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

Re: [iaik-jce] A little problem about demo programs



Here is the stack trace.

java.lang.StringIndexOutOfBoundsException: String index out of range:
-62
        at java.lang.String.charAt(String.java, Compiled Code)
        at sun.io.ByteToCharMS950.getUnicode(ByteToCharMS950.java:39)
        at
sun.io.ByteToCharDoubleByte.convert(ByteToCharDoubleByte.java:115)
        at java.lang.String.<init>(String.java:363)
        at java.lang.String.<init>(String.java:447)
        at iaik.asn1.ASN1.a(Unknown Source)
        at iaik.asn1.ASN1.<init>(Unknown Source)
        at iaik.pkcs.pkcs8.PrivateKeyInfo.<init>(Unknown Source)
        at iaik.security.rsa.RSAPrivateKey.<init>(Unknown Source)
        at iaik.security.rsa.RSASignature.engineInitSign(Unknown Source)
        at java.security.Signature.initSign(Signature.java:275)
        at iaik.x509.X509Certificate.sign(Unknown Source)
        at
demo.keystore.SetupKeyStore.createCertificate(SetupKeyStore.java:139)
        at
demo.keystore.SetupKeyStore.generateCertificates(SetupKeyStore.java:357)
        at demo.keystore.SetupKeyStore.start(SetupKeyStore.java:500)
        at demo.keystore.SetupKeyStore.main(SetupKeyStore.java:510)

The problem begins at "cert.sign(algorithm ,privateKey);" in line 139 of
SetupKeyStore.java.

I use SDK 1.2.2 in traditional chinese win nt 4.0.


Dieter Bratko wrote:
> 
> Again, I have tried this without any problems. Would you provide a stack
> trace output?
> 
> Dieter Bratko
> 
> ----- Original Message -----
> From: Stephen Kuo <skedin@alumni.cis.thu.edu.tw>
> To: <iaik-jce@iaik.tu-graz.ac.at>
> Sent: Tuesday, October 05, 1999 4:38 PM
> Subject: [iaik-jce] A little problem about demo programs
> 
> > I am new to iaikjce2.51.
> > I tried to run the demo, but always failed.
> > Here are the exception I got:
> >
> > Provider 1: SUN  version: 1.2
> > Provider 2: IAIK  version: 2.5100000000000002
> > Create new KeyStore in directory: D:\iaikjce2.51\src [y]
> > KeyStore will be saved to: D:\iaikjce2.51\src\jce.keystore
> > generate RSA KeyPair for CA certificate [1024 bits]...
> > generate RSA KeyPair for a test certificate [512 bits]...
> > generate RSA KeyPair for a test certificate [1024 bits]...
> > generate RSA KeyPair for a test certificate [2048 bits]...
> > generate DSA KeyPair for CA certificate [1024 bits]...
> > generate DSA KeyPair for a test certificate [512 bits]...
> > generate DSA KeyPair for a server certificate [1024 bits]...
> > generate DSA KeyPair for a server certificate [2048 bits]...
> > generate DH KeyPair for a test certificate [512 bits]...
> > generate DH KeyPair for a server certificate [1024 bits]...
> > generate DH KeyPair for a server certificate [2048 bits]...
> > create self signed RSA CA certificate...
> > Exception: java.lang.StringIndexOutOfBoundsException: String index out
> > of range: -62
> >
> > I did not change any codes, what should I do now ?
> >
> > Besides, can I create a class 2 certificate by myself ?
> > I mean, can I use IAIKJCE to build a simple CA server ?
> > --
> > 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
> >
> >
> >
--
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