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

Re: [iaik-jce] error reading keystore from file



SUN has changed the algorithm oid of the DSA algorithm from 1.3.14.3.2.12 to
1.2.840.10040.4.1, whereas IAIK continues to use 1.3.14.3.2.12.

To also recognize 1.2.840.10040.4.1, it has to be registered within the
AlgorithmID class. You can create and register a new algorithmID by using
the

 public AlgorithmID(String objectID, String name, String implementationName)

constructor of the AlgorithmID class, where "objectID" specifies the "OID"
string, name the name of the algorithm, and "implementationName" a
transformation string that will work on EngineClass.getInstance(...):

 public AlgorithmID("1.2.840.10040.4.1", "DSA", "DSA");

Dieter Bratko



----- Original Message -----
From: Lucas Gonze <lucas@gonze.com>
Cc: <iaik-jce@iaik.tu-graz.ac.at>
Sent: Tuesday, August 24, 1999 5:39 PM
Subject: [iaik-jce] error reading keystore from file


> I'm reading in a keystore created via the jdk keytool.  This is for the
purpose of
> implementing getPrivateKey() in a TrustDecider.  My code looks like this:
>
>       KeyStore ks = KeyStore.getInstance("JKS", "SUN");
>       FileInputStream kis = new FileInputStream(fname);
>       ks.load(kis,null);
>
> I get this error:
>
> java.security.cert.CertificateException: PublicKey algorithm not
implemented:
> 1.2.840.10040.4.1
> java.security.cert.CertificateException: PublicKey algorithm not
implemented:
> 1.2.840.10040.4.1
> at iaik.x509.X509Certificate.b(Unknown Source)
> at iaik.x509.X509Certificate.decode(Unknown Source)
> at iaik.x509.X509Certificate.<init>(Unknown Source)
> at iaik.x509.CertificateFactory.engineGenerateCertificate(Unknown Source)
> at
java.security.cert.CertificateFactory.generateCertificate(CertificateFactory
.java:290)
> at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:682)
> at java.security.KeyStore.load(KeyStore.java:612)
> at com.gonze.TestKey.getPrivateKey(TestKey.java:62)
> at com.gonze.TestKey.main(TestKey.java:82)
>
> Suggestions?
>
> - Lucas Gonze
> --
> 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
>
>
>


smime.p7s