/** * Generates certification path object on the base of encoding provided via * array of bytes. The format of provided encoded form is specified by * parameter {@code encoding}. * * @throws CertificateException if specified encoding form is not supported, * or some problems occurred during the decoding. */ public static X509CertPathImpl getInstance(byte[] in, String encoding) throws CertificateException { try { final Encoding encType = Encoding.findByApiName(encoding); if (encType == null) { throw new CertificateException("Unsupported encoding: " + encoding); } switch (encType) { case PKI_PATH: return (X509CertPathImpl) ASN1.decode(in); case PKCS7: return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in)); default: throw new CertificateException("Unsupported encoding: " + encoding); } } catch (IOException e) { throw new CertificateException("Failed to decode CertPath", e); } }
/** * Generates certification path object on the basis of encoding provided via * input stream. The format of provided encoded form is specified by * parameter <code>encoding</code>. * * @throws CertificateException if specified encoding form is not supported, * or some problems occurred during the decoding. */ public static X509CertPathImpl getInstance(InputStream in, String encoding) throws CertificateException { try { final Encoding encType = Encoding.findByApiName(encoding); if (encType == null) { throw new CertificateException("Unsupported encoding: " + encoding); } switch (encType) { case PKI_PATH: return (X509CertPathImpl) ASN1.decode(in); case PKCS7: return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in)); default: throw new CertificateException("Unsupported encoding: " + encoding); } } catch (IOException e) { throw new CertificateException("Failed to decode CertPath", e); } }
/** * Generates certification path object on the base of encoding provided via * array of bytes. The format of provided encoded form is specified by * parameter {@code encoding}. * * @throws CertificateException if specified encoding form is not supported, * or some problems occurred during the decoding. */ public static X509CertPathImpl getInstance(byte[] in, String encoding) throws CertificateException { try { final Encoding encType = Encoding.findByApiName(encoding); if (encType == null) { throw new CertificateException("Unsupported encoding: " + encoding); } switch (encType) { case PKI_PATH: return (X509CertPathImpl) ASN1.decode(in); case PKCS7: return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in)); default: throw new CertificateException("Unsupported encoding: " + encoding); } } catch (IOException e) { throw new CertificateException("Failed to decode CertPath", e); } }
/** * Generates certification path object on the basis of encoding provided via * input stream. The format of provided encoded form is specified by * parameter <code>encoding</code>. * * @throws CertificateException if specified encoding form is not supported, * or some problems occurred during the decoding. */ public static X509CertPathImpl getInstance(InputStream in, String encoding) throws CertificateException { try { final Encoding encType = Encoding.findByApiName(encoding); if (encType == null) { throw new CertificateException("Unsupported encoding: " + encoding); } switch (encType) { case PKI_PATH: return (X509CertPathImpl) ASN1.decode(in); case PKCS7: return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in)); default: throw new CertificateException("Unsupported encoding: " + encoding); } } catch (IOException e) { throw new CertificateException("Failed to decode CertPath", e); } }
/** * Generates certification path object on the basis of encoding provided via * input stream. The format of provided encoded form is specified by * parameter <code>encoding</code>. * * @throws CertificateException if specified encoding form is not supported, * or some problems occurred during the decoding. */ public static X509CertPathImpl getInstance(InputStream in, String encoding) throws CertificateException { try { final Encoding encType = Encoding.findByApiName(encoding); if (encType == null) { throw new CertificateException("Unsupported encoding: " + encoding); } switch (encType) { case PKI_PATH: return (X509CertPathImpl) ASN1.decode(in); case PKCS7: return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in)); default: throw new CertificateException("Unsupported encoding: " + encoding); } } catch (IOException e) { throw new CertificateException("Failed to decode CertPath", e); } }
/** * Generates certification path object on the basis of encoding provided via * input stream. The format of provided encoded form is specified by * parameter <code>encoding</code>. * * @throws CertificateException if specified encoding form is not supported, * or some problems occurred during the decoding. */ public static X509CertPathImpl getInstance(InputStream in, String encoding) throws CertificateException { try { final Encoding encType = Encoding.findByApiName(encoding); if (encType == null) { throw new CertificateException("Unsupported encoding: " + encoding); } switch (encType) { case PKI_PATH: return (X509CertPathImpl) ASN1.decode(in); case PKCS7: return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in)); default: throw new CertificateException("Unsupported encoding: " + encoding); } } catch (IOException e) { throw new CertificateException("Failed to decode CertPath", e); } }
/** * Generates certification path object on the base of encoding provided via * array of bytes. The format of provided encoded form is specified by * parameter {@code encoding}. * * @throws CertificateException if specified encoding form is not supported, * or some problems occurred during the decoding. */ public static X509CertPathImpl getInstance(byte[] in, String encoding) throws CertificateException { try { final Encoding encType = Encoding.findByApiName(encoding); if (encType == null) { throw new CertificateException("Unsupported encoding: " + encoding); } switch (encType) { case PKI_PATH: return (X509CertPathImpl) ASN1.decode(in); case PKCS7: return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in)); default: throw new CertificateException("Unsupported encoding: " + encoding); } } catch (IOException e) { throw new CertificateException("Failed to decode CertPath", e); } }
/** * Generates certification path object on the base of encoding provided via * array of bytes. The format of provided encoded form is specified by * parameter {@code encoding}. * * @throws CertificateException if specified encoding form is not supported, * or some problems occurred during the decoding. */ public static X509CertPathImpl getInstance(byte[] in, String encoding) throws CertificateException { try { final Encoding encType = Encoding.findByApiName(encoding); if (encType == null) { throw new CertificateException("Unsupported encoding: " + encoding); } switch (encType) { case PKI_PATH: return (X509CertPathImpl) ASN1.decode(in); case PKCS7: return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in)); default: throw new CertificateException("Unsupported encoding: " + encoding); } } catch (IOException e) { throw new CertificateException("Failed to decode CertPath", e); } }
/** * Generates certification path object on the basis of encoding provided via * input stream. The format of provided encoded form is specified by * parameter <code>encoding</code>. * * @throws CertificateException if specified encoding form is not supported, * or some problems occurred during the decoding. */ public static X509CertPathImpl getInstance(InputStream in, String encoding) throws CertificateException { try { final Encoding encType = Encoding.findByApiName(encoding); if (encType == null) { throw new CertificateException("Unsupported encoding: " + encoding); } switch (encType) { case PKI_PATH: return (X509CertPathImpl) ASN1.decode(in); case PKCS7: return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in)); default: throw new CertificateException("Unsupported encoding: " + encoding); } } catch (IOException e) { throw new CertificateException("Failed to decode CertPath", e); } }
/** * Generates certification path object on the base of encoding provided via * array of bytes. The format of provided encoded form is specified by * parameter {@code encoding}. * * @throws CertificateException if specified encoding form is not supported, * or some problems occurred during the decoding. */ public static X509CertPathImpl getInstance(byte[] in, String encoding) throws CertificateException { try { final Encoding encType = Encoding.findByApiName(encoding); if (encType == null) { throw new CertificateException("Unsupported encoding: " + encoding); } switch (encType) { case PKI_PATH: return (X509CertPathImpl) ASN1.decode(in); case PKCS7: return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in)); default: throw new CertificateException("Unsupported encoding: " + encoding); } } catch (IOException e) { throw new CertificateException("Failed to decode CertPath", e); } }
/** * Generates certification path object on the base of encoding provided via * array of bytes. The format of provided encoded form is specified by * parameter {@code encoding}. * * @throws CertificateException if specified encoding form is not supported, * or some problems occurred during the decoding. */ public static X509CertPathImpl getInstance(byte[] in, String encoding) throws CertificateException { try { final Encoding encType = Encoding.findByApiName(encoding); if (encType == null) { throw new CertificateException("Unsupported encoding: " + encoding); } switch (encType) { case PKI_PATH: return (X509CertPathImpl) ASN1.decode(in); case PKCS7: return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in)); default: throw new CertificateException("Unsupported encoding: " + encoding); } } catch (IOException e) { throw new CertificateException("Failed to decode CertPath", e); } }
/** * Generates certification path object on the basis of encoding provided via * input stream. The format of provided encoded form is specified by * parameter <code>encoding</code>. * * @throws CertificateException if specified encoding form is not supported, * or some problems occurred during the decoding. */ public static X509CertPathImpl getInstance(InputStream in, String encoding) throws CertificateException { try { final Encoding encType = Encoding.findByApiName(encoding); if (encType == null) { throw new CertificateException("Unsupported encoding: " + encoding); } switch (encType) { case PKI_PATH: return (X509CertPathImpl) ASN1.decode(in); case PKCS7: return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in)); default: throw new CertificateException("Unsupported encoding: " + encoding); } } catch (IOException e) { throw new CertificateException("Failed to decode CertPath", e); } }
/** * Generates certification path object on the basis of encoding provided via * input stream. The format of provided encoded form is specified by * parameter <code>encoding</code>. * * @throws CertificateException if specified encoding form is not supported, * or some problems occurred during the decoding. */ public static X509CertPathImpl getInstance(InputStream in, String encoding) throws CertificateException { try { final Encoding encType = Encoding.findByApiName(encoding); if (encType == null) { throw new CertificateException("Unsupported encoding: " + encoding); } switch (encType) { case PKI_PATH: return (X509CertPathImpl) ASN1.decode(in); case PKCS7: return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in)); default: throw new CertificateException("Unsupported encoding: " + encoding); } } catch (IOException e) { throw new CertificateException("Failed to decode CertPath", e); } }
/** * @see java.security.cert.CertPath#getEncoded(String) */ @Override public byte[] getEncoded(String encoding) throws CertificateEncodingException { final Encoding encType = Encoding.findByApiName(encoding); if (encType == null) { throw new CertificateEncodingException("Unsupported encoding: " + encoding); } return getEncoded(encType); }
/** * @see java.security.cert.CertPath#getEncoded(String) */ @Override public byte[] getEncoded(String encoding) throws CertificateEncodingException { final Encoding encType = Encoding.findByApiName(encoding); if (encType == null) { throw new CertificateEncodingException("Unsupported encoding: " + encoding); } return getEncoded(encType); }
/** * @see java.security.cert.CertPath#getEncoded(String) */ @Override public byte[] getEncoded(String encoding) throws CertificateEncodingException { final Encoding encType = Encoding.findByApiName(encoding); if (encType == null) { throw new CertificateEncodingException("Unsupported encoding: " + encoding); } return getEncoded(encType); }
/** * @see java.security.cert.CertPath#getEncoded(String) */ @Override public byte[] getEncoded(String encoding) throws CertificateEncodingException { final Encoding encType = Encoding.findByApiName(encoding); if (encType == null) { throw new CertificateEncodingException("Unsupported encoding: " + encoding); } return getEncoded(encType); }
/** * @see java.security.cert.CertPath#getEncoded(String) */ @Override public byte[] getEncoded(String encoding) throws CertificateEncodingException { final Encoding encType = Encoding.findByApiName(encoding); if (encType == null) { throw new CertificateEncodingException("Unsupported encoding: " + encoding); } return getEncoded(encType); }
/** * @see java.security.cert.CertPath#getEncoded(String) */ @Override public byte[] getEncoded(String encoding) throws CertificateEncodingException { final Encoding encType = Encoding.findByApiName(encoding); if (encType == null) { throw new CertificateEncodingException("Unsupported encoding: " + encoding); } return getEncoded(encType); }
/** * @see java.security.cert.CertPath#getEncoded(String) */ @Override public byte[] getEncoded(String encoding) throws CertificateEncodingException { final Encoding encType = Encoding.findByApiName(encoding); if (encType == null) { throw new CertificateEncodingException("Unsupported encoding: " + encoding); } return getEncoded(encType); }