Monday, April 13, 2015

Self-signed Certificate & Java Security Warning & Browser

dev setup:


  • html page XYZ hosting Java Applet ABC
  • Java Applet ABC signed by mykey
  • mykey - self-issued pivate key

security warning - untrusted applet signer


When loading html page, we got security warning as below:

Reason:  The applet is signed using self-issued key (for dev only)


To resolve:
Export signer pubkey certificate (its private key is used to sign applet ABC)
C:\> keytool -export -keystore c:\Users\*****\.keystore -alias mykey -file C:\Users\*****\workspace\POC\jwangdev.cer.p12
Enter keystore password: dev1234

Import singer certificate into “Signer CA” via Java Control Panel.
Java Control Panel -> Security -> Manage Cerficates… -> choose “Signer CA” -> import C:\Users\*****\workspace\POC\jwangdev.cer.p12


restart browser. done.

applet security warning - untrusted https certificate issuer

reason:
From the signed applet ABC, we have https connection to https://localhost:8443 (a dev jboss server with default self-signed https certificate for "localhost"). When applet tries to make such https connection, we have security warning window as below: 

To suppress the above warning window:

Add “C:\Users\*****\workspace\POC\ dev_jboss_cert.cer.p12” certificate to “Secure Site” via Java Control Panel. 

restart browser. done.

No comments:

Post a Comment