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

[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

req.pem