Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
VictorFaure
Contributor II
Contributor II

Signing XML with PKCS12 certificate, KeyFactory not available

Hello,

I'm working on a job that should sign a XML file and I have a .p12 certificate file.

I'm loading the private key like so:

 

KeyStore ks = KeyStore.getInstance(keyStoreType);
ks.load(new FileInputStream(keyStoreFilePath), keyStorePass.toCharArray());
String alias = ks.aliases().nextElement();
PrivateKey privateKey = (PrivateKey) ks.getKey(alias, keyStorePass.toCharArray());

 

 Unfortunately I'm encountering "java.security.UnrecoverableKeyException: Get Key failed: 1.2.398.3.10.1.1.2.2 KeyFactory not available"
I have little to no idea of what I can do to progress here, I looked it up and it seems I need to add a provider to my providers list, but I would need to know the provider for that.

If you have already been in a similar situation, I happily accept your advice, thanks everybody who reads this.

Labels (3)
2 Replies
Xiaodi_Shi
Employee
Employee

Hello,

Could you please let us know if this KB article helps for your use case?

https://community.qlik.com/t5/Official-Support-Articles/Talend-Studio-How-to-set-a-truststore-for-an...

Best regards

Sabrina

VictorFaure
Contributor II
Contributor II
Author

Hello, unfortunately this article doesn't seem related with my issue, still while looking it up I've tried reading my certificate as .p12 is a binary format, but the provided openssl command returns an error, this article didn't really help...

Respectfully.