Fields Summary |
---|
public static final org.bouncycastle.asn1.DERObjectIdentifier | SubjectDirectoryAttributesSubject Directory Attributes |
public static final org.bouncycastle.asn1.DERObjectIdentifier | SubjectKeyIdentifierSubject Key Identifier |
public static final org.bouncycastle.asn1.DERObjectIdentifier | KeyUsageKey Usage |
public static final org.bouncycastle.asn1.DERObjectIdentifier | PrivateKeyUsagePeriodPrivate Key Usage Period |
public static final org.bouncycastle.asn1.DERObjectIdentifier | SubjectAlternativeNameSubject Alternative Name |
public static final org.bouncycastle.asn1.DERObjectIdentifier | IssuerAlternativeNameIssuer Alternative Name |
public static final org.bouncycastle.asn1.DERObjectIdentifier | BasicConstraintsBasic Constraints |
public static final org.bouncycastle.asn1.DERObjectIdentifier | CRLNumberCRL Number |
public static final org.bouncycastle.asn1.DERObjectIdentifier | ReasonCodeReason code |
public static final org.bouncycastle.asn1.DERObjectIdentifier | InstructionCodeHold Instruction Code |
public static final org.bouncycastle.asn1.DERObjectIdentifier | InvalidityDateInvalidity Date |
public static final org.bouncycastle.asn1.DERObjectIdentifier | DeltaCRLIndicatorDelta CRL indicator |
public static final org.bouncycastle.asn1.DERObjectIdentifier | IssuingDistributionPointIssuing Distribution Point |
public static final org.bouncycastle.asn1.DERObjectIdentifier | CertificateIssuerCertificate Issuer |
public static final org.bouncycastle.asn1.DERObjectIdentifier | NameConstraintsName Constraints |
public static final org.bouncycastle.asn1.DERObjectIdentifier | CRLDistributionPointsCRL Distribution Points |
public static final org.bouncycastle.asn1.DERObjectIdentifier | CertificatePoliciesCertificate Policies |
public static final org.bouncycastle.asn1.DERObjectIdentifier | PolicyMappingsPolicy Mappings |
public static final org.bouncycastle.asn1.DERObjectIdentifier | AuthorityKeyIdentifierAuthority Key Identifier |
public static final org.bouncycastle.asn1.DERObjectIdentifier | PolicyConstraintsPolicy Constraints |
public static final org.bouncycastle.asn1.DERObjectIdentifier | ExtendedKeyUsageExtended Key Usage |
public static final org.bouncycastle.asn1.DERObjectIdentifier | FreshestCRLFreshest CRL |
public static final org.bouncycastle.asn1.DERObjectIdentifier | InhibitAnyPolicyInhibit Any Policy |
public static final org.bouncycastle.asn1.DERObjectIdentifier | AuthorityInfoAccessAuthority Info Access |
public static final org.bouncycastle.asn1.DERObjectIdentifier | SubjectInfoAccessSubject Info Access |
public static final org.bouncycastle.asn1.DERObjectIdentifier | BiometricInfoBiometricInfo |
public static final org.bouncycastle.asn1.DERObjectIdentifier | QCStatementsQCStatements |
private org.bouncycastle.asn1.OrderedTable | table |
Constructors Summary |
---|
public X509Extensions(org.bouncycastle.asn1.ASN1Sequence seq)Constructor from ASN1Sequence.
the extensions are a list of constructed sequences, either with (OID, OctetString) or (OID, Boolean, OctetString)
Enumeration e = seq.getObjects();
while (e.hasMoreElements())
{
ASN1Sequence s = ASN1Sequence.getInstance(e.nextElement());
// BEGIN android-changed
int sSize = s.size();
DERObjectIdentifier key = (DERObjectIdentifier) s.getObjectAt(0);
Object value;
if (sSize == 3)
{
value = new X509Extension(DERBoolean.getInstance(s.getObjectAt(1)), ASN1OctetString.getInstance(s.getObjectAt(2)));
}
else if (sSize == 2)
{
value = new X509Extension(false, ASN1OctetString.getInstance(s.getObjectAt(1)));
}
else
{
throw new IllegalArgumentException("Bad sequence size: " + sSize);
}
table.add(key, value);
// END android-changed
}
|
public X509Extensions(Hashtable extensions)constructor from a table of extensions.
it's is assumed the table contains OID/String pairs.
this(null, extensions);
|
public X509Extensions(Vector ordering, Hashtable extensions)Constructor from a table of extensions with ordering.
It's is assumed the table contains OID/String pairs.
Enumeration e;
if (ordering == null)
{
e = extensions.keys();
}
else
{
e = ordering.elements();
}
// BEGIN android-changed
while (e.hasMoreElements())
{
DERObjectIdentifier oid = (DERObjectIdentifier)e.nextElement();
X509Extension ext = (X509Extension)extensions.get(oid);
table.add(oid, ext);
}
// END android-changed
|
public X509Extensions(Vector objectIDs, Vector values)Constructor from two vectors
Enumeration e = objectIDs.elements();
// BEGIN android-changed
int count = 0;
while (e.hasMoreElements())
{
DERObjectIdentifier oid = (DERObjectIdentifier)e.nextElement();
X509Extension ext = (X509Extension)values.elementAt(count);
table.add(oid, ext);
count++;
}
// END android-changed
|
Methods Summary |
---|
public boolean | equals(java.lang.Object o)
if (!(o instanceof X509Extensions))
{
return false;
}
X509Extensions other = (X509Extensions)o;
// BEGIN android-changed
Enumeration e1 = table.getKeys();
Enumeration e2 = other.table.getKeys();
// END android-changed
while (e1.hasMoreElements() && e2.hasMoreElements())
{
Object o1 = e1.nextElement();
Object o2 = e2.nextElement();
if (!o1.equals(o2))
{
return false;
}
}
if (e1.hasMoreElements() || e2.hasMoreElements())
{
return false;
}
return true;
|
public X509Extension | getExtension(org.bouncycastle.asn1.DERObjectIdentifier oid)return the extension represented by the object identifier
passed in.
// BEGIN android-changed
return (X509Extension)table.get(oid);
// END android-changed
|
public static org.bouncycastle.asn1.x509.X509Extensions | getInstance(org.bouncycastle.asn1.ASN1TaggedObject obj, boolean explicit)
// END android-changed
return getInstance(ASN1Sequence.getInstance(obj, explicit));
|
public static org.bouncycastle.asn1.x509.X509Extensions | getInstance(java.lang.Object obj)
if (obj == null || obj instanceof X509Extensions)
{
return (X509Extensions)obj;
}
if (obj instanceof ASN1Sequence)
{
return new X509Extensions((ASN1Sequence)obj);
}
if (obj instanceof ASN1TaggedObject)
{
return getInstance(((ASN1TaggedObject)obj).getObject());
}
throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
|
public int | hashCode()
// BEGIN android-changed
int size = table.size();
int hashCode = 0;
for (int i = 0; i < size; i++) {
hashCode ^= table.getKey(i).hashCode();
hashCode ^= table.getValue(i).hashCode();
}
// END android-changed
return hashCode;
|
public java.util.Enumeration | oids()return an Enumeration of the extension field's object ids.
// BEGIN android-changed
return table.getKeys();
// END android-changed
|
public org.bouncycastle.asn1.DERObject | toASN1Object()
Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension
Extension ::= SEQUENCE {
extnId EXTENSION.&id ({ExtensionSet}),
critical BOOLEAN DEFAULT FALSE,
extnValue OCTET STRING }
// BEGIN android-changed
int size = table.size();
ASN1EncodableVector vec = new ASN1EncodableVector();
for (int i = 0; i < size; i++) {
DERObjectIdentifier oid = table.getKey(i);
X509Extension ext = (X509Extension)table.getValue(i);
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(oid);
if (ext.isCritical())
{
v.add(DERBoolean.TRUE);
}
v.add(ext.getValue());
vec.add(new DERSequence(v));
}
// END android-changed
return new DERSequence(vec);
|