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

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



Yes, I think the problem is my platform.
I don't know the bug should be belong to Java 2 SDK or IAIK JCE ?
Anyway, the examples work fine in Solaris.
Thank you.

Dieter Bratko wrote:
> 
> The exception seems to be thrown as part of the PEM-DER checking process
> during a key parsing operation. Obviously a byte-to-char conversion process
> fails. Perhaps you may try it with another JDK. I can send you a keystore
> file already created by the SetupKeyStore program, but I worry that the same
> error may occur when reading a key from the store.
> Sorry,
> Dieter Bratko
> 
> ----- Original Message -----
> From: Stephen Kuo <skedin@alumni.cis.thu.edu.tw>
> To: Dieter Bratko <Dieter.Bratko@iaik.at>
> Cc: <iaik-jce@iaik.tu-graz.ac.at>
> Sent: Tuesday, December 07, 1999 1:43 PM
> Subject: 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
> >
> >
> >
> 
>   ------------------------------------------------------------------------
>                    Name: jce.keystore
>    jce.keystore    Type: unspecified type (application/octet-stream)
>                Encoding: base64
--
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