提交 2d729db2 编写于 作者: M Matt Caswell

Send TLSv1.2 as the record version when using TLSv1.3

Reviewed-by: NBen Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/4701)
上级 a5816a5a
......@@ -816,7 +816,8 @@ int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
/* Clear our SSL3_RECORD structures */
memset(wr, 0, sizeof(wr));
for (j = 0; j < numpipes; j++) {
unsigned int version = SSL_TREAT_AS_TLS13(s) ? TLS1_VERSION : s->version;
unsigned int version = SSL_TREAT_AS_TLS13(s) ? TLS1_2_VERSION
: s->version;
unsigned char *compressdata = NULL;
size_t maxcomplen;
unsigned int rectype;
......
......@@ -87,7 +87,7 @@ $testtype = REVERSE_ORDER_VERSIONS;
$proxy->start();
$record = pop @{$proxy->record_list};
ok(TLSProxy::Message->success()
&& $record->version() == TLSProxy::Record::VERS_TLS_1_0
&& $record->version() == TLSProxy::Record::VERS_TLS_1_2
&& TLSProxy::Proxy->is_tls13(),
"Reverse order versions");
......@@ -107,7 +107,7 @@ $testtype = WITH_TLS1_4;
$proxy->start();
$record = pop @{$proxy->record_list};
ok(TLSProxy::Message->success()
&& $record->version() == TLSProxy::Record::VERS_TLS_1_0
&& $record->version() == TLSProxy::Record::VERS_TLS_1_2
&& TLSProxy::Proxy->is_tls13(),
"TLS1.4 in supported versions extension");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册