Skip to content

DTLS Handshake is failing with "VERIFY_MAC_ERROR" #463

@swamidas1998

Description

@swamidas1998

Hi Team,

Type:- Bug
Priority:- Critical
WolfSSL build:- 4.6.0
OpenSSL Server version:- OpenSSL 1.0.2u

I was porting the DTLS client into my application and encountered an error during the DTLS Handshake.
During the handshake, The TimingPadVerify API is failing with VERIFY_MAC_ERROR For the "Encrypted Handshake Message" packet received from the DTLS server, and this issue is observed only in the case when we get "Change Cipher Spec + Encrypted Handshake Message" in a single DTLS packet. However, The handshake is successful when the "Encrypted Handshake Message" alone is received in a single packet.
Do I need to enable any other macros or need to call any APIs?
Could you please help me in resolving this issue?

Please find the snaps of the Wireshark capture.
If you have a look at the below capture, Packet number 105 has both the headers and the TimingPadVerify API fails.
DTLS_multi_packets

If you have a look at the below capture, Packet number 110 has only "Encrypted Handshake Message" and the API is successful at this point.
DTLS_single_packet

OpenSSL Server command:- .\openssl.exe s_server -accept 5012 -cert server-cert.pem -key server-key.pem -dtls1_2 -cipher AES256-SHA256

Note:- It's not a cipher specific issue.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions