Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
openssl
提交
885e601d
O
openssl
项目概览
btwise
/
openssl
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
885e601d
编写于
3月 02, 2016
作者:
K
Kurt Roeckx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use version flexible method instead of fixed version
Reviewed-by:
N
Viktor Dukhovni
<
viktor@openssl.org
>
MR: #1824
上级
0d5301af
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
40 deletion
+8
-40
test/clienthellotest.c
test/clienthellotest.c
+5
-22
test/heartbeat_test.c
test/heartbeat_test.c
+1
-1
test/ssltest.c
test/ssltest.c
+2
-17
未找到文件。
test/clienthellotest.c
浏览文件 @
885e601d
...
...
@@ -72,19 +72,13 @@
#define EXTENSION_SIZE_LEN 2
#define TOTAL_NUM_TESTS 2
/*
* Test that explicitly setting ticket data results in it appearing in the
* ClientHello for TLS1.2
*/
#define TEST_SET_SESSION_TICK_DATA_TLS_1_2 0
#define TOTAL_NUM_TESTS 1
/*
* Test that explicitly setting ticket data results in it appearing in the
* ClientHello for a negotiated SSL/TLS version
*/
#define TEST_SET_SESSION_TICK_DATA_VER_NEG
1
#define TEST_SET_SESSION_TICK_DATA_VER_NEG
0
int
main
(
int
argc
,
char
*
argv
[])
{
...
...
@@ -114,16 +108,7 @@ int main(int argc, char *argv[])
*/
for
(;
currtest
<
TOTAL_NUM_TESTS
;
currtest
++
)
{
testresult
=
0
;
if
(
currtest
==
TEST_SET_SESSION_TICK_DATA_TLS_1_2
)
{
#ifndef OPENSSL_NO_TLS1_2_METHOD
ctx
=
SSL_CTX_new
(
TLSv1_2_method
());
#else
testresult
=
1
;
continue
;
#endif
}
else
{
ctx
=
SSL_CTX_new
(
TLS_method
());
}
ctx
=
SSL_CTX_new
(
TLS_method
());
con
=
SSL_new
(
ctx
);
rbio
=
BIO_new
(
BIO_s_mem
());
...
...
@@ -131,8 +116,7 @@ int main(int argc, char *argv[])
SSL_set_bio
(
con
,
rbio
,
wbio
);
SSL_set_connect_state
(
con
);
if
(
currtest
==
TEST_SET_SESSION_TICK_DATA_TLS_1_2
||
currtest
==
TEST_SET_SESSION_TICK_DATA_VER_NEG
)
{
if
(
currtest
==
TEST_SET_SESSION_TICK_DATA_VER_NEG
)
{
if
(
!
SSL_set_session_ticket_ext
(
con
,
dummytick
,
strlen
(
dummytick
)))
goto
end
;
}
...
...
@@ -184,8 +168,7 @@ int main(int argc, char *argv[])
goto
end
;
if
(
type
==
TLSEXT_TYPE_session_ticket
)
{
if
(
currtest
==
TEST_SET_SESSION_TICK_DATA_TLS_1_2
||
currtest
==
TEST_SET_SESSION_TICK_DATA_VER_NEG
)
{
if
(
currtest
==
TEST_SET_SESSION_TICK_DATA_VER_NEG
)
{
if
(
size
==
strlen
(
dummytick
)
&&
memcmp
(
data
,
dummytick
,
size
)
==
0
)
{
/* Ticket data is as we expected */
...
...
test/heartbeat_test.c
浏览文件 @
885e601d
...
...
@@ -124,7 +124,7 @@ static HEARTBEAT_TEST_FIXTURE set_up(const char *const test_case_name,
static
HEARTBEAT_TEST_FIXTURE
set_up_dtls
(
const
char
*
const
test_case_name
)
{
HEARTBEAT_TEST_FIXTURE
fixture
=
set_up
(
test_case_name
,
DTLS
v1
_server_method
());
DTLS_server_method
());
fixture
.
process_heartbeat
=
dtls1_process_heartbeat
;
/*
...
...
test/ssltest.c
浏览文件 @
885e601d
...
...
@@ -3557,7 +3557,7 @@ static unsigned int psk_server_callback(SSL *ssl, const char *identity,
static
int
do_test_cipherlist
(
void
)
{
#if
!defined(OPENSSL_NO_SSL3_METHOD) || !defined(OPENSSL_NO_TLS1_METHOD)
#if
ndef OPENSSL_NO_TLS
int
i
=
0
;
const
SSL_METHOD
*
meth
;
const
SSL_CIPHER
*
ci
,
*
tci
=
NULL
;
...
...
@@ -3567,10 +3567,8 @@ static int do_test_cipherlist(void)
* call functions, thus avoiding auto-init
*/
OPENSSL_init_crypto
(
0
,
NULL
);
#endif
#ifndef OPENSSL_NO_SSL3_METHOD
meth
=
SSLv3_method
();
meth
=
TLS_method
();
tci
=
NULL
;
while
((
ci
=
meth
->
get_cipher
(
i
++
))
!=
NULL
)
{
if
(
tci
!=
NULL
)
...
...
@@ -3582,19 +3580,6 @@ static int do_test_cipherlist(void)
tci
=
ci
;
}
#endif
#ifndef OPENSSL_NO_TLS1_METHOD
meth
=
TLSv1_method
();
tci
=
NULL
;
while
((
ci
=
meth
->
get_cipher
(
i
++
))
!=
NULL
)
{
if
(
tci
!=
NULL
)
if
(
ci
->
id
>=
tci
->
id
)
{
fprintf
(
stderr
,
"testing TLSv1 cipher list order: "
);
fprintf
(
stderr
,
"failed %x vs. %x
\n
"
,
ci
->
id
,
tci
->
id
);
return
0
;
}
tci
=
ci
;
}
#endif
return
1
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录