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

Re: [iaik-jce] Problems reading openssl-generated certificate request



Did you add the IAIK provider at the start of your code?:

IAIK.addAsProvider(true);

Don't forget to import iaik.security.provider.IAIK too!


----- Original Message -----
From: Roger Bodin (QTX) <Roger.Boden@etx.ericsson.se>
To: <iaik-jce@iaik.at>
Sent: Thursday, January 13, 2000 2:35 PM
Subject: [iaik-jce] Problems reading openssl-generated certificate request


> Hello,
>
> I'm having problems with reading an openssl-generated certificate request
using iaik.pkcs.pkcs10.CertificateRequest.
>
> This is what I do:
>
> import java.io.*;
> import iaik.pkcs.pkcs10.*;
>
> public class pkcs10 {
>     public static  void main(String[] args) {
> try {
>     InputStream inStream = new FileInputStream("req.pem");
>     CertificateRequest cr = new CertificateRequest(inStream);
>     System.out.println(cr.toString());
> }
> catch(Exception exc) {
>     System.out.println(exc.toString());
> }
>     }
> }
>
> This is what I get:
>
> iaik.pkcs.PKCSParsingException: Unable to create PublicKey:
java.security.InvalidKeyException: PublicKey algorithm not implemented:
rsaEncryption
>
> Any clues what is wrong? Is there a problem with the OID identifying the
algorithm of the key in the request?
>
> I am using IAIK-JCE 2.51 with the full jar file (including the
RSA-classes) and jdk 1.2.2 on windows NT.
>
> I provide the PKCS#10 request file.
>  <<req.pem>>
> --
> Roger
>
>

--
Mailinglist-archive at http://jcewww.iaik.at/mailarchive/iaik-jce/jcethreads.html

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