Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SSL_OP_IGNORE_UNEXPECTED_EOF a runtime?!

9 views
Skip to first unread message

Marco Gaiarin

unread,
Sep 20, 2023, 5:50:06 AM9/20/23
to

Ho un servizio interno, specie di sacro graal intoccabile, a cui un client
(un programmino molto semplice con poche dipendenze e che ovviamente è sacro
come il servizio...) si collega via SSL.

Su una debian stretch funziona:

root@vdctms1:~# openssl s_client -connect 10.7.0.15:10011
CONNECTED(00000003)
write:errno=0
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 176 bytes
Verification: OK
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : 0000
Session-ID:
Session-ID-ctx:
Master-Key:
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1695200417
Timeout : 7200 (sec)
Verify return code: 0 (ok)
Extended master secret: no


Su una buster no:

gaio@hermione:~$ openssl s_client -connect 10.7.0.15:10011
CONNECTED(00000003)
40D7F2BD1E7F0000:error:0A000126:SSL routines:ssl3_read_n:unexpected eof while reading:../ssl/record/rec_layer_s3.c:308:
---
[...]

Inizialmente pensavo fosse colpa di SSLv3, ma come vedete sopra l'handshake
funziona perfettamente in TLSv1.2 che è ancora abilitato in buster.


Ravanando in rete ho capito che il problema è che il client dovrebbe
impostare il flag all'oggetto (SSL_OP_IGNORE_UNEXPECTED_EOF):

https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html
https://wiki.openssl.org/index.php/List_of_SSL_OP_Flags

perchè nelle recenti versioni è stato aggiunto per sopperire a una
vulnerabilità.


Ho quindi provato ad aggiungere in /etc/ssl/openssl.cnf in fondo:

Options = SSL_OP_IGNORE_UNEXPECTED_EOF

ma non è cambiato nulla.

Ho anche provato una cosa del tipo:

CipherString = ALL
Options = SSL_OP_IGNORE_UNEXPECTED_EOF
Protocol = -ALL,TLSv1.2

ma l'errore è sempre quello.


Cosa sbaglio?! Grazie.

--
È facile battere le ortiche col pisello degli altri!
(Diego)
0 new messages