summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/common.c b/src/common.c
index 15376d4b05..df2b431423 100644
--- a/src/common.c
+++ b/src/common.c
@@ -1057,17 +1057,19 @@ pin_callback(void *user, int attempt, const char *token_url,
}
}
- printf("Token '%s' with URL '%s' ", token_label, token_url);
- printf("requires %s PIN\n", desc);
-
password = getenv(env);
if (password == NULL) /* compatibility */
password = getenv("GNUTLS_PIN");
if (password == NULL && (info == NULL || info->batch == 0)) {
+ fprintf(stderr, "Token '%s' with URL '%s' ", token_label, token_url);
+ fprintf(stderr, "requires %s PIN\n", desc);
+
password = getpass("Enter PIN: ");
} else {
if (flags & GNUTLS_PIN_WRONG) {
+ fprintf(stderr, "Token '%s' with URL '%s' ", token_label, token_url);
+ fprintf(stderr, "requires %s PIN\n", desc);
fprintf(stderr, "Cannot continue with a wrong password in the environment.\n");
exit(1);
}