Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
cf56663f
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看板
提交
cf56663f
编写于
2月 12, 2003
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Option to disable SSL auto chain build
上级
ea513641
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
34 addition
and
3 deletion
+34
-3
CHANGES
CHANGES
+18
-0
ssl/s3_both.c
ssl/s3_both.c
+14
-3
ssl/ssl.h
ssl/ssl.h
+2
-0
未找到文件。
CHANGES
浏览文件 @
cf56663f
...
...
@@ -420,6 +420,24 @@ TODO: bug: pad x with leading zeros if necessary
Changes between 0.9.7 and 0.9.7a [XX xxx 2003]
*) Allow an application to disable the automatic SSL chain building.
Before this a rather primitive chain build was always performed in
ssl3_output_cert_chain(): an application had no way to send the
correct chain if the automatic operation produced an incorrect result.
Now the chain builder is disabled if either:
1. Extra certificates are added via SSL_CTX_add_extra_chain_cert().
2. The mode flag SSL_MODE_NO_AUTO_CHAIN is set.
The reasoning behind this is that an application would not want the
auto chain building to take place if extra chain certificates are
present and it might also want a means of sending no additional
certificates (for example the chain has two certificates and the
root is omitted).
[Steve Henson]
*) Add the possibility to build without the ENGINE framework.
[Steven Reddie <smr@essemer.com.au> via Richard Levitte]
...
...
ssl/s3_both.c
浏览文件 @
cf56663f
...
...
@@ -273,6 +273,13 @@ unsigned long ssl3_output_cert_chain(SSL *s, X509 *x)
X509_STORE_CTX
xs_ctx
;
X509_OBJECT
obj
;
int
no_chain
;
if
((
s
->
mode
&
SSL_MODE_NO_AUTO_CHAIN
)
||
s
->
ctx
->
extra_certs
)
no_chain
=
1
;
else
no_chain
=
0
;
/* TLSv1 sends a chain with nothing in it, instead of an alert */
buf
=
s
->
init_buf
;
if
(
!
BUF_MEM_grow_clean
(
buf
,
10
))
...
...
@@ -282,7 +289,7 @@ unsigned long ssl3_output_cert_chain(SSL *s, X509 *x)
}
if
(
x
!=
NULL
)
{
if
(
!
X509_STORE_CTX_init
(
&
xs_ctx
,
s
->
ctx
->
cert_store
,
NULL
,
NULL
))
if
(
!
no_chain
&&
!
X509_STORE_CTX_init
(
&
xs_ctx
,
s
->
ctx
->
cert_store
,
NULL
,
NULL
))
{
SSLerr
(
SSL_F_SSL3_OUTPUT_CERT_CHAIN
,
ERR_R_X509_LIB
);
return
(
0
);
...
...
@@ -300,6 +307,10 @@ unsigned long ssl3_output_cert_chain(SSL *s, X509 *x)
l2n3
(
n
,
p
);
i2d_X509
(
x
,
&
p
);
l
+=
n
+
3
;
if
(
no_chain
)
break
;
if
(
X509_NAME_cmp
(
X509_get_subject_name
(
x
),
X509_get_issuer_name
(
x
))
==
0
)
break
;
...
...
@@ -311,8 +322,8 @@ unsigned long ssl3_output_cert_chain(SSL *s, X509 *x)
* ref count */
X509_free
(
x
);
}
X509_STORE_CTX_cleanup
(
&
xs_ctx
);
if
(
!
no_chain
)
X509_STORE_CTX_cleanup
(
&
xs_ctx
);
}
/* Thawte special :-) */
...
...
ssl/ssl.h
浏览文件 @
cf56663f
...
...
@@ -529,6 +529,8 @@ typedef struct ssl_session_st
/* Never bother the application with retries if the transport
* is blocking: */
#define SSL_MODE_AUTO_RETRY 0x00000004L
/* Don't attempt to automatically build certificate chain */
#define SSL_MODE_NO_AUTO_CHAIN 0x00000008L
/* Note: SSL[_CTX]_set_{options,mode} use |= op on the previous value,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录