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

Re: [iaik-jce] Certificate



In your code the rsa_cert array is null, which is why the assignment must
fail. You have to initialize the array using e.g. rsa_cert = new
X509Certificate[1]. The exception does not seem to have anything to do
with the certificate parsing.

 Andreas Sterbenz              mailto:Andreas.Sterbenz@iaik.tu-graz.ac.at


-----Ursprüngliche Nachricht-----
Von: Oliver Floericke <O_Floericke@msg.de>
An: Mailing List IAIK JCI <iaik-jce@iaik.tu-graz.ac.at>
Gesendet: Donnerstag, 24. Juni 1999 14:23
Betreff: [iaik-jce] Certificate


> Hi,
>
> referring to my question about certificates two days ago I have to
extend
> the problem to be not able to read ANY kind of certificate at all
>
>
> If I'm trying to read a PEM file in I get the mentioned message: too
large
> ASN.1 object:75. If I try to read a DER file (either created by OpenSSL
> Tools or IAIK ) I get an NullPointerException when trying to create the
> X509Certificate class. This is the code:
>
>    X509Certificate[] rsa_cert = null;
>
>   Security.insertProviderAt (new IAIK (), 1);
>
>   InputStream fis = new FileInputStream("cert.der");
>   rsa_cert[0] = new X509Certificate(fis);   <== here the exceptions
occur
> ...
>   fis.close();
>
> What do I have to do to read a certificate (I need it at the client
side for
> ClientAuthentication) if I do not want to use the KeyStore ? Or is this
not
> possible?
>
> Any suggestons (Demo Sourcecode?) would be nice !!!!
>
> Oliver



smime.p7s