Hi all!
Trying to migrate from chan_sip to pjsip.
I’m having trouble getting tls to run with pjsip.
I’m using Asterisk 13.19.2 with pjsip 2.7.1 under gentoo (built with --with-pjproject-bundled) using openssl-1.0.2n .
- TLS is working for all my devices under chan_sip (Handshake converges to TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA cipher suite)
- TLSv1 handshake fails with pjsip for all my devices (I’m trying to debug with CSipSimple 1.02.03)
- I see TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA offered in CSipSimple’s TLSv1 Client Hello message (in a tcpdump captured trace)
- I see asterisk responding with a Handshake failure
- The asterisk console claims no overlap in supported ciphers “WARNING[9241]: pjproject:0 <?>: SSL SSL_ERROR_SSL (Handshake): Level: 0 err: <336109761> len: 0”
This behaviour is consistent whether I omit the ‘cipher’ parameter or whether I specify cipher=ECDHE-RSA-AES256-SHA (which according to https://www.openssl.org/docs/manmaster/man1/ciphers.html#CIPHER_STRINGS corresponds to TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) explicitely in my transport definition.
My [transport] reads:
[transport-tls]
type=transport
protocol=tls
bind=0.0.0.0:5061
cert_file=/etc/asterisk/keys/asterisk.pem
method=tlsv1
cipher=ECDHE-RSA-AES256-SHA
asterisk.pem is the single file containing both the key and the certificate.
pjsip show transport transport-tls shows - as expected:
Transport: transport-tls tls 0 0 0.0.0.0:5061
ParameterName : ParameterValue
allow_reload : false
async_operations : 1
bind : 0.0.0.0:5061
ca_list_file :
ca_list_path :
cert_file : /etc/asterisk/keys/asterisk.pem
cipher : ECDHE-RSA-AES256-SHA
cos : 0
domain :
external_media_address :
external_signaling_address :
external_signaling_port : 0
local_net :
method : tlsv1
password :
priv_key_file :
protocol : tls
require_client_cert : No
symmetric_transport : false
tos : 0
verify_client : No
verify_server : No
websocket_write_timeout : 100
‘pjsip list ciphers’ lists a plethora of suites (amongst them: ECDHE-RSA-AES256-SHA )
To my understanding, everything should be working… but unfortunately, nothing is… so I’m hoping that the error message delivered is simply not expressive and that the real problem lies in my configuration. Any suggestions?