[pkg-opensc-commit] [libp11] 99/239: kill warnings / make functions static.

Eric Dorland eric at moszumanska.debian.org
Sat Oct 17 06:21:13 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 85b40f94b141e349fb763856456ef76b6d85c1a5
Author: Andreas Jellinghaus <andreas at ionisiert.de>
Date:   Fri Jun 29 13:40:00 2007 +0000

    kill warnings / make functions static.
---
 src/libp11.h   | 15 ++++++++++++++-
 src/p11_cert.c | 11 +++++------
 2 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/src/libp11.h b/src/libp11.h
index cb2719b..d68e60a 100644
--- a/src/libp11.h
+++ b/src/libp11.h
@@ -286,7 +286,7 @@ extern int PKCS11_change_pin(PKCS11_SLOT * slot, const char *old_pin,
 
 extern int PKCS11_generate_key(PKCS11_TOKEN * token, int algorithm, unsigned int bits, char *label, unsigned char* id, unsigned int id_len);
 
-/** 
+/* 
  * Store private key on a token
  *
  * @param token token returned by PKCS11_find_token()
@@ -299,7 +299,20 @@ extern int PKCS11_generate_key(PKCS11_TOKEN * token, int algorithm, unsigned int
  */
 extern int PKCS11_store_private_key(PKCS11_TOKEN * token, EVP_PKEY * pk, char *label, unsigned char *id, unsigned int id_len);
 
+ 
+ * Store public key on a token
+ *
+ * @param token token returned by PKCS11_find_token()
+ * @param pk private key
+ * @param label label for this key
+ * @param id bytes to use as id value
+ * @param id_len length of id value.
+ * @retval 0 success
+ * @retval -1 error
+ */
+extern int PKCS11_store_public_key(PKCS11_TOKEN * token, EVP_PKEY * pk, char *label, unsigned char *id, unsigned int id_len);
 
+*
 /** 
  * Store certificate on a token
  *
diff --git a/src/p11_cert.c b/src/p11_cert.c
index efbeba7..6d77213 100644
--- a/src/p11_cert.c
+++ b/src/p11_cert.c
@@ -83,7 +83,7 @@ PKCS11_CERT *PKCS11_find_certificate(PKCS11_KEY * key)
 /*
  * Find all certs of a given type (public or private)
  */
-int pkcs11_find_certs(PKCS11_TOKEN * token)
+static int pkcs11_find_certs(PKCS11_TOKEN * token)
 {
 	PKCS11_SLOT *slot = TOKEN2SLOT(token);
 	PKCS11_CTX *ctx = TOKEN2CTX(token);
@@ -109,8 +109,8 @@ int pkcs11_find_certs(PKCS11_TOKEN * token)
 	return (res < 0) ? -1 : 0;
 }
 
-int
-pkcs11_next_cert(PKCS11_CTX * ctx, PKCS11_TOKEN * token, CK_SESSION_HANDLE session)
+static int pkcs11_next_cert(PKCS11_CTX * ctx, PKCS11_TOKEN * token,
+		CK_SESSION_HANDLE session)
 {
 	CK_OBJECT_HANDLE obj;
 	CK_ULONG count;
@@ -129,9 +129,8 @@ pkcs11_next_cert(PKCS11_CTX * ctx, PKCS11_TOKEN * token, CK_SESSION_HANDLE sessi
 	return 0;
 }
 
-int
-pkcs11_init_cert(PKCS11_CTX * ctx, PKCS11_TOKEN * token,
-		 CK_SESSION_HANDLE session, CK_OBJECT_HANDLE obj, PKCS11_CERT ** ret)
+static int pkcs11_init_cert(PKCS11_CTX * ctx, PKCS11_TOKEN * token,
+	 CK_SESSION_HANDLE session, CK_OBJECT_HANDLE obj, PKCS11_CERT ** ret)
 {
 	PKCS11_TOKEN_private *tpriv;
 	PKCS11_CERT_private *kpriv;

-- 
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