From: Nikos Mavrogiannopoulos Date: Wed, 2 Jul 2014 13:49:36 +0000 (+0200) Subject: tools: when in batch mode and no PIN, print a note about using the environment variables X-Git-Tag: gnutls_3_3_6~72 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=dfe94979b7e53e1d953fb6095596dbe38079b11e;p=thirdparty%2Fgnutls.git tools: when in batch mode and no PIN, print a note about using the environment variables --- diff --git a/src/common.c b/src/common.c index db9d18829e..7f7ef675fb 100644 --- a/src/common.c +++ b/src/common.c @@ -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); }