Questions tagged [sslsocketfactory]

Layered socket factory for TLS/SSL connections, based on JSSE. SSLSocketFactory can be used to validate the identity of the HTTPS server against a list of trusted certificates and to authenticate to the HTTPS server using a private key.

Layered socket factory for TLS/SSL connections, based on JSSE.

SSLSocketFactory can be used to validate the identity of the HTTPS server against a list of trusted certificates and to authenticate to the HTTPS server using a private key.

SSLSocketFactory will enable server authentication when supplied with a truststore file containg one or several trusted certificates. The client secure socket will reject the connection during the SSL session handshake if the target HTTPS server attempts to authenticate itself with a non-trusted certificate.

120 questions
50
votes
2 answers

Random "peer not authenticated" exceptions with Java SSLContextImpl$TLS10Context

I get connection failures that appear randomly when connecting to an HAProxy server using SSL. I have confirmed that these failures happen on JDK versions 1.7.0_21 and 1.7.0_25 but not with 1.7.0_04 or with 1.6.0_38. The exception is Exception in…
user2687486
  • 501
  • 4
  • 5
26
votes
3 answers

Now that SSLSocketFactory is deprecated on Android, what would be the best way to handle Client Certificate Authentication?

I am working on an Android app that requires Client Certificate Authentication (with PKCS 12 files). Following the deprecation of all that's apache.http.*, we have started a pretty big work of refactoring on our network layer, and we have decided…
TheYann
  • 1,297
  • 2
  • 12
  • 13
22
votes
5 answers

SSLSocket via another SSLSocket

I'm trying to create an SSLSocket on top of another SSLSocket in an Android app. The lower connection is an SSL-secured connection to a Secure Web Proxy (HTTP proxy over SSL), the upper connection is for HTTP over SSL (HTTPS). For this, I'm using…
FD_
  • 12,712
  • 4
  • 32
  • 62
16
votes
6 answers

Disable SSL as a protocol in HttpsURLConnection

Due to the POODLE vulnerability, my server, hosted in Amazon AWS does no longer support SSLv3. As a result, the first HTTPS connection my Android app does against the server results in an error when the connection was being established. Error…
GaRRaPeTa
  • 4,859
  • 4
  • 30
  • 52
14
votes
1 answer

Android SSLSocket handshake failure in Android 6 and above

I've written a server based on a Java SSLServerSocket that accepts connections and communicates to android applications via a custom binary protocol: ServerSocket serverSocket = SSLServerSocketFactory.getDefault().createServerSocket(1234); while…
John Ericksen
  • 10,783
  • 4
  • 43
  • 72
14
votes
2 answers

How to build a SSLSocketFactory from PEM certificate and key without converting to keystore?

I'm given a self-signed client certificate kit that is to be used to access a server via HTTPS. The kit consists of the following PEM files: client.crt (client certificate) client.key (client private key) ca.crt (CA certificate) One way to solve…
Roman Puchkovskiy
  • 9,798
  • 4
  • 25
  • 51
10
votes
3 answers

How do I tell the TLS version in Android Volley

My project has been using Android Volley network framework for a long time, but recently I found a SSL 3.0 protocol bug published on the Internet. I want to know how can I find out what's the TLS version my project used, and how to confirm whether…
Alex Wang
  • 131
  • 1
  • 9
8
votes
2 answers

Secret Key SSL Socket connections in Java

I'm working on encrypting a tcp connection between a server and a client. In the course of research and testing I'm leaning towards using secret key encryption. My problem is that I cannot find any tutorials on how to implement this feature. The…
Kyte
  • 726
  • 2
  • 11
  • 24
7
votes
4 answers

an unsafe implementation of the interface X509TrustManager from google

I hava an app in Google Play, I received a mail from Google saying that: Your app(s) listed at the end of this email use an unsafe implementation of the interface X509TrustManager. Specifically, the implementation ignores all SSL certificate…
zys
  • 1,176
  • 3
  • 16
  • 34
6
votes
1 answer

SSLSocketFactory and TrustManager redundancy in OkHttp3

In OkHttp3, the following is deprecated [A]: sslSocketFactory(SSLSocketFactory sslSocketFactory) It is replaced by [B]: sslSocketFactory(SSLSocketFactory sslSocketFactory, X509TrustManager trustManager). Here are my questions: What is…
Cy.Cup
  • 61
  • 3
6
votes
2 answers

Why does SSLSocketFactory lack setEnabledCipherSuites?

SSLSocketFactory provides getDefaultCipherSuites (ciphers that are enabled by default on sockets) and getSupportedCipherSuites (ciphers that can be enabled, if desired). However, SSLSocketFactory does not offer setEnabledCipherSuites to configure…
jww
  • 83,594
  • 69
  • 338
  • 732
5
votes
1 answer

Square okHTTP certificate pinning - sslSocketFactory error

I am trying to import my own BKS file, which contains my self signed certificate but I am running into trouble with okHTTP. I want to do this with the bks file, I also got it working via the sha512/. I ve got this code from several tutorials and I…
5
votes
0 answers

keytool Java and TLS/SSL

I have a socket client and server socket. The server has a keystore with a key in it. keytool -genkey -alias mystuff -keyalg RSA -keystore keystore.jks -keysize 2048 This page says that it generates a key pair when the above command is run.…
DevilCode
  • 892
  • 2
  • 32
  • 56
4
votes
2 answers

How make SSL server socket support both http & https in java?

I'm trying to create simple web server using java sockets which should support both http & https. But i can acheive only one at a time. I need to logic which supports both http @ port 80 & https @ port 443 at same time. This is the sample code for…
Ranjith
  • 115
  • 1
  • 7
3
votes
0 answers

Error creating bean 'jpaVendorAdapter' ,Failed to instantiate [jpa.JpaVendorAdapter], NoClassDefFoundError: SslSocketFactory

When I try To Run Cmd >mvn clean spring-boot:run -DskipTests What I have Already Tried Deleted Folder C:\Users\xyz.m2\repository Pom Files Version Conflict Clean Package Delete Project And Try Again If You Found Problem In reading Check Here…
1
2 3 4 5 6 7 8