Skip to main content

Posts

Showing posts with the label ssl

Https Connection Android

I am doing a https post and I'm getting an exception of ssl exception Not trusted server certificate. If i do normal http it is working perfectly fine. Do I have to accept the server certificate somehow?

creating a Java Proxy Server that accepts HTTPS

i already have a working HTTP proxy server that can handle multiple HTTP request. now my problem is how do I handle https request? here's a simplified code i am using: class Daemon { public static void main(String[] args) { ServerSocket cDaemonSocket = new ServerSocket(3128); while(true) { try { Socket ClientSocket = cDaemonSocket.accept(); (new ClientHandler(ClientSocket )).start(); }catch(Exception e) { } } } } and the ClientHandler class ClientHandler extends Thread { private Socket socket = null; private Socket remoteSocket = null; private HTTPReqHeader request = null; ClientHandler(Socket socket) { this.socket = socket; request = new HTTPReqHeader(); request.parse(socket); // I read and parse the HTTP request here } public void run() { if(!request.isSecure() )

JBoss/Java and SSL

Hi I'm a bit lost and hope you'll get me out of here. I'll try to be as clear as possible since I don't really understand/know how I should use certificates. I've got an application that is supposed to communicate with another one using webservices and SSL. We both asked our main "Certificate Authority" to get certificates. They sent us 4 files and a password for the .P12 file: .csr, .cer, .key, .P12 Here is what I did : * Configure JBoss to use SSL on 8443 and used the P12 file as the keystore To test this I did a small Java class that call a webservices on this server, using : props.setProperty("javax.net.ssl.trustStore", "/.../.../certif.p12"); props.setProperty("javax.net.ssl.trustStorePassword", "XXXXXXXXX"); props.setProperty("javax.net.ssl.trustStoreType", "PKCS12"); The connection works, but I think I'm missing something as I did not use the other files. If I send my .P12 file

Using two private keys (keystore) and two public keys (truststore) in one SSL Socket Connection

I need to use to key-pair in one socket ssl connection without change nothing in clients. Why? Because one client use a CN attribute in trust store for connection handshake and other clients using another value in the same attribute to process the same task in the same way. So I need to use two key store (private) with distinct CN attributes and also aliases and share two different trust store (public key) with distinct CN attributes and also aliases too. Describing bellow: keyStore1 Keystore type: JKS Keystore provider: SUN ... Alias name: identity1 ... Owner: CN=app1, OU=..., ... Issuer: CN=app1, OU=..., ... ... keyStore2 ... Alias name: identity2 ... Owner: CN=app2, OU=..., ... Issuer: CN=app2, OU=..., ... trustStore1 ... Alias name: identity1 ... Owner: CN=app1, OU=..., ... Issuer: CN=app1, OU=..., ... ... trustStore2 ... Alias name: identity2 ... Owner: CN=app2, OU=..., ... Issuer: CN=app2, OU=..., ... I tried to implement this feature in this way: KeyStore Key