/** * Creates the extension object on the base of its encoded form. */ public static IssuingDistributionPoint decode(byte[] encoding) throws IOException { IssuingDistributionPoint idp = (IssuingDistributionPoint) ASN1.decode(encoding); idp.encoding = encoding; return idp; }
/** * Constructs the object on the base of its encoded form. */ public InvalidityDate(byte[] encoding) throws IOException { super(encoding); date = (Date) ASN1.decode(encoding); }
public static CertificatePolicies decode(byte[] encoding) throws IOException { CertificatePolicies cps = ((CertificatePolicies) ASN1.decode(encoding)); cps.encoding = encoding; return cps; }
public static AuthorityKeyIdentifier decode(byte[] encoding) throws IOException { AuthorityKeyIdentifier aki = (AuthorityKeyIdentifier) ASN1.decode(encoding); aki.encoding = encoding; return aki; }
/** * Creates the extension object on the base of its encoded form. */ public KeyUsage(byte[] encoding) throws IOException { super(encoding); this.keyUsage = (boolean[]) ASN1.decode(encoding); }
/** * Creates the extension object on the base of its encoded form. * @param which specifies which alternative names are given * (Subject's or Issuer's) */ public AlternativeName(boolean which, byte[] encoding) throws IOException { super(encoding); this.which = which; this.alternativeNames = (GeneralNames) GeneralNames.ASN1.decode(encoding); }
public ReasonCode(byte[] encoding) throws IOException { super(encoding); this.code = ((byte[]) ASN1.decode(encoding))[0]; }
public static InfoAccessSyntax decode(byte[] encoding) throws IOException { return ((InfoAccessSyntax) ASN1.decode(encoding)); }
public static CRLDistributionPoints decode(byte[] encoding) throws IOException { return (CRLDistributionPoints) ASN1.decode(encoding); }
/** * Constructs the object on the base of its encoded form. */ public CRLNumber(byte[] encoding) throws IOException { super(encoding); number = new BigInteger((byte[]) ASN1.decode(encoding)); }
/** * Creates the extension object on the base of its encoded form. */ public BasicConstraints(byte[] encoding) throws IOException { super(encoding); Object[] values = (Object[]) ASN1.decode(encoding); ca = (Boolean) values[0]; if (values[1] != null) { pathLenConstraint = new BigInteger((byte[]) values[1]).intValue(); } }
/** * Returns the list of string representation of OIDs corresponding * to key purpose IDs. */ public List<String> getExtendedKeyUsage() throws IOException { if (keys == null) { keys = (List<String>) ASN1.decode(getEncoded()); } return keys; }
public X500Principal getIssuer() throws IOException { if (issuer == null) { issuer = (X500Principal) ASN1.decode(getEncoded()); } return issuer; }
public final Object decode(byte[] encoded, int offset, int encodingLen) throws IOException { return decode(new DerInputStream(encoded, offset, encodingLen)); }
public final Object decode(InputStream in) throws IOException { return decode(new DerInputStream(in)); }
public final Object decode(byte[] encoded) throws IOException { return decode(new DerInputStream(encoded)); }
public Object decode(BerInputStream in) throws IOException { int index = Arrays.binarySearch(identifiers[0], in.tag); if (index < 0) { throw new ASN1Exception("Failed to decode ASN.1 choice type. No alternatives were found for " + getClass().getName());// FIXME message } index = identifiers[1][index]; in.content = type[index].decode(in); // set index for getDecodedObject method in.choiceIndex = index; if (in.isVerify) { return null; } return getDecodedObject(in); }
public final void verify(byte[] encoded) throws IOException { DerInputStream decoder = new DerInputStream(encoded); decoder.setVerify(); decode(decoder); }
public final void verify(InputStream in) throws IOException { DerInputStream decoder = new DerInputStream(in); decoder.setVerify(); decode(decoder); }
public Object decode(BerInputStream in) throws IOException { if (constrId != in.tag) { throw new ASN1Exception("ASN.1 explicitly tagged type is expected at [" + in.tagOffset + "]. Expected tag: " + Integer.toHexString(constrId) + ", " + "but encountered tag " + Integer.toHexString(in.tag)); } in.next(); in.content = type.decode(in); if (in.isVerify) { return null; } return getDecodedObject(in); }