diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-05-22 15:13:20 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-06-03 19:52:33 +0200 |
commit | f1bbe2d1fec833323d7e8fe32c50736aec398751 (patch) | |
tree | a163297edfe1e1e0441748d0cb8aa53ca07daaeb /src/pkcs11.c | |
parent | 0daa4508750f85feb72818b1a246d599873bde53 (diff) | |
download | gnutls-f1bbe2d1fec833323d7e8fe32c50736aec398751.tar.gz |
Added gnutls_pubkey_t abstract type to handle public keys. It can currently
import/export public keys from existing certificate types as well as from PKCS #11
URL. This allows generating a certificate or certificate request from a given public key
(currently one could only generate them from a given private key).
PKCS#11 API augmented to allow reading arbitrary objects instead of just certificates.
Certtool updated to list those objects.
Diffstat (limited to 'src/pkcs11.c')
-rw-r--r-- | src/pkcs11.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pkcs11.c b/src/pkcs11.c index 55d246b0e0..c22d8bc8e4 100644 --- a/src/pkcs11.c +++ b/src/pkcs11.c @@ -355,13 +355,13 @@ size_t size; if (url == NULL) url = "pkcs11:"; - ret = gnutls_pkcs11_crt_init(&crt); + ret = gnutls_pkcs11_obj_init(&crt); if (ret < 0) { fprintf(stderr, "Error in %s:%d: %s\n", __func__, __LINE__, gnutls_strerror(ret)); exit(1); } - ret = gnutls_pkcs11_crt_import_url( crt, url); + ret = gnutls_pkcs11_obj_import_url( crt, url); if (ret < 0) { fprintf(stderr, "Error in %s:%d: %s\n", __func__, __LINE__, gnutls_strerror(ret)); exit(1); @@ -389,7 +389,7 @@ size_t size; fputs("\n\n", outfile); gnutls_x509_crt_deinit(xcrt); - gnutls_pkcs11_crt_deinit(crt); + gnutls_pkcs11_obj_deinit(crt); return; |