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

[iaik-jce] Key and certificate reading (Made with OpenSSL.)



I am trying to read a dsa private key and certificate pair for using them
in isasilk. Both of them are created with the openssl tool. The best I can get
when I try to read them in PKCS#8 format, but I get the following
exception:

java.security.GeneralSecurityException: Unable to parse decrypted private key:
+java.security.InvalidKeyException: PublicKey algorithm not implemented:
+1.2.840.10040.4.1
        at iaik.pkcs.pkcs8.EncryptedPrivateKeyInfo.decrypt(Unknown Source)

with the following code:

setKey((new EncryptedPrivateKeyInfo(asn1object)).decrypt(password));

and

java.io.IOException: Unable to decode certificate:
+java.security.cert.CertificateException: PublicKey algorithm not implemented:
+1.2.840.10040.4.1
        at iaik.utils.KeyAndCertificate.<init>(Unknown Source)

with

KeyAndCertificate kac = new KeyAndCertificate(filename);
kac.decrypt(password.toCharArray());

There was the following in the class:

static {
    iaik.security.provider.IAIK.addAsProvider();
}

-- 
Ilpo Nyyssönen
/* :-) */
--
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