This option allows passing parameters to the PKCS#11 module
loading process, i.e., passed to gnutls_pkcs11_add_provider().
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
doc = "This will override the default options in /etc/gnutls/pkcs11.conf";
};
+flag = {
+ name = provider-opts;
+ arg-type = string;
+ descrip = "Specify parameters for the PKCS #11 provider library";
+ doc = "This is a PKCS#11 internal option used by few modules.
+ Mainly for testing PKCS#11 modules.";
+};
+
flag = {
name = detailed-url;
descrip = "Print detailed URLs";
}
if (HAVE_OPT(PROVIDER)) {
+ const char *params = NULL;
+
+ if (HAVE_OPT(PROVIDER_OPTS))
+ params = OPT_ARG(PROVIDER_OPTS);
+
ret = gnutls_pkcs11_init(GNUTLS_PKCS11_FLAG_MANUAL, NULL);
if (ret < 0)
fprintf(stderr, "pkcs11_init: %s\n",
else {
ret =
gnutls_pkcs11_add_provider(OPT_ARG(PROVIDER),
- NULL);
+ params);
if (ret < 0) {
fprintf(stderr, "pkcs11_add_provider: %s\n",
gnutls_strerror(ret));