jsse

Tomcat: TLSv1.2 with strong ciphers not working

核能气质少年 提交于 2021-02-07 08:19:36
问题 I installed Tomcat-7, configured support for TLSv1.2 on port 8443. My Connector configuration: protocol="org.apache.coyote.http11.Http11NioProtocol" SSLEnabled="true" scheme="https" secure="true" sslProtocol="TLSv1.2" sslEnabledProtocols="TLSv1.2" I then configured a list of strong ciphers I wanted to use. TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 As I have read, Tomcat can either

Keystore password encrypting in java

邮差的信 提交于 2021-02-05 08:00:52
问题 I need to set the following variables before invoking remote queue. System.setProperty("javax.net.ssl.trustStore","C:\\certs\\trustStore.jks"); System.setProperty("javax.net.ssl.keyStore","C:\\keystore\\keyStore.jks"); System.setProperty("javax.net.ssl.keyStorePassword","Demo1234"); System.setProperty("javax.net.ssl.trustStorePassword","Demo1234"); The passwords are exposed here. What is the best way to encrypt the passwords? 回答1: At some point, your private key/key store password must be

How to close a blocked SSLSocket?

橙三吉。 提交于 2020-04-16 02:42:25
问题 I have a Java server that needs an option to shut down all connections. As part of this, I'm calling close() on each client socket. The problem I'm having is that this call sometimes blocks indefinitely. I can only reproduce this by simulating several hundred users, so its hard to pinpoint, but I suspect that this happens when that socket is blocked on a write. I read in another question that calling shutdownOutput() on the socket helps, but it is not supported by SSLSocket (which I am using)

Throwing exception on NIO SSL Handshake process using SSLEngine

扶醉桌前 提交于 2020-01-22 03:22:50
问题 I am getting following exception on NIO SSL handshake. During handshake process, On client side, a) NEED_WRAP b) NEED_UNWRAP c) NEED_TASK d) NEED_UNWRAP - getting the following exception on calling unwrap. javax.net.ssl.SSLProtocolException: Handshake message sequence violation, 1 at sun.security.ssl.Handshaker.checkThrown(Handshaker.java:1371) at sun.security.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineImpl.java:513) at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:790) at

Throwing exception on NIO SSL Handshake process using SSLEngine

孤街浪徒 提交于 2020-01-22 03:22:27
问题 I am getting following exception on NIO SSL handshake. During handshake process, On client side, a) NEED_WRAP b) NEED_UNWRAP c) NEED_TASK d) NEED_UNWRAP - getting the following exception on calling unwrap. javax.net.ssl.SSLProtocolException: Handshake message sequence violation, 1 at sun.security.ssl.Handshaker.checkThrown(Handshaker.java:1371) at sun.security.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineImpl.java:513) at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:790) at

What is SunX509 used for and can it work with parties using IbmX509?

馋奶兔 提交于 2020-01-11 08:16:49
问题 When I manually create a KeyManager , one of the steps is this: KeyManagerFactory.getInstance("SunX509") This does not work on IBM jre where I need to specify "IbmX509". My questions: I read that this is called the "certificate encoding algorithm". What does that mean? When is it used? What happens when the client is using the IBM algorithm and the server is using the Sun algorithm? Thanks, Doron 回答1: I read that this is called the "certificate encoding algorithm". No it isn't. It is a key

SSLContext initialization

故事扮演 提交于 2020-01-09 03:34:46
问题 I'm looking at the JSSE reference guide, I need to obtain an instance of SSLContext in order to create a SSLEngine , so I can use it with Netty to enable security. To obtain an instance of SSLContext , I use SSLContext.getInstance() . I see that the method is overridden multiple times, so I can chose the protocol and security provider to use. Here, I can see the list of algorithms that can be used. Which algorithm should I use to enable secure communication? Also, since it is possible to

Client-Server SSL communication + Self signed certificate

邮差的信 提交于 2020-01-06 13:27:37
问题 I'm building a Java Client-Server application. The client will communicating with the Server through SSL. I want to achive that the client needs to be authenticate itself. I mean use a keystore or whatever, but this topic is really new to me. So my question would be, how can I generate a Client and a Server side Keystore (if that's what it's called) and self sign it. From here I can do the rest. What I have: keytool -genkeypair -alias test -keystore test.store -storepass StorePass -validity

Client-Server SSL communication + Self signed certificate

℡╲_俬逩灬. 提交于 2020-01-06 13:27:14
问题 I'm building a Java Client-Server application. The client will communicating with the Server through SSL. I want to achive that the client needs to be authenticate itself. I mean use a keystore or whatever, but this topic is really new to me. So my question would be, how can I generate a Client and a Server side Keystore (if that's what it's called) and self sign it. From here I can do the rest. What I have: keytool -genkeypair -alias test -keystore test.store -storepass StorePass -validity

How do I provide a specific TrustStore while using the default KeyStore in Java (JSSE)

喜夏-厌秋 提交于 2019-12-30 06:43:27
问题 Overview JSSE allows users to provide default trust stores and key stores by specifying javax.net.ssl.* parameters. I would like to provide a non-default TrustManager for my application, while allowing the user to specify the KeyManager as usual, but there doesn't seem to be any way to achieve this. Details http://docs.oracle.com/javase/7/docs/technotes/guides/security/jsse/JSSERefGuide.html#CustomizingStores Suppose on unix machines I want to allow the user to use a pkcs12 key store for