-
Notifications
You must be signed in to change notification settings - Fork 485
Description
After upgrading the library to the latest preview 6.1.0-pre, the DTLS handshake is now failing and WebRTC no longer connects. Downgrading back to the 6.0.12 fixes the issue. It looks like the error is coming from BouncyCastle and I found this was recently updated to the latest nuget.
It looks like inside BouncyCastle it fails due to a mismatch of certificate types: RSA vs ECDSA. So it might be a duplicate of #953
I am running on Windows 11 ARM64, VS 2022 17.8.3, NET8.
sipsorcery[0]
RTCPeerConnection DTLS handshake failed with error illegal_parameter(47).
warn: sipsorcery[0]
DTLS server raised unexpected alert: fatal(2), illegal_parameter(47).
warn: sipsorcery[0]
DTLS handshake as server failed. illegal_parameter(47)
Org.BouncyCastle.Tls.TlsFatalAlert: illegal_parameter(47)
at Org.BouncyCastle.Tls.TlsUtilities.CheckClientCertificateType(CertificateRequest certificateRequest, Int16 clientCertificateType, Int16 alertDescription)
at Org.BouncyCastle.Tls.TlsUtilities.VerifyCertificateVerifyClient(TlsServerContext serverContext, CertificateRequest certificateRequest, DigitallySigned certificateVerify, TlsHandshakeHash handshakeHash)
at Org.BouncyCastle.Tls.DtlsServerProtocol.ProcessCertificateVerify(ServerHandshakeState state, Byte[] body, TlsHandshakeHash handshakeHash)
at Org.BouncyCastle.Tls.DtlsServerProtocol.ServerHandshake(ServerHandshakeState state, DtlsRecordLayer recordLayer, DtlsRequest request)
at Org.BouncyCastle.Tls.DtlsServerProtocol.Accept(TlsServer server, DatagramTransport transport, DtlsRequest request)
at Org.BouncyCastle.Tls.DtlsServerProtocol.Accept(TlsServer server, DatagramTransport transport)
at SIPSorcery.Net.DtlsSrtpTransport.DoHandshakeAsServer(String& handshakeError)