]> git.sur5r.net Git - openldap/commitdiff
ITS#7316 MozNSS: do not retry when reading the pin from file
authorJan Vcelak <jvcelak@redhat.com>
Fri, 22 Jun 2012 07:41:18 +0000 (09:41 +0200)
committerHoward Chu <hyc@openldap.org>
Tue, 26 Jun 2012 13:47:48 +0000 (06:47 -0700)
Avoid infinite loop if the pin in the password file is wrong.

libraries/libldap/tls_m.c

index e5b426e0ac08b7a2e4bd3a7de8a54df0ef0c4c6c..4b5727bd03361bbc77af46d3dbb9c4bb38aca42c 100644 (file)
@@ -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