]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
p11tool: print the module name of a token in verbose mode
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Fri, 10 Jul 2015 14:25:48 +0000 (16:25 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Fri, 10 Jul 2015 14:25:48 +0000 (16:25 +0200)
src/pkcs11.c

index a77ac68cf1f388cfac336a84bdfddc68f4b6f79f..ab2de9e9bdafb5f3e755a8eb8561bfc445e8342b 100644 (file)
@@ -610,6 +610,15 @@ pkcs11_token_list(FILE * outfile, unsigned int detailed,
                }
 
                fprintf(outfile, "\tSerial: %s\n", buf);
+
+               size = sizeof(buf);
+               ret =
+                   gnutls_pkcs11_token_get_info(url,
+                                                GNUTLS_PKCS11_TOKEN_MODNAME,
+                                                buf, &size);
+               if (ret >= 0) {
+                       fprintf(outfile, "\tModule: %s\n", buf);
+               }
                fprintf(outfile, "\n\n");
  cont:
                gnutls_free(url);