Приветствую экспертов!
Устанавливаю в профиле принудительно cipher suites TLS_AES_256_GCM_SHA384 Профиль "не взлетает", видимо, по причине SSL_CTX_set_cipher_list:no cipher match
Код: ofia.c:4608 tls-version [tlsv1.3] 2020-03-10 08:53:07.303742 [DEBUG] sofia.c:4608 tls-ciphers [TLS_AES_256_GCM_SHA384] tport.c:498 tport_tcreate() tport_create(): 0x7f309404ed40 tport.c:1621 tport_bind_server() tport_bind_server(0x7f309404ed40) to tls/[2a2b:95a1:aaba::5e]:12345/sips tport.c:1693 tport_bind_server() tport_bind_server(0x7f309404ed40): calling tport_listen for tls tport.c:621 tport_alloc_primary() tport_alloc_primary(0x7f309404ed40): new primary tport 0x7f309404f280 tport_type_tls.c:239 tport_tls_init_master() tport_tls_init_master(0x7f309404f280): tls key = /etc/freeswitch/tls/agent.pem tport_tls.c:434 tls_init_context() tls: initialized ECDH tport_tls.c:440 tls_init_context() tls_init_context: error setting cipher list tport_tls.c:157 tls_log_errors() tls_init_context: 1410d0b9:SSL routines:SSL_CTX_set_cipher_list:no cipher match tport.c:727 tport_listen() tport_listen(0x7f309404ed40): tls_init_master(pf=10 tls/[2a2b:95a1:aaba::5e]:12345): Input/output error tport.c:555 tport_destroy() tport_destroy(0x7f309404ed40) 2020-03-10 08:53:07.323719 [ERR] sofia.c:3244 Error Creating SIP UA for profile: external-ipv6 (sip:mod_sofia@[2a2b:95a1:aaba::5e]:5080;transport=udp,tcp) ATTEMPT 1 (RETRY IN 5 SEC)
Что же, бывает.
Но! Если в профиле не устанавливать никакой cipher suites (типа, дефолт) или установить что-нибудь из tlsv1.2, к примеру, ECDHE-RSA-AES256-GCM-SHA384, то наблюдается странный феномен: соединение устанавливается по протоколу tlsv1.3 и согласовывается "типа неподходящий" (в предыдущем примере) cipher suites TLS_AES_256_GCM_SHA384
Код: 020-03-10 09:03:17.063713 [DEBUG] sofia.c:4608 tls-version [tlsv1.3] 2020-03-10 09:03:17.063713 [DEBUG] sofia.c:4608 tls-ciphers [ECDHE-RSA-AES256-GCM-SHA384] tport.c:498 tport_tcreate() tport_create(): 0x1b9c7a0 tport.c:1621 tport_bind_server() tport_bind_server(0x1b9c7a0) to tls/[2a2b:95a1:aaba::5e]:12345/sips tport.c:1693 tport_bind_server() tport_bind_server(0x1b9c7a0): calling tport_listen for tls tport.c:621 tport_alloc_primary() tport_alloc_primary(0x1b9c7a0): new primary tport 0x201d600 tport_type_tls.c:239 tport_tls_init_master() tport_tls_init_master(0x201d600): tls key = /etc/freeswitch/tls/agent.pem tport_tls.c:434 tls_init_context() tls: initialized ECDH tport_type_tls.c:266 tport_tls_init_master() tport_tls_init_master(0x201d600): tls context initialized for [2a2b:95a1:aaba::5e]:12345 tport.c:751 tport_listen() tport_listen(0x201d600): listening at tls/[2a2b:95a1:aaba::5e]:12345/sips tport.c:2759 tport_wakeup_pri() tport_wakeup_pri(0x201d600): events IN tport.c:862 tport_alloc_secondary() tport_alloc_secondary(0x201d600): new secondary tport 0x1b9b900 tport_type_tcp.c:203 tport_tcp_init_secondary() tport_tcp_init_secondary(0x1b9b900): Setting TCP_KEEPIDLE to 30 tport_type_tcp.c:209 tport_tcp_init_secondary() tport_tcp_init_secondary(0x1b9b900): Setting TCP_KEEPINTVL to 30 tport_type_tls.c:613 tport_tls_accept() tport_tls_accept(0x1b9b900): new connection from tls/[2a07:6a44:c012:81ac::3]:42069/sips tport_tls.c:960 tls_connect() tls_connect(0x1b9b900): events NEGOTIATING tport_tls.c:960 tls_connect() tls_connect(0x1b9b900): events NEGOTIATING tport_tls.c:603 tls_post_connection_check() tls_post_connection_check(0x1b9b900): TLS cipher chosen (name): TLS_AES_256_GCM_SHA384 tport_tls.c:605 tls_post_connection_check() tls_post_connection_check(0x1b9b900): TLS cipher chosen (version): TLSv1.3 tport_tls.c:608 tls_post_connection_check() tls_post_connection_check(0x1b9b900): TLS cipher chosen (bits/alg_bits): 256/256 tport_tls.c:611 tls_post_connection_check() tls_post_connection_check(0x1b9b900): TLS cipher chosen (description): TLS_AES_256_GCM_SHA384 TLSv1.3 Kx=any Au=any Enc=AESGCM(256) Mac=AEAD tport_tls.c:698 tls_post_connection_check() tls_post_connection_check(0x1b9b900): Peer Certificate Subject 0: 226.123.233.100 tport_tls.c:698 tls_post_connection_check() tls_post_connection_check(0x1b9b900): Peer Certificate Subject 1: 2a07:6a44:c012:81ac::3 tport.c:2304 tport_set_secondary_timer() tport(0x1b9b900): reset timer tport.c:2784 tport_wakeup() tport_wakeup(0x1b9b900): events IN tport.c:2882 tport_recv_event() tport_recv_event(0x1b9b900) tport_type_tls.c:434 tport_tls_recv() tport_tls_recv(0x1b9b900): tls_read() returned 597 tport.c:3223 tport_recv_iovec() tport_recv_iovec(0x1b9b900) msg 0x1c5aa20 from (tls/[2a07:6a44:c012:81ac::3]:42069) has 597 bytes, veclen = 1 tport.c:3041 tport_deliver() tport_deliver(0x1b9b900): msg 0x1c5aa20 (597 bytes) from tls/[2a07:6a44:c012:81ac::3]:42069/sips next=(nil) tport.c:2304 tport_set_secondary_timer() tport(0x1b9b900): reset timer
Интерес у меня не только теоретический. Я никак не могу добиться согласования адекватных шифров для одного слабого клиента. Клиент шлет набор поддерживаемых шифронаборов, но FS неизменно выбирает худший, а если принудительно задать в профиле нужный из числа посылаемых клиентом, то соединение не устанавливается.
|