Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
95ed0e7c
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看板
提交
95ed0e7c
编写于
9月 16, 2015
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Embed X509_REQ_INFO
Reviewed-by:
N
Rich Salz
<
rsalz@openssl.org
>
上级
5cf6abd8
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
32 addition
and
32 deletion
+32
-32
crypto/asn1/t_req.c
crypto/asn1/t_req.c
+2
-2
crypto/asn1/x_req.c
crypto/asn1/x_req.c
+1
-1
crypto/include/internal/x509_int.h
crypto/include/internal/x509_int.h
+1
-1
crypto/x509/x509_r2x.c
crypto/x509/x509_r2x.c
+1
-1
crypto/x509/x509_req.c
crypto/x509/x509_req.c
+15
-15
crypto/x509/x509rset.c
crypto/x509/x509rset.c
+8
-8
crypto/x509/x_all.c
crypto/x509/x_all.c
+3
-3
crypto/x509v3/v3_skey.c
crypto/x509v3/v3_skey.c
+1
-1
未找到文件。
crypto/asn1/t_req.c
浏览文件 @
95ed0e7c
...
...
@@ -108,7 +108,7 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags,
if
(
nmflags
==
X509_FLAG_COMPAT
)
nmindent
=
16
;
ri
=
x
->
req_info
;
ri
=
&
x
->
req_info
;
if
(
!
(
cflag
&
X509_FLAG_NO_HEADER
))
{
if
(
BIO_write
(
bp
,
"Certificate Request:
\n
"
,
21
)
<=
0
)
goto
err
;
...
...
@@ -153,7 +153,7 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags,
if
(
BIO_printf
(
bp
,
"%8sAttributes:
\n
"
,
""
)
<=
0
)
goto
err
;
sk
=
x
->
req_info
->
attributes
;
sk
=
x
->
req_info
.
attributes
;
if
(
sk_X509_ATTRIBUTE_num
(
sk
)
==
0
)
{
if
(
BIO_printf
(
bp
,
"%12sa0:00
\n
"
,
""
)
<=
0
)
goto
err
;
...
...
crypto/asn1/x_req.c
浏览文件 @
95ed0e7c
...
...
@@ -107,7 +107,7 @@ ASN1_SEQUENCE_enc(X509_REQ_INFO, enc, rinf_cb) = {
IMPLEMENT_ASN1_FUNCTIONS
(
X509_REQ_INFO
)
ASN1_SEQUENCE_ref
(
X509_REQ
,
0
,
CRYPTO_LOCK_X509_REQ
)
=
{
ASN1_
SIMPLE
(
X509_REQ
,
req_info
,
X509_REQ_INFO
),
ASN1_
EMBED
(
X509_REQ
,
req_info
,
X509_REQ_INFO
),
ASN1_SIMPLE
(
X509_REQ
,
sig_alg
,
X509_ALGOR
),
ASN1_SIMPLE
(
X509_REQ
,
signature
,
ASN1_BIT_STRING
)
}
ASN1_SEQUENCE_END_ref
(
X509_REQ
,
X509_REQ
)
...
...
crypto/include/internal/x509_int.h
浏览文件 @
95ed0e7c
...
...
@@ -100,7 +100,7 @@ struct X509_req_info_st {
};
struct
X509_req_st
{
X509_REQ_INFO
*
req_info
;
X509_REQ_INFO
req_info
;
X509_ALGOR
*
sig_alg
;
ASN1_BIT_STRING
*
signature
;
int
references
;
...
...
crypto/x509/x509_r2x.c
浏览文件 @
95ed0e7c
...
...
@@ -80,7 +80,7 @@ X509 *X509_REQ_to_X509(X509_REQ *r, int days, EVP_PKEY *pkey)
/* duplicate the request */
xi
=
&
ret
->
cert_info
;
if
(
sk_X509_ATTRIBUTE_num
(
r
->
req_info
->
attributes
)
!=
0
)
{
if
(
sk_X509_ATTRIBUTE_num
(
r
->
req_info
.
attributes
)
!=
0
)
{
if
((
xi
->
version
=
ASN1_INTEGER_new
())
==
NULL
)
goto
err
;
if
(
!
ASN1_INTEGER_set
(
xi
->
version
,
2
))
...
...
crypto/x509/x509_req.c
浏览文件 @
95ed0e7c
...
...
@@ -81,7 +81,7 @@ X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md)
goto
err
;
}
ri
=
ret
->
req_info
;
ri
=
&
ret
->
req_info
;
ri
->
version
->
length
=
1
;
ri
->
version
->
data
=
OPENSSL_malloc
(
1
);
...
...
@@ -112,9 +112,9 @@ X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md)
EVP_PKEY
*
X509_REQ_get_pubkey
(
X509_REQ
*
req
)
{
if
(
(
req
==
NULL
)
||
(
req
->
req_info
==
NULL
)
)
if
(
req
==
NULL
)
return
(
NULL
);
return
(
X509_PUBKEY_get
(
req
->
req_info
->
pubkey
));
return
(
X509_PUBKEY_get
(
req
->
req_info
.
pubkey
));
}
int
X509_REQ_check_private_key
(
X509_REQ
*
x
,
EVP_PKEY
*
k
)
...
...
@@ -195,7 +195,7 @@ STACK_OF(X509_EXTENSION) *X509_REQ_get_extensions(X509_REQ *req)
int
idx
,
*
pnid
;
const
unsigned
char
*
p
;
if
((
req
==
NULL
)
||
(
req
->
req_info
==
NULL
)
||
!
ext_nids
)
if
((
req
==
NULL
)
||
!
ext_nids
)
return
(
NULL
);
for
(
pnid
=
ext_nids
;
*
pnid
!=
NID_undef
;
pnid
++
)
{
idx
=
X509_REQ_get_attr_by_NID
(
req
,
*
pnid
,
-
1
);
...
...
@@ -244,33 +244,33 @@ int X509_REQ_add_extensions(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts)
int
X509_REQ_get_attr_count
(
const
X509_REQ
*
req
)
{
return
X509at_get_attr_count
(
req
->
req_info
->
attributes
);
return
X509at_get_attr_count
(
req
->
req_info
.
attributes
);
}
int
X509_REQ_get_attr_by_NID
(
const
X509_REQ
*
req
,
int
nid
,
int
lastpos
)
{
return
X509at_get_attr_by_NID
(
req
->
req_info
->
attributes
,
nid
,
lastpos
);
return
X509at_get_attr_by_NID
(
req
->
req_info
.
attributes
,
nid
,
lastpos
);
}
int
X509_REQ_get_attr_by_OBJ
(
const
X509_REQ
*
req
,
ASN1_OBJECT
*
obj
,
int
lastpos
)
{
return
X509at_get_attr_by_OBJ
(
req
->
req_info
->
attributes
,
obj
,
lastpos
);
return
X509at_get_attr_by_OBJ
(
req
->
req_info
.
attributes
,
obj
,
lastpos
);
}
X509_ATTRIBUTE
*
X509_REQ_get_attr
(
const
X509_REQ
*
req
,
int
loc
)
{
return
X509at_get_attr
(
req
->
req_info
->
attributes
,
loc
);
return
X509at_get_attr
(
req
->
req_info
.
attributes
,
loc
);
}
X509_ATTRIBUTE
*
X509_REQ_delete_attr
(
X509_REQ
*
req
,
int
loc
)
{
return
X509at_delete_attr
(
req
->
req_info
->
attributes
,
loc
);
return
X509at_delete_attr
(
req
->
req_info
.
attributes
,
loc
);
}
int
X509_REQ_add1_attr
(
X509_REQ
*
req
,
X509_ATTRIBUTE
*
attr
)
{
if
(
X509at_add1_attr
(
&
req
->
req_info
->
attributes
,
attr
))
if
(
X509at_add1_attr
(
&
req
->
req_info
.
attributes
,
attr
))
return
1
;
return
0
;
}
...
...
@@ -279,7 +279,7 @@ int X509_REQ_add1_attr_by_OBJ(X509_REQ *req,
const
ASN1_OBJECT
*
obj
,
int
type
,
const
unsigned
char
*
bytes
,
int
len
)
{
if
(
X509at_add1_attr_by_OBJ
(
&
req
->
req_info
->
attributes
,
obj
,
if
(
X509at_add1_attr_by_OBJ
(
&
req
->
req_info
.
attributes
,
obj
,
type
,
bytes
,
len
))
return
1
;
return
0
;
...
...
@@ -289,7 +289,7 @@ int X509_REQ_add1_attr_by_NID(X509_REQ *req,
int
nid
,
int
type
,
const
unsigned
char
*
bytes
,
int
len
)
{
if
(
X509at_add1_attr_by_NID
(
&
req
->
req_info
->
attributes
,
nid
,
if
(
X509at_add1_attr_by_NID
(
&
req
->
req_info
.
attributes
,
nid
,
type
,
bytes
,
len
))
return
1
;
return
0
;
...
...
@@ -299,7 +299,7 @@ int X509_REQ_add1_attr_by_txt(X509_REQ *req,
const
char
*
attrname
,
int
type
,
const
unsigned
char
*
bytes
,
int
len
)
{
if
(
X509at_add1_attr_by_txt
(
&
req
->
req_info
->
attributes
,
attrname
,
if
(
X509at_add1_attr_by_txt
(
&
req
->
req_info
.
attributes
,
attrname
,
type
,
bytes
,
len
))
return
1
;
return
0
;
...
...
@@ -307,10 +307,10 @@ int X509_REQ_add1_attr_by_txt(X509_REQ *req,
long
X509_REQ_get_version
(
X509_REQ
*
req
)
{
return
ASN1_INTEGER_get
(
req
->
req_info
->
version
);
return
ASN1_INTEGER_get
(
req
->
req_info
.
version
);
}
X509_NAME
*
X509_REQ_get_subject_name
(
X509_REQ
*
req
)
{
return
req
->
req_info
->
subject
;
return
req
->
req_info
.
subject
;
}
crypto/x509/x509rset.c
浏览文件 @
95ed0e7c
...
...
@@ -68,22 +68,22 @@ int X509_REQ_set_version(X509_REQ *x, long version)
{
if
(
x
==
NULL
)
return
(
0
);
x
->
req_info
->
enc
.
modified
=
1
;
return
(
ASN1_INTEGER_set
(
x
->
req_info
->
version
,
version
));
x
->
req_info
.
enc
.
modified
=
1
;
return
(
ASN1_INTEGER_set
(
x
->
req_info
.
version
,
version
));
}
int
X509_REQ_set_subject_name
(
X509_REQ
*
x
,
X509_NAME
*
name
)
{
if
(
(
x
==
NULL
)
||
(
x
->
req_info
==
NULL
)
)
if
(
x
==
NULL
)
return
(
0
);
x
->
req_info
->
enc
.
modified
=
1
;
return
(
X509_NAME_set
(
&
x
->
req_info
->
subject
,
name
));
x
->
req_info
.
enc
.
modified
=
1
;
return
(
X509_NAME_set
(
&
x
->
req_info
.
subject
,
name
));
}
int
X509_REQ_set_pubkey
(
X509_REQ
*
x
,
EVP_PKEY
*
pkey
)
{
if
(
(
x
==
NULL
)
||
(
x
->
req_info
==
NULL
)
)
if
(
x
==
NULL
)
return
(
0
);
x
->
req_info
->
enc
.
modified
=
1
;
return
(
X509_PUBKEY_set
(
&
x
->
req_info
->
pubkey
,
pkey
));
x
->
req_info
.
enc
.
modified
=
1
;
return
(
X509_PUBKEY_set
(
&
x
->
req_info
.
pubkey
,
pkey
));
}
crypto/x509/x_all.c
浏览文件 @
95ed0e7c
...
...
@@ -83,7 +83,7 @@ int X509_verify(X509 *a, EVP_PKEY *r)
int
X509_REQ_verify
(
X509_REQ
*
a
,
EVP_PKEY
*
r
)
{
return
(
ASN1_item_verify
(
ASN1_ITEM_rptr
(
X509_REQ_INFO
),
a
->
sig_alg
,
a
->
signature
,
a
->
req_info
,
r
));
a
->
sig_alg
,
a
->
signature
,
&
a
->
req_info
,
r
));
}
int
NETSCAPE_SPKI_verify
(
NETSCAPE_SPKI
*
a
,
EVP_PKEY
*
r
)
...
...
@@ -116,13 +116,13 @@ int X509_http_nbio(OCSP_REQ_CTX *rctx, X509 **pcert)
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
,
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
,
x
->
sig_alg
,
NULL
,
x
->
signature
,
&
x
->
req_info
,
ctx
);
}
...
...
crypto/x509v3/v3_skey.c
浏览文件 @
95ed0e7c
...
...
@@ -126,7 +126,7 @@ static ASN1_OCTET_STRING *s2i_skey_id(X509V3_EXT_METHOD *method,
}
if
(
ctx
->
subject_req
)
pk
=
ctx
->
subject_req
->
req_info
->
pubkey
->
public_key
;
pk
=
ctx
->
subject_req
->
req_info
.
pubkey
->
public_key
;
else
pk
=
ctx
->
subject_cert
->
cert_info
.
key
->
public_key
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录