How to generate a "CertPath"?
From: somebody (some_at_body.com)
Date: 01/23/04
- Next message: Andrew Thompson: "Re: Mars Rover Not Responding"
- Previous message: analogueboy: "Re: starting J2EE"
- Next in thread: Jeff: "Re: How to generate a "CertPath"?"
- Reply: Jeff: "Re: How to generate a "CertPath"?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 23 Jan 2004 17:39:12 -0500
When the generateCertPath line below is executed, I receive the
following message:
java.security.cert.CertificateException: unsupported encoding
This is a CA certificate from Verisign. What encoding should
I use?
-THanks
try {
// open an input stream to the file
FileInputStream fis = new FileInputStream(filename);
// instantiate a CertificateFactory for X.509
CertificateFactory cf = CertificateFactory.getInstance("X.509");
X509Certificate cert = (X509Certificate)cf.generateCertificate(fis);
//CertPath cp = cf.generateCertPath(fis, cert.getEncoded().toString());
CertPath cp = cf.generateCertPath(fis, "PKCS7");
}
catch (Exception e) {
e.printStackTrace();
}
- Next message: Andrew Thompson: "Re: Mars Rover Not Responding"
- Previous message: analogueboy: "Re: starting J2EE"
- Next in thread: Jeff: "Re: How to generate a "CertPath"?"
- Reply: Jeff: "Re: How to generate a "CertPath"?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|