Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
10061c7c
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看板
提交
10061c7c
编写于
1月 03, 1999
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
More EVP_PKEY patches for new functionality.
上级
cb0f35d7
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
29 addition
and
7 deletion
+29
-7
apps/ca.c
apps/ca.c
+7
-1
apps/req.c
apps/req.c
+4
-1
apps/x509.c
apps/x509.c
+13
-4
crypto/x509/x509_cmp.c
crypto/x509/x509_cmp.c
+1
-0
crypto/x509/x509_req.c
crypto/x509/x509_req.c
+4
-1
未找到文件。
apps/ca.c
浏览文件 @
10061c7c
...
...
@@ -1228,6 +1228,7 @@ int verbose;
goto
err
;
}
i
=
X509_REQ_verify
(
req
,
pktmp
);
EVP_PKEY_free
(
pktmp
);
if
(
i
<
0
)
{
ok
=
0
;
...
...
@@ -1297,6 +1298,7 @@ int verbose;
goto
err
;
}
i
=
X509_verify
(
req
,
pktmp
);
EVP_PKEY_free
(
pktmp
);
if
(
i
<
0
)
{
ok
=
0
;
...
...
@@ -1651,7 +1653,9 @@ again2:
if
(
!
X509_set_subject_name
(
ret
,
subject
))
goto
err
;
pktmp
=
X509_REQ_get_pubkey
(
req
);
if
(
!
X509_set_pubkey
(
ret
,
pktmp
))
goto
err
;
i
=
X509_set_pubkey
(
ret
,
pktmp
);
EVP_PKEY_free
(
pktmp
);
if
(
!
i
)
goto
err
;
/* Lets add the extensions, if there are any */
if
((
extensions
!=
NULL
)
&&
(
sk_num
(
extensions
)
>
0
))
...
...
@@ -1701,6 +1705,7 @@ again2:
if
(
EVP_PKEY_missing_parameters
(
pktmp
)
&&
!
EVP_PKEY_missing_parameters
(
pkey
))
EVP_PKEY_copy_parameters
(
pktmp
,
pkey
);
EVP_PKEY_free
(
pktmp
);
#endif
if
(
!
X509_sign
(
ret
,
pkey
,
dgst
))
...
...
@@ -1953,6 +1958,7 @@ int verbose;
BIO_printf
(
bio_err
,
"Signature ok
\n
"
);
X509_REQ_set_pubkey
(
req
,
pktmp
);
EVP_PKEY_free
(
pktmp
);
ok
=
do_body
(
xret
,
pkey
,
x509
,
dgst
,
policy
,
db
,
serial
,
startdate
,
days
,
1
,
verbose
,
req
,
extensions
);
err:
...
...
apps/req.c
浏览文件 @
10061c7c
...
...
@@ -624,6 +624,7 @@ loop:
}
if
(
x509
)
{
EVP_PKEY
*
tmppkey
;
if
((
x509ss
=
X509_new
())
==
NULL
)
goto
end
;
/* don't set the version number, for starters
...
...
@@ -639,7 +640,9 @@ loop:
(
long
)
60
*
60
*
24
*
days
);
X509_set_subject_name
(
x509ss
,
X509_REQ_get_subject_name
(
req
));
X509_set_pubkey
(
x509ss
,
X509_REQ_get_pubkey
(
req
));
tmppkey
=
X509_REQ_get_pubkey
(
req
);
X509_set_pubkey
(
x509ss
,
tmppkey
);
EVP_PKEY_free
(
tmppkey
);
if
(
!
(
i
=
X509_sign
(
x509ss
,
pkey
,
digest
)))
goto
end
;
...
...
apps/x509.c
浏览文件 @
10061c7c
...
...
@@ -402,7 +402,9 @@ bad:
ci->key=req->req_info->pubkey;
req->req_info->pubkey=NULL;
#else
X509_set_pubkey
(
x
,
X509_REQ_get_pubkey
(
req
));
pkey
=
X509_REQ_get_pubkey
(
req
);
X509_set_pubkey
(
x
,
pkey
);
EVP_PKEY_free
(
pkey
);
#endif
}
else
...
...
@@ -715,7 +717,9 @@ int days;
X509_STORE_CTX
xsc
;
EVP_PKEY
*
upkey
;
EVP_PKEY_copy_parameters
(
X509_get_pubkey
(
xca
),
pkey
);
upkey
=
X509_get_pubkey
(
xca
);
EVP_PKEY_copy_parameters
(
upkey
,
pkey
);
EVP_PKEY_free
(
upkey
);
X509_STORE_CTX_init
(
&
xsc
,
ctx
,
x
,
NULL
);
buf
=
(
char
*
)
Malloc
(
EVP_PKEY_size
(
pkey
)
*
2
+
...
...
@@ -833,6 +837,7 @@ int days;
/* Force a re-write */
X509_set_pubkey
(
x
,
upkey
);
}
EVP_PKEY_free
(
upkey
);
if
(
!
X509_sign
(
x
,
pkey
,
digest
))
goto
end
;
ret
=
1
;
...
...
@@ -1033,8 +1038,12 @@ int days;
EVP_MD
*
digest
;
{
EVP_PKEY_copy_parameters
(
X509_get_pubkey
(
x
),
pkey
);
EVP_PKEY_save_parameters
(
X509_get_pubkey
(
x
),
1
);
EVP_PKEY
*
pktmp
;
pktmp
=
X509_get_pubkey
(
x
);
EVP_PKEY_copy_parameters
(
pktmp
,
pkey
);
EVP_PKEY_save_parameters
(
pktmp
,
1
);
EVP_PKEY_free
(
pktmp
);
if
(
!
X509_set_issuer_name
(
x
,
X509_get_subject_name
(
x
)))
goto
err
;
if
(
X509_gmtime_adj
(
X509_get_notBefore
(
x
),
0
)
==
NULL
)
goto
err
;
...
...
crypto/x509/x509_cmp.c
浏览文件 @
10061c7c
...
...
@@ -297,5 +297,6 @@ EVP_PKEY *k;
ok
=
1
;
err:
EVP_PKEY_free
(
xk
);
return
(
ok
);
}
crypto/x509/x509_req.c
浏览文件 @
10061c7c
...
...
@@ -74,6 +74,7 @@ EVP_MD *md;
X509_REQ
*
ret
;
X509_REQ_INFO
*
ri
;
int
i
;
EVP_PKEY
*
pktmp
;
ret
=
X509_REQ_new
();
if
(
ret
==
NULL
)
...
...
@@ -92,7 +93,9 @@ EVP_MD *md;
if
(
!
X509_REQ_set_subject_name
(
ret
,
X509_get_subject_name
(
x
)))
goto
err
;
i
=
X509_REQ_set_pubkey
(
ret
,
X509_get_pubkey
(
x
));
pktmp
=
X509_get_pubkey
(
x
);
i
=
X509_REQ_set_pubkey
(
ret
,
pktmp
);
EVP_PKEY_free
(
pktmp
);
if
(
!
i
)
goto
err
;
if
(
pkey
!=
NULL
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录