summaryrefslogtreecommitdiff
path: root/lib/includes/gnutls/pkcs11.h
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2015-03-30 16:12:27 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2015-03-30 16:12:27 +0200
commit453825acef6cad5724e3e9e2c5b42252319522ce (patch)
tree81f7dd278d88d57fdca1acb3d33f723ad9243eac /lib/includes/gnutls/pkcs11.h
parent02298ec3070b5b0c84efcbf534777ab39187de89 (diff)
downloadgnutls-453825acef6cad5724e3e9e2c5b42252319522ce.tar.gz
enhanced copy functions to allow specifying a CKA_ID
Diffstat (limited to 'lib/includes/gnutls/pkcs11.h')
-rw-r--r--lib/includes/gnutls/pkcs11.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/includes/gnutls/pkcs11.h b/lib/includes/gnutls/pkcs11.h
index b68b92459f..9280181dbf 100644
--- a/lib/includes/gnutls/pkcs11.h
+++ b/lib/includes/gnutls/pkcs11.h
@@ -196,13 +196,21 @@ int gnutls_pkcs11_get_raw_issuer_by_dn (const char *url, const gnutls_datum_t *d
int gnutls_pkcs11_crt_is_known(const char *url, gnutls_x509_crt_t cert,
unsigned int flags);
-int gnutls_pkcs11_copy_x509_crt(const char *token_url,
+#define gnutls_pkcs11_copy_x509_crt(url, crt, label, flags) \
+ gnutls_pkcs11_copy_x509_crt2(url, crt, label, NULL, flags)
+
+int gnutls_pkcs11_copy_x509_crt2(const char *token_url,
gnutls_x509_crt_t crt,
- const char *label, unsigned int flags
- /* GNUTLS_PKCS11_OBJ_FLAG_* */ );
-int gnutls_pkcs11_copy_x509_privkey(const char *token_url,
+ const char *label,
+ const gnutls_datum_t *id,
+ unsigned int flags /* GNUTLS_PKCS11_OBJ_FLAG_* */);
+
+#define gnutls_pkcs11_copy_x509_privkey(url, key, label, usage, flags) \
+ gnutls_pkcs11_copy_x509_privkey2(url, key, label, NULL, usage, flags)
+int gnutls_pkcs11_copy_x509_privkey2(const char *token_url,
gnutls_x509_privkey_t key,
const char *label,
+ const gnutls_datum_t *cid,
unsigned int key_usage
/*GNUTLS_KEY_* */ ,
unsigned int flags