diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-10-13 16:48:52 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-10-13 16:48:52 +0200 |
commit | 414081b3f7ac86d1f3c2d4b26fca11650d60914a (patch) | |
tree | bd9e0ac4529dfc7d4628dc285ecf06fa7d32b7b5 | |
parent | 4e43cbcf2b9e245973e12d7d17294e67d0d6834a (diff) | |
download | gnutls-414081b3f7ac86d1f3c2d4b26fca11650d60914a.tar.gz |
p11tool: avoid asking the security officer PIN twice on initialization
-rw-r--r-- | src/pkcs11.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pkcs11.c b/src/pkcs11.c index 77002b9ee8..7334118252 100644 --- a/src/pkcs11.c +++ b/src/pkcs11.c @@ -914,6 +914,9 @@ pkcs11_init(FILE * outfile, const char *url, const char *label, if (pin == NULL || pin[0] == '\n') exit(1); + /* do not ask the SO PIN twice */ + setenv("GNUTLS_SO_PIN", so_pin, 0); + ret = gnutls_pkcs11_token_set_pin(url, NULL, pin, GNUTLS_PIN_USER); if (ret < 0) { fprintf(stderr, "Error in %s:%d: %s\n", __func__, __LINE__, |