Search in sources :

Example 1 with RelativeDistinguishedName

use of org.openmuc.jasn1.compiler.pkix1explicit88.RelativeDistinguishedName in project jasn1 by openmuc.

the class DistributionPointName method decode.

public int decode(InputStream is, BerTag berTag) throws IOException {
    int codeLength = 0;
    BerTag passedTag = berTag;
    if (berTag == null) {
        berTag = new BerTag();
        codeLength += berTag.decode(is);
    }
    if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) {
        fullName = new GeneralNames();
        codeLength += fullName.decode(is, false);
        return codeLength;
    }
    if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 1)) {
        nameRelativeToCRLIssuer = new RelativeDistinguishedName();
        codeLength += nameRelativeToCRLIssuer.decode(is, false);
        return codeLength;
    }
    if (passedTag != null) {
        return 0;
    }
    throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item.");
}
Also used : RelativeDistinguishedName(org.openmuc.jasn1.compiler.pkix1explicit88.RelativeDistinguishedName) IOException(java.io.IOException)

Aggregations

IOException (java.io.IOException)1 RelativeDistinguishedName (org.openmuc.jasn1.compiler.pkix1explicit88.RelativeDistinguishedName)1