forked from pool/libp11
This commit is contained in:
parent
16f3ba1cb4
commit
fbb765f851
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:82727e24018eb93280476a4c8f61f4dd24f62584a1f36faf839decfb422bbc6c
|
|
||||||
size 306885
|
|
3
libp11-0.2.6.tar.bz2
Normal file
3
libp11-0.2.6.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:0f741d6ee6abc786bb5309728d53e09b17053ce36e84fd6e1dba9a89948da3ef
|
||||||
|
size 296484
|
@ -1,22 +0,0 @@
|
|||||||
--- src/libp11.h
|
|
||||||
+++ src/libp11.h
|
|
||||||
@@ -112,7 +112,7 @@
|
|
||||||
*
|
|
||||||
* @return none
|
|
||||||
*/
|
|
||||||
-extern void *PKCS11_CTX_init_args(PKCS11_CTX * ctx, const char * init_args);
|
|
||||||
+extern void PKCS11_CTX_init_args(PKCS11_CTX * ctx, const char * init_args);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Load a PKCS#11 module
|
|
||||||
--- src/p11_load.c
|
|
||||||
+++ src/p11_load.c
|
|
||||||
@@ -43,7 +43,7 @@
|
|
||||||
/*
|
|
||||||
* Set private init args for module
|
|
||||||
*/
|
|
||||||
-void *PKCS11_CTX_init_args(PKCS11_CTX * ctx, const char *init_args)
|
|
||||||
+void PKCS11_CTX_init_args(PKCS11_CTX * ctx, const char *init_args)
|
|
||||||
{
|
|
||||||
PKCS11_CTX_private *priv = PRIVCTX(ctx);
|
|
||||||
priv->init_args = init_args ? strdup(init_args) : NULL;
|
|
@ -1,15 +0,0 @@
|
|||||||
--- configure.ac
|
|
||||||
+++ configure.ac
|
|
||||||
@@ -20,9 +20,9 @@
|
|
||||||
# (Code changed: REVISION++)
|
|
||||||
# (Oldest interface removed: OLDEST++)
|
|
||||||
# (Interfaces added: CURRENT++, REVISION=0)
|
|
||||||
-LIBP11_LT_CURRENT="1"
|
|
||||||
-LIBP11_LT_OLDEST="0"
|
|
||||||
-LIBP11_LT_REVISION="2"
|
|
||||||
+LIBP11_LT_CURRENT="2"
|
|
||||||
+LIBP11_LT_OLDEST="1"
|
|
||||||
+LIBP11_LT_REVISION="0"
|
|
||||||
LIBP11_LT_AGE="$((${LIBP11_LT_CURRENT}-${LIBP11_LT_OLDEST}))"
|
|
||||||
|
|
||||||
AC_CONFIG_SRCDIR([src/libp11.h])
|
|
@ -1,154 +0,0 @@
|
|||||||
--- src/libp11.h
|
|
||||||
+++ src/libp11.h
|
|
||||||
@@ -53,7 +53,7 @@
|
|
||||||
typedef struct PKCS11_key_st {
|
|
||||||
char *label;
|
|
||||||
unsigned char *id;
|
|
||||||
- int id_len;
|
|
||||||
+ size_t id_len;
|
|
||||||
unsigned char isPrivate; /**< private key present? */
|
|
||||||
unsigned char needLogin; /**< login to read private key? */
|
|
||||||
EVP_PKEY *evp_key; /**< initially NULL, need to call PKCS11_load_key */
|
|
||||||
@@ -64,7 +64,7 @@
|
|
||||||
typedef struct PKCS11_cert_st {
|
|
||||||
char *label;
|
|
||||||
unsigned char *id;
|
|
||||||
- int id_len;
|
|
||||||
+ size_t id_len;
|
|
||||||
X509 *x509;
|
|
||||||
void *_private;
|
|
||||||
} PKCS11_CERT;
|
|
||||||
@@ -291,7 +291,7 @@
|
|
||||||
* @retval -1 error
|
|
||||||
*/
|
|
||||||
|
|
||||||
-extern int PKCS11_generate_key(PKCS11_TOKEN * token, int algorithm, unsigned int bits, char *label, unsigned char* id, unsigned int id_len);
|
|
||||||
+extern int PKCS11_generate_key(PKCS11_TOKEN * token, int algorithm, unsigned int bits, char *label, unsigned char* id, size_t id_len);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Store private key on a token
|
|
||||||
@@ -304,7 +304,7 @@
|
|
||||||
* @retval 0 success
|
|
||||||
* @retval -1 error
|
|
||||||
*/
|
|
||||||
-extern int PKCS11_store_private_key(PKCS11_TOKEN * token, EVP_PKEY * pk, char *label, unsigned char *id, unsigned int id_len);
|
|
||||||
+extern int PKCS11_store_private_key(PKCS11_TOKEN * token, EVP_PKEY * pk, char *label, unsigned char *id, size_t id_len);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Store public key on a token
|
|
||||||
@@ -317,7 +317,7 @@
|
|
||||||
* @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);
|
|
||||||
+extern int PKCS11_store_public_key(PKCS11_TOKEN * token, EVP_PKEY * pk, char *label, unsigned char *id, size_t id_len);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Store certificate on a token
|
|
||||||
@@ -332,7 +332,7 @@
|
|
||||||
* @retval -1 error
|
|
||||||
*/
|
|
||||||
extern int PKCS11_store_certificate(PKCS11_TOKEN * token, X509 * x509,
|
|
||||||
- char *label, unsigned char *id, unsigned int id_len,
|
|
||||||
+ char *label, unsigned char *id, size_t id_len,
|
|
||||||
PKCS11_CERT **ret_cert);
|
|
||||||
|
|
||||||
/* rsa private key operations */
|
|
||||||
--- src/p11_cert.c
|
|
||||||
+++ src/p11_cert.c
|
|
||||||
@@ -174,7 +174,7 @@
|
|
||||||
cert->x509 = d2i_X509(NULL, &p, size);
|
|
||||||
}
|
|
||||||
cert->id_len = sizeof(id);
|
|
||||||
- if (!pkcs11_getattr_var(token, obj, CKA_ID, id, (size_t *) & cert->id_len)) {
|
|
||||||
+ if (!pkcs11_getattr_var(token, obj, CKA_ID, id, &cert->id_len)) {
|
|
||||||
cert->id = (unsigned char *) malloc(cert->id_len);
|
|
||||||
memcpy(cert->id, id, cert->id_len);
|
|
||||||
}
|
|
||||||
@@ -219,7 +219,7 @@
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
PKCS11_store_certificate(PKCS11_TOKEN * token, X509 * x509, char *label,
|
|
||||||
- unsigned char *id, unsigned int id_len,
|
|
||||||
+ unsigned char *id, size_t id_len,
|
|
||||||
PKCS11_CERT ** ret_cert)
|
|
||||||
{
|
|
||||||
PKCS11_SLOT *slot = TOKEN2SLOT(token);
|
|
||||||
--- src/p11_key.c
|
|
||||||
+++ src/p11_key.c
|
|
||||||
@@ -31,9 +31,9 @@
|
|
||||||
CK_SESSION_HANDLE session, CK_OBJECT_HANDLE o,
|
|
||||||
CK_OBJECT_CLASS type, PKCS11_KEY **);
|
|
||||||
static int pkcs11_store_private_key(PKCS11_TOKEN *, EVP_PKEY *, char *,
|
|
||||||
- unsigned char *, unsigned int, PKCS11_KEY **);
|
|
||||||
+ unsigned char *, size_t, PKCS11_KEY **);
|
|
||||||
static int pkcs11_store_public_key(PKCS11_TOKEN *, EVP_PKEY *, char *,
|
|
||||||
- unsigned char *, unsigned int, PKCS11_KEY **);
|
|
||||||
+ unsigned char *, size_t, PKCS11_KEY **);
|
|
||||||
|
|
||||||
static CK_OBJECT_CLASS key_search_class;
|
|
||||||
static CK_ATTRIBUTE key_search_attrs[] = {
|
|
||||||
@@ -93,14 +93,14 @@
|
|
||||||
/*
|
|
||||||
* Store a private key on the token
|
|
||||||
*/
|
|
||||||
-int PKCS11_store_private_key(PKCS11_TOKEN * token, EVP_PKEY * pk, char *label, unsigned char *id, unsigned int id_len)
|
|
||||||
+int PKCS11_store_private_key(PKCS11_TOKEN * token, EVP_PKEY * pk, char *label, unsigned char *id, size_t id_len)
|
|
||||||
{
|
|
||||||
if (pkcs11_store_private_key(token, pk, label, id, id_len, NULL))
|
|
||||||
return -1;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
-int PKCS11_store_public_key(PKCS11_TOKEN * token, EVP_PKEY * pk, char *label, unsigned char *id, unsigned int id_len)
|
|
||||||
+int PKCS11_store_public_key(PKCS11_TOKEN * token, EVP_PKEY * pk, char *label, unsigned char *id, size_t id_len)
|
|
||||||
{
|
|
||||||
if (pkcs11_store_public_key(token, pk, label, id, id_len, NULL))
|
|
||||||
return -1;
|
|
||||||
@@ -114,7 +114,7 @@
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
PKCS11_generate_key(PKCS11_TOKEN * token,
|
|
||||||
- int algorithm, unsigned int bits, char *label, unsigned char* id, unsigned int id_len)
|
|
||||||
+ int algorithm, unsigned int bits, char *label, unsigned char* id, size_t id_len)
|
|
||||||
{
|
|
||||||
PKCS11_KEY *key_obj;
|
|
||||||
EVP_PKEY *pk;
|
|
||||||
@@ -283,7 +283,7 @@
|
|
||||||
if (!pkcs11_getattr_s(token, obj, CKA_LABEL, label, sizeof(label)))
|
|
||||||
key->label = BUF_strdup(label);
|
|
||||||
key->id_len = sizeof(id);
|
|
||||||
- if (!pkcs11_getattr_var(token, obj, CKA_ID, id, (size_t *) & key->id_len)) {
|
|
||||||
+ if (!pkcs11_getattr_var(token, obj, CKA_ID, id, &key->id_len)) {
|
|
||||||
key->id = (unsigned char *) malloc(key->id_len);
|
|
||||||
memcpy(key->id, id, key->id_len);
|
|
||||||
}
|
|
||||||
@@ -329,7 +329,7 @@
|
|
||||||
* Store private key
|
|
||||||
*/
|
|
||||||
static int pkcs11_store_private_key(PKCS11_TOKEN * token, EVP_PKEY * pk,
|
|
||||||
- char *label, unsigned char *id, unsigned int id_len,
|
|
||||||
+ char *label, unsigned char *id, size_t id_len,
|
|
||||||
PKCS11_KEY ** ret_key)
|
|
||||||
{
|
|
||||||
PKCS11_SLOT *slot = TOKEN2SLOT(token);
|
|
||||||
@@ -392,7 +392,7 @@
|
|
||||||
* Store public key
|
|
||||||
*/
|
|
||||||
static int pkcs11_store_public_key(PKCS11_TOKEN * token, EVP_PKEY * pk,
|
|
||||||
- char *label, unsigned char *id, unsigned int id_len,
|
|
||||||
+ char *label, unsigned char *id, size_t id_len,
|
|
||||||
PKCS11_KEY ** ret_key)
|
|
||||||
{
|
|
||||||
PKCS11_SLOT *slot = TOKEN2SLOT(token);
|
|
||||||
--- src/pkcs11.h
|
|
||||||
+++ src/pkcs11.h
|
|
||||||
@@ -460,7 +460,7 @@
|
|
||||||
{
|
|
||||||
ck_attribute_type_t type;
|
|
||||||
void *value;
|
|
||||||
- unsigned long value_len;
|
|
||||||
+ size_t value_len;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
@ -1,3 +1,16 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 5 14:05:01 CEST 2009 - sbrabec@suse.cz
|
||||||
|
|
||||||
|
- Updated to version 0.2.6:
|
||||||
|
* Add new symbol to export file.
|
||||||
|
* Add function to export the slot id.
|
||||||
|
* Increase library version because of the new function.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 8 18:44:53 CEST 2009 - sbrabec@suse.cz
|
||||||
|
|
||||||
|
- Don't call autoreconf on older products.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Sep 2 18:04:03 CEST 2008 - sbrabec@suse.cz
|
Tue Sep 2 18:04:03 CEST 2008 - sbrabec@suse.cz
|
||||||
|
|
||||||
|
53
libp11.spec
53
libp11.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package libp11 (Version 0.2.4)
|
# spec file for package libp11 (Version 0.2.6)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -19,17 +19,13 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: libp11
|
Name: libp11
|
||||||
Version: 0.2.4
|
Version: 0.2.6
|
||||||
Release: 3
|
Release: 1
|
||||||
Url: http://www.opensc-project.org/libp11/
|
Url: http://www.opensc-project.org/libp11/
|
||||||
Group: Productivity/Security
|
Group: Productivity/Security
|
||||||
License: LGPL v2.1 or later
|
License: LGPL v2.1 or later
|
||||||
Summary: Library Implementing a Small Layer on Top of PKCS#11 API
|
Summary: Library Implementing a Small Layer on Top of PKCS#11 API
|
||||||
Source: %{name}-%{version}.tar.bz2
|
Source: %{name}-%{version}.tar.bz2
|
||||||
# All three following patches were sent to upstream:
|
|
||||||
Patch: libp11-strict-aliasing.patch
|
|
||||||
Patch1: libp11-api-fix.patch
|
|
||||||
Patch2: libp11-api-update.patch
|
|
||||||
BuildRequires: doxygen openssl-devel pkg-config zlib-devel
|
BuildRequires: doxygen openssl-devel pkg-config zlib-devel
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
@ -114,12 +110,11 @@ Authors:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch
|
|
||||||
%patch1
|
|
||||||
%patch2
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if %suse_version > 1100
|
||||||
autoreconf -f -i
|
autoreconf -f -i
|
||||||
|
%endif
|
||||||
%configure --disable-static --with-pic \
|
%configure --disable-static --with-pic \
|
||||||
--enable-doc\
|
--enable-doc\
|
||||||
--docdir=%{_docdir}/libp11-1\
|
--docdir=%{_docdir}/libp11-1\
|
||||||
@ -152,39 +147,3 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_libdir}/pkgconfig/*.pc
|
%{_libdir}/pkgconfig/*.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Sep 02 2008 sbrabec@suse.cz
|
|
||||||
- Call autoreconf to build correctly with new libtool.
|
|
||||||
* Tue Sep 02 2008 crrodriguez@suse.de
|
|
||||||
- fix build, doxygen required.
|
|
||||||
- kill ".la" files and static libraries
|
|
||||||
- fix -devel package requires
|
|
||||||
* Tue Aug 19 2008 sbrabec@suse.cz
|
|
||||||
- Updated to version 0.2.4:
|
|
||||||
* Build system rewritten
|
|
||||||
* added PKCS11_CTX_init_args
|
|
||||||
* fix segfault in init_args code
|
|
||||||
* implemented PKCS11_private_encrypt
|
|
||||||
- Fixed incorrect API.
|
|
||||||
- Fixed x86_64 issues.
|
|
||||||
* Thu Apr 10 2008 ro@suse.de
|
|
||||||
- added baselibs.conf file to build xxbit packages
|
|
||||||
for multilib support
|
|
||||||
* Mon Jul 30 2007 ro@suse.de
|
|
||||||
- provide old name
|
|
||||||
* Wed Jul 25 2007 sbrabec@suse.cz
|
|
||||||
- Updated to version 0.2.3:
|
|
||||||
* update wiki export script.
|
|
||||||
* replaced rsa header files from rsalabs (official) with scute
|
|
||||||
(open source).
|
|
||||||
* allow CKR_USER_ALREADY_LOGGED_IN on C_Login.
|
|
||||||
* mark internal functions as static.
|
|
||||||
* add code to store public keys and generate keys.
|
|
||||||
- Name package according to shared library packaging policy.
|
|
||||||
* Fri Mar 30 2007 ro@suse.de
|
|
||||||
- added zlib-devel to buildreq
|
|
||||||
* Tue Oct 03 2006 sbrabec@suse.cz
|
|
||||||
- Updated to version 0.2.2:
|
|
||||||
* bug fixes
|
|
||||||
* code cleanup
|
|
||||||
* Fri May 12 2006 sbrabec@suse.cz
|
|
||||||
- New SuSE package, version 0.2.1.
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user