]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
documented pin_callback expectations.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 8 Jun 2012 07:20:32 +0000 (09:20 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 8 Jun 2012 07:20:32 +0000 (09:20 +0200)
doc/examples/ex-cert-select-pkcs11.c

index e8cb21e367ae40ce36a2c13009b39f9892295221..83c2e64c9f5d9a05f4f914753647281b61ab92ad 100644 (file)
@@ -46,6 +46,11 @@ pin_callback (void *user, int attempt, const char *token_url,
 {
   const char *password;
   int len;
+  
+  /* Note that a PIN callback may be called multiple times during a
+   * session. It is expected to cache and return the same PIN for
+   * the same token_url, unless flags is set to GNUTLS_PKCS11_PIN_WRONG.
+   */
 
   printf ("PIN required for token '%s' with URL '%s'\n", token_label,
           token_url);