Skip to content

Tag: java

How do I get OpenJDK 16 to talk with an SSL enabled nginx server?

I’m running a spring boot application that needs to make an https call to an nginx server. The application is running on CentOS 7 with OpenJDK 16. Following this more or less, I gathered a list of all the ciphers available to the JVM: In nginx, I have the following: I’ve tried every one of the cip…

How to get value from an optional object in another optional?

Basically,I need to get a size of optional list in an optional object. Something like: The code doesn’t look nice. What’s the elegant way to get it? With ifPresent().orElse()? Thanks in advance! Answer Consecutive map (or flatMap, in case something returns an Optional) operations, and a final orEl…

How can I get debug messages from Java’s SSL handshake?

I’m trying to secure a Java Spring Boot REST service with Keycloak. Part of that involves communication between the service and Keycloak to get the well-known OpenID configuration. When everything is unencrypted (over HTTP), things work fine. When I add an SSL certificate into the mix (technically on an…