Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
124055a9
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
大约 1 年 前同步成功
通知
9
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
124055a9
编写于
8月 31, 2015
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
make X509_REQ opaque
Reviewed-by:
N
Rich Salz
<
rsalz@openssl.org
>
上级
bc3686df
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
44 addition
and
33 deletion
+44
-33
apps/ca.c
apps/ca.c
+1
-4
apps/req.c
apps/req.c
+0
-2
apps/x509.c
apps/x509.c
+2
-11
crypto/asn1/t_req.c
crypto/asn1/t_req.c
+1
-0
crypto/asn1/x_req.c
crypto/asn1/x_req.c
+1
-0
crypto/include/internal/x509_int.h
crypto/include/internal/x509_int.h
+16
-0
crypto/x509/x509_r2x.c
crypto/x509/x509_r2x.c
+1
-0
crypto/x509/x509_req.c
crypto/x509/x509_req.c
+11
-0
crypto/x509/x509rset.c
crypto/x509/x509rset.c
+4
-0
crypto/x509/x_all.c
crypto/x509/x_all.c
+1
-0
crypto/x509v3/v3_skey.c
crypto/x509v3/v3_skey.c
+1
-0
crypto/x509v3/v3_utl.c
crypto/x509v3/v3_utl.c
+1
-0
include/openssl/x509.h
include/openssl/x509.h
+4
-16
未找到文件。
apps/ca.c
浏览文件 @
124055a9
...
...
@@ -1479,7 +1479,6 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509,
goto
end
;
}
X509_REQ_set_subject_name
(
req
,
n
);
req
->
req_info
->
enc
.
modified
=
1
;
X509_NAME_free
(
n
);
}
...
...
@@ -1993,7 +1992,6 @@ static int certify_spkac(X509 **xret, char *infile, EVP_PKEY *pkey,
X509_REQ
*
req
=
NULL
;
CONF_VALUE
*
cv
=
NULL
;
NETSCAPE_SPKI
*
spki
=
NULL
;
X509_REQ_INFO
*
ri
;
char
*
type
,
*
buf
;
EVP_PKEY
*
pktmp
=
NULL
;
X509_NAME
*
n
=
NULL
;
...
...
@@ -2037,8 +2035,7 @@ static int certify_spkac(X509 **xret, char *infile, EVP_PKEY *pkey,
/*
* Build up the subject name set.
*/
ri
=
req
->
req_info
;
n
=
ri
->
subject
;
n
=
X509_REQ_get_subject_name
(
req
);
for
(
i
=
0
;;
i
++
)
{
if
(
sk_CONF_VALUE_num
(
sk
)
<=
i
)
...
...
apps/req.c
浏览文件 @
124055a9
...
...
@@ -726,8 +726,6 @@ int req_main(int argc, char **argv)
goto
end
;
}
req
->
req_info
->
enc
.
modified
=
1
;
if
(
verbose
)
{
print_name
(
bio_err
,
"new subject="
,
X509_REQ_get_subject_name
(
req
),
nmflag
);
...
...
apps/x509.c
浏览文件 @
124055a9
...
...
@@ -567,15 +567,6 @@ int x509_main(int argc, char **argv)
goto
end
;
}
if
((
req
->
req_info
==
NULL
)
||
(
req
->
req_info
->
pubkey
==
NULL
)
||
(
req
->
req_info
->
pubkey
->
public_key
==
NULL
)
||
(
req
->
req_info
->
pubkey
->
public_key
->
data
==
NULL
))
{
BIO_printf
(
bio_err
,
"The certificate request appears to corrupted
\n
"
);
BIO_printf
(
bio_err
,
"It does not contain a public key
\n
"
);
goto
end
;
}
if
((
pkey
=
X509_REQ_get_pubkey
(
req
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"error unpacking public key
\n
"
);
goto
end
;
...
...
@@ -611,9 +602,9 @@ int x509_main(int argc, char **argv)
}
else
if
(
!
X509_set_serialNumber
(
x
,
sno
))
goto
end
;
if
(
!
X509_set_issuer_name
(
x
,
req
->
req_info
->
subject
))
if
(
!
X509_set_issuer_name
(
x
,
X509_REQ_get_subject_name
(
req
)
))
goto
end
;
if
(
!
X509_set_subject_name
(
x
,
req
->
req_info
->
subject
))
if
(
!
X509_set_subject_name
(
x
,
X509_REQ_get_subject_name
(
req
)
))
goto
end
;
X509_gmtime_adj
(
X509_get_notBefore
(
x
),
0
);
...
...
crypto/asn1/t_req.c
浏览文件 @
124055a9
...
...
@@ -62,6 +62,7 @@
#include <openssl/bn.h>
#include <openssl/objects.h>
#include <openssl/x509.h>
#include "internal/x509_int.h"
#include <openssl/x509v3.h>
#ifndef OPENSSL_NO_RSA
# include <openssl/rsa.h>
...
...
crypto/asn1/x_req.c
浏览文件 @
124055a9
...
...
@@ -60,6 +60,7 @@
#include "internal/cryptlib.h"
#include <openssl/asn1t.h>
#include <openssl/x509.h>
#include "internal/x509_int.h"
/*-
* X509_REQ_INFO is handled in an unusual way to get round
...
...
crypto/include/internal/x509_int.h
浏览文件 @
124055a9
...
...
@@ -89,3 +89,19 @@ struct x509_cert_aux_st {
ASN1_OCTET_STRING
*
keyid
;
/* key id of private key */
STACK_OF
(
X509_ALGOR
)
*
other
;
/* other unspecified info */
};
struct
X509_req_info_st
{
ASN1_ENCODING
enc
;
ASN1_INTEGER
*
version
;
X509_NAME
*
subject
;
X509_PUBKEY
*
pubkey
;
/* d=2 hl=2 l= 0 cons: cont: 00 */
STACK_OF
(
X509_ATTRIBUTE
)
*
attributes
;
/* [ 0 ] */
};
struct
X509_req_st
{
X509_REQ_INFO
*
req_info
;
X509_ALGOR
*
sig_alg
;
ASN1_BIT_STRING
*
signature
;
int
references
;
};
crypto/x509/x509_r2x.c
浏览文件 @
124055a9
...
...
@@ -62,6 +62,7 @@
#include <openssl/evp.h>
#include <openssl/asn1.h>
#include <openssl/x509.h>
#include "internal/x509_int.h"
#include <openssl/objects.h>
#include <openssl/buffer.h>
...
...
crypto/x509/x509_req.c
浏览文件 @
124055a9
...
...
@@ -63,6 +63,7 @@
#include <openssl/asn1.h>
#include <openssl/asn1t.h>
#include <openssl/x509.h>
#include "internal/x509_int.h"
#include <openssl/objects.h>
#include <openssl/buffer.h>
#include <openssl/pem.h>
...
...
@@ -303,3 +304,13 @@ int X509_REQ_add1_attr_by_txt(X509_REQ *req,
return
1
;
return
0
;
}
long
X509_REQ_get_version
(
X509_REQ
*
req
)
{
return
ASN1_INTEGER_get
(
req
->
req_info
->
version
);
}
X509_NAME
*
X509_REQ_get_subject_name
(
X509_REQ
*
req
)
{
return
req
->
req_info
->
subject
;
}
crypto/x509/x509rset.c
浏览文件 @
124055a9
...
...
@@ -62,11 +62,13 @@
#include <openssl/objects.h>
#include <openssl/evp.h>
#include <openssl/x509.h>
#include "internal/x509_int.h"
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
));
}
...
...
@@ -74,6 +76,7 @@ int X509_REQ_set_subject_name(X509_REQ *x, X509_NAME *name)
{
if
((
x
==
NULL
)
||
(
x
->
req_info
==
NULL
))
return
(
0
);
x
->
req_info
->
enc
.
modified
=
1
;
return
(
X509_NAME_set
(
&
x
->
req_info
->
subject
,
name
));
}
...
...
@@ -81,5 +84,6 @@ int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey)
{
if
((
x
==
NULL
)
||
(
x
->
req_info
==
NULL
))
return
(
0
);
x
->
req_info
->
enc
.
modified
=
1
;
return
(
X509_PUBKEY_set
(
&
x
->
req_info
->
pubkey
,
pkey
));
}
crypto/x509/x_all.c
浏览文件 @
124055a9
...
...
@@ -63,6 +63,7 @@
#include <openssl/asn1.h>
#include <openssl/evp.h>
#include <openssl/x509.h>
#include "internal/x509_int.h"
#include <openssl/ocsp.h>
#ifndef OPENSSL_NO_RSA
# include <openssl/rsa.h>
...
...
crypto/x509v3/v3_skey.c
浏览文件 @
124055a9
...
...
@@ -60,6 +60,7 @@
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/x509v3.h>
#include "internal/x509_int.h"
static
ASN1_OCTET_STRING
*
s2i_skey_id
(
X509V3_EXT_METHOD
*
method
,
X509V3_CTX
*
ctx
,
char
*
str
);
...
...
crypto/x509v3/v3_utl.c
浏览文件 @
124055a9
...
...
@@ -63,6 +63,7 @@
#include "internal/cryptlib.h"
#include <openssl/conf.h>
#include <openssl/x509v3.h>
#include "internal/x509_int.h"
#include <openssl/bn.h>
static
char
*
strip_spaces
(
char
*
name
);
...
...
include/openssl/x509.h
浏览文件 @
124055a9
...
...
@@ -166,21 +166,9 @@ typedef struct x509_attributes_st X509_ATTRIBUTE;
DECLARE_STACK_OF
(
X509_ATTRIBUTE
)
typedef
struct
X509_req_info_st
{
ASN1_ENCODING
enc
;
ASN1_INTEGER
*
version
;
X509_NAME
*
subject
;
X509_PUBKEY
*
pubkey
;
/* d=2 hl=2 l= 0 cons: cont: 00 */
STACK_OF
(
X509_ATTRIBUTE
)
*
attributes
;
/* [ 0 ] */
}
X509_REQ_INFO
;
typedef
struct
X509_req_info_st
X509_REQ_INFO
;
typedef
struct
X509_req_st
{
X509_REQ_INFO
*
req_info
;
X509_ALGOR
*
sig_alg
;
ASN1_BIT_STRING
*
signature
;
int
references
;
}
X509_REQ
;
typedef
struct
X509_req_st
X509_REQ
;
typedef
struct
x509_cinf_st
{
ASN1_INTEGER
*
version
;
/* [ 0 ] default of v1 */
...
...
@@ -508,8 +496,6 @@ extern "C" {
# define X509_get_notBefore(x) ((x)->cert_info->validity->notBefore)
# define X509_get_notAfter(x) ((x)->cert_info->validity->notAfter)
# define X509_extract_key(x) X509_get_pubkey(x)
/*****/
# define X509_REQ_get_version(x) ASN1_INTEGER_get((x)->req_info->version)
# define X509_REQ_get_subject_name(x) ((x)->req_info->subject)
# define X509_REQ_extract_key(a) X509_REQ_get_pubkey(a)
# define X509_name_cmp(a,b) X509_NAME_cmp((a),(b))
# define X509_get_signature_type(x) EVP_PKEY_type(OBJ_obj2nid((x)->sig_alg->algorithm))
...
...
@@ -816,7 +802,9 @@ EVP_PKEY *X509_get_pubkey(X509 *x);
ASN1_BIT_STRING
*
X509_get0_pubkey_bitstr
(
const
X509
*
x
);
int
X509_certificate_type
(
X509
*
x
,
EVP_PKEY
*
pubkey
/* optional */
);
long
X509_REQ_get_version
(
X509_REQ
*
req
);
int
X509_REQ_set_version
(
X509_REQ
*
x
,
long
version
);
X509_NAME
*
X509_REQ_get_subject_name
(
X509_REQ
*
req
);
int
X509_REQ_set_subject_name
(
X509_REQ
*
req
,
X509_NAME
*
name
);
int
X509_REQ_set_pubkey
(
X509_REQ
*
x
,
EVP_PKEY
*
pkey
);
EVP_PKEY
*
X509_REQ_get_pubkey
(
X509_REQ
*
req
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录