Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
661b361b
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看板
提交
661b361b
编写于
5月 03, 1999
作者:
B
Ben Laurie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Some more stack stuff.
上级
0b3f827c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
11 deletion
+15
-11
crypto/stack/safestack.h
crypto/stack/safestack.h
+5
-3
ssl/ssl.h
ssl/ssl.h
+2
-2
ssl/ssl_cert.c
ssl/ssl_cert.c
+8
-6
未找到文件。
crypto/stack/safestack.h
浏览文件 @
661b361b
...
...
@@ -76,7 +76,8 @@ int sk_##type##_find(STACK_OF(type) *sk,type *v); \
type *sk_##type##_delete(STACK_OF(type) *sk,int n); \
void sk_##type##_delete_ptr(STACK_OF(type) *sk,type *v); \
int sk_##type##_insert(STACK_OF(type) *sk,type *v,int n); \
void sk_##type##_set_cmp_func(STACK_OF(type) *sk,int (*cmp)(type **,type **)); \
int (*sk_##type##_set_cmp_func(STACK_OF(type) *sk, \
int (*cmp)(type **,type **)))(type **,type **); \
STACK_OF(type) *sk_##type##_dup(STACK_OF(type) *sk); \
void sk_##type##_pop_free(STACK_OF(type) *sk,void (*func)(type *)); \
type *sk_##type##_shift(STACK_OF(type) *sk); \
...
...
@@ -107,8 +108,9 @@ void sk_##type##_delete_ptr(STACK_OF(type) *sk,type *v) \
{ sk_delete_ptr((STACK *)sk,(char *)v); } \
int sk_##type##_insert(STACK_OF(type) *sk,type *v,int n) \
{ return sk_insert((STACK *)sk,(char *)v,n); } \
void sk_##type##_set_cmp_func(STACK_OF(type) *sk,int (*cmp)(type **,type **)) \
{ sk_set_cmp_func((STACK *)sk,cmp); } \
int (*sk_##type##_set_cmp_func(STACK_OF(type) *sk, \
int (*cmp)(type **,type **)))(type **,type **) \
{ return (int (*)(type **,type **))sk_set_cmp_func((STACK *)sk,cmp); } \
STACK_OF(type) *sk_##type##_dup(STACK_OF(type) *sk) \
{ return (STACK_OF(type) *)sk_dup((STACK *)sk); } \
void sk_##type##_pop_free(STACK_OF(type) *sk,void (*func)(type *)) \
...
...
ssl/ssl.h
浏览文件 @
661b361b
...
...
@@ -876,9 +876,9 @@ int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, char *file, int type);
int
SSL_CTX_use_certificate_file
(
SSL_CTX
*
ctx
,
char
*
file
,
int
type
);
int
SSL_CTX_use_certificate_chain_file
(
SSL_CTX
*
ctx
,
const
char
*
file
);
/* PEM type */
STACK_OF
(
X509_NAME
)
*
SSL_load_client_CA_file
(
const
char
*
file
);
int
SSL_add_file_cert_subjects_to_stack
(
STACK
*
stackCAs
,
int
SSL_add_file_cert_subjects_to_stack
(
STACK
_OF
(
X509_NAME
)
*
stackCAs
,
const
char
*
file
);
int
SSL_add_dir_cert_subjects_to_stack
(
STACK
*
stackCAs
,
int
SSL_add_dir_cert_subjects_to_stack
(
STACK
_OF
(
X509_NAME
)
*
stackCAs
,
const
char
*
dir
);
#endif
...
...
ssl/ssl_cert.c
浏览文件 @
661b361b
...
...
@@ -373,7 +373,8 @@ err:
* certs may have been added to \c stack.
*/
int
SSL_add_file_cert_subjects_to_stack
(
STACK
*
stack
,
const
char
*
file
)
int
SSL_add_file_cert_subjects_to_stack
(
STACK_OF
(
X509_NAME
)
*
stack
,
const
char
*
file
)
{
BIO
*
in
;
X509
*
x
=
NULL
;
...
...
@@ -381,7 +382,7 @@ int SSL_add_file_cert_subjects_to_stack(STACK *stack,const char *file)
int
ret
=
1
;
int
(
*
oldcmp
)();
oldcmp
=
sk_set_cmp_func
(
stack
,
name_cmp
);
oldcmp
=
sk_
X509_NAME_
set_cmp_func
(
stack
,
name_cmp
);
in
=
BIO_new
(
BIO_s_file_internal
());
...
...
@@ -401,10 +402,10 @@ int SSL_add_file_cert_subjects_to_stack(STACK *stack,const char *file)
if
((
xn
=
X509_get_subject_name
(
x
))
==
NULL
)
goto
err
;
xn
=
X509_NAME_dup
(
xn
);
if
(
xn
==
NULL
)
goto
err
;
if
(
sk_
find
(
stack
,(
char
*
)
xn
)
>=
0
)
if
(
sk_
X509_NAME_find
(
stack
,
xn
)
>=
0
)
X509_NAME_free
(
xn
);
else
sk_
push
(
stack
,(
char
*
)
xn
);
sk_
X509_NAME_push
(
stack
,
xn
);
}
if
(
0
)
...
...
@@ -417,7 +418,7 @@ err:
if
(
x
!=
NULL
)
X509_free
(
x
);
sk_set_cmp_func
(
stack
,
oldcmp
);
sk_
X509_NAME_
set_cmp_func
(
stack
,
oldcmp
);
return
ret
;
}
...
...
@@ -435,7 +436,8 @@ err:
#ifndef WIN32
int
SSL_add_dir_cert_subjects_to_stack
(
STACK
*
stack
,
const
char
*
dir
)
int
SSL_add_dir_cert_subjects_to_stack
(
STACK_OF
(
X509_NAME
)
*
stack
,
const
char
*
dir
)
{
DIR
*
d
=
opendir
(
dir
);
struct
dirent
*
dstruct
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录