From 2db51956502a28e8de8e95abbdeda7a0b2390046 Mon Sep 17 00:00:00 2001 From: Jan Vcelak Date: Fri, 22 Jun 2012 09:41:18 +0200 Subject: [PATCH] ITS#7316 MozNSS: do not retry when reading the pin from file Avoid infinite loop if the pin in the password file is wrong. --- libraries/libldap/tls_m.c | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.39.5