diff options
author | Miloslav Trmač <mitr@redhat.com> | 2010-11-25 23:11:03 +0100 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2010-11-25 23:11:03 +0100 |
commit | 6e919f9347656ba0ae390038679ac942ad6a9964 (patch) | |
tree | 5e2516afc1648b345b35e5542e31889c5cf9a779 /include/ncrypto/ncrypto.h | |
parent | e4dee3eb1f10e14dd63c7ed6e20d718c5f2d56a3 (diff) | |
download | ncrypto-6e919f9347656ba0ae390038679ac942ad6a9964.tar.gz ncrypto-6e919f9347656ba0ae390038679ac942ad6a9964.tar.xz ncrypto-6e919f9347656ba0ae390038679ac942ad6a9964.zip |
Add private key extraction support
Diffstat (limited to 'include/ncrypto/ncrypto.h')
-rw-r--r-- | include/ncrypto/ncrypto.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/ncrypto/ncrypto.h b/include/ncrypto/ncrypto.h index 9f5a3f4..47ca5df 100644 --- a/include/ncrypto/ncrypto.h +++ b/include/ncrypto/ncrypto.h @@ -76,10 +76,14 @@ CK_RV ncr_public_key_create (struct ncr_public_key **key, CK_KEY_TYPE type, CK_RV ncr_public_key_export (struct ncr_public_key *key, void *dest, size_t *dest_size_ptr); CK_RV ncr_public_key_destroy (struct ncr_public_key *key); +/* "Sensitive" corresponds to CKA_SENSITIVE. */ CK_RV ncr_private_key_create (struct ncr_private_key **key, CK_KEY_TYPE type, - const void *der, size_t der_size, + _Bool sensitive, const void *der, size_t der_size, const void *public_value, size_t public_value_size); +CK_RV ncr_private_key_set_sensitive (struct ncr_private_key *key); +CK_RV ncr_private_key_export (struct ncr_private_key *key, void *dest, + size_t *dest_size_ptr); CK_RV ncr_private_key_destroy (struct ncr_private_key *key); /* RSA keys */ @@ -92,7 +96,7 @@ CK_RV ncr_public_key_export_rsa (struct ncr_public_key *key, void *modulus, size_t *modulus_size_ptr, void *public_exponent, size_t *public_exponent_size_ptr); -CK_RV ncr_private_key_create_rsa (struct ncr_private_key **key, +CK_RV ncr_private_key_create_rsa (struct ncr_private_key **key, _Bool sensitive, const void *modulus, size_t modulus_size, const void *public_exponent, size_t public_exponent_size, |