fixed wrong text of prompt for secret
git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@190 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
@@ -924,7 +924,7 @@ perform_PC_to_RDR_Secure(const __u8 *in, size_t inlen, __u8** out, size_t *outle
|
||||
if (verify) {
|
||||
if (0 > EVP_read_pw_string_min((char *) curr_pin.data,
|
||||
curr_pin.min_length, curr_pin.max_length,
|
||||
"Please enter your PIN for verification",
|
||||
"Please enter your PIN for verification: ",
|
||||
0)) {
|
||||
sc_result = SC_ERROR_INTERNAL;
|
||||
sc_error(ctx, "Could not read PIN.\n");
|
||||
@@ -935,7 +935,7 @@ perform_PC_to_RDR_Secure(const __u8 *in, size_t inlen, __u8** out, size_t *outle
|
||||
/* if only the new pin is requested, it is stored in curr_pin */
|
||||
if (0 > EVP_read_pw_string_min((char *) curr_pin.data,
|
||||
curr_pin.min_length, curr_pin.max_length,
|
||||
"Please enter your current PIN for modification",
|
||||
"Please enter your current PIN for modification: ",
|
||||
0)) {
|
||||
sc_result = SC_ERROR_INTERNAL;
|
||||
sc_error(ctx, "Could not read current PIN.\n");
|
||||
@@ -945,7 +945,7 @@ perform_PC_to_RDR_Secure(const __u8 *in, size_t inlen, __u8** out, size_t *outle
|
||||
|
||||
if (0 > EVP_read_pw_string_min((char *) new_pin.data,
|
||||
new_pin.min_length, new_pin.max_length,
|
||||
"Please enter your new PIN for modification",
|
||||
"Please enter your new PIN for modification: ",
|
||||
modify->bConfirmPIN & CCID_PIN_CONFIRM_NEW)) {
|
||||
sc_result = SC_ERROR_INTERNAL;
|
||||
sc_error(ctx, "Could not read new PIN.\n");
|
||||
|
||||
@@ -602,7 +602,7 @@ pace_reset_retry_counter(struct sm_ctx *ctx, sc_card_t *card,
|
||||
}
|
||||
if (0 > EVP_read_pw_string_min(p,
|
||||
MIN_PIN_LEN, MAX_PIN_LEN+1,
|
||||
"Please enter your new PIN for modification", 0)) {
|
||||
"Please enter your new PIN: ", 0)) {
|
||||
sc_error(card->ctx, "Could not read new PIN.\n");
|
||||
free(p);
|
||||
return SC_ERROR_INTERNAL;
|
||||
@@ -643,10 +643,10 @@ get_psec(sc_card_t *card, const char *pin, size_t length_pin, enum s_type pin_id
|
||||
char *p = NULL;
|
||||
PACE_SEC *r;
|
||||
int sc_result;
|
||||
char buf[32]; /* XXX max size of mrz */
|
||||
char buf[MAX_MRZ_LEN > 32 ? MAX_MRZ_LEN : 32];
|
||||
|
||||
if (!length_pin || !pin) {
|
||||
if (0 > snprintf(buf, sizeof buf, "Please enter your %s",
|
||||
if (0 > snprintf(buf, sizeof buf, "Please enter your %s: ",
|
||||
pace_secret_name(pin_id))) {
|
||||
sc_error(card->ctx, "Could not create password prompt.\n");
|
||||
return NULL;
|
||||
@@ -657,9 +657,8 @@ get_psec(sc_card_t *card, const char *pin, size_t length_pin, enum s_type pin_id
|
||||
pace_secret_name(pin_id));
|
||||
return NULL;
|
||||
}
|
||||
if (0 > EVP_read_pw_string_min(p, 0, MAX_MRZ_LEN,
|
||||
"Please enter your new PIN for modification", 0)) {
|
||||
sc_error(card->ctx, "Could not read %s (%s).\n",
|
||||
if (0 > EVP_read_pw_string_min(p, 0, MAX_MRZ_LEN, buf, 0)) {
|
||||
sc_error(card->ctx, "Could not read %s.\n",
|
||||
pace_secret_name(pin_id));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user