Hi,
I'm implementing DTLS-SRTP support on our WebRTC gateway using openssl version 1.0.1e. I have it working with Chrome 28.0.1500.95m when the gateway is the server (and the caller) and Chrome is the client. However, when the gateway is the callee/client, the DTLS negotiation fails early with a decoding error at our gateway trying to decode the server/Chrome response with "Server Hello, Certificate, Server Key Exchange, Certificate Request, Server Hello Done". Just for comparison, when the gateway is acting as the server, its response contains "Server Hello, Certificate, Server Hello Done", which works.
The gateway is using a self-signed certificate with no CA, and it has the SSL verify mode set to SSL_VERIFY_NONE. The verify routine callback is still called by openssl after reading Server Hello with an error like, "18:self signed certificate:depth=0:/CN=WebRTC". I am not sure if this is a real error or not, and if the callback should be even called with verify disabled. The callback function, however, returns 1 to make openssl ignore it. Openssl continues on to read the server certificate and produces an alert with the fatal "decode error" (and SSL_read() or SSL_connect() returns SSL_ERROR_SSL (1)). At this point, I'm thinking it must be a problem on the gateway side either in code or set-up. Is there any one with familiarity with the topic and/or openssl offer me some suggestions as to what could be wrong here?
Thanks,
Uma