Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography 1.27
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.bouncycastle.asn1.x509
Class GeneralName

    java.lang.Object
      org.bouncycastle.asn1.ASN1Encodable
          org.bouncycastle.asn1.x509.GeneralName

All Implemented Interfaces:
  DEREncodable

public class GeneralName
extends ASN1Encodable

The GeneralName object.

     GeneralName ::= CHOICE {
          otherName                       [0]     OtherName,
          rfc822Name                      [1]     IA5String,
          dNSName                         [2]     IA5String,
          x400Address                     [3]     ORAddress,
          directoryName                   [4]     Name,
          ediPartyName                    [5]     EDIPartyName,
          uniformResourceIdentifier       [6]     IA5String,
          iPAddress                       [7]     OCTET STRING,
          registeredID                    [8]     OBJECT IDENTIFIER}

     OtherName ::= SEQUENCE {
          type-id    OBJECT IDENTIFIER,
          value      [0] EXPLICIT ANY DEFINED BY type-id }

     EDIPartyName ::= SEQUENCE {
          nameAssigner            [0]     DirectoryString OPTIONAL,
          partyName               [1]     DirectoryString }

Field Summary
`static int` | `directoryName`
`static int` | `dNSName`
`static int` | `ediPartyName`
`static int` | `iPAddress`
`static int` | `otherName`
`static int` | `registeredID`
`static int` | `rfc822Name`
`static int` | `uniformResourceIdentifier`
`static int` | `x400Address`

Constructor Summary
`GeneralName(DERObject name, int tag)` Deprecated. this constructor seems the wrong way round!
`GeneralName(int tag, ASN1Encodable name)` When the subjectAltName extension contains an Internet mail address, the address MUST be included as an rfc822Name.
`GeneralName(int tag, java.lang.String name)` Create a General name for the given tag from the passed in String.
`GeneralName(X509Name directoryName)`

Method Summary
`static GeneralName` | `getInstance(ASN1TaggedObject tagObj, boolean explicit)`
`static GeneralName` | `getInstance(java.lang.Object obj)`
`DEREncodable` | `getName()`
`int` | `getTagNo()`
`DERObject` | `toASN1Object()`

Methods inherited from class org.bouncycastle.asn1.ASN1Encodable
`equals, getDERObject, getEncoded, hashCode`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### otherName

    public static final int otherName

See Also:
  Constant Field Values

### rfc822Name

    public static final int rfc822Name

See Also:
  Constant Field Values

### dNSName

    public static final int dNSName

See Also:
  Constant Field Values

### x400Address

    public static final int x400Address

See Also:
  Constant Field Values

### directoryName

    public static final int directoryName

See Also:
  Constant Field Values

### ediPartyName

    public static final int ediPartyName

See Also:
  Constant Field Values

### uniformResourceIdentifier

    public static final int uniformResourceIdentifier

See Also:
  Constant Field Values

### iPAddress

    public static final int iPAddress

See Also:
  Constant Field Values

### registeredID

    public static final int registeredID

See Also:
  Constant Field Values

Constructor Detail

### GeneralName

    public GeneralName(X509Name directoryName)

### GeneralName

    public GeneralName(DERObject name,
                       int tag)

  Deprecated. this constructor seems the wrong way round!

### GeneralName

    public GeneralName(int tag,
                       ASN1Encodable name)

  When the subjectAltName extension contains an Internet mail address, the address MUST be included as an rfc822Name. The format of an rfc822Name is an "addr-spec" as defined in RFC 822 [RFC 822]. When the subjectAltName extension contains a domain name service label, the domain name MUST be stored in the dNSName (an IA5String). The name MUST be in the "preferred name syntax," as specified by RFC 1034 [RFC 1034]. When the subjectAltName extension contains a URI, the name MUST be stored in the uniformResourceIdentifier (an IA5String). The name MUST be a non-relative URL, and MUST follow the URL syntax and encoding rules specified in [RFC 1738]. The name must include both a scheme (e.g., "http" or "ftp") and a scheme-specific-part. The scheme- specific-part must include a fully qualified domain name or IP address as the host. When the subjectAltName extension contains a iPAddress, the address MUST be stored in the octet string in "network byte order," as specified in RFC 791 [RFC 791]. The least significant bit (LSB) of each octet is the LSB of the corresponding byte in the network address. For IP Version 4, as specified in RFC 791, the octet string MUST contain exactly four octets. For IP Version 6, as specified in RFC 1883, the octet string MUST contain exactly sixteen octets [RFC 1883].

### GeneralName

    public GeneralName(int tag,
                       java.lang.String name)

  Create a General name for the given tag from the passed in String.

Parameters:
  `tag` - tag number
  `name` - string representation of name

Method Detail

### getInstance

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

### getInstance

    public static GeneralName getInstance(ASN1TaggedObject tagObj,
                                          boolean explicit)

### getTagNo

    public int getTagNo()

### getName

    public DEREncodable getName()

### toASN1Object

    public DERObject toASN1Object()

  Specified by:
    `toASN1Object` in class `ASN1Encodable`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography 1.27
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD