com.novell.security.japi.pki
Class NPKI_AltName

java.lang.Object
  |
  +--com.novell.security.japi.pki.NPKI_AltName

public class NPKI_AltName
extends java.lang.Object

Specifies an X.509 subject alternative name extension to be encoded with the certifcate.

The subject alternative name extension is used to specify additional identities to be bound to the subject of the certificate (i.e., other names that identify the object).


Field Summary
protected  short m_length
           
protected  short m_type
           
protected  byte[] m_value
           
 
Constructor Summary
NPKI_AltName(short type, byte[] value)
          Constructor
NPKI_AltName(short type, int value)
          Constructor
NPKI_AltName(short type, long value)
          Constructor
NPKI_AltName(short type, short value)
          Constructor
NPKI_AltName(short type, java.lang.String value)
          Constructor
 
Method Summary
 short getLength()
          Retrieves the alternative name length.
 short getType()
          Retrieves the altnernative name type.
 byte[] getValue()
          Retrieves the alternative name.
 void setType(short type)
          Sets the type of alternative name that is to be encoded in the certificate.
 void setValue(byte[] value)
          Sets the value of the alternative name.
 void setValue(int value)
          Sets the value of the alternative name.
 void setValue(long value)
          Sets the value of the alternative name.
 void setValue(short value)
          Sets the value of the alternative name.
 void setValue(java.lang.String value)
          Sets the value of the alternative name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_type

protected short m_type

m_length

protected short m_length

m_value

protected byte[] m_value
Constructor Detail

NPKI_AltName

public NPKI_AltName(short type,
                    short value)
             throws java.io.IOException
Constructor

Parameters:
type - Specifies which subject alternative name type is to be encoded in the certificate.
value - The alternative name to be encoded in the certificate.
Throws:
java.io.IOException - if an I/O exception occurs

NPKI_AltName

public NPKI_AltName(short type,
                    int value)
             throws java.io.IOException
Constructor

Parameters:
type - Specifies which subject alternative name type is to be encoded in the certificate.
value - The alternative name to be encoded in the certificate.
Throws:
java.io.IOException - if an I/O exception occurs

NPKI_AltName

public NPKI_AltName(short type,
                    long value)
             throws java.io.IOException
Constructor

Parameters:
type - Specifies which subject alternative name type is to be encoded in the certificate.
value - The alternative name to be encoded in the certificate.
Throws:
java.io.IOException - if an I/O exception occurs

NPKI_AltName

public NPKI_AltName(short type,
                    java.lang.String value)
             throws java.io.IOException
Constructor

Parameters:
type - Specifies which subject alternative name type is to be encoded in the certificate.
value - The alternative name to be encoded in the certificate.
Throws:
java.io.IOException - if an I/O exception occurs

NPKI_AltName

public NPKI_AltName(short type,
                    byte[] value)
             throws java.io.IOException
Constructor

Parameters:
type - Specifies which subject alternative name type is to be encoded in the certificate.
value - The alternative name to be encoded in the certificate.
Throws:
java.io.IOException - if an I/O exception occurs
Method Detail

setType

public void setType(short type)
Sets the type of alternative name that is to be encoded in the certificate.

Parameters:
type - Specifies which subject alternative name type is to be encoded in the certificate.

setValue

public void setValue(short value)
              throws java.io.IOException
Sets the value of the alternative name. The length will be 2 bytes.

Parameters:
value - The alternative name to be encoded in the certificate.
Throws:
java.io.IOException - if an I/O exception occurs

setValue

public void setValue(int value)
              throws java.io.IOException
Sets the value of the alternative name. The length will be 4 bytes.

Parameters:
value - The alternative name to be encoded in the certificate.
Throws:
java.io.IOException - if an I/O exception occurs

setValue

public void setValue(long value)
              throws java.io.IOException
Sets the value of the alternative name. The length will be 8 bytes.

Parameters:
value - The alternative name to be encoded in the certificate.
Throws:
java.io.IOException - if an I/O exception occurs

setValue

public void setValue(java.lang.String value)
              throws java.io.IOException
Sets the value of the alternative name. The length will be the number of bytes in the string.

Parameters:
value - The alternative name to be encoded in the certificate.
Throws:
java.io.IOException - if an I/O exception occurs

setValue

public void setValue(byte[] value)
              throws java.io.IOException
Sets the value of the alternative name. The length will be the length of value.

Parameters:
value - The alternative name to be encoded in the certificate.
Throws:
java.io.IOException - if an I/O exception occurs

getType

public short getType()
Retrieves the altnernative name type.

Returns:
The type of alternative name to be encoded in the certificate.

getLength

public short getLength()
Retrieves the alternative name length.

Returns:
The length in bytes of the alternative name to be encoded in the certificate.

getValue

public byte[] getValue()
Retrieves the alternative name.

Returns:
The alternative name to be encoded in the certificate.