[rs-commit] r71 - /redwax-tool/trunk/redwax_p11kit.c

rs-commit at redwax.eu rs-commit at redwax.eu
Wed Nov 24 19:23:01 CET 2021


Author: minfrin at redwax.eu
Date: Wed Nov 24 19:23:01 2021
New Revision: 71

Log:
If the maximum length of a PIN is zero, don't try to log in.

Modified:
    redwax-tool/trunk/redwax_p11kit.c

Modified: redwax-tool/trunk/redwax_p11kit.c
==============================================================================
--- redwax-tool/trunk/redwax_p11kit.c	(original)
+++ redwax-tool/trunk/redwax_p11kit.c	Wed Nov 24 19:23:01 2021
@@ -862,6 +862,11 @@
 
             int len;
 
+            if (max <= 0) {
+                /* maximum length says no password allowed */
+                break;
+            }
+
             status = apr_password_get(prompt, buf, &max);
             if (APR_ENAMETOOLONG == status) {
                 redwax_print_error(r,



More information about the rs-commit mailing list