Hi All,

We were looking into getting multiple keys with unique passwords in the
same key store to work (for the HTTP transport [1]). But when the passwords
were unique to each key, it resulted in an UnrecoverableKeyException.
However, if the passwords of all the keys were the same, it worked
correctly. The password of the key store was different from the password(s)
of the keys in both scenarios.

Checked several Stackoverflow questions related to this [2], [3], [4], [5]
and pretty much every answer to this was to use the same password for both
the key store and the key.

Tomcat also seem to follow this approach of keeping the store and key
passwords the same [6].

Does anyone know whether this can or cannot be done for certain?

If this cannot be done, are we also going to keep following the Tomcat's
(and others') approach of using the same password for both key store and
the key?

[1] -
https://github.com/wso2/transport-http/blob/master/components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/common/ssl/SSLHandlerFactory.java

[2] -
https://stackoverflow.com/questions/35709433/java-keystore-with-multiple-keys-and-different-passwords

[3] -
https://stackoverflow.com/questions/15967650/caused-by-java-security-unrecoverablekeyexception-cannot-recover-key?noredirect=1&lq=1

[4] -
https://stackoverflow.com/questions/1321557/can-not-get-key-from-keystore

[5] -
https://stackoverflow.com/questions/2889238/keystore-change-passwords/2889605

[6] -
https://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html#Prepare_the_Certificate_Keystore

Thanks.

-- 
Best Regards,

*Pubudu Fernando*
Software Engineer
WSO2 (www.wso2.com)
m: +94 77 888 2543

<https://lk.linkedin.com/in/pubuduf>  <http://blog.pubudu.xyz/>
<https://github.com/pubudu91>
<http://stackoverflow.com/users/4329912/pubudu>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to