Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #32178
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Date | 2015-07-28 00:10 -0700 |
| References | <7224870d-053b-449f-84a5-61e31af54cc6@googlegroups.com> |
| Message-ID | <a5b0157c-ab68-4832-b9af-ec9105299591@googlegroups.com> (permalink) |
| Subject | Re: netty with ssl |
| From | Louie <liuhongyuand@gmail.com> |
在 2015年7月27日星期一 UTC+8下午6:34:04,Louie写道:
> Hi
> I'm using the netty with ssl, but it doesn't work.This is my error log and the ssl code.
>
> error code:
> adding as trusted cert:
> Subject: EMAILADDRESS=xxx, CN=Louie, OU=SDG, O=SDG, L=SH, ST=SH, C=CN
> Issuer: EMAILADDRESS=xxx, CN=Louie, OU=SDG, O=SDG, L=SH, ST=SH, C=CN
> Algorithm: RSA; Serial number: 0xffc3decf334dd844
> Valid from Mon Jul 27 17:05:34 CST 2015 until Thu Jul 24 17:05:34 CST 2025
>
> trigger seeding of SecureRandom
> done seeding SecureRandom
> NewsInterface server listening on port 443
> Using SSLEngineImpl.
> Using SSLEngineImpl.
> Ignoring unavailable cipher suite: TLS_DHE_DSS_WITH_AES_256_GCM_SHA384
> Ignoring unavailable cipher suite: TLS_RSA_WITH_AES_256_CBC_SHA
> .
> .
> .
> Allow unsafe renegotiation: false
> Allow legacy hello messages: true
> Is initial handshake: true
> Is secure renegotiation: false
> .
> .
> Ignoring unavailable cipher suite: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
> Ignoring unavailable cipher suite: TLS_RSA_WITH_AES_256_CBC_SHA256
>
> nioEventLoopGroup-3-2, READ: TLSv1 Handshake, length = 201
> *** ClientHello, TLSv1.2
> *** ClientHello, TLSv1.2
> RandomCookie: RandomCookie: GMT: 17143111 GMT: 76079028 bytes = { bytes = { 24147, , 165, 240, 26, 239, 99, 4, 230, 85, 246, 75, 36, 214, 149, 50, 109, 187, 118, 217, 152, 174, 60, 99, 181, 31, 202, 118, 201, 2, 178, 239, 249, 62, 162, 203, 203, 50, 131, 198, 170, 255, 215, 38, 231, 182, 4, 208, 243, 80, 235, 159117, }
> 4, Session ID: 140, {}
> Cipher Suites: [Unknown 0xcc:0x14, Unknown 0xcc:0x13, Unknown 0xcc:0x15, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
> Compression Methods: { 0 }
> Extension server_name, server_name: [type=host_name (0), value=127.0.0.1]
> Unsupported extension type_23, data:
> Unsupported extension type_35, data:
> Extension signature_algorithms, signature_algorithms: SHA512withRSA, SHA512withECDSA, SHA384withRSA, SHA384withECDSA, SHA256withRSA, SHA256withECDSA, SHA224withRSA, SHA224withECDSA, SHA1withRSA, SHA1withECDSA
> Unsupported extension status_request, data: 01:00:00:00:00
> Unsupported extension type_13172, data:
> Unsupported extension type_18, data:
> Unsupported extension type_16, data: 00:1b:08:68:74:74:70:2f:31:2e:31:08:73:70:64:79:2f:33:2e:31:05:68:32:2d:31:34:02:68:32
> Unsupported extension type_30032, data:
> Extension ec_point_formats, formats: [uncompressed]
> Extension elliptic_curves, curve names: {secp256r1, secp384r1}
> ***
> 86 }
> Session ID: {}
> Cipher Suites: [Unknown 0xcc:0x14, Unknown 0xcc:0x13, Unknown 0xcc:0x15, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
> Compression Methods: { 0 }
> Extension server_name, server_name: [type=host_name (0), value=127.0.0.1]
> Unsupported extension type_23, data:
> %% Initialized: [Session-1, SSL_NULL_WITH_NULL_NULL]
> Unsupported extension type_35, data:
> Extension signature_algorithms, signature_algorithms: SHA512withRSA, SHA512withECDSA, SHA384withRSA, SHA384withECDSA, SHA256withRSA, SHA256withECDSA, SHA224withRSA, SHA224withECDSA, SHA1withRSA, SHA1withECDSA
> Unsupported extension status_request, data: 01:00:00:00:00
> Unsupported extension type_13172, data:
> Unsupported extension type_18, data:
> Unsupported extension type_16, data: 00:1b:08:68:74:74:70:2f:31:2e:31:08:73:70:64:79:2f:33:2e:31:05:68:32:2d:31:34:02:68:32
> Unsupported extension type_30032, data:
> Extension ec_point_formats, formats: [uncompressed]
> Extension elliptic_curves, curve names: {secp256r1, secp384r1}
> ***
> %% Initialized: [Session-2, SSL_NULL_WITH_NULL_NULL]
> nioEventLoopGroup-3-1, 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]
> nioEventLoopGroup-3-1, SEND TLSv1.2 ALERT: fatal, description = handshake_failure
> nioEventLoopGroup-3-2, fatal error: 40: no cipher suites in common
> javax.net.ssl.SSLHandshakeException: no cipher suites in common
> %% Invalidated: [Session-2, SSL_NULL_WITH_NULL_NULL]
> nioEventLoopGroup-3-2, SEND TLSv1.2 ALERT: fatal, description = handshake_failure
> nioEventLoopGroup-3-2, WRITE: TLSv1.2 Alert, length = 2
> nioEventLoopGroup-3-2, fatal: engine already closed. Rethrowing javax.net.ssl.SSLHandshakeException: no cipher suites in common
> nioEventLoopGroup-3-2, called closeOutbound()
> nioEventLoopGroup-3-2, closeOutboundInternal()
> nioEventLoopGroup-3-1, WRITE: TLSv1.2 Alert, length = 2
> nioEventLoopGroup-3-2, called closeInbound()
> nioEventLoopGroup-3-2, fatal: engine already closed. Rethrowing javax.net.ssl.SSLException: Inbound closed before receiving peer's close_notify: possible truncation attack?
> nioEventLoopGroup-3-1, fatal: engine already closed. Rethrowing javax.net.ssl.SSLHandshakeException: no cipher suites in common
> nioEventLoopGroup-3-1, called closeOutbound()
> nioEventLoopGroup-3-1, closeOutboundInternal()
> nioEventLoopGroup-3-1, called closeInbound()
> nioEventLoopGroup-3-1, fatal: engine already closed. Rethrowing javax.net.ssl.SSLException: Inbound closed before receiving peer's close_notify: possible truncation attack?
> Your session is protected by SSL_NULL_WITH_NULL_NULL cipher suite.
>
> Your session is protected by SSL_NULL_WITH_NULL_NULL cipher suite.
>
> nioEventLoopGroup-3-2, called closeOutbound()
> nioEventLoopGroup-3-2, closeOutboundInternal()
> nioEventLoopGroup-3-2, called closeInbound()
> nioEventLoopGroup-3-2, closeInboundInternal()
> nioEventLoopGroup-3-1, called closeOutbound()
> nioEventLoopGroup-3-1, closeOutboundInternal()
> nioEventLoopGroup-3-1, called closeInbound()
> nioEventLoopGroup-3-1, closeInboundInternal()
>
>
>
>
> ssl code:
> SSLContext context = null;
> try {
> context = SSLContext.getInstance("TLS");
> TrustManagerFactory tmf;
> KeyStore ks = KeyStore.getInstance("JKS");
> ks.load(new FileInputStream(System.getProperty("user.dir") + "/cer/cacerts.jks"), password);
> tmf = TrustManagerFactory.getInstance("SunX509");
> tmf.init(ks);
> TrustManager[] tm = tmf.getTrustManagers();
> context.init(null,tm, null);
> } catch (CertificateException | NoSuchAlgorithmException | KeyStoreException | IOException | KeyManagementException e) {
> e.printStackTrace();
> }
>
> SSLEngine sslEngine = sslContext.createSSLEngine();
> sslEngine.setUseClientMode(false);
> SslHandler sslHandler = new SslHandler(sslEngine);
> pipeline.addLast("ssl",sslHandler);
>
>
>
> Why it doesn't work? Please help me,thanks!
I'm still have this problem now... please help me T_T
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
netty with ssl Louie <liuhongyuand@gmail.com> - 2015-07-27 03:33 -0700
Re: netty with ssl Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-07-27 07:45 -0400
Re: netty with ssl Louie <liuhongyuand@gmail.com> - 2015-07-27 05:45 -0700
Re: netty with ssl e.d.programmer@gmail.com - 2015-07-27 06:26 -0700
Re: netty with ssl Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-07-27 09:53 -0400
Re: netty with ssl e.d.programmer@gmail.com - 2015-07-27 08:09 -0700
Re: netty with ssl Louie <liuhongyuand@gmail.com> - 2015-07-28 00:10 -0700
Re: netty with ssl e.d.programmer@gmail.com - 2015-07-28 05:44 -0700
Re: netty with ssl phalgun251@gmail.com - 2016-03-02 09:53 -0800
csiph-web