08-17-2011 08:04 AM
Hi guys,
I`m trying to load a PFX file, but unfortunately, I can`t find any information how to do it. I`ve checked both Blackberry and Bouncy castle API.
Any suggestions?
08-17-2011 08:09 AM
08-17-2011 08:22 AM
Hi Simon,
Thank you for reply, actually I read your topic.
You were discussed a way how to install PKCS12 file (add it to one of system keystores). My goal is to find a way how to load p12 file using some API and have an access to it`s fileds (private key, certificate) from my application.
08-17-2011 08:29 AM
08-19-2011 11:15 AM
Hi simon_hain,
Class keyStore is usefull, thank you for link, but the problem is that I have to know some information about PFX (subject) - otherwise there is no way to find it in keystore.
Did you do it in your project? Could you please share some small example?
01-24-2013 02:44 AM - edited 01-24-2013 02:44 AM
Its so frustrating to see that PKCS12 is supported (http://btsc.webapps.blackberry.com/btsc/viewdocume
But none of the developers here on this forum is able to load a personal PFX and use its public and private key. Did anyone here manage to get it working? Else, i would KINDLY ask RIM to give us some more support cause im stuck at the same thing as everybody here.
01-24-2013 03:11 AM
01-24-2013 03:19 AM
Hi Simon, Can you help me out with an example? I don't want to use the SDcard but maybe your example can get me back on track?
01-24-2013 03:39 AM
I first try to open the certificate using the utility class:
byte[] certificateBytes = IOUtilities.streamToBytes(httpConnection.openInputStream()); Certificate certificate = CertificateUtilities.readCertificateFile(null, certificateBytes); if (certificate == null) {
if that fails i try invocation:
Invocation invocation = new Invocation(fileUri); invocation.setAction(ContentHandler.ACTION_OPEN); Registry registry = Registry.getRegistry(getClass().getName()); registry.invoke(invocation);