Questions tagged [sslcontext]

According to IBM Knowledge Center,

The SSLContext is an engine class for an implementation of a secure socket protocol. An instance of this class acts as a factory for SSL socket factories and SSL engines. An SSLContext holds all of the state information shared across all objects created under that context. For example, session state is associated with the SSLContext when it is negotiated through the handshake protocol by sockets created by socket factories provided by the context. These cached sessions can be reused and shared by other sockets created under the same context.

Each instance is configured through its init method with the keys, certificate chains, and trusted root CA certificates that it needs to perform authentication. This configuration is provided in the form of key and trust managers. These managers provide support for the authentication and key agreement aspects of the cipher suites supported by the context.

94 questions
1
vote
1 answer

Can I reload trustmanager after opening serversocket in a ssl connection

Lets say I have created a SSLContext, created a serverSocket from the serverSocketFactory and I have started accepting connections. something like: SSLContext.getDefault().getServerSocketFactory().createServerSocket(1234).accept(); Assume it is…
Subhomoy Sikdar
  • 526
  • 5
  • 19
1
vote
1 answer

Effect to a SSLEngine when calling init() of a shared SSLContext object again

I have an implementation of reactor pattern in which I load the SSLContext when a TransportListener (Basically a listener listening on a given port for HTTPS connections.) is starting. Then I call the same init() method again (through a JMX call to…
Imesha Sudasingha
  • 3,462
  • 1
  • 23
  • 34
0
votes
0 answers

Connecting spring boot application with IBM MQ Server using SSL certificate

I've an application written in Java, spring boot. Details about that is mentioned below: Application is deployed on Openshift Container Application have to connect to IBM MQ Hub as for messaging, which is a remote server To communicate with MQ…
0
votes
0 answers

How to set user required ciphers to SSLContext asper syslog cloudbees client specific?

We are trying to set only those ciphers required for us in client hello , so trying to set ciphers in context object as shown in below code but our changes are not reflecting still client uses default ciphers only and it created sockets every time…
user
  • 1
0
votes
0 answers

How to translate Postman certificate setting to Java/Kotlin code?

I have a certificate setup in Postman like belowenter image description here Now, I manually copy the cert.pem and privateKey.pem as strings like : val cert = "...." val privatekey="...." httpClient = HttpClientBuilder.create() …
BoboSha
  • 3
  • 2
0
votes
0 answers

Jetty 10 server curl command failed

I run below command from terminal where jetty 10 server is running but getting below error. admin@provo-blond:~> curl -v localhost:9240 * Rebuilt URL to: localhost:9240/ * Trying ::1... * TCP_NODELAY set * Connected to localhost (::1) port 9240…
0
votes
1 answer

Multiple SSLContext with Webclient from WebFlux

I need to call multiple different API's from my application with WebClient. Let's say, there are two different API's. For these API's I have to use different SSLContexts that built from different certificates. I create different SSLContexts for them…
0
votes
1 answer

Adding SSLContext to RESTclient mTLS (Groovy/Java)

I'm struggeling a bit with my code to make it possible to use mTLS in the RESTClient. So I'm looking for a way to establish an mTLS connection. Here is my code: ... def mymTLSservice = "https://my-token-service.example.com" // Load custom my…
0
votes
0 answers

Java SSL Context initialization without a truststore?

Is there a way to initialize ssl context in java without a trust store? private static SSLContext getSSLContext( final KeyManager[] keyManagers, final TrustManager[] trustManagers) throws KeyManagementException, NoSuchAlgorithmException { …
0
votes
0 answers

SSL Connection working with Java8 but failing with Java17

I need help / guidance with what can be the possible issue when I am trying to call a rest api on SSL (TLS) connection. I have a private key and signed cert from the data producer, I created the keystore from these to files and with code build a…
ishan
  • 1
  • 1
0
votes
0 answers

spring-data-elastic connection certificate issue: javax.net.ssl.SSLHandshakeException: PKIX path building failed

My Elasticsearch instance is running. Able to connect via kibana web UI and postman with the .crt certificate. I wrote a method to prepare SSLContext for connecting to elastic via spring-data-elasticsearch @SneakyThrows private SSLContext…
0
votes
0 answers

Unable to accept self signed certificates using CloseableHttpClient

I tried the recommendations in this post but have not been able to get a working solution. Despite using TrustSelfSignedStrategy and NoopHostnameVerifier I am still getting the following error: javax.net.ssl.SSLPeerUnverifiedException: Certificate…
RichardFeynman
  • 478
  • 1
  • 6
  • 16
0
votes
1 answer

SNI in TCPServer with SSLContext in Ruby

I want to write a simple server in Ruby that returns a different TLS certificate depending on the hostname. Currently I do it so that I specify a TCPServer with SSLContext and give the SSLContext certificate and key. This certificate is then used…
Marek Küthe
  • 90
  • 1
  • 8
0
votes
0 answers

cannot find symbol for "nl.altindag.ssl.SSLFactory;"

I have looked at all the similar questions regarding "cannot find symbol". Most of them give a vague answers in terms of "It means that either there is a problem in your Java source code, or there is a problem in the way that you are compiling…
0
votes
1 answer

java ssl client certificate with apache httpclient 4.5.13

I want to create SSL connection. I have created .cer file from .ks file using the keystore explorer 5.4.4. Used below code for creating the SSLContext. loadKeyMaterial method has tried with and without pwd. InputStream keyStoreStream = new…