[opencryptoki] fix unresolved symbols in TPM module (#830129)
Dan Horák
sharkcz at fedoraproject.org
Mon Jun 11 17:08:41 UTC 2012
commit b44c0f1db46213c372b6f5afcea62bce4e1f4bec
Author: Dan Horák <dan at danny.cz>
Date: Mon Jun 11 19:08:36 2012 +0200
fix unresolved symbols in TPM module (#830129)
opencryptoki-2.4.1-830129.patch | 99 +++++++++++++++++++++++++++++++++++++++
opencryptoki.spec | 8 +++-
2 files changed, 106 insertions(+), 1 deletions(-)
---
diff --git a/opencryptoki-2.4.1-830129.patch b/opencryptoki-2.4.1-830129.patch
new file mode 100644
index 0000000..df404fa
--- /dev/null
+++ b/opencryptoki-2.4.1-830129.patch
@@ -0,0 +1,99 @@
+diff -X /root/gitignore -pburN opencryptoki-2.4.1/usr/lib/pkcs11/cca_stdll/h_extern.h opencryptoki-2.4.1-key/usr/lib/pkcs11/cca_stdll/h_extern.h
+--- opencryptoki-2.4.1/usr/lib/pkcs11/cca_stdll/h_extern.h 2012-02-22 13:37:51.000000000 -0600
++++ opencryptoki-2.4.1-key/usr/lib/pkcs11/cca_stdll/h_extern.h 2012-06-11 09:56:02.509036554 -0500
+@@ -1642,10 +1642,6 @@ CK_RV object_mgr_get_attribute_values
+ CK_RV object_mgr_get_object_size( CK_OBJECT_HANDLE handle,
+ CK_ULONG * size );
+
+-CK_BBOOL object_mgr_invalidate_handle1( CK_OBJECT_HANDLE handle );
+-
+-CK_BBOOL object_mgr_invalidate_handle2( OBJECT *obj );
+-
+ CK_BBOOL object_mgr_purge_session_objects( SESSION * sess,
+ SESS_OBJ_TYPE type );
+
+diff -X /root/gitignore -pburN opencryptoki-2.4.1/usr/lib/pkcs11/common/h_extern.h opencryptoki-2.4.1-key/usr/lib/pkcs11/common/h_extern.h
+--- opencryptoki-2.4.1/usr/lib/pkcs11/common/h_extern.h 2012-02-22 13:37:51.000000000 -0600
++++ opencryptoki-2.4.1-key/usr/lib/pkcs11/common/h_extern.h 2012-06-11 09:56:02.510036534 -0500
+@@ -1955,10 +1955,6 @@ CK_RV object_mgr_get_attribute_values
+ CK_RV object_mgr_get_object_size( CK_OBJECT_HANDLE handle,
+ CK_ULONG * size );
+
+-CK_BBOOL object_mgr_invalidate_handle1( CK_OBJECT_HANDLE handle );
+-
+-CK_BBOOL object_mgr_invalidate_handle2( OBJECT *obj );
+-
+ CK_BBOOL object_mgr_purge_session_objects( SESSION * sess,
+ SESS_OBJ_TYPE type );
+
+diff -X /root/gitignore -pburN opencryptoki-2.4.1/usr/lib/pkcs11/common/mech_ssl3.c opencryptoki-2.4.1-key/usr/lib/pkcs11/common/mech_ssl3.c
+--- opencryptoki-2.4.1/usr/lib/pkcs11/common/mech_ssl3.c 2012-02-22 13:37:51.000000000 -0600
++++ opencryptoki-2.4.1-key/usr/lib/pkcs11/common/mech_ssl3.c 2012-06-11 09:56:02.510036534 -0500
+@@ -1746,16 +1746,7 @@ ssl3_key_and_mac_derive( SESSION
+ #endif
+ }
+
+- return rc;
+-
+ error:
+-
+- if (client_write_handle != 0)
+- object_mgr_invalidate_handle1( client_write_handle );
+-
+- if (server_write_handle != 0)
+- object_mgr_invalidate_handle1( server_write_handle );
+-
+ return rc;
+ }
+
+@@ -1917,8 +1908,8 @@ ssl3_kmd_process_mac_keys( SESSION
+ return CKR_OK;
+
+ error:
+- if (*client_handle != 0) object_mgr_invalidate_handle1( *client_handle );
+- if (*server_handle != 0) object_mgr_invalidate_handle1( *server_handle );
++ *client_handle = 0;
++ *server_handle = 0;
+
+ if (client_obj) {
+ object_free( client_obj );
+@@ -2173,11 +2164,8 @@ ssl3_kmd_process_write_keys( SESSION
+ return CKR_OK;
+
+ error:
+- if (*client_handle != 0)
+- object_mgr_invalidate_handle1( *client_handle );
+-
+- if (*server_handle != 0)
+- object_mgr_invalidate_handle1( *server_handle );
++ *client_handle = 0;
++ *server_handle = 0;
+
+ if (client_obj)
+ object_free( client_obj );
+diff -X /root/gitignore -pburN opencryptoki-2.4.1/usr/lib/pkcs11/tpm_stdll/h_extern.h opencryptoki-2.4.1-key/usr/lib/pkcs11/tpm_stdll/h_extern.h
+--- opencryptoki-2.4.1/usr/lib/pkcs11/tpm_stdll/h_extern.h 2012-02-22 13:37:51.000000000 -0600
++++ opencryptoki-2.4.1-key/usr/lib/pkcs11/tpm_stdll/h_extern.h 2012-06-11 09:56:02.511036516 -0500
+@@ -1533,10 +1533,6 @@ CK_RV object_mgr_get_attribute_values
+ CK_RV object_mgr_get_object_size( CK_OBJECT_HANDLE handle,
+ CK_ULONG * size );
+
+-CK_BBOOL object_mgr_invalidate_handle1( CK_OBJECT_HANDLE handle );
+-
+-CK_BBOOL object_mgr_invalidate_handle2( OBJECT *obj );
+-
+ CK_BBOOL object_mgr_purge_session_objects( SESSION * sess,
+ SESS_OBJ_TYPE type );
+
+diff -X /root/gitignore -pburN opencryptoki-2.4.1/usr/lib/pkcs11/tpm_stdll/key_mgr.c opencryptoki-2.4.1-key/usr/lib/pkcs11/tpm_stdll/key_mgr.c
+--- opencryptoki-2.4.1/usr/lib/pkcs11/tpm_stdll/key_mgr.c 2012-02-22 13:37:51.000000000 -0600
++++ opencryptoki-2.4.1-key/usr/lib/pkcs11/tpm_stdll/key_mgr.c 2012-06-11 09:42:48.351005308 -0500
+@@ -844,7 +844,7 @@ key_mgr_unwrap_key( SESSION *
+ //
+ break;
+ default:
+- OCK_LOG_ERROR(ERR_MECHANISM_INVALID);
++ OCK_LOG_ERR(ERR_MECHANISM_INVALID);
+ return CKR_MECHANISM_INVALID;
+ }
+
diff --git a/opencryptoki.spec b/opencryptoki.spec
index a24ffc7..8e976cf 100644
--- a/opencryptoki.spec
+++ b/opencryptoki.spec
@@ -1,7 +1,7 @@
Name: opencryptoki
Summary: Implementation of the PKCS#11 (Cryptoki) specification v2.11
Version: 2.4.1
-Release: 1%{?dist}
+Release: 2%{?dist}
License: CPL
Group: System Environment/Base
URL: http://sourceforge.net/projects/opencryptoki
@@ -12,6 +12,8 @@ Patch0: %{name}-2.3.2-do-not-create-group-in-pkcs11_startup.patch
Patch1: %{name}-2.4-group.patch
# convert from initscript to systemd unit
Patch2: %{name}-2.4.1-systemd.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=830129
+Patch3: %{name}-2.4.1-830129.patch
Requires(pre): shadow-utils coreutils sed
BuildRequires: openssl-devel
BuildRequires: trousers-devel
@@ -135,6 +137,7 @@ cryptographic hardware such as IBM 4764 or 4765 that uses the
%patch0 -p1
%patch1 -p1 -b .group
%patch2 -p1 -b .systemd
+%patch3 -p1 -b .bz830129
# Upstream tarball has unnecessary executable perms set on the sources
find . -name '*.[ch]' -print0 | xargs -0 chmod -x
@@ -257,6 +260,9 @@ fi
%changelog
+* Mon Jun 11 2012 Dan Horák <dan[at]danny.cz> - 2.4.1-2
+- fix unresolved symbols in TPM module (#830129)
+
* Sat Feb 25 2012 Dan Horák <dan[at]danny.cz> - 2.4.1-1
- new upstream release 2.4.1
- convert from initscript to systemd unit
More information about the scm-commits
mailing list