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

Re: [iaik-jce] How to get the 'keyid' part of AuthorityKeyIdentifier from the certificate extension?




 FileInputStream file = new
FileInputStream("/export/home/yyz/apps/yyz123.pem");
 X509Certificate cert = new X509Certificate(file);
//   wrong  byte[] cakeyid = cert.getExtensionValue("2.5.29.35");
// try
 byte[] cakeyid
=((AuthorityKeyIdentifier)cert.getExtension(AuthorityKeyIdentifier.oid)).getKeyIdentifier()

 System.out.println( "CAKeyID=" + GKUtil.toHexString(cakeyid) );

--
Petruzzi Francesco - Openfor s.r.l.
--
via Faravelli, 8 - 20149 Milano (Italy)
phone:(+39)0234534545 - fax:(+39)0234534065
--


--
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