From: Jan Vcelak Date: Fri, 22 Jun 2012 07:41:18 +0000 (+0200) Subject: ITS#7316 MozNSS: do not retry when reading the pin from file X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2db51956502a28e8de8e95abbdeda7a0b2390046;p=openldap ITS#7316 MozNSS: do not retry when reading the pin from file Avoid infinite loop if the pin in the password file is wrong. --- diff --git a/libraries/libldap/tls_m.c b/libraries/libldap/tls_m.c index e5b426e0ac..4b5727bd03 100644 --- a/libraries/libldap/tls_m.c +++ b/libraries/libldap/tls_m.c @@ -903,6 +903,8 @@ tlsm_get_pin(PK11SlotInfo *slot, PRBool retry, tlsm_ctx *ctx) */ if ( ctx->tc_pin_file ) { pwdstr = tlsm_get_pin_from_file( token_name, ctx ); + if (retry && pwdstr != NULL) + return NULL; } #endif /* RETRIEVE_PASSWORD_FROM_FILE */ #ifdef READ_PASSWORD_FROM_STDIN