Search in sources :

Example 1 with AnnotatedException

use of org.bouncycastle.jce.provider.AnnotatedException in project nhin-d by DirectProject.

the class CRLRevocationManager method getObject.

private static DERObject getObject(String oid, byte[] ext) throws AnnotatedException {
    ASN1InputStream aIn = null;
    try {
        aIn = new ASN1InputStream(ext);
        ASN1OctetString octs = (ASN1OctetString) aIn.readObject();
        IOUtils.closeQuietly(aIn);
        aIn = new ASN1InputStream(octs.getOctets());
        return aIn.readObject();
    } catch (Exception e) {
        throw new NHINDException("exception processing extension " + oid, e);
    } finally {
        IOUtils.closeQuietly(aIn);
    }
}
Also used : ASN1OctetString(org.bouncycastle.asn1.ASN1OctetString) ASN1InputStream(org.bouncycastle.asn1.ASN1InputStream) NHINDException(org.nhindirect.stagent.NHINDException) AnnotatedException(org.bouncycastle.jce.provider.AnnotatedException) IOException(java.io.IOException) CertificateException(java.security.cert.CertificateException) NHINDException(org.nhindirect.stagent.NHINDException) CRLException(java.security.cert.CRLException) NoSuchProviderException(java.security.NoSuchProviderException)

Aggregations

IOException (java.io.IOException)1 NoSuchProviderException (java.security.NoSuchProviderException)1 CRLException (java.security.cert.CRLException)1 CertificateException (java.security.cert.CertificateException)1 ASN1InputStream (org.bouncycastle.asn1.ASN1InputStream)1 ASN1OctetString (org.bouncycastle.asn1.ASN1OctetString)1 AnnotatedException (org.bouncycastle.jce.provider.AnnotatedException)1 NHINDException (org.nhindirect.stagent.NHINDException)1