Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
0c372b94
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
1 年多 前同步成功
通知
10
Star
18
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
0c372b94
编写于
3月 09, 2002
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make {RSA,DSA,DH}_new_method obtain and release an ENGINE functional reference in all cases.
上级
26e12373
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
47 addition
and
14 deletion
+47
-14
crypto/dh/dh.h
crypto/dh/dh.h
+1
-1
crypto/dh/dh_err.c
crypto/dh/dh_err.c
+1
-1
crypto/dh/dh_lib.c
crypto/dh/dh_lib.c
+15
-4
crypto/dsa/dsa.h
crypto/dsa/dsa.h
+1
-1
crypto/dsa/dsa_err.c
crypto/dsa/dsa_err.c
+1
-1
crypto/dsa/dsa_lib.c
crypto/dsa/dsa_lib.c
+15
-4
crypto/rsa/rsa_lib.c
crypto/rsa/rsa_lib.c
+13
-2
未找到文件。
crypto/dh/dh.h
浏览文件 @
0c372b94
...
...
@@ -195,7 +195,7 @@ void ERR_load_DH_strings(void);
#define DH_F_DH_COMPUTE_KEY 102
#define DH_F_DH_GENERATE_KEY 103
#define DH_F_DH_GENERATE_PARAMETERS 104
#define DH_F_DH_NEW
105
#define DH_F_DH_NEW
_METHOD
105
/* Reason codes. */
#define DH_R_NO_PRIVATE_VALUE 100
...
...
crypto/dh/dh_err.c
浏览文件 @
0c372b94
...
...
@@ -71,7 +71,7 @@ static ERR_STRING_DATA DH_str_functs[]=
{
ERR_PACK
(
0
,
DH_F_DH_COMPUTE_KEY
,
0
),
"DH_compute_key"
},
{
ERR_PACK
(
0
,
DH_F_DH_GENERATE_KEY
,
0
),
"DH_generate_key"
},
{
ERR_PACK
(
0
,
DH_F_DH_GENERATE_PARAMETERS
,
0
),
"DH_generate_parameters"
},
{
ERR_PACK
(
0
,
DH_F_DH_NEW
,
0
),
"DH_new
"
},
{
ERR_PACK
(
0
,
DH_F_DH_NEW
_METHOD
,
0
),
"DH_new_method
"
},
{
0
,
NULL
}
};
...
...
crypto/dh/dh_lib.c
浏览文件 @
0c372b94
...
...
@@ -107,20 +107,29 @@ DH *DH_new_method(ENGINE *engine)
ret
=
(
DH
*
)
OPENSSL_malloc
(
sizeof
(
DH
));
if
(
ret
==
NULL
)
{
DHerr
(
DH_F_DH_NEW
,
ERR_R_MALLOC_FAILURE
);
DHerr
(
DH_F_DH_NEW
_METHOD
,
ERR_R_MALLOC_FAILURE
);
return
(
NULL
);
}
ret
->
meth
=
DH_get_default_method
();
ret
->
engine
=
engine
;
if
(
!
ret
->
engine
)
if
(
engine
)
{
if
(
!
ENGINE_init
(
engine
))
{
DSAerr
(
DH_F_DH_NEW_METHOD
,
ERR_R_ENGINE_LIB
);
OPENSSL_free
(
ret
);
return
NULL
;
}
ret
->
engine
=
engine
;
}
else
ret
->
engine
=
ENGINE_get_default_DH
();
if
(
ret
->
engine
)
{
ret
->
meth
=
ENGINE_get_DH
(
ret
->
engine
);
if
(
!
ret
->
meth
)
{
DHerr
(
DH_F_DH_NEW
,
ERR_R_ENGINE_LIB
);
DHerr
(
DH_F_DH_NEW
_METHOD
,
ERR_R_ENGINE_LIB
);
ENGINE_finish
(
ret
->
engine
);
OPENSSL_free
(
ret
);
return
NULL
;
...
...
@@ -145,6 +154,8 @@ DH *DH_new_method(ENGINE *engine)
CRYPTO_new_ex_data
(
CRYPTO_EX_INDEX_DH
,
ret
,
&
ret
->
ex_data
);
if
((
ret
->
meth
->
init
!=
NULL
)
&&
!
ret
->
meth
->
init
(
ret
))
{
if
(
ret
->
engine
)
ENGINE_finish
(
ret
->
engine
);
CRYPTO_free_ex_data
(
CRYPTO_EX_INDEX_DH
,
ret
,
&
ret
->
ex_data
);
OPENSSL_free
(
ret
);
ret
=
NULL
;
...
...
crypto/dsa/dsa.h
浏览文件 @
0c372b94
...
...
@@ -230,7 +230,7 @@ void ERR_load_DSA_strings(void);
#define DSA_F_DSAPARAMS_PRINT_FP 101
#define DSA_F_DSA_DO_SIGN 112
#define DSA_F_DSA_DO_VERIFY 113
#define DSA_F_DSA_NEW
103
#define DSA_F_DSA_NEW
_METHOD
103
#define DSA_F_DSA_PRINT 104
#define DSA_F_DSA_PRINT_FP 105
#define DSA_F_DSA_SIGN 106
...
...
crypto/dsa/dsa_err.c
浏览文件 @
0c372b94
...
...
@@ -71,7 +71,7 @@ static ERR_STRING_DATA DSA_str_functs[]=
{
ERR_PACK
(
0
,
DSA_F_DSAPARAMS_PRINT_FP
,
0
),
"DSAparams_print_fp"
},
{
ERR_PACK
(
0
,
DSA_F_DSA_DO_SIGN
,
0
),
"DSA_do_sign"
},
{
ERR_PACK
(
0
,
DSA_F_DSA_DO_VERIFY
,
0
),
"DSA_do_verify"
},
{
ERR_PACK
(
0
,
DSA_F_DSA_NEW
,
0
),
"DSA_new
"
},
{
ERR_PACK
(
0
,
DSA_F_DSA_NEW
_METHOD
,
0
),
"DSA_new_method
"
},
{
ERR_PACK
(
0
,
DSA_F_DSA_PRINT
,
0
),
"DSA_print"
},
{
ERR_PACK
(
0
,
DSA_F_DSA_PRINT_FP
,
0
),
"DSA_print_fp"
},
{
ERR_PACK
(
0
,
DSA_F_DSA_SIGN
,
0
),
"DSA_sign"
},
...
...
crypto/dsa/dsa_lib.c
浏览文件 @
0c372b94
...
...
@@ -110,19 +110,28 @@ DSA *DSA_new_method(ENGINE *engine)
ret
=
(
DSA
*
)
OPENSSL_malloc
(
sizeof
(
DSA
));
if
(
ret
==
NULL
)
{
DSAerr
(
DSA_F_DSA_NEW
,
ERR_R_MALLOC_FAILURE
);
DSAerr
(
DSA_F_DSA_NEW
_METHOD
,
ERR_R_MALLOC_FAILURE
);
return
(
NULL
);
}
ret
->
meth
=
DSA_get_default_method
();
ret
->
engine
=
engine
;
if
(
!
ret
->
engine
)
if
(
engine
)
{
if
(
!
ENGINE_init
(
engine
))
{
DSAerr
(
DSA_F_DSA_NEW_METHOD
,
ERR_R_ENGINE_LIB
);
OPENSSL_free
(
ret
);
return
NULL
;
}
ret
->
engine
=
engine
;
}
else
ret
->
engine
=
ENGINE_get_default_DSA
();
if
(
ret
->
engine
)
{
ret
->
meth
=
ENGINE_get_DSA
(
ret
->
engine
);
if
(
!
ret
->
meth
)
{
DSAerr
(
DSA_F_DSA_NEW
,
DSAerr
(
DSA_F_DSA_NEW
_METHOD
,
ERR_R_ENGINE_LIB
);
ENGINE_finish
(
ret
->
engine
);
OPENSSL_free
(
ret
);
...
...
@@ -149,6 +158,8 @@ DSA *DSA_new_method(ENGINE *engine)
CRYPTO_new_ex_data
(
CRYPTO_EX_INDEX_DSA
,
ret
,
&
ret
->
ex_data
);
if
((
ret
->
meth
->
init
!=
NULL
)
&&
!
ret
->
meth
->
init
(
ret
))
{
if
(
ret
->
engine
)
ENGINE_finish
(
ret
->
engine
);
CRYPTO_free_ex_data
(
CRYPTO_EX_INDEX_DSA
,
ret
,
&
ret
->
ex_data
);
OPENSSL_free
(
ret
);
ret
=
NULL
;
...
...
crypto/rsa/rsa_lib.c
浏览文件 @
0c372b94
...
...
@@ -130,8 +130,17 @@ RSA *RSA_new_method(ENGINE *engine)
}
ret
->
meth
=
RSA_get_default_method
();
ret
->
engine
=
engine
;
if
(
!
ret
->
engine
)
if
(
engine
)
{
if
(
!
ENGINE_init
(
engine
))
{
RSAerr
(
RSA_F_RSA_NEW_METHOD
,
ERR_R_ENGINE_LIB
);
OPENSSL_free
(
ret
);
return
NULL
;
}
ret
->
engine
=
engine
;
}
else
ret
->
engine
=
ENGINE_get_default_RSA
();
if
(
ret
->
engine
)
{
...
...
@@ -166,6 +175,8 @@ RSA *RSA_new_method(ENGINE *engine)
CRYPTO_new_ex_data
(
CRYPTO_EX_INDEX_RSA
,
ret
,
&
ret
->
ex_data
);
if
((
ret
->
meth
->
init
!=
NULL
)
&&
!
ret
->
meth
->
init
(
ret
))
{
if
(
ret
->
engine
)
ENGINE_finish
(
ret
->
engine
);
CRYPTO_free_ex_data
(
CRYPTO_EX_INDEX_RSA
,
ret
,
&
ret
->
ex_data
);
OPENSSL_free
(
ret
);
ret
=
NULL
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录