From 6b9c47112bdbceebeafcdbbb6cfdb691683cf87f Mon Sep 17 00:00:00 2001 From: Alex Dupre Date: Tue, 12 Apr 2011 13:52:54 +0000 Subject: Optimize C_GetAttributeValues: remove not needed call. --- security/iaikpkcs11wrapper/Makefile | 1 + .../files/patch-native_src_pkcs11wrapper.c | 34 ++++++++++++++++++++-- 2 files changed, 32 insertions(+), 3 deletions(-) (limited to 'security') diff --git a/security/iaikpkcs11wrapper/Makefile b/security/iaikpkcs11wrapper/Makefile index ffd73bc7a5ff..e7bf3858ea16 100644 --- a/security/iaikpkcs11wrapper/Makefile +++ b/security/iaikpkcs11wrapper/Makefile @@ -7,6 +7,7 @@ PORTNAME= iaikPkcs11Wrapper PORTVERSION= 1.2.17 +PORTREVISION= 1 CATEGORIES= security java devel MASTER_SITES= ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= ale diff --git a/security/iaikpkcs11wrapper/files/patch-native_src_pkcs11wrapper.c b/security/iaikpkcs11wrapper/files/patch-native_src_pkcs11wrapper.c index 7e7b88b06c77..df010e4cd5d1 100644 --- a/security/iaikpkcs11wrapper/files/patch-native_src_pkcs11wrapper.c +++ b/security/iaikpkcs11wrapper/files/patch-native_src_pkcs11wrapper.c @@ -1,6 +1,34 @@ ---- ../../src/pkcs11wrapper.c.orig 2008-01-17 12:49:35.000000000 +0100 -+++ ../../src/pkcs11wrapper.c 2008-01-17 12:53:51.000000000 +0100 -@@ -3965,11 +3965,12 @@ +--- ../../src/pkcs11wrapper.c.orig 2008-07-24 12:20:36.000000000 +0200 ++++ ../../src/pkcs11wrapper.c 2011-04-12 10:53:02.000000000 +0200 +@@ -1134,6 +1134,7 @@ + jobject jAttribute; + CK_RV rv; + CK_ULONG error = 0; ++ CK_BBOOL array = FALSE; + ModuleData *moduleData; + CK_FUNCTION_LIST_PTR ckpFunctions; + moduleData = getModuleEntry(env, obj); +@@ -1188,9 +1189,11 @@ + for (j=0; jC_GetAttributeValue)(ckSessionHandle, ckObjectHandle, ckpAttributes, ckAttributesLength); + if(ckAssertReturnValueOK(env, rv) != CK_ASSERT_OK) { +@@ -1202,6 +1205,7 @@ + free(ckpAttributes); + return ; + } ++ } + + /* now, the ulValueLength field of each attribute should hold the exact buffer length needed + * to allocate the needed buffers accordingly +@@ -4111,11 +4115,12 @@ jpTemp = (jchar*) malloc((*ckpLength) * sizeof(jchar)); if (jpTemp == NULL) { *ckpArray = NULL_PTR; throwOutOfMemoryError(env); return 1; } (*env)->GetCharArrayRegion(env, jArray, 0, *ckpLength, jpTemp); -- cgit v1.2.3