Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
ed97425c
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ed97425c
编写于
7月 24, 2009
作者:
S
sherman
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
1b55cb24
d9daa38a
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
17 addition
and
27 deletion
+17
-27
src/share/native/sun/security/pkcs11/wrapper/p11_general.c
src/share/native/sun/security/pkcs11/wrapper/p11_general.c
+2
-2
src/share/native/sun/security/pkcs11/wrapper/p11_keymgmt.c
src/share/native/sun/security/pkcs11/wrapper/p11_keymgmt.c
+4
-8
src/share/native/sun/security/pkcs11/wrapper/p11_objmgmt.c
src/share/native/sun/security/pkcs11/wrapper/p11_objmgmt.c
+5
-9
src/share/native/sun/security/pkcs11/wrapper/p11_sign.c
src/share/native/sun/security/pkcs11/wrapper/p11_sign.c
+1
-1
src/share/native/sun/security/pkcs11/wrapper/p11_util.c
src/share/native/sun/security/pkcs11/wrapper/p11_util.c
+4
-6
src/share/native/sun/security/pkcs11/wrapper/pkcs11wrapper.h
src/share/native/sun/security/pkcs11/wrapper/pkcs11wrapper.h
+1
-1
未找到文件。
src/share/native/sun/security/pkcs11/wrapper/p11_general.c
浏览文件 @
ed97425c
...
...
@@ -337,7 +337,7 @@ Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetSlotList
CK_ULONG
ckTokenNumber
;
CK_SLOT_ID_PTR
ckpSlotList
;
CK_BBOOL
ckTokenPresent
;
jlongArray
jSlotList
;
jlongArray
jSlotList
=
NULL
;
CK_RV
rv
;
CK_FUNCTION_LIST_PTR
ckpFunctions
=
getFunctionList
(
env
,
obj
);
...
...
@@ -637,7 +637,7 @@ Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetMechanismList
CK_SLOT_ID
ckSlotID
;
CK_ULONG
ckMechanismNumber
;
CK_MECHANISM_TYPE_PTR
ckpMechanismList
;
jlongArray
jMechanismList
;
jlongArray
jMechanismList
=
NULL
;
CK_RV
rv
;
CK_FUNCTION_LIST_PTR
ckpFunctions
=
getFunctionList
(
env
,
obj
);
...
...
src/share/native/sun/security/pkcs11/wrapper/p11_keymgmt.c
浏览文件 @
ed97425c
...
...
@@ -73,9 +73,8 @@ JNIEXPORT jlong JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1GenerateKey
CK_MECHANISM
ckMechanism
;
CK_ATTRIBUTE_PTR
ckpAttributes
=
NULL_PTR
;
CK_ULONG
ckAttributesLength
;
CK_OBJECT_HANDLE
ckKeyHandle
;
CK_OBJECT_HANDLE
ckKeyHandle
=
0
;
jlong
jKeyHandle
=
0L
;
CK_ULONG
i
;
CK_RV
rv
;
CK_FUNCTION_LIST_PTR
ckpFunctions
=
getFunctionList
(
env
,
obj
);
...
...
@@ -151,8 +150,7 @@ JNIEXPORT jlongArray JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1Generate
CK_OBJECT_HANDLE_PTR
ckpPublicKeyHandle
;
/* pointer to Public Key */
CK_OBJECT_HANDLE_PTR
ckpPrivateKeyHandle
;
/* pointer to Private Key */
CK_OBJECT_HANDLE_PTR
ckpKeyHandles
;
/* pointer to array with Public and Private Key */
jlongArray
jKeyHandles
;
CK_ULONG
i
;
jlongArray
jKeyHandles
=
NULL
;
CK_RV
rv
;
CK_FUNCTION_LIST_PTR
ckpFunctions
=
getFunctionList
(
env
,
obj
);
...
...
@@ -299,9 +297,8 @@ JNIEXPORT jlong JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1UnwrapKey
CK_ULONG
ckWrappedKeyLength
;
CK_ATTRIBUTE_PTR
ckpAttributes
=
NULL_PTR
;
CK_ULONG
ckAttributesLength
;
CK_OBJECT_HANDLE
ckKeyHandle
;
CK_OBJECT_HANDLE
ckKeyHandle
=
0
;
jlong
jKeyHandle
=
0L
;
CK_ULONG
i
;
CK_RV
rv
;
CK_FUNCTION_LIST_PTR
ckpFunctions
=
getFunctionList
(
env
,
obj
);
...
...
@@ -478,8 +475,7 @@ JNIEXPORT jlong JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1DeriveKey
CK_ATTRIBUTE_PTR
ckpAttributes
=
NULL_PTR
;
CK_ULONG
ckAttributesLength
;
CK_OBJECT_HANDLE
ckKeyHandle
=
0
;
jlong
jKeyHandle
;
CK_ULONG
i
;
jlong
jKeyHandle
=
0L
;
CK_RV
rv
;
CK_OBJECT_HANDLE_PTR
phKey
=
&
ckKeyHandle
;
...
...
src/share/native/sun/security/pkcs11/wrapper/p11_objmgmt.c
浏览文件 @
ed97425c
...
...
@@ -72,8 +72,7 @@ JNIEXPORT jlong JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1CreateObject
CK_OBJECT_HANDLE
ckObjectHandle
;
CK_ATTRIBUTE_PTR
ckpAttributes
=
NULL_PTR
;
CK_ULONG
ckAttributesLength
;
jlong
jObjectHandle
;
CK_ULONG
i
;
jlong
jObjectHandle
=
0L
;
CK_RV
rv
;
CK_FUNCTION_LIST_PTR
ckpFunctions
=
getFunctionList
(
env
,
obj
);
...
...
@@ -114,8 +113,7 @@ JNIEXPORT jlong JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1CopyObject
CK_OBJECT_HANDLE
ckNewObjectHandle
;
CK_ATTRIBUTE_PTR
ckpAttributes
=
NULL_PTR
;
CK_ULONG
ckAttributesLength
;
jlong
jNewObjectHandle
;
CK_ULONG
i
;
jlong
jNewObjectHandle
=
0L
;
CK_RV
rv
;
CK_FUNCTION_LIST_PTR
ckpFunctions
=
getFunctionList
(
env
,
obj
);
...
...
@@ -180,7 +178,7 @@ JNIEXPORT jlong JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetObjectSize
CK_SESSION_HANDLE
ckSessionHandle
;
CK_OBJECT_HANDLE
ckObjectHandle
;
CK_ULONG
ckObjectSize
;
jlong
jObjectSize
;
jlong
jObjectSize
=
0L
;
CK_RV
rv
;
CK_FUNCTION_LIST_PTR
ckpFunctions
=
getFunctionList
(
env
,
obj
);
...
...
@@ -217,7 +215,7 @@ JNIEXPORT void JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetAttributeVa
CK_ATTRIBUTE_PTR
ckpAttributes
=
NULL_PTR
;
CK_ULONG
ckAttributesLength
;
CK_ULONG
ckBufferLength
;
CK_ULONG
i
,
j
;
CK_ULONG
i
;
jobject
jAttribute
;
CK_RV
rv
;
...
...
@@ -307,7 +305,6 @@ JNIEXPORT void JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1SetAttributeVa
CK_OBJECT_HANDLE
ckObjectHandle
;
CK_ATTRIBUTE_PTR
ckpAttributes
=
NULL_PTR
;
CK_ULONG
ckAttributesLength
;
CK_ULONG
i
;
CK_RV
rv
;
CK_FUNCTION_LIST_PTR
ckpFunctions
=
getFunctionList
(
env
,
obj
);
...
...
@@ -342,7 +339,6 @@ JNIEXPORT void JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1FindObjectsIni
CK_SESSION_HANDLE
ckSessionHandle
;
CK_ATTRIBUTE_PTR
ckpAttributes
=
NULL_PTR
;
CK_ULONG
ckAttributesLength
;
CK_ULONG
i
;
CK_RV
rv
;
CK_FUNCTION_LIST_PTR
ckpFunctions
=
getFunctionList
(
env
,
obj
);
...
...
@@ -385,7 +381,7 @@ JNIEXPORT jlongArray JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1FindObje
CK_ULONG
ckMaxObjectLength
;
CK_OBJECT_HANDLE_PTR
ckpObjectHandleArray
;
CK_ULONG
ckActualObjectCount
;
jlongArray
jObjectHandleArray
;
jlongArray
jObjectHandleArray
=
NULL
;
CK_FUNCTION_LIST_PTR
ckpFunctions
=
getFunctionList
(
env
,
obj
);
if
(
ckpFunctions
==
NULL
)
{
return
NULL
;
}
...
...
src/share/native/sun/security/pkcs11/wrapper/p11_sign.c
浏览文件 @
ed97425c
...
...
@@ -110,7 +110,7 @@ JNIEXPORT jbyteArray JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1Sign
CK_BYTE_PTR
ckpSignature
;
CK_ULONG
ckDataLength
;
CK_ULONG
ckSignatureLength
=
0
;
jbyteArray
jSignature
;
jbyteArray
jSignature
=
NULL
;
CK_RV
rv
;
CK_FUNCTION_LIST_PTR
ckpFunctions
=
getFunctionList
(
env
,
obj
);
...
...
src/share/native/sun/security/pkcs11/wrapper/p11_util.c
浏览文件 @
ed97425c
...
...
@@ -194,16 +194,14 @@ jlong ckAssertReturnValueOK(JNIEnv *env, CK_RV returnValue)
jclass
jPKCS11ExceptionClass
;
jmethodID
jConstructor
;
jthrowable
jPKCS11Exception
;
jlong
jErrorCode
;
jlong
jErrorCode
=
0L
;
if
(
returnValue
==
CKR_OK
)
{
return
0L
;
}
else
{
if
(
returnValue
!=
CKR_OK
)
{
jErrorCode
=
ckULongToJLong
(
returnValue
);
jPKCS11ExceptionClass
=
(
*
env
)
->
FindClass
(
env
,
CLASS_PKCS11EXCEPTION
);
if
(
jPKCS11ExceptionClass
!=
NULL
)
{
jConstructor
=
(
*
env
)
->
GetMethodID
(
env
,
jPKCS11ExceptionClass
,
"<init>"
,
"(J)V"
);
if
(
jConstructor
!=
NULL
)
{
jErrorCode
=
ckULongToJLong
(
returnValue
);
jPKCS11Exception
=
(
jthrowable
)
(
*
env
)
->
NewObject
(
env
,
jPKCS11ExceptionClass
,
jConstructor
,
jErrorCode
);
if
(
jPKCS11Exception
!=
NULL
)
{
(
*
env
)
->
Throw
(
env
,
jPKCS11Exception
);
...
...
@@ -211,8 +209,8 @@ jlong ckAssertReturnValueOK(JNIEnv *env, CK_RV returnValue)
}
}
(
*
env
)
->
DeleteLocalRef
(
env
,
jPKCS11ExceptionClass
);
return
jErrorCode
;
}
return
jErrorCode
;
}
/*
...
...
src/share/native/sun/security/pkcs11/wrapper/pkcs11wrapper.h
浏览文件 @
ed97425c
...
...
@@ -300,7 +300,7 @@ void jAttributeArrayToCKAttributeArray(JNIEnv *env, jobjectArray jAArray, CK_ATT
/* funktions to convert a CK-type array and the array length to a Java array */
j
char
Array
ckByteArrayToJByteArray
(
JNIEnv
*
env
,
const
CK_BYTE_PTR
ckpArray
,
CK_ULONG
ckLength
);
j
byte
Array
ckByteArrayToJByteArray
(
JNIEnv
*
env
,
const
CK_BYTE_PTR
ckpArray
,
CK_ULONG
ckLength
);
jlongArray
ckULongArrayToJLongArray
(
JNIEnv
*
env
,
const
CK_ULONG_PTR
ckpArray
,
CK_ULONG
ckLength
);
jcharArray
ckCharArrayToJCharArray
(
JNIEnv
*
env
,
const
CK_CHAR_PTR
ckpArray
,
CK_ULONG
length
);
jcharArray
ckUTF8CharArrayToJCharArray
(
JNIEnv
*
env
,
const
CK_UTF8CHAR_PTR
ckpArray
,
CK_ULONG
ckLength
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录