summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2010-12-02 16:14:18 +0100
committerMiloslav Trmač <mitr@redhat.com>2010-12-02 16:14:18 +0100
commit81de29993fdecd28a749411969e30eb3d536c36a (patch)
tree2830a7cd5d4ae9228b113242f788d3d0dc92136b
parent2097b0ddb78190344f5b2d7e0affd6c02dce3fa5 (diff)
parentf1ccfac037766fe7f3db33640fcdca3ba496aeaf (diff)
downloadncrypto-81de29993fdecd28a749411969e30eb3d536c36a.tar.gz
ncrypto-81de29993fdecd28a749411969e30eb3d536c36a.tar.xz
ncrypto-81de29993fdecd28a749411969e30eb3d536c36a.zip
Merge branch 'local'
-rw-r--r--include/ncrypto/ncrypto.h6
-rw-r--r--lib/ncrypto_nss.c24
2 files changed, 2 insertions, 28 deletions
diff --git a/include/ncrypto/ncrypto.h b/include/ncrypto/ncrypto.h
index ff20d8c..329d12a 100644
--- a/include/ncrypto/ncrypto.h
+++ b/include/ncrypto/ncrypto.h
@@ -77,12 +77,10 @@ CK_RV ncr_public_key_create (struct ncr_public_key **key, const void *der,
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);
+
/* The PKCS#8 privateKeyInfo structure is used for private keys. "Sensitive"
corresponds to CKA_SENSITIVE. */
-CK_RV ncr_private_key_create (struct ncr_private_key **key, CK_KEY_TYPE type,
- _Bool sensitive, const void *der, size_t der_size,
- const void *public_value,
- size_t public_value_size);
+/* Use algorithm-specific ncr_private_key_create_* for key creation. */
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);
diff --git a/lib/ncrypto_nss.c b/lib/ncrypto_nss.c
index 46716ea..6207149 100644
--- a/lib/ncrypto_nss.c
+++ b/lib/ncrypto_nss.c
@@ -518,30 +518,6 @@ private_key_export_components (struct ncr_private_key *key, PRArenaPool *arena,
return CKR_OK;
}
-/* FIXME: public_value should not be necessary, it is somewhere inside "der". */
-CK_RV
-ncr_private_key_create (struct ncr_private_key **key, CK_KEY_TYPE type,
- _Bool sensitive, const void *der, size_t der_size,
- const void *public_value, size_t public_value_size)
-{
- SECItem der_key;
- SECItem public;
- CK_RV res;
-
- res = ensure_ncr_is_open ();
- if (res != CKR_OK)
- return res;
-
- g_return_val_if_fail (key != NULL, CKR_ARGUMENTS_BAD);
- g_return_val_if_fail (der != NULL, CKR_ARGUMENTS_BAD);
-
- der_key.data = (void *)der;
- der_key.len = der_size;
- public.data = (void *)public_value;
- public.len = public_value_size;
- return private_key_create (key, type, sensitive, &der_key, &public);
-}
-
CK_RV
ncr_private_key_set_sensitive (struct ncr_private_key *key)
{