Questions tagged [sslengine]

SSLEngine is a Java 5.0 class which provides SSL/TLS services but is transport independent.

71 questions
65
votes
6 answers

Apache: Invalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration

When configure apache2 virtual hosts for ssl/https connection, after adding configuration and enable the configuration with this command " a2ensite pm.university.com.conf " i got this error "Invalid command 'SSLEngine', perhaps misspelled or defined…
Dung
  • 19,199
  • 9
  • 59
  • 54
26
votes
3 answers

Making SSLEngine use TLSv1.2 on Android (4.4.2)?

Folks, I'm hoping there's something obvious that I'm missing, and I hope someone will be able to shed some light. I'm trying to get TLSv1.2 running in an SSL + NIO context (using the AndroidAsync library), so I'm trying to enable it via an…
Glen
  • 577
  • 1
  • 6
  • 11
13
votes
4 answers

SSL and SocketChannel

Ideally, I only need a simple SSLSocketChannel. I already have a component that reads and writes message over ordinary SocketChannel, but for some of these connections, I have to use SSL over the wire; the operations over these connections,…
akappa
  • 10,220
  • 3
  • 39
  • 56
12
votes
3 answers

create an SSLContext instance using a Bouncy Castle provider

I'm stuck at the creation of an SSLContext (which I want to use to instantiate an SSLEngine to handle encrypted transport via the java-nio): The code String protocol = "TLSv1.2"; Provider provider = new…
Sebastian Schmitt
  • 433
  • 1
  • 5
  • 18
10
votes
1 answer

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

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…
danarmak
  • 1,190
  • 1
  • 10
  • 19
9
votes
1 answer

Failed to send SSL Close message

I have a thread which once in a while is going to list the topics on the Message Hub. But once in a while, I am getting a :Failed to send SSL Close message. Any ideas? KafkaConsumer consumer = new…
8
votes
1 answer

SSL Handshaking Using Self-Signed Certs and SSLEngine (JSSE)

I have been tasked to implement a custom/standalone Java webserver that can process SSL and non-SSL messages on the same port. I have implemented an NIO server and its working quite well for non-SSL requests. I am having a heck of a time with the…
Peter
  • 1,182
  • 2
  • 12
  • 23
7
votes
1 answer

javax.net.ssl.SSLException: SSLEngine closed already SSLEngine closed already in webclient (Springboot)

I am using webclient in springboot application to call a external restful webservice. getting this exception intermittently. javax.net.ssl.SSLException: SSLEngine closed already SSLEngine closed already I see below warning in logs before getting…
7
votes
0 answers

Print Decoded Data after SSLEngine Handshake is FINISHED

How do I get the decoded data after the SSL Handshake is complete? At the moment it seems to decrypt just some of the data. Steps to reproduce Save and Run this code Go to https://localhost:1500 - You should notice the beginning and end of the…
user1191027
7
votes
1 answer

Java NIO and SSL

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…
user1418979
  • 123
  • 1
  • 8
6
votes
4 answers

Android SSLEngine example

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…
Paul
  • 35,689
  • 11
  • 93
  • 122
6
votes
3 answers

java SSLEngine says NEED_WRAP, call .wrap() and still NEED_WRAP

I am seeing a weird issue with SSLEngine and wondering if there is an issue with my code or SSLEngine. Here is the order in which I see things HandshakeStatus is NEED_WRAP We call SSLEngine.WRAP after, there is ZERO data written to the buffer, and…
Dean Hiller
  • 19,235
  • 25
  • 129
  • 212
6
votes
2 answers

How can I increase server SSL performance

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…
5
votes
2 answers

Changes in SSLEngine usage when going up to TLSv1.3

Java 11 was released with TLSv1.3 support, used by default. It works OK in context of HTTPS and SSL sockets, but it seems that when using SSLEngine there are additional hurdles due to changes in TLSv1.3 behavior. So there is a robust implementation…
alamar
  • 18,729
  • 4
  • 64
  • 97
4
votes
3 answers

Spring WebClient throws javax.net.ssl.SSLException: SSLEngine closed already when used heavily

That's my code: WebClient.create().post() .uri(URI.create(url)) .header("Authorization", "Basic " + Base64Utils.encodeToString(("username:password").getBytes(UTF_8))) …
AvielNiego
  • 1,193
  • 2
  • 12
  • 27
1
2 3 4 5