Bouncy Castle Cryptography Library 1.49

org.bouncycastle.asn1.x509
Class ExtendedKeyUsage

java.lang.Object
  extended by org.bouncycastle.asn1.ASN1Object
      extended by org.bouncycastle.asn1.x509.ExtendedKeyUsage
All Implemented Interfaces:
ASN1Encodable

public class ExtendedKeyUsage
extends ASN1Object

The extendedKeyUsage object.

      extendedKeyUsage ::= SEQUENCE SIZE (1..MAX) OF KeyPurposeId
 


Constructor Summary
ExtendedKeyUsage(KeyPurposeId usage)
           
ExtendedKeyUsage(KeyPurposeId[] usages)
           
ExtendedKeyUsage(java.util.Vector usages)
          Deprecated. use KeyPurposeId[] constructor.
 
Method Summary
static ExtendedKeyUsage fromExtensions(Extensions extensions)
           
static ExtendedKeyUsage getInstance(ASN1TaggedObject obj, boolean explicit)
           
static ExtendedKeyUsage getInstance(java.lang.Object obj)
           
 KeyPurposeId[] getUsages()
          Returns all extended key usages.
 boolean hasKeyPurposeId(KeyPurposeId keyPurposeId)
           
 int size()
           
 ASN1Primitive toASN1Primitive()
           
 
Methods inherited from class org.bouncycastle.asn1.ASN1Object
equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode, toASN1Object
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendedKeyUsage

public ExtendedKeyUsage(KeyPurposeId usage)

ExtendedKeyUsage

public ExtendedKeyUsage(KeyPurposeId[] usages)

ExtendedKeyUsage

public ExtendedKeyUsage(java.util.Vector usages)
Deprecated. use KeyPurposeId[] constructor.

Method Detail

getInstance

public static ExtendedKeyUsage getInstance(ASN1TaggedObject obj,
                                           boolean explicit)

getInstance

public static ExtendedKeyUsage getInstance(java.lang.Object obj)

fromExtensions

public static ExtendedKeyUsage fromExtensions(Extensions extensions)

hasKeyPurposeId

public boolean hasKeyPurposeId(KeyPurposeId keyPurposeId)

getUsages

public KeyPurposeId[] getUsages()
Returns all extended key usages. The returned vector contains DERObjectIdentifiers.

Returns:
An array with all key purposes.

size

public int size()

toASN1Primitive

public ASN1Primitive toASN1Primitive()
Specified by:
toASN1Primitive in interface ASN1Encodable
Specified by:
toASN1Primitive in class ASN1Object

Bouncy Castle Cryptography Library 1.49