[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 to
1.2.840.10040.4.1, whereas IAIK continues to use

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

 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
> 1.2.840.10040.4.1
> java.security.cert.CertificateException: PublicKey algorithm not
> 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
> 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
> To unsubscribe send an email to listserv@iaik.tu-graz.ac.at with the
folowing content: UNSUBSCRIBE iaik-jce