Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DTLS Handshake is failing with "VERIFY_MAC_ERROR" #463

Open
swamidas1998 opened this issue Sep 30, 2024 · 1 comment
Open

DTLS Handshake is failing with "VERIFY_MAC_ERROR" #463

swamidas1998 opened this issue Sep 30, 2024 · 1 comment
Assignees

Comments

@swamidas1998
Copy link

swamidas1998 commented Sep 30, 2024

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.

@dgarske
Copy link
Contributor

dgarske commented Sep 30, 2024

Hi @swamidas1998 ,
Thank you for the report. @rizlik will review this report.
Thanks, David Garske, wolfSSL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants