Hi,
I have managed to run the example on ssl successfully from
https://github.com/spray/spray/tree/release/1.2/examples/spray-can/simple-http-server In the trait MySslConfiguration, I tried using my own self-signed certificate by replacing
val keyStoreResource = "/ssl-test-keystore.jks"
val password = ""
by
val keyStoreResource = "/gauss.jks"
val password = "xxx"
With the above change, I get the following error when I access
https://localhost:8080 from Firefox 29.0..1
Using SSLEngineImpl.
Using SSLEngineImpl.
Allow unsafe renegotiation: false
Allow legacy hello messages: true
Is initial handshake: true
Is secure renegotiation: false
Allow unsafe renegotiation: false
Allow legacy hello messages: true
Is initial handshake: true
Is secure renegotiation: false
SSLTest-akka.actor.default-dispatcher-3, READ: TLSv1 Handshake, length = 177
SSLTest-akka.actor.default-dispatcher-2, READ: TLSv1 Handshake, length = 177
*** ClientHello, TLSv1
*** ClientHello, TLSv1
RandomCookie: RandomCookie: GMT: 395986783 GMT: -1974684754 bytes = { bytes = { 76, 29, 67, 233, 107, 204, 231, 157, 177, 50, 66, 79, 136, 138, 75, 73, 253, 72, 57, 122, 173, 66, 169, 46, 134, 81, 221, 221, 22, 242, 33, 158, 71, 206, 1, 103, 200, 106, 132, 42, 86, 53, 63, 86, 16, 28, 223, 148, 246, 111, 121, 5, 203, 164, 220172 }
}
Session ID: Session ID: {83, 147, 118, 231, 217, 198, 203, 103, 199, 129, 91, 64, 95, 239, 41, 190, 214, 225, 212, 138, 238, 40, 175, 202, 45, 163, 98, 18, 6, 152, 56, 199}
{83, 147, 118, 231, 217, 198, 203, 103, 199, 129, 91, 64, 95, 239, 41, 190, 214, 225, 212, 138, 238, 40, 175, 202, 45, 163, 98, 18, 6, 152, 56, 199}
Cipher Suites: [TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, TLS_ECDHE_RSA_WITH_RC4_128_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_CAMELLIA_128_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_CAMELLIA_256_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_RC4_128_SHA, SSL_RSA_WITH_RC4_128_MD5]
Cipher Suites: [TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, TLS_ECDHE_RSA_WITH_RC4_128_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_CAMELLIA_128_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_CAMELLIA_256_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_RC4_128_SHA, SSL_RSA_WITH_RC4_128_MD5]
Compression Methods: { Compression Methods: { 00 }
}
Extension server_name, server_name: [host_name: localhost]
Extension server_name, server_name: [host_name: localhost]
Extension renegotiation_info, renegotiated_connection: <empty>
Extension renegotiation_info, renegotiated_connection: <empty>
Extension elliptic_curves, curve names: {secp256r1, secp384r1, secp521r1}
Extension elliptic_curves, curve names: {secp256r1, secp384r1, secp521r1}
Extension ec_point_formats, formats: [uncompressed]
Extension ec_point_formats, formats: [uncompressed]
Unsupported extension type_35, data:
Unsupported extension type_35, data:
Unsupported extension type_13172, data:
Unsupported extension type_13172, data:
Unsupported extension status_request, data: 01:00:00:00:00
Unsupported extension status_request, data: 01:00:00:00:00
***
***
%% Initialized: [Session-1, SSL_NULL_WITH_NULL_NULL]
%% Initialized: [Session-2, SSL_NULL_WITH_NULL_NULL]
SSLTest-akka.actor.default-dispatcher-3, fatal error: 40: no cipher suites in common
javax.net.ssl.SSLHandshakeException: no cipher suites in common
SSLTest-akka.actor.default-dispatcher-2, fatal error: 40: no cipher suites in common
javax.net.ssl.SSLHandshakeException: no cipher suites in common
%% Invalidated: [Session-1, SSL_NULL_WITH_NULL_NULL]
%% Invalidated: [Session-2, SSL_NULL_WITH_NULL_NULL]
SSLTest-akka.actor.default-dispatcher-3, SEND TLSv1 ALERT: fatal, description = handshake_failure
SSLTest-akka.actor.default-dispatcher-2, SEND TLSv1 ALERT: fatal, description = handshake_failure
SSLTest-akka.actor.default-dispatcher-3, WRITE: TLSv1 Alert, length = 2
SSLTest-akka.actor.default-dispatcher-2, WRITE: TLSv1 Alert, length = 2
SSLTest-akka.actor.default-dispatcher-3, fatal: engine already closed. Rethrowing javax.net.ssl.SSLHandshakeException: no cipher suites in common
SSLTest-akka.actor.default-dispatcher-2, fatal: engine already closed. Rethrowing javax.net.ssl.SSLHandshakeException: no cipher suites in common
[ERROR] [06/07/2014 22:31:40.737] [SSLTest-akka.actor.default-dispatcher-3] [akka://SSLTest/user/IO-HTTP/listener-0/1] Aborting encrypted connection to localhost/
127.0.0.1:40816 due to [SSLHandshakeException:no cipher suites in common] -> [SSLHandshakeException:no cipher suites in common]
[ERROR] [06/07/2014 22:31:40.737] [SSLTest-akka.actor.default-dispatcher-2] [akka://SSLTest/user/IO-HTTP/listener-0/0] Aborting encrypted connection to localhost/
127.0.0.1:40815 due to [SSLHandshakeException:no cipher suites in common] -> [SSLHandshakeException:no cipher suites in common]
[DEBUG] [06/07/2014 22:31:40.741] [SSLTest-akka.actor.default-dispatcher-7] [akka://SSLTest/system/IO-TCP/selectors/$a/0] New connection accepted
The following thread had a similar problem. But the fix there does not work for me.
https://groups.google.com/forum/#!searchin/spray-user/no$20cipher$20suites$20in$20common|sort:relevance/spray-user/j6pdNilBy_o/UGFAUjuCjiwJThanks in advance for any assistance!
Shing