Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
285046ec
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看板
提交
285046ec
编写于
23年前
作者:
R
Richard Levitte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
SSL_add_dir_cert_subjects_to_stack for Win32 finally implemented.
Submitted by Massimo Santin <msantin@santineassociati.com>.
上级
f8000b93
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
55 addition
and
0 deletion
+55
-0
CHANGES
CHANGES
+3
-0
ssl/ssl_cert.c
ssl/ssl_cert.c
+52
-0
未找到文件。
CHANGES
浏览文件 @
285046ec
...
...
@@ -12,6 +12,9 @@
*) applies to 0.9.6a/0.9.6b/0.9.6c and 0.9.7
+) applies to 0.9.7 only
+) Add an implementation of SSL_add_dir_cert_subjects_to_stack for Win32.
[Massimo Santin via Richard Levitte]
+) Major restructuring to the underlying ENGINE code. This includes
reduction of linker bloat, separation of pure "ENGINE" manipulation
(initialisation, etc) from functionality dealing with implementations
...
...
This diff is collapsed.
Click to expand it.
ssl/ssl_cert.c
浏览文件 @
285046ec
...
...
@@ -115,6 +115,10 @@
#include <dirent.h>
#endif
#if defined(WIN32)
#include <windows.h>
#endif
#ifdef NeXT
#include <sys/dir.h>
#define dirent direct
...
...
@@ -771,4 +775,52 @@ err:
#endif
#endif
#else
int
SSL_add_dir_cert_subjects_to_stack
(
STACK_OF
(
X509_NAME
)
*
stack
,
const
char
*
dir
)
{
WIN32_FIND_DATA
FindFileData
;
HANDLE
hFind
;
int
ret
=
0
;
CRYPTO_w_lock
(
CRYPTO_LOCK_READDIR
);
hFind
=
FindFirstFile
(
dir
,
&
FindFileData
);
/* Note that a side effect is that the CAs will be sorted by name */
if
(
hFind
==
INVALID_HANDLE_VALUE
)
{
SYSerr
(
SYS_F_OPENDIR
,
get_last_sys_error
());
ERR_add_error_data
(
3
,
"opendir('"
,
dir
,
"')"
);
SSLerr
(
SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK
,
ERR_R_SYS_LIB
);
goto
err
;
}
do
{
char
buf
[
1024
];
int
r
;
if
(
strlen
(
dir
)
+
strlen
(
FindFileData
.
cFileName
)
+
2
>
sizeof
buf
)
{
SSLerr
(
SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK
,
SSL_R_PATH_TOO_LONG
);
goto
err
;
}
r
=
BIO_snprintf
(
buf
,
sizeof
buf
,
"%s/%s"
,
dir
,
FindFileData
.
cFileName
);
if
(
r
<=
0
||
r
>=
sizeof
buf
)
goto
err
;
if
(
!
SSL_add_file_cert_subjects_to_stack
(
stack
,
buf
))
goto
err
;
}
while
(
FindNextFile
(
hFind
,
&
FindFileData
)
!=
FALSE
);
FindClose
(
hFind
);
ret
=
1
;
err:
CRYPTO_w_unlock
(
CRYPTO_LOCK_READDIR
);
return
ret
;
}
#endif
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部