aboutsummaryrefslogtreecommitdiff
path: root/security/iaikpkcs11wrapper
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2011-11-13 21:07:33 +0000
committerAlex Dupre <ale@FreeBSD.org>2011-11-13 21:07:33 +0000
commit26ebd2017004eae715d8c50d9d0328eb97bfc99e (patch)
tree0cf8668d9e1f914a5719ca984d9d52b2cf6aa1db /security/iaikpkcs11wrapper
parent0aea06c28c01fa0e06b824a4bbb36d9ee8f07f0b (diff)
downloadports-26ebd2017004eae715d8c50d9d0328eb97bfc99e.tar.gz
ports-26ebd2017004eae715d8c50d9d0328eb97bfc99e.zip
Notes
Diffstat (limited to 'security/iaikpkcs11wrapper')
-rw-r--r--security/iaikpkcs11wrapper/Makefile21
-rw-r--r--security/iaikpkcs11wrapper/distinfo4
-rw-r--r--security/iaikpkcs11wrapper/files/patch-native_src_pkcs11wrapper.c22
3 files changed, 26 insertions, 21 deletions
diff --git a/security/iaikpkcs11wrapper/Makefile b/security/iaikpkcs11wrapper/Makefile
index f04d928b9441..760b267bd5ac 100644
--- a/security/iaikpkcs11wrapper/Makefile
+++ b/security/iaikpkcs11wrapper/Makefile
@@ -6,12 +6,11 @@
#
PORTNAME= iaikPkcs11Wrapper
-PORTVERSION= 1.2.17
-PORTREVISION= 1
+PORTVERSION= 1.2.18
CATEGORIES= security java devel
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= ale
-DISTNAME= ${PORTNAME}${PORTVERSION}
+DISTNAME= ${PORTNAME}_${PORTVERSION:S/./_/g}
MAINTAINER= ale@FreeBSD.org
COMMENT= A PKCS\#11 Java wrapper
@@ -26,13 +25,14 @@ ALL_TARGET= release
PLIST_FILES= lib/libpkcs11wrapper.so %%JAVAJARDIR%%/iaikPkcs11Wrapper.jar
PORTDOCS= *
+PORTEXAMPLES= *
.include <bsd.port.pre.mk>
.if ${ARCH} == "amd64" || ${ARCH} == "ia64"
-WRKSRC= ${WRKDIR}/native/platforms/linux_x64
+WRKSRC= ${WRKDIR}/src/native/unix/linux-x86_64
.else
-WRKSRC= ${WRKDIR}/native/platforms/linux
+WRKSRC= ${WRKDIR}/src/native/unix/linux-x86
.endif
do-install:
@@ -40,15 +40,20 @@ do-install:
@${INSTALL_PROGRAM} ${WRKSRC}/release/libpkcs11wrapper.so ${PREFIX}/lib/
@${ECHO_MSG} " [ DONE ]"
@${ECHO_MSG} -n ">> Installing JAR file as ${JAVAJARDIR}/iaikPkcs11Wrapper.jar..."
- @${INSTALL_DATA} ${WRKDIR}/java/lib/iaikPkcs11Wrapper.jar ${JAVAJARDIR}/
+ @${INSTALL_DATA} ${WRKDIR}/bin/iaikPkcs11Wrapper.jar ${JAVAJARDIR}/
@${ECHO_MSG} " [ DONE ]"
.if !defined(NOPORTDOCS)
@${ECHO_MSG} -n ">> Installing documentation in ${DOCSDIR}..."
@${MKDIR} ${DOCSDIR}
@cd ${WRKDIR}/docs && ${FIND} * | \
${CPIO} -pdmu -R ${SHAREOWN}:${SHAREGRP} ${DOCSDIR} > /dev/null 2>&1
- @cd ${WRKDIR}/java/docs && ${FIND} api-doc | \
- ${CPIO} -pdmu -R ${SHAREOWN}:${SHAREGRP} ${DOCSDIR} > /dev/null 2>&1
+ @${ECHO_MSG} " [ DONE ]"
+.endif
+.if !defined(NOPORTEXAMPLES)
+ @${ECHO_MSG} -n ">> Installing examples in ${EXAMPLESDIR}..."
+ @${MKDIR} ${EXAMPLESDIR}
+ @cd ${WRKDIR}/examples && ${FIND} * | \
+ ${CPIO} -pdmu -R ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR} > /dev/null 2>&1
@${ECHO_MSG} " [ DONE ]"
.endif
diff --git a/security/iaikpkcs11wrapper/distinfo b/security/iaikpkcs11wrapper/distinfo
index 3456926eed64..41005422e0c8 100644
--- a/security/iaikpkcs11wrapper/distinfo
+++ b/security/iaikpkcs11wrapper/distinfo
@@ -1,2 +1,2 @@
-SHA256 (iaikPkcs11Wrapper1.2.17.zip) = 01b55a0fd199a5b0b2a50aec2245864b258f79574545802ae91de4e8704e4a31
-SIZE (iaikPkcs11Wrapper1.2.17.zip) = 6340722
+SHA256 (iaikPkcs11Wrapper_1_2_18.zip) = 605d22ab2095b359acc0ac19f22111fa22982464cf6adce1f93b2ff03cf43938
+SIZE (iaikPkcs11Wrapper_1_2_18.zip) = 3371774
diff --git a/security/iaikpkcs11wrapper/files/patch-native_src_pkcs11wrapper.c b/security/iaikpkcs11wrapper/files/patch-native_src_pkcs11wrapper.c
index df010e4cd5d1..bbf6cb1dc775 100644
--- a/security/iaikpkcs11wrapper/files/patch-native_src_pkcs11wrapper.c
+++ b/security/iaikpkcs11wrapper/files/patch-native_src_pkcs11wrapper.c
@@ -1,14 +1,14 @@
---- ../../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 @@
+--- ../../common/pkcs11wrapper.c.orig 2011-11-03 12:15:18.000000000 +0100
++++ ../../common/pkcs11wrapper.c 2011-11-13 21:55:57.000000000 +0100
+@@ -1258,6 +1258,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 @@
+
+@@ -1328,9 +1329,11 @@
for (j=0; j<length; j++){
ckAttributeArray[j].pValue = NULL_PTR;
}
@@ -19,22 +19,22 @@
+ if (array == TRUE) {
// get ulValueLen of the attributes of a CKF_ARRAY_ATTRIBUTE if present
rv = (*ckpFunctions->C_GetAttributeValue)(ckSessionHandle, ckObjectHandle, ckpAttributes, ckAttributesLength);
- if(ckAssertReturnValueOK(env, rv) != CK_ASSERT_OK) {
-@@ -1202,6 +1205,7 @@
- free(ckpAttributes);
+ if(ckAssertReturnValueOK(env, rv, __FUNCTION__) != CK_ASSERT_OK) {
+@@ -1343,6 +1346,7 @@
+ TRACE0(tag_call, __FUNCTION__, "exiting ");
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 @@
+@@ -4474,11 +4478,12 @@
jpTemp = (jchar*) malloc((*ckpLength) * sizeof(jchar));
- if (jpTemp == NULL) { *ckpArray = NULL_PTR; throwOutOfMemoryError(env); return 1; }
+ if (jpTemp == NULL && (*ckpLength)!=0) { *ckpArray = NULL_PTR; throwOutOfMemoryError(env); return 1; }
(*env)->GetCharArrayRegion(env, jArray, 0, *ckpLength, jpTemp);
- *ckpArray = (CK_UTF8CHAR_PTR) malloc (*ckpLength * sizeof(CK_UTF8CHAR));
+ *ckpArray = (CK_UTF8CHAR_PTR) malloc ((*ckpLength + 1) * sizeof(CK_UTF8CHAR));
- if (*ckpArray == NULL) { free(jpTemp); throwOutOfMemoryError(env); return 2; }
+ if (*ckpArray == NULL && (*ckpLength)!=0) { free(jpTemp); throwOutOfMemoryError(env); return 2; }
for (i=0; i<(*ckpLength); i++) {
(*ckpArray)[i] = jCharToCKUTF8Char(jpTemp[i]);
}