How to sign data with .p12 file in Java?
Java seems to support only until pkcs11, I just can't find the standard library for pkcs12. There's nothing in 'java.security'... for decoding .p12 file to get private key to perform signing.
Any solution? I'm creating an applet so it's good if there's a small library available, but not those libraries of 1MB or above.
You can open an p12 file as a keystore.
http://docs.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#KeystoreFormats
After opening the keystore you can retrieve the private key and use it for signing your data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With