hi,

it seems that your do not have the provider properly installed. ensure that
the JCE provider classes are in your classpath or in the jre/lib/ext
directory of your runtime environment.. then you can install the provider
dynamically using a simple line of code; e.g.

    Security.insertProviderAt(new IAIK(), 1);

or you can install it statically by copying the provider classes to the
jre/lib/ext directory and inserting a configuration line into your
java.security file in jre/lib/security; e.g.

security.provider.1=iaik.security.provider.IAIK

then the certificate parsing should work. however, if you use JDK 1.3 you
can also use the SUN provider for such simple tasks. it should work without
any additional configuration.

regards


  Karl

-----Original Message-----
From: marilen [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 04, 2001 9:41 AM
To: Assen Kolov
Cc: 'Karl Scheibelhofer'; [EMAIL PROTECTED]
Subject: Re: [OCF] help X509


indeed i tried to use iaik but i got this error:

java.security.cert.CertificateException: PublicKey algorithm not
implemented: rsaEncryption
       at iaik.x509.X509Certificate.b(Unknown Source)
       at iaik.x509.X509Certificate.<init>(Unknown Source)
       at SimpleCard.main(SimpleCard.java:239)
OCF shutting down...

anyway is the certificate size fixed?

Assen Kolov wrote:

Hi,I'm afraid I gave some wrong advice earlier today. Indeed, the JDK
containsan implementation of a CertificateFactory provided by SUN, so my
referenceto the mozilla package doesn't make much sense.Thanks to Karl and
Benoit for pointing that out.Regards,Assen
-----Original Message-----From: Karl Scheibelhofer
[SMTP:[EMAIL PROTECTED]]Sent:  Thursday, May 03, 2001 4:00 PMTo:
marilen; [EMAIL PROTECTED]:  RE: [OCF]  help X509hi,the correct
code for this purpose is      CertificateFactory certificateFactory
=CertificateFactory.getInstance("X.509");       // you can also explicitly specify
the provider to use      // CertificateFactory certificateFactory
=CertificateFactory.getInstance("X.509", "IAIK");      X509Certificate
certificate = (X509Certificate)
certificateFactory.generateCertificate(newByteArrayInputStream(encodedCertif
icateByteArray));i hope this is what you are looking for.regards  Karl
-----Original Message-----From: marilen [mailto:[EMAIL PROTECTED]]Sent:
Thursday, May 03, 2001 3:04 PMTo: [EMAIL PROTECTED]: [OCF] help
X509I have 814 bytes of certificate and i need to interpret them as a
X509certificate in java. Which classes should i use? Can anyone help?---
Visit the OpenCard web site at http://www.opencard.org/ for moreinformation
on OpenCard---binaries, source code, documents.This list is being archived
at
http://www.opencard.org/archive/opencard/
! To unsubscribe from the [EMAIL PROTECTED] mailing list send an
email
! to!                           [EMAIL PROTECTED]! containing
the word!                           unsubscribe! in the body.
---
Visit the OpenCard web site at http://www.opencard.org/ for moreinformation
on OpenCard---binaries, source code, documents.This list is being archived
at http://www.opencard.org/archive/opencard/
! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email!
to!                           [EMAIL PROTECTED]! containing the
word!                           unsubscribe ! in the body.
---
Visit the OpenCard web site at http://www.opencard.org/ for moreinformation
on OpenCard---binaries, source code, documents.This list is being archived
at http://www.opencard.org/archive/opencard/
! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email!
to!                           [EMAIL PROTECTED]! containing the
word!                           unsubscribe ! in the body.



---
> Visit the OpenCard web site at http://www.opencard.org/ for more
> information on OpenCard---binaries, source code, documents.
> This list is being archived at http://www.opencard.org/archive/opencard/

! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
!                           [EMAIL PROTECTED]
! containing the word
!                           unsubscribe 
! in the body.

Reply via email to