Greetings, In JDK, the SUN provider package includes implementation of certificate factory for X.509 certificates and certificate revocation lists only. As you can see in Java 1.4 API doc, there is only X509Certificate abstract class under java.security.cert package. i.e. There is no standard Java Solution for process PKCS#7 certificate data format.
Definitely, you can develop your own implementation or search one from the Internet(but I guess it is not easy). However, I found that a PKCS#7 certificate file can be parsed with the "X.509" CertificateFactory with the Sun's implementation as stated the in the following URL. Parsing a Certificate Reply http://java.sun.com/j2se/1.4/docs/guide/security/CryptoSpec.html#ParseCert e.g. FileInputStream fis = new FileInputStream(filename); CertificateFactory cf = CertificateFactory.getInstance("X.509"); Collection c = cf.generateCertificates(fis); Iterator i = c.iterator(); while (i.hasNext()) { Certificate cert = (Certificate)i.next(); System.out.println(cert); } Yes. It works. It can parse the cert file(*.p7b), but you can't validate the cert perfectly. Because, it's still using the X509 implementation. And, you will get limited methods to call which defined in Certificate class. Happy Programming! -Victor Cheung From : [EMAIL PROTECTED] on 17/12/2002 01:43:04 PM To: [EMAIL PROTECTED] cc: (bcc: Victor HT CHEUNG/HD/HKSARG) Subject: [jdjlist] PKCS#7 implementation for Java Hi, Does anyone know a "standard" Java solution for parsing PKCS#7 data structures and validating then? I tried Google and found some implementations (from RSA, IBM and IAIK) included in their JCE packages, but it looks like these are proprietary extensions to JCE not included in the original spec (since JCE is for encryption only). TIA, Tedi Esta mensagem, incluindo seus anexos, pode conter informa��o confidencial e/ou privilegiada. Se voc� recebeu este e-mail por engano, n�o utilize, copie ou divulgue as informa��es nele contidas. E, por favor, avise imediatamente o remetente, respondendo ao e-mail, e em seguida apague-o. Este e-mail possui conte�do informativo e n�o transacional. Caso necessite de atendimento imediato, recomendamos utilizar um dos canais dispon�veis: Internet Banking <http://www.bankboston.com.br> , BankBoston por telefone <http://www.bankboston.com.br/bpt> ou ag�ncia/representante de atendimento de sua conveni�ncia. Agradecemos sua colabora��o. This message, including its attachments, may contain confidential and/or privileged information. If you received this email by mistake, do not use, copy or disseminate any information herein contained. Please notify us immediately by replying to the sender and then delete it. This email is for information purposes only, not for transactions. In case you need immediate assistance, please use one of the following channels: Internet Banking <http://www.bankboston.com.br> , BankBoston by phone <http://www.bankboston.com.br/bpt> or branch/relationship manager at your convenience. Thank you for your cooperation. ____________________________________________________ To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm Be respectful! Clean up your posts before replying ____________________________________________________ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12"> <TITLE>PKCS#7 implementation for Java</TITLE> </HEAD> <BODY> <P><FONT SIZE=2>Hi,</FONT> </P> <P><FONT SIZE=2> Does anyone know a "standard" Java solution for parsing PKCS#7 data structures and validating then? I tried Google and found some implementations (from RSA, IBM and IAIK) included in their JCE packages, but it looks like these are proprietary extensions to JCE not included in the original spec (since JCE is for encryption only). </FONT></P> <P><FONT SIZE=2> TIA,</FONT> </P> <P><FONT SIZE=2> Tedi</FONT> </P> <BR> <P><FONT SIZE=1>Esta mensagem, incluindo seus anexos, pode conter informa��o confidencial e/ou privilegiada. Se voc� recebeu este e-mail por engano, n�o utilize, copie ou divulgue as informa��es nele contidas. E, por favor, avise imediatamente o remetente, respondendo ao e-mail, e em seguida apague-o. Este e-mail possui conte�do informativo e n�o transacional. Caso necessite de atendimento imediato, recomendamos utilizar um dos canais dispon�veis: </FONT><A HREF="http://www.bankboston.com.br"><U><FONT SIZE=1>Internet Banking</FONT></U></A><FONT SIZE=1> , </FONT><A HREF="http://www.bankboston.com.br/bpt"><U><FONT SIZE=1>BankBoston por telefone</FONT></U></A><FONT SIZE=1> ou ag�ncia/representante de atendimento de sua conveni�ncia. Agradecemos sua colabora��o.</FONT></P> <P><FONT SIZE=1>This message, including its attachments, may contain confidential and/or privileged information. If you received this email by mistake, do not use, copy or disseminate any information herein contained. Please notify us immediately by replying to the sender and then delete it. This email is for information purposes only, not for transactions. In case you need immediate assistance, please use one of the following channels: </FONT><A HREF="http://www.bankboston.com.br"><U><FONT SIZE=1>Internet Banking</FONT></U></A><FONT SIZE=1> , </FONT><A HREF="http://www.bankboston.com.br/bpt"><U><FONT SIZE=1>BankBoston by phone</FONT></U></A><FONT SIZE=1> or branch/relationship manager at your convenience. Thank you for your cooperation.</FONT></P> ____________________________________________________<BR> To change your JDJList options, please visit:<BR> http://www.sys-con.com/java/list.cfm<BR> <BR> Be respectful! Clean up your posts before replying<BR> ____________________________________________________ </BODY> </HTML> ----------------------------- Disclaimer: This email (including every file transmitted with it) may contain confidential and privileged information and is solely for the use of the intended recipient(s). Any unauthorised dissemination, distribution or copying of this email is strictly prohibited. Please notify the sender and delete this email immediately if you have received this by mistake. We do not accept liability arising from email transmitted by mistake. ____________________________________________________ To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm Be respectful! Clean up your posts before replying ____________________________________________________
