]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
tools: when in batch mode and no PIN, print a note about using the environment variables
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Wed, 2 Jul 2014 13:49:36 +0000 (15:49 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Wed, 2 Jul 2014 13:49:36 +0000 (15:49 +0200)
src/common.c

index db9d18829efec3fc7b6d4b422913fe221956f306..7f7ef675fbd7a70cf37ff4f676600e23d43848c1 100644 (file)
@@ -1043,7 +1043,10 @@ pin_callback(void *user, int attempt, const char *token_url,
        }
 
        if (password == NULL || password[0] == 0 || password[0] == '\n') {
-               fprintf(stderr, "No PIN given\n");
+               fprintf(stderr, "No PIN given.\n");
+               if (info != NULL && info->batch != 0) {
+                       fprintf(stderr, "note: when operating in batch mode, set the GNUTLS_PIN or GNUTLS_SO_PIN environment variables\n");
+               }
                exit(1);
        }