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

AW: [iaik-jce] PKCS#7



Use iaik.pkcs.PKCS7CertList:

  X509Certificate[] certs = ...;

  PKCS7CertList pkcs7 = new PKCS7CertList();
  pkcs7.setCertificateList(certs);
  FileOutputStream fos = ...;
  pkcs7.writeTo(fos);
  fos.close();

Parsing:

  FileInputStream fis = ...;
  // recognize any base64 encoding:
  ASN1InputStream asn1In = new ASN1InputStream(fis);
  PKCS7CertList pkcs7 = new PKCS7CertList(asn1In);
  X509Certificate[] certs = pkcs7.getCertificateList();
  ...


Dieter Bratko

-----Ursprüngliche Nachricht-----
Von: iaik-jce-owner@iaik.tu-graz.ac.at
[mailto:iaik-jce-owner@iaik.tu-graz.ac.at]Im Auftrag von Gottschol,
Andreas
Gesendet: Freitag, 14. April 2000 17:38
An: iaik-jce@iaik.at
Betreff: [iaik-jce] PKCS#7


Hi,

as some programs expect certificates in the PKCS#7 format (e.g. MS
InternetExplorer)
I would like to convert some X.509Certificate chain to a PKCS#7 object.
Does anybody know how this can be done using the IAIK-JCE classes?
Some sample code or a literature reference would be great.
Any help is very much appreciated.

Best regards, A. Gottschol

--
Mailinglist-archive at
http://jcewww.iaik.at/mailarchive/iaik-jce/jcethreads.html

To unsubscribe send an email to listserv@iaik.at with the folowing content:
UNSUBSCRIBE iaik-jce




smime.p7s