jsse

How to initiate ssl connection using SSLv2

北城以北 提交于 2019-11-29 16:37:24
I want to initiate an SSL connection with a remote server using SSLv2. I am using Java. I tried to get the supported protocols in my socket using: String[] suppProtocols=socket.getSupportedProtocols(); System.out.println("The protocols supported for this socket are: "+Arrays.toString(suppProtocols)); and I got this in the output: [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2] Now, I read that Java does not support SSLv2 and SSLv2Hello only sends hello message using SSLv2. I can't grasp what does this means? Isn't the same as if the client support SSLv2? How can I make SSL connection using SSLv2.

Java JSSE SSLEngine cannot resume SSL session

ぃ、小莉子 提交于 2019-11-29 15:42:16
I am writing an application that uses SSLEngine with NIO, I writing both the client and the server. The client is able to connect to the server and after he is connected i want him to be able to perform session resumption / renegotiation, but currently without luck.. As the code that uses the SSLEngine is pretty big (SSLEngine usage is SO complex!) i will write a simple pseudo code that demonstrate the situation: Server: global sslcontext initialized once await new client client.sslEngine = create new server ssl engine using the global sslcontext client.handleHandshake and wait for it to be

configuring SSLContext using existing SSL key/certificate pair in java (JSSE API)

被刻印的时光 ゝ 提交于 2019-11-29 09:01:05
I am working on a java-project where I should implement the SSL-protokol on the server-side. Well, this is the first time I will use SSL in my application, so I read a lot about ssl/tls and now I want to implement something in java. I will implement this process using JSSE API: 1) client will connect to me 2) I will make authentification with my pubic key certificate. I means that I will send the client a public key and its corresponding certificate 3) the client encrypt the secret-key using my public key and RSA-algorithm and send it to me I have already the private key and certificate saved

收藏

三世轮回 提交于 2019-11-29 08:56:47
原文地址: https://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html?spm=a2c4e.11153940.blogcont324371.10.68b578d3G07OBO 中英文对照: https://www.microsofttranslator.com/bv.aspx?to=zh-CHS&refd=www.translatoruser.net&r=true&a=https%3A%2F%2Fdocs.oracle.com%2Fjavase%2F8%2Fdocs%2Ftechnotes%2Fguides%2Fsecurity%2Fjsse%2FJSSERefGuide.html%3Fspm%3Da2c4e.11153940.blogcont324371.10.68b578d3G07OBO 本指南涵盖以下主题: 介绍 特点和好处 JSSE 标准 API SunJSSE 提供商 相关文档 JRE 安装目录 术语和定义 安全套接字层 (SSL) 协议概述 为什么使用 SSL? SSL 的工作原理 JSSE 类和接口 核心类和接口 SocketFactory 和 ServerSocketFactory 类 SSLSocketFactory 和

SSL Server socket want auth option

丶灬走出姿态 提交于 2019-11-29 04:40:38
Concerning SSLServerSocket.setWantClientAuth : If this is set to true if the client chooses to not send a certificate the negotiation continues. Also I noticed this also happens if the client sends a certificate but is not part of the truststore.The negotiation does not fail either in this case. So what is the use case of this setting? Bruno (Multiple edits, following a number of comments.) setWantClientAuth is used to request client certificate authentication, but keep the connection if no authentication is provided. setNeedClientAuth is used to request and require client certificate

SSL Renegotiation with Client Certificate causes Server Buffer Overflow

好久不见. 提交于 2019-11-29 03:46:49
问题 I've coded a Java client application which connects to an Apache web server over HTTPS using a client certificate and performs an HTTP PUT of a file to the server. It works fine with small files, but crashes with large ones. The Apache server log shows the following: ... OpenSSL: Handshake: done ... Changed client verification type will force renegotiation ... filling buffer, max size 131072 bytes ... request body exceeds maximum size (131072) for SSL buffer could not buffer message body to

How do I initialize a TrustManagerFactory with multiple sources of trust?

落爺英雄遲暮 提交于 2019-11-28 23:21:07
问题 My application has a personal keystore containing trusted self-signed certificates for use in the local network - say mykeystore.jks . I wish to be able to connect to public sites(say google.com) as well as ones in my local network using self-signed certificates which have been provisioned locally. The problem here is that, when I connect to https://google.com, path building fails, because setting my own keystore overrides the default keystore containing root CAs bundled with the JRE,

jsse handshake_failure on public https web site

淺唱寂寞╮ 提交于 2019-11-28 23:15:02
I have read a related question already, but it doesn't seem to fail at the same place I am seeing a failure. I am trying a very simple operation: public static void main(String [] argv) { try { URL u = new URL("https://membership.usairways.com/Login.aspx"); Object o = u.getContent(); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } But I get a handshake_failure when running that with Java 6, on both my Mac and Windows machines. Others keep having a problem with the certificate not being found, but the debug log ( -Djavax.net.debug=ssl

java.lang.SecurityException: The jurisdiction policy files are not signed by a trusted signer

回眸只為那壹抹淺笑 提交于 2019-11-28 22:22:43
In working on a different problem (related to RMI), I upgraded the system's "security folder" with the "unlimited strength" policy files and now my applicaiton fails in a different way. I get a long stack dump, of which following bits appear pertinent: Exception in thread "main" java.lang.ExceptionInInitializerError [...crop...] Caused by: java.lang.SecurityException: Can not initialize cryptographic mechanism at javax.crypto.JceSecurity.<clinit>(JceSecurity.java:86) ... 17 more Caused by: java.lang.SecurityException: The jurisdiction policy files are not signed by a trusted signer! [...crop..

JSSE wrap creates two tls packets requiring two unwraps. Why?

旧时模样 提交于 2019-11-28 14:34:58
I am inspecting the behavior of our java application with respect to jsse tls encryption and decryption with a connected openssl client. First I observed that when I call unwrap for client data, it always unwraps consuming 37 bytes and producing 0. The next unwrap consumes some bytes and produces some. At first I thought the client would wrap an empty array first. But then I discovered that the jsse code does the same, except it produces 1 byte instead of 0. So every call to a wrap consumes X bytes and produces Y bytes but requires TWO unwrap s while the first one consumes 37 bytes and