sslengine

How can I increase server SSL performance

你说的曾经没有我的故事 提交于 2020-01-02 03:26:07
问题 I've enabled SSL on my proxy server and found that the performance has dropped from around 17k requests per second to 5k request per second. I followed the code in Netty's secure chat example and I don't think I've done anything differently. I've written a dummy server to see if I've made some mistakes on my proxy. Running the dummy SSL server in normal http mode is capable of around 50k request per second. When I enable SSL on the dummy server that drops to 28k requests per second. Is there

Java NIO and SSL

杀马特。学长 韩版系。学妹 提交于 2019-12-23 09:07:14
问题 I'm writing a server using java NIO, and I have a few questions that I can't find answers to. First, regarding SSLEngine, how to handle NEED_TASK properly in separated thread? When I invoke tasks in separate thread they complete, but I have no idea how to go back to perform another handshake operation. One option would be to call that operation from a thread that was performing delegated task, but I guess that's not the way to do it. Another question is about calling interestOps() from

Get SSLException form the SSLEngine Wrap method during handshake process

大兔子大兔子 提交于 2019-12-07 22:48:13
问题 When I run the client Handshake process on my Java application in order to establish SSL connection, I get SSLException on the second call to the wrap method. I understand that in this point the client sends the CLientKeyExchange and ChangeCipherSpec to the server. The error message that I get from the exception is "General SSLEngine problem". Maybe there is a problem with my certificate that I need to send? Here is the exception stack details: Details: General SSLEngine problem Trace detail

Java SSLEngine example

穿精又带淫゛_ 提交于 2019-12-07 14:32:39
问题 I found an example how to implement Java SSLEngine here. Unfortunately the source code of the server is not complete. Do you know where I can find the complete source code from the tutorial? 回答1: Searching for an SSLEngine implementation myself, I started writing my own one, which I shared on Github. It involves an SSL/TLS server and client, and also a Demo class containing a running example. I would be glad if you take a look and even more if you provide feedback about possible bugs or

Java SSLEngine example

岁酱吖の 提交于 2019-12-06 01:33:05
I found an example how to implement Java SSLEngine here . Unfortunately the source code of the server is not complete. Do you know where I can find the complete source code from the tutorial? Searching for an SSLEngine implementation myself, I started writing my own one, which I shared on Github . It involves an SSL/TLS server and client, and also a Demo class containing a running example. I would be glad if you take a look and even more if you provide feedback about possible bugs or better implementation. Also feel free to check a post I uploaded on my (really newly created!) blog, where I

How to set custom DH group in Java SSLEngine to prevent Logjam attack?

狂风中的少年 提交于 2019-12-05 17:40:23
问题 The new Logjam attack on TLS is based on common DH groups. This link recommends generating a new, custom 2048-bit DH group for each server. How can I set a custom DH group in Java server code which uses SSLEngine? ETA: would I be safe if I used only ephemeral DH cipher suites, i.e. ones with DHE or ECDHE and not DH or ECDH in their name? Or is this unrelated? 回答1: Java (JCE/JSSE) uses DH parameters from some well known DSA groups. The JCE parameter generator allows only to produce groups with

How can I increase server SSL performance

喜欢而已 提交于 2019-12-05 06:03:06
I've enabled SSL on my proxy server and found that the performance has dropped from around 17k requests per second to 5k request per second. I followed the code in Netty's secure chat example and I don't think I've done anything differently. I've written a dummy server to see if I've made some mistakes on my proxy. Running the dummy SSL server in normal http mode is capable of around 50k request per second. When I enable SSL on the dummy server that drops to 28k requests per second. Is there anything I'm doing wrong? Is there something I'm missing? I'm using JDK 6 to compile the code, running

Android SSLEngine example

六月ゝ 毕业季﹏ 提交于 2019-12-04 23:48:17
问题 I need to work with a TCP socket over TLS for an app I'm working on. I've been through dozens of examples and while I have no problem getting through the handshake, I can't seem to read the input stream through any means (tried a lot, including readline(), reading to character array, etc). every time I try, the app freezes on that spot. If I debug, it never goes to the next line of code. In an attempted solution, I decided to move over to using an SSLEngine, since that's supposed to be the

SSL Handshaking With Older Clients Using SSLEngine (JSSE)

一曲冷凌霜 提交于 2019-12-04 04:57:06
问题 This is a follow-up question to "SSL Handshaking Using Self-Signed Certs and SSLEngine (JSSE)". I have implemented a NIO Webserver that can process SSL and non-SSL messages on the same port. In order to distinguish between SSL and non-SSL messages, I check the first byte of the inbound request to see if it is a SSL/TLS message. Example: byte a = read(buf); if (totalBytesRead==1 && (a>19 && a<25)){ parseTLS(buf); } In the parseTLS() method I instantiate an SSLEngine, initiate the handshake,

Android SSLEngine example

て烟熏妆下的殇ゞ 提交于 2019-12-03 14:56:16
I need to work with a TCP socket over TLS for an app I'm working on. I've been through dozens of examples and while I have no problem getting through the handshake, I can't seem to read the input stream through any means (tried a lot, including readline(), reading to character array, etc). every time I try, the app freezes on that spot. If I debug, it never goes to the next line of code. In an attempted solution, I decided to move over to using an SSLEngine, since that's supposed to be the Java 1.5 answer to java.nio for SSL. However, I have found one example (here: http://docs.oracle.com