Update to 1.2.18 release.
Feature safe: yes
This commit is contained in:
parent
0aea06c28c
commit
26ebd20170
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=285720
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user