Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
7ab50749
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看板
提交
7ab50749
编写于
1月 30, 2016
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add function to return internal enoding of X509_NAME.
PR#4280 Reviewed-by:
N
Tim Hudson
<
tjh@openssl.org
>
上级
33254e1c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
37 addition
and
6 deletion
+37
-6
crypto/x509/x_name.c
crypto/x509/x_name.c
+13
-0
doc/crypto/d2i_X509_NAME.pod
doc/crypto/d2i_X509_NAME.pod
+20
-6
include/openssl/x509.h
include/openssl/x509.h
+3
-0
util/libeay.num
util/libeay.num
+1
-0
未找到文件。
crypto/x509/x_name.c
浏览文件 @
7ab50749
...
...
@@ -567,3 +567,16 @@ int X509_NAME_print(BIO *bp, X509_NAME *name, int obase)
OPENSSL_free
(
b
);
return
0
;
}
int
X509_NAME_get0_der
(
const
unsigned
char
**
pder
,
size_t
*
pderlen
,
X509_NAME
*
nm
)
{
/* Make sure encoding is valid */
if
(
i2d_X509_NAME
(
nm
,
NULL
)
<=
0
)
return
0
;
if
(
pder
!=
NULL
)
*
pder
=
(
unsigned
char
*
)
nm
->
bytes
->
data
;
if
(
pderlen
!=
NULL
)
*
pderlen
=
nm
->
bytes
->
length
;
return
1
;
}
doc/crypto/d2i_X509_NAME.pod
浏览文件 @
7ab50749
...
...
@@ -11,21 +11,35 @@ d2i_X509_NAME, i2d_X509_NAME - X509_NAME encoding functions
X509_NAME *d2i_X509_NAME(X509_NAME **a, unsigned char **pp, long length);
int i2d_X509_NAME(X509_NAME *a, unsigned char **pp);
int X509_NAME_get0_der(const unsigned char **pder, size_t *pderlen,
X509_NAME *nm)
=head1 DESCRIPTION
These functions decode and encode an B<X509_NAME> structure which is the
same as the B<Name> type defined in RFC2459 (and elsewhere) and used
for example in certificate subject and issuer names.
The functions d2i_X509_NAME() and i2d_X509_NAME() decode and encode an
B<X509_NAME> structure which is the same as the B<Name> type defined in
RFC3280 (and elsewhere) and used for example in certificate subject and
issuer names.
Otherwise the functions behave in a similar way to d2i_X509() and i2d_X509()
described in the L<d2i_X509(3)> manual page.
The function X509_NAME_get0_der() returns an internal pointer to the
encoding of an B<X509_NAME> structure in B<*pder> and consisting of
B<*pderlen> bytes. It is useful for applications that wish to examine
the encoding of an B<X509_NAME> structure without copying it.
=head1 RETURN VALUES
=head1 SEE ALSO
L<d2i_X509(3)>
The meanings of the return values of d2i_X509_NAME() and i2d_X509_NAME()
are similar to those for d2i_X509() and i2d_X509().
=head1 HISTORY
The function X509_NAME_get0_der() returns 1 for success and 0 if an error
occurred.
TBA
L<d2i_X509(3)>
=cut
include/openssl/x509.h
浏览文件 @
7ab50749
...
...
@@ -873,6 +873,9 @@ ASN1_OBJECT *X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne);
ASN1_STRING
*
X509_NAME_ENTRY_get_data
(
X509_NAME_ENTRY
*
ne
);
int
X509_NAME_ENTRY_set
(
const
X509_NAME_ENTRY
*
ne
);
int
X509_NAME_get0_der
(
const
unsigned
char
**
pder
,
size_t
*
pderlen
,
X509_NAME
*
nm
);
int
X509v3_get_ext_count
(
const
STACK_OF
(
X509_EXTENSION
)
*
x
);
int
X509v3_get_ext_by_NID
(
const
STACK_OF
(
X509_EXTENSION
)
*
x
,
int
nid
,
int
lastpos
);
...
...
util/libeay.num
浏览文件 @
7ab50749
...
...
@@ -4765,3 +4765,4 @@ OCSP_resp_get0_produced_at 5159 1_1_0 EXIST::FUNCTION:
TS_STATUS_INFO_get0_failure_info 5160 1_1_0 EXIST::FUNCTION:
TS_STATUS_INFO_get0_text 5161 1_1_0 EXIST::FUNCTION:
CRYPTO_secure_zalloc 5162 1_1_0 EXIST::FUNCTION:
X509_NAME_get0_der 5163 1_1_0 EXIST::FUNCTION:
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录