Quando si tenta di utilizzare un endpoint SSL con un richiedente HTTP nel contesto TLS, viene visualizzato il seguente errore:
Root Exception stack trace:javax.net.ssl.SSLException: Received fatal alert: handshake_failure at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1647) at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1615)
Quando compare, questo tipo di errore indica che si è verificato un problema durante il tentativo di eseguire l'handshake SSL. In genere questo è dovuto al fatto che il protocollo e/o le cipher suite proposte dal client non sono supportate dal servizio che si sta tentando di utilizzare.
È possibile verificare questa circostanza abilitando il debug SSL. Ulteriori informazioni su come abilitare il debug SSL sono disponibili qui: How to enable SSL debug logging in MuleSoft Products (Come abilitare la registrazione di debug SSL nei prodotti MuleSoft)
Nel registro di debug SSL è possibile vedere che il client invia il messaggio ClientHello con la versione TLS (nell'esempio, TLSv1.2) e le cipher suite supportate e non si riceve mai il messaggio ServerHello con le cipher suite supportate.
*** ClientHello, TLSv1.2RandomCookie: GMT: 1540703219 bytes = { 236, 187, 154, 87, 41, 72, 226, 59, 44, 178, 16, 175, 159, 193, 47, 58, 245, 244, 240, 145, 135, 108, 196, 71, 237, 58, 231, 0 }Session ID: {}Cipher Suites: [TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA]Compression Methods: { 0 }
Verificare che il servizio remoto che si sta tentando di utilizzare supporti lo stesso protocollo e almeno una delle cipher suite elencate nel messaggio ClientHello.
Per eseguire questa operazione, si possono utilizzare alcuni dei seguenti strumenti:
È possibile utilizzare openssl per connettersi al server e vedere la versione TLS che supporta:
openssl s_client -connect : -tls1_2
openssl s_client -connect : -tls1_1
openssl s_client -connect : -tls1
In alternativa, è possibile utilizzare il comando cURL come segue:
curl -vvvv -k https://:
Oppure è possibile utilizzare lo strumento nmap con lo script seguente per elencare il protocollo e le cipher suite:
https://nmap.org/nsedoc/scripts/ssl-enum-ciphers.html
Dopo aver identificato il protocollo e le cipher suite supportati dal servizio, è possibile modificare quelli supportati dal richiedente HTTP attraverso la configurazione TLS per consentire la connessione al servizio.
Ulteriori informazioni sulla configurazione TLS in Mule 3:
https://docs.mulesoft.com/mule-runtime/3.9/tls-configuration#protocol-cipher-suite-behavior
Ulteriori informazioni sulla configurazione TLS in Mule 4:
https://docs.mulesoft.com/mule-runtime/latest/tls-configuration#optional-attributes-of-the-tls-context-element
https://docs.mulesoft.com/mule-runtime/latest/tls-configuration#optional-specify-protocols-and-cipher-suites
https://docs.mulesoft.com/mule-runtime/latest/tls-configuration#example-adding-additional-cipher-suites-and-protocol-restrictions
001123418

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.