com.novell.security.japi.pki
Class NPKI_ExtAltNames

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

public class NPKI_ExtAltNames
extends java.lang.Object

The x.509 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  java.util.Vector m_altName
           
protected  int m_flags
           
 
Constructor Summary
NPKI_ExtAltNames(int flags)
          Constructor for the X.509 subject alternative name extension.
 
Method Summary
 void addAltName(com.novell.security.japi.pki.NPKI_AltName altName)
          Adds the specified issuer alternative name.
 com.novell.security.japi.pki.NPKI_AltName getAltName(int altNameNumber)
          Gets alternative name at the specified index.
 int getFlags()
          Gets flags that denotes how the extension will be encoded in the certificate.
 int getNumberOfNames()
          Gets number of alternative names in the list.
 boolean removeAltName(com.novell.security.japi.pki.NPKI_AltName altName)
          Removes alternative name.
 void removeAltNameAt(int altNameNumber)
          Removes the alternative name at the specified index.
 void setFlags(int flags)
          Set flags to specify whether or not this extension should be included in the certificate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_flags

protected int m_flags

m_altName

protected java.util.Vector m_altName
Constructor Detail

NPKI_ExtAltNames

public NPKI_ExtAltNames(int flags)
                 throws java.io.IOException
Constructor for the X.509 subject alternative name extension.

Parameters:
flags - Specifies whether or not to include this extension.
Throws:
java.io.IOException - if an I/O error occurs.
Method Detail

setFlags

public void setFlags(int flags)
Set flags to specify whether or not this extension should be included in the certificate.

For a description of the general-purpose flags, see the General-purpose extension flags section. NOTE: There are no subject alternative name extension specific flags defined in this release.

Parameters:
flags - Denotes how the extension will be encoded in the certificate and is composed of both general purpose flags combined with any extension specific flags if necessary.

addAltName

public void addAltName(com.novell.security.japi.pki.NPKI_AltName altName)
Adds the specified issuer alternative name.

Parameters:
altName - An object representing an alternative name.

getAltName

public com.novell.security.japi.pki.NPKI_AltName getAltName(int altNameNumber)
                                                     throws java.lang.ArrayIndexOutOfBoundsException
Gets alternative name at the specified index.

Parameters:
altNameNumber - The index of the alternate name to be retrieved.
Returns:
NPKI_AltName The object containing the alternative name.
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the index was invalid.

removeAltName

public boolean removeAltName(com.novell.security.japi.pki.NPKI_AltName altName)
Removes alternative name.

Parameters:
altName - The alternative name that is to be removed from the list.
Returns:
True on success.

removeAltNameAt

public void removeAltNameAt(int altNameNumber)
                     throws java.lang.ArrayIndexOutOfBoundsException
Removes the alternative name at the specified index.

Parameters:
altNameNumber - Index of the alternative name to be removed.
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the index was invalid

getFlags

public int getFlags()
Gets flags that denotes how the extension will be encoded in the certificate.

Returns:
flags

getNumberOfNames

public int getNumberOfNames()
Gets number of alternative names in the list.

Returns:
Number of alternative names.