How Can I Access an SSL Connection Through Android?

1) It depends. Do you have a self signed cert on the server side and you are trying to validate your identity to the android device? Or are you on the android side trying to validate your idendity to the server? If it is the former , then please see this link: http://www.codeproject.com/KB/android/SSLVerification_Android.aspx?display=Mobile You want … Read more

Spring Boot SSL Client

Given that you’re using Spring, here’s an example that shows how to use Spring’s RestTemplate and Apache’s HttpClient configured with a client certificate and to trust a self-signed certificate from the server: KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); keyStore.load(new FileInputStream(new File(“keystore.jks”)), “secret”.toCharArray()); SSLConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory( new SSLContextBuilder() .loadTrustMaterial(null, new TrustSelfSignedStrategy()) .loadKeyMaterial(keyStore, “password”.toCharArray()).build()); HttpClient httpClient = … Read more

Generating client side certificates in browser and signing on server

Yes, it’s possible. There are no cross-browser solutions, though. For Internet Explorer, you will have to use some ActiveX controls using X509Enrollment.CX509EnrollmentWebClassFactory or CEnroll.CEnroll, depending on whether it’s running on Windows XP or Vista/7. This will generate a PKCS#10 certificate request (which you may need to wrap between the traditional delimiters. For the rest, you … Read more

curl: Unknown error (0x80092012) – The revocation function was unable to check revocation for the certificate

I’ve been using curl through a mitm proxy for pen-testing and getting the same issue. I finally figured that curl needs a parameter telling it not to check certificate revocation, so the command looks something like this: curl “https://www.example.com” –ssl-no-revoke -x 127.0.0.1:8081 The -x parameter passes the proxy details – you may not need this. … Read more

Https iOS with self signed certificate

By default, Cocoa refuses all SSL connections when the certificate is invalid. However, you can force them to accept also invalid certificates. The method depends on which library/framework you are using. For example: For NSURLConnection, check this answer. For ASIHTTPRequest, you need to set the property validatesSecureCertificate to NO. For AFNetworking, you can check the … Read more