[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iaik-jce] Using PKCS12 - Help Needed

I am attempting to export a private key and certificate from my
application using the PKCS12 class.  I am having the following

I am using the PKCS12 constructor which takes a KeyBag and a
CertificateBag array.  II have a KeyBag constructed from an RSA private
key (no added attributes).  I also have a CertificateBag array of length
one containing a self-signed certificate created from the default
iaik.x509.X509Certificate using the setXXX methods.  Both components
display properly using the toString( ) methods.

When I call the toString( ) method or the writeTo( ) method on this
PKCS12 object, I get a NullPointerException.  What else must I do so
that the PKCS12 object will be OK?  For example, is it mandatory that
the PrivateKey or the entire PKCS12 object be (password) protected?

In addition, could you provide more information on the PKCS12Create
class - the format of the parameters to the main( ) routine and how to
use the start(String) method.  Is there (planned) a TestPKCS12.java file
in the demo directory of some JCE release?


Mailinglist-archive at http://jcewww.iaik.tu-graz.ac.at/mailarchive/iaik-jce/maillist.html

To unsubscribe send an email to listserv@iaik.tu-graz.ac.at with the folowing content: UNSUBSCRIBE iaik-jce