Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
8d207ee3
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
接近 2 年 前同步成功
通知
12
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看板
提交
8d207ee3
编写于
3月 14, 2010
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add X509_CRL_sign_ctx function
上级
cdb182b5
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
29 addition
and
7 deletion
+29
-7
crypto/asn1/a_sign.c
crypto/asn1/a_sign.c
+4
-4
crypto/x509/x509.h
crypto/x509/x509.h
+6
-3
crypto/x509/x_all.c
crypto/x509/x_all.c
+19
-0
未找到文件。
crypto/asn1/a_sign.c
浏览文件 @
8d207ee3
...
@@ -224,13 +224,13 @@ int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
...
@@ -224,13 +224,13 @@ int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
EVP_MD_CTX_cleanup
(
&
ctx
);
EVP_MD_CTX_cleanup
(
&
ctx
);
return
0
;
return
0
;
}
}
return
ASN1_item_sign_ctx
(
&
ctx
,
it
,
algor1
,
algor2
,
signature
,
asn
);
return
ASN1_item_sign_ctx
(
it
,
algor1
,
algor2
,
signature
,
asn
,
&
ctx
);
}
}
int
ASN1_item_sign_ctx
(
EVP_MD_CTX
*
ctx
,
int
ASN1_item_sign_ctx
(
const
ASN1_ITEM
*
it
,
const
ASN1_ITEM
*
it
,
X509_ALGOR
*
algor1
,
X509_ALGOR
*
algor2
,
X509_ALGOR
*
algor1
,
X509_ALGOR
*
algor2
,
ASN1_BIT_STRING
*
signature
,
void
*
asn
)
ASN1_BIT_STRING
*
signature
,
void
*
asn
,
EVP_MD_CTX
*
ctx
)
{
{
const
EVP_MD
*
type
;
const
EVP_MD
*
type
;
EVP_PKEY
*
pkey
;
EVP_PKEY
*
pkey
;
...
...
crypto/x509/x509.h
浏览文件 @
8d207ee3
...
@@ -660,8 +660,11 @@ int X509_signature_dump(BIO *bp,const ASN1_STRING *sig, int indent);
...
@@ -660,8 +660,11 @@ int X509_signature_dump(BIO *bp,const ASN1_STRING *sig, int indent);
int
X509_signature_print
(
BIO
*
bp
,
X509_ALGOR
*
alg
,
ASN1_STRING
*
sig
);
int
X509_signature_print
(
BIO
*
bp
,
X509_ALGOR
*
alg
,
ASN1_STRING
*
sig
);
int
X509_sign
(
X509
*
x
,
EVP_PKEY
*
pkey
,
const
EVP_MD
*
md
);
int
X509_sign
(
X509
*
x
,
EVP_PKEY
*
pkey
,
const
EVP_MD
*
md
);
int
X509_sign_ctx
(
X509
*
x
,
EVP_MD_CTX
*
ctx
);
int
X509_REQ_sign
(
X509_REQ
*
x
,
EVP_PKEY
*
pkey
,
const
EVP_MD
*
md
);
int
X509_REQ_sign
(
X509_REQ
*
x
,
EVP_PKEY
*
pkey
,
const
EVP_MD
*
md
);
int
X509_REQ_sign_ctx
(
X509_REQ
*
x
,
EVP_MD_CTX
*
ctx
);
int
X509_CRL_sign
(
X509_CRL
*
x
,
EVP_PKEY
*
pkey
,
const
EVP_MD
*
md
);
int
X509_CRL_sign
(
X509_CRL
*
x
,
EVP_PKEY
*
pkey
,
const
EVP_MD
*
md
);
int
X509_CRL_sign_ctx
(
X509_CRL
*
x
,
EVP_MD_CTX
*
ctx
);
int
NETSCAPE_SPKI_sign
(
NETSCAPE_SPKI
*
x
,
EVP_PKEY
*
pkey
,
const
EVP_MD
*
md
);
int
NETSCAPE_SPKI_sign
(
NETSCAPE_SPKI
*
x
,
EVP_PKEY
*
pkey
,
const
EVP_MD
*
md
);
int
X509_pubkey_digest
(
const
X509
*
data
,
const
EVP_MD
*
type
,
int
X509_pubkey_digest
(
const
X509
*
data
,
const
EVP_MD
*
type
,
...
@@ -897,9 +900,9 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *algor1,
...
@@ -897,9 +900,9 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *algor1,
int
ASN1_item_sign
(
const
ASN1_ITEM
*
it
,
X509_ALGOR
*
algor1
,
X509_ALGOR
*
algor2
,
int
ASN1_item_sign
(
const
ASN1_ITEM
*
it
,
X509_ALGOR
*
algor1
,
X509_ALGOR
*
algor2
,
ASN1_BIT_STRING
*
signature
,
ASN1_BIT_STRING
*
signature
,
void
*
data
,
EVP_PKEY
*
pkey
,
const
EVP_MD
*
type
);
void
*
data
,
EVP_PKEY
*
pkey
,
const
EVP_MD
*
type
);
int
ASN1_item_sign_ctx
(
EVP_MD_CTX
*
ctx
,
int
ASN1_item_sign_ctx
(
const
ASN1_ITEM
*
it
,
const
ASN1_ITEM
*
it
,
X509_ALGOR
*
algor1
,
X509_ALGOR
*
algor2
,
X509_ALGOR
*
algor1
,
X509_ALGOR
*
algor2
,
ASN1_BIT_STRING
*
signature
,
void
*
asn
);
ASN1_BIT_STRING
*
signature
,
void
*
asn
,
EVP_MD_CTX
*
ctx
);
#endif
#endif
int
X509_set_version
(
X509
*
x
,
long
version
);
int
X509_set_version
(
X509
*
x
,
long
version
);
...
...
crypto/x509/x_all.c
浏览文件 @
8d207ee3
...
@@ -94,12 +94,25 @@ int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md)
...
@@ -94,12 +94,25 @@ int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md)
x
->
sig_alg
,
x
->
signature
,
x
->
cert_info
,
pkey
,
md
));
x
->
sig_alg
,
x
->
signature
,
x
->
cert_info
,
pkey
,
md
));
}
}
int
X509_sign_ctx
(
X509
*
x
,
EVP_MD_CTX
*
ctx
)
{
return
ASN1_item_sign_ctx
(
ASN1_ITEM_rptr
(
X509_CINF
),
x
->
cert_info
->
signature
,
x
->
sig_alg
,
x
->
signature
,
x
->
cert_info
,
ctx
);
}
int
X509_REQ_sign
(
X509_REQ
*
x
,
EVP_PKEY
*
pkey
,
const
EVP_MD
*
md
)
int
X509_REQ_sign
(
X509_REQ
*
x
,
EVP_PKEY
*
pkey
,
const
EVP_MD
*
md
)
{
{
return
(
ASN1_item_sign
(
ASN1_ITEM_rptr
(
X509_REQ_INFO
),
x
->
sig_alg
,
NULL
,
return
(
ASN1_item_sign
(
ASN1_ITEM_rptr
(
X509_REQ_INFO
),
x
->
sig_alg
,
NULL
,
x
->
signature
,
x
->
req_info
,
pkey
,
md
));
x
->
signature
,
x
->
req_info
,
pkey
,
md
));
}
}
int
X509_REQ_sign_ctx
(
X509_REQ
*
x
,
EVP_MD_CTX
*
ctx
)
{
return
ASN1_item_sign_ctx
(
ASN1_ITEM_rptr
(
X509_REQ_INFO
),
x
->
sig_alg
,
NULL
,
x
->
signature
,
x
->
req_info
,
ctx
);
}
int
X509_CRL_sign
(
X509_CRL
*
x
,
EVP_PKEY
*
pkey
,
const
EVP_MD
*
md
)
int
X509_CRL_sign
(
X509_CRL
*
x
,
EVP_PKEY
*
pkey
,
const
EVP_MD
*
md
)
{
{
x
->
crl
->
enc
.
modified
=
1
;
x
->
crl
->
enc
.
modified
=
1
;
...
@@ -107,6 +120,12 @@ int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md)
...
@@ -107,6 +120,12 @@ int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md)
x
->
sig_alg
,
x
->
signature
,
x
->
crl
,
pkey
,
md
));
x
->
sig_alg
,
x
->
signature
,
x
->
crl
,
pkey
,
md
));
}
}
int
X509_CRL_sign_ctx
(
X509_CRL
*
x
,
EVP_MD_CTX
*
ctx
)
{
return
ASN1_item_sign_ctx
(
ASN1_ITEM_rptr
(
X509_CRL_INFO
),
x
->
crl
->
sig_alg
,
x
->
sig_alg
,
x
->
signature
,
x
->
crl
,
ctx
);
}
int
NETSCAPE_SPKI_sign
(
NETSCAPE_SPKI
*
x
,
EVP_PKEY
*
pkey
,
const
EVP_MD
*
md
)
int
NETSCAPE_SPKI_sign
(
NETSCAPE_SPKI
*
x
,
EVP_PKEY
*
pkey
,
const
EVP_MD
*
md
)
{
{
return
(
ASN1_item_sign
(
ASN1_ITEM_rptr
(
NETSCAPE_SPKAC
),
x
->
sig_algor
,
NULL
,
return
(
ASN1_item_sign
(
ASN1_ITEM_rptr
(
NETSCAPE_SPKAC
),
x
->
sig_algor
,
NULL
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录