diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-09-19 10:40:14 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-09-19 10:51:55 +0200 |
commit | 8a35aa03cab2c54e1f9133ff0a3effadc4c6494e (patch) | |
tree | 01868d9bf4e0417a89862b6281c89a63258b5a8a /src/serv.c | |
parent | 931349570084744101883dec704cbd6752434d6d (diff) | |
download | gnutls-8a35aa03cab2c54e1f9133ff0a3effadc4c6494e.tar.gz |
gnutls-serv: added the --provider option
Diffstat (limited to 'src/serv.c')
-rw-r--r-- | src/serv.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/serv.c b/src/serv.c index de03c4ee1c..74dd1af2a9 100644 --- a/src/serv.c +++ b/src/serv.c @@ -951,6 +951,22 @@ int main(int argc, char **argv) exit(1); } #ifdef ENABLE_PKCS11 + if (HAVE_OPT(PROVIDER)) { + ret = gnutls_pkcs11_init(GNUTLS_PKCS11_FLAG_MANUAL, NULL); + if (ret < 0) + fprintf(stderr, "pkcs11_init: %s", + gnutls_strerror(ret)); + else { + ret = + gnutls_pkcs11_add_provider(OPT_ARG(PROVIDER), + NULL); + if (ret < 0) { + fprintf(stderr, "pkcs11_add_provider: %s", + gnutls_strerror(ret)); + exit(1); + } + } + } pkcs11_common(NULL); #endif |