Example usage for org.apache.commons.ssl.asn1 ASN1InputStream readObject

List of usage examples for org.apache.commons.ssl.asn1 ASN1InputStream readObject

Introduction

In this page you can find the example usage for org.apache.commons.ssl.asn1 ASN1InputStream readObject.

Prototype

public DERObject readObject() throws IOException 

Source Link

Usage

From source file:org.wso2.carbon.identity.authenticator.x509Certificate.X509CertificateAuthenticator.java

/**
 * Get decoded alternative name//from   w  w w .j a va 2  s. c o  m
 *
 * @param decoder ASN1 Decoder
 */
private String decodeAlternativeName(ASN1InputStream decoder) throws IOException {

    DEREncodable encoded = decoder.readObject();
    encoded = ((DERSequence) encoded).getObjectAt(1);
    encoded = ((DERTaggedObject) encoded).getObject();
    encoded = ((DERTaggedObject) encoded).getObject();
    return ((DERUTF8String) encoded).getString();
}