org.bouncycastle.asn1.ASN1SequenceParser Java Examples

The following examples show how to use org.bouncycastle.asn1.ASN1SequenceParser. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AuthorizationList.java    From Auditor with MIT License 5 votes vote down vote up
private static ASN1TaggedObject parseAsn1TaggedObject(ASN1SequenceParser parser)
        throws CertificateParsingException {
    ASN1Encodable asn1Encodable = parseAsn1Encodable(parser);
    if (asn1Encodable == null || asn1Encodable instanceof ASN1TaggedObject) {
        return (ASN1TaggedObject) asn1Encodable;
    }
    throw new CertificateParsingException(
            "Expected tagged object, found " + asn1Encodable.getClass().getName());
}
 
Example #2
Source File: AuthorizationList.java    From Auditor with MIT License 5 votes vote down vote up
private static ASN1Encodable parseAsn1Encodable(ASN1SequenceParser parser)
        throws CertificateParsingException {
    try {
        return parser.readObject();
    } catch (IOException e) {
        throw new CertificateParsingException("Failed to parse ASN1 sequence", e);
    }
}
 
Example #3
Source File: AuthorizationList.java    From AttestationServer with MIT License 5 votes vote down vote up
private static ASN1TaggedObject parseAsn1TaggedObject(ASN1SequenceParser parser)
        throws CertificateParsingException {
    ASN1Encodable asn1Encodable = parseAsn1Encodable(parser);
    if (asn1Encodable == null || asn1Encodable instanceof ASN1TaggedObject) {
        return (ASN1TaggedObject) asn1Encodable;
    }
    throw new CertificateParsingException(
            "Expected tagged object, found " + asn1Encodable.getClass().getName());
}
 
Example #4
Source File: AuthorizationList.java    From AttestationServer with MIT License 5 votes vote down vote up
private static ASN1Encodable parseAsn1Encodable(ASN1SequenceParser parser)
        throws CertificateParsingException {
    try {
        return parser.readObject();
    } catch (IOException e) {
        throw new CertificateParsingException("Failed to parse ASN1 sequence", e);
    }
}
 
Example #5
Source File: AuthorizationList.java    From android-testdpc with Apache License 2.0 5 votes vote down vote up
private static ASN1TaggedObject parseAsn1TaggedObject(ASN1SequenceParser parser)
        throws CertificateParsingException {
    ASN1Encodable asn1Encodable = parseAsn1Encodable(parser);
    if (asn1Encodable == null || asn1Encodable instanceof ASN1TaggedObject) {
        return (ASN1TaggedObject) asn1Encodable;
    }
    throw new CertificateParsingException(
            "Expected tagged object, found " + asn1Encodable.getClass().getName());
}
 
Example #6
Source File: AuthorizationList.java    From android-testdpc with Apache License 2.0 5 votes vote down vote up
private static ASN1Encodable parseAsn1Encodable(ASN1SequenceParser parser)
        throws CertificateParsingException {
    try {
        return parser.readObject();
    } catch (IOException e) {
        throw new CertificateParsingException("Failed to parse ASN1 sequence", e);
    }
}