Skip to content
代码片段 群组 项目
提交 bdb936b7 编辑于 作者: Jerry Yu's avatar Jerry Yu
浏览文件

Workaround anti replay fail of GnuTLS


Signed-off-by: default avatarJerry Yu <jerry.h.yu@arm.com>
上级 a15af378
No related branches found
No related tags found
无相关合并请求
......@@ -947,6 +947,16 @@ int mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext(
uint32_t obfuscated_ticket_age =
(uint32_t)( now - session->ticket_received );
/* Workaround for anti replay fail of GnuTLS server.
*
* The time unit of ticket age is milliseconds, but current unit is
* seconds. If the ticket was received at the end of first second and
* sent in next second, GnuTLS think it is replay attack.
*
*/
if( obfuscated_ticket_age > 0 )
obfuscated_ticket_age -= 1;
obfuscated_ticket_age *= 1000;
obfuscated_ticket_age += session->ticket_age_add;
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册