[Opendnssec-user] Key Wrapping with SUNPKCS11 and SoftHSM

Sitaraman Vilayannur vrsitaramanietflists at gmail.com
Sun Jan 19 14:12:45 UTC 2014


Hi, I am attempting to wrap a key like so, but getting the below error. Any
help is appreciated. I am using SoftHSM provider. Is there a configuration
entry that i can make to provide support for this key? Thanks

Sitaraman
keyGen.initialize(1024, sr); KeyPair keyPair = keyGen.generateKeyPair();
PrivateKey pk = keyPair.getPrivate(); aesCipher.init(WRAP_MODE,
keyPair.getPrivate()); byte[] wrappedPk = aesCipher.wrap(pk);

I get an error statingjava.security.InvalidKeyException: No installed
provider supports this key: sun.security.pkcs11.P11Key$P11RSAPublicKey at
javax.crypto.Cipher.chooseProvider(Cipher.java:878) at
javax.crypto.Cipher.init(Cipher.java:1213) at
javax.crypto.Cipher.init(Cipher.java:1153) at
softhsm.SoftHSM.main(SoftHSM.java:96)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opendnssec.org/pipermail/opendnssec-user/attachments/20140119/f8b04ad3/attachment.htm>


More information about the Opendnssec-user mailing list