[pkg-opensc-commit] [libp11] 72/239: add function to store certificates.
Eric Dorland
eric at moszumanska.debian.org
Sat Oct 17 06:21:10 UTC 2015
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository libp11.
commit a8c1bb9ee0990345dfa2a1ac6d96b90a284c3e8d
Author: Andreas Jellinghaus <andreas at ionisiert.de>
Date: Sun Oct 30 15:27:55 2005 +0000
add function to store certificates.
---
src/libp11.h | 16 ++++++++++++++++
src/p11_cert.c | 5 +----
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/src/libp11.h b/src/libp11.h
index 4f7a672..070b399 100644
--- a/src/libp11.h
+++ b/src/libp11.h
@@ -273,6 +273,22 @@ extern int PKCS11_change_pin(PKCS11_SLOT * slot, const char *old_pin,
extern int PKCS11_generate_key(PKCS11_TOKEN *, int, unsigned int, char *);
extern int PKCS11_store_private_key(PKCS11_TOKEN *, EVP_PKEY *, char *);
+/**
+ * Store certificate on a token
+ *
+ * @param token token returned by PKCS11_find_token()
+ * @param x509 x509 certificate object
+ * @param label label for this certificate
+ * @param id bytes to use as id value
+ * @param id_len length of id value.
+ * @param ret_cert put new PKCS11_CERT object here
+ * @return 0 success
+ * @return -1 error
+ */
+extern int PKCS11_store_certificate(PKCS11_TOKEN * token, X509 * x509,
+ char *label, unsigned char *id, unsigned int id_len,
+ PKCS11_CERT **ret_cert);
+
/* rsa private key operations */
extern int PKCS11_sign(int type, const unsigned char *m, unsigned int m_len,
unsigned char *sigret, unsigned int *siglen, const PKCS11_KEY * key);
diff --git a/src/p11_cert.c b/src/p11_cert.c
index 02c945a..1f8e708 100644
--- a/src/p11_cert.c
+++ b/src/p11_cert.c
@@ -30,9 +30,6 @@ static int pkcs11_next_cert(PKCS11_CTX *, PKCS11_TOKEN *, CK_SESSION_HANDLE);
static int pkcs11_init_cert(PKCS11_CTX * ctx, PKCS11_TOKEN * token,
CK_SESSION_HANDLE session, CK_OBJECT_HANDLE o,
PKCS11_CERT **);
-static int pkcs11_store_certificate(PKCS11_TOKEN *, X509 *,
- char *, unsigned char *, unsigned int,
- PKCS11_CERT **);
static CK_OBJECT_CLASS cert_search_class;
static CK_ATTRIBUTE cert_search_attrs[] = {
@@ -221,7 +218,7 @@ void pkcs11_destroy_certs(PKCS11_TOKEN * token)
* Store certificate
*/
int
-pkcs11_store_certificate(PKCS11_TOKEN * token, X509 * x509, char *label,
+PKCS11_store_certificate(PKCS11_TOKEN * token, X509 * x509, char *label,
unsigned char *id, unsigned int id_len,
PKCS11_CERT ** ret_cert)
{
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/libp11.git
More information about the pkg-opensc-commit
mailing list