How to generate a "CertPath"?

From: somebody (some_at_body.com)
Date: 01/23/04


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();
    }



Relevant Pages

  • Re: RSA vs AES
    ... > Verisign, MS took the extra burden of issuing a critical patch to ... > those stolen root CAs. ... if any of these other keys ever got compromised ... ... BBN Certificate Services ...
    (sci.crypt)
  • Re: Your digital ID name cannot be found by the underlying security system
    ... This morning I received email from VeriSign indicating that apparently I ... Although I do not have a private key recovery feature, ... replaced the certificate 3 times already and still it will not work. ...
    (microsoft.public.outlook)
  • Re: [Full-Disclosure] PGP vs. certificate from Verisign
    ... What I wonder - will Verisign have set up CRL servers yet? ... PGP vs. certificate from Verisign ...
    (Full-Disclosure)
  • Re: what certificate to buy from Verisign ?
    ... > Server certificate is used by server service, ... For client side, there has Client Authentication Certificate ... > like Verisign will have much more types of certificates available, ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: what certificate to buy from Verisign ?
    ... \par Microsoft Online Support ... \par Subject: Re: what certificate to buy from Verisign? ... \par> secure communication channel between client/server, ...
    (microsoft.public.dotnet.framework.webservices.enhancements)