com.novell.security.japi.pki
Class NPKIAPI

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

public class NPKIAPI
extends java.lang.Object

Establishes methods and protocols to implement a certificate authority (CA) that issues, stores, and manages digital certificates. This API can help you use the functionality of Novell eDirectory to further enhance or customize your security solutions and easily build on the certificates issued by Novell Certificate Server without re-writing your own technology.

NOTE: Novell Certificate Server requires the cryptography services of Novell International Cryptographic Infrastructure (NICI). NICI is the underlying cryptographic infrastructure that provides the cryptography for Novell Certificate Server and other Novell applications. Novell Certificate Server will not function if cryptography services are not fully installed.

NICI availability and cryptography strength is restricted if your network is located in an entity listed on the U.S. Government Restricted Party List or in a country with import controls on cryptography products or technologies.


Field Summary
static int CHAIN_CERT
          Use this flag when exporting or retrieving information on the certificate chain.
static int CHAIN_CERT_DESCENDING
          Use this flag to get the certificate chain in descending order.
static int CRL_SIGN
          Designates that the key is used to sign CRLs (Certificate Revocation Lists).
static int DATA_ENCIPHERMENT
          Designates that the key is used to directly encrypt data.
static int DECIPHER_ONLY
          Not valid for RSA keys.
static int DEFAULT_YEAR_ENCODING
          Specifies the X.509 default for date encoding (see RFC 2459 for more details).
static int DIGITAL_SIGNATURE
          Designates that the key is used to create digital signatures.
static int ENCIPHER_ONLY
          Not valid for RSA keys.
static int EXTENSION_CRITICAL
          Use to set the extension as critical in the certificate.
static int EXTENSION_DONT_ENCODE
          Use to exclude the extension from the certificate.
static int FIELD_CRITICAL
          Specifies a critical field in a certificate.
static int FIELD_NON_CRITICAL
          Specifies a non-critical field.
static int FOUR_DIGIT_YEAR
          Identifies dates that have either a four-digit year.
static int KEY_AGREEMENT
          Not valid for RSA keys.
static int KEY_CERT_SIGN
          Designates that the key is used to sign certificates.
static int KEY_ENCIPHERMENT
          Designates that the key is used to encrypt other keys.
static int KMO_CERTIFICATE_INVALID
          Indicates the object is in an invalid state.
static int KMO_CERTIFICATE_PRESENT
          Indicates all certificates as well as the key pair have been stored, and the object is in working order.
static int KMO_EMPTY
          Indicates no certificates or key pair have been stored.
static int KMO_KEY_PAIR_PRESENT
          Indicates a key pair has been stored, but no certificates have been stored.
static int KMO_TRUSTED_ROOT_PRESENT
          Indicates a key pair and the root certificate have been stored, but the object certificate has not been stored.
static int MAX_CERTIFICATE_SIZE
          Flags to use when creating a KMO using PKI verb #3 -- Create RSA key pair.
static int MAX_CSR_SIZE
          Size of the certificate signing request (CSR).
static int MAX_NICK_NAME_BYTES
          Size in bytes of the nickname.
static int MAX_NICK_NAME_CHARS
          Maximum characters in nickname.
static int MAX_SINGLE_CERTIFICATE_SIZE
          Maximum size in bytes that the server certificate can be set.
static int NO_CA_OPERATIONAL
          Indicates a CA is either not installed and/or not operational on the specified server.
static int NON_REPUDIATION
          Designates that the key is used for non-repudiation.
static int NOVELL_CERT
          Deprecated.
static int NOVELL_EXTENSION_EXTRACTABLE_KEY
          An additional flag that specifies that the private key can be extracted from Novell International Cryptographic Infrastructure (NICI).
static int NOVELL_EXTENSION_ORGCA_DEFAULT
          Specifies that the key-pair is for the organizational CA.
static int NOVELL_EXTENSION_SERVER_DEFAULT
          Used to specify that the key-pair is for a server.
static int NOVELL_EXTENSION_USER_DEFAULT
          Specifies that the key-pair is for a user.
static int NPKI_CA_CHANGE_HEALTH_CHECK_FORCE
          Use this value to set the 'Security Rights Level' to specify that the PKI Health Check code should force the re-creation of the default server certificates if the Trusted Root certificate for the default server certificate objects (KMOs) are not the same as the Organizational CA's root certificate.
static int NPKI_CA_RIGHTS_DEFAULT
          Specifies the system default Security Rights Level.
static int NPKI_CA_RIGHTS_ISSUE_CRL_ALL
          Specifies that the 'Security Rights Level' allows any authenticated eDirectory user to issue an emergency CRL without specific rights to the CRL Configuration object.
static int NPKI_CA_RIGHTS_READ_NCP
          Specifies that the 'Security Rights Level' only requires read (R) rights for any object to opereate the Certificate Authority.
static int NPKI_CA_RIGHTS_SELF_PROVISION_SERVER
          Specifies that the 'Security Rights Level' allows servers to create their own certificates, without specific rights to the Certificate Authority, provided that the certificates encode a subject name that is consistant with the server's IP Address, DNS Name or eDirectory identity.
static int NPKI_CA_RIGHTS_SELF_PROVISION_USER
          Specifies that the 'Security Rights Level' allows users to create their own certificates, without specific rights to the Certificate Authority, provided that the certificates encode a subject name that is consistant with the user's eDirectory identity.
static int NPKI_CA_RIGHTS_WRITE_ALL
          Specifies that the 'Security Rights Level' requires Write (W) rights for all objects to opereate the Certificate Authority.
static int NPKI_CERTIFICATE_CREATE_CA_CHANGE_FORCE
          This flag will cause createDefaultCertificates to force the re-creation of the default server certificates if the Trusted Root certificate for the default server certificate objects (KMOs) are not the same as the Organizational CA's root certificate.
static int NPKI_CERTIFICATE_CREATE_FORCE
          This flag will cause createDefaultCertificates to overwrite all default certificates with a new key pair and a new certificate.
static int NPKI_CERTIFICATE_CREATE_NO_OVERWRITE
          This flag will cause createDefaultCertificates to create the default certificates if they do not exit, but none of the current default certificates will be overwritten.
static int NPKI_CERTIFICATE_CREATE_NORMAL
          The default flag for createDefaultCertificates.
static int NPKI_DONT_QUERY_IP_AND_DNS
          Use this flag if you do not want createDefaultCertificates to queary WinSock/DNS for the default IP and DNS info.
static int NPKI_DONT_REPLACE_SSL_DNS
          Use this flag if you do not want createDefaultCertificates to overwrite the 'SSL CertificateDNS' KMO.
static int NPKI_DONT_REPLACE_SSL_IP
          Use this flag if you do not want createDefaultCertificates to overwrite the 'SSL CertificateIP' KMO.
static int NPKI_INVALID_CONTEXT
          Specifies the context values.
static int OBJECT_KEY_CERT
          Use this flag when exporting or retrieving information on the object certificate.
static int PKI_ADD
          Use to add an entry.
static int PKI_ADD_CERT
          Deprecated.
static int PKI_ALL_VENDORS
          Lists all certificate vendors.
static int PKI_CA_INFO
          Use PKI_CA_INFO when querying information about creating or using a certificate authority.
static int PKI_CA_KEY_AND_CERTS
          Use this flag when exporting the CA self-signed certificate, public certificate, and the CA's chain.
static int PKI_CERTIFICATE_NORMAL
          Indicates that a certiifcate has been issued and the key pair is present.
static int PKI_CERTIFICATE_ON_HOLD
          Indicates that the certificate is on hold.
static int PKI_CHAIN_CERTIFICATE
          Use this flag when exorting or retrieving information on the certificate chain.
static int PKI_CLEAR
          Use to remove (or clear) all the entries.
static int PKI_CLEAR_CERTS
          Deprecated.
static int PKI_CSR_PENDING
          Indicates that the user certificate has not been issued by the CA.
static int PKI_CUSTOM_SUBJECT_NAME
          Use when the subject name is not the default.
static int PKI_DAYS
          Specifies a time unit of days.
static int PKI_DEFAULT_CONFIGURATION
          Specifies that this configuration is the default configuration.
static int PKI_DEL_CERT
          Deprecated.
static int PKI_DELETE
          Use to remove an entry.
static int PKI_E_ACCESS_DENIED
          The user does not have the appropriate eDirectory rights to perform the operation.
static int PKI_E_ADD_CERTIFICATE
          The User Certificate created was not stored in the User object.
static int PKI_E_ADD_KEYPAIR
          Not currently used.
static int PKI_E_ADD_TRUSTED_ROOT
          Not currently used.
static int PKI_E_ALGORITHM_NOT_SUPPORTED
          The requested key generation or signature algorithm is not allowed by NICI.
static int PKI_E_BAD_REQUEST_SYNTAX
          An invalid request was made to the client or server.
static int PKI_E_BAD_ROOT_INDEX
          The certificate chain stored in a Server Certificate object Server_Certificate_Object has been corrupted.
static int PKI_E_BROKEN_CHAIN
          The certificate chain being stored in a Server Certificate object is invalid or corrupted.
static int PKI_E_BUFFER_OVERFLOW
          An internal data buffer overflow occurred.
static int PKI_E_CA_ALREADY_INSTALLED
          Not currently used.
static int PKI_E_CA_NOT_OPERATIONAL
          The specified server is not a CA.
static int PKI_E_CERT_INVALID
          The certificate is invalid.
static int PKI_E_CERT_NOT_FOUND
          The specified certificate could not be found.
static int PKI_E_CREATE_CERTIFICATE_OR_CSR
          The certificate or certificate signing request could not be generated.
static int PKI_E_CRL_INVALID
          The CRL is invalid.
static int PKI_E_CRYPT_INIT
          Not currently used.
static int PKI_E_DATA_NOT_READY
          The requested data is not available.
static int PKI_E_DSIO
          Not currently used.
static int PKI_E_DUPLICATE
          Not currently used.
static int PKI_E_EXPECTING_CERTIFICATE
          An attempt to store a certificate or a certificate chain with an invalid encoding into a Server Certificate object was made.
static int PKI_E_EXPIRED_CERTIFICATE
          A certificate is no longer valid because it has expired.
static int PKI_E_FILE_CREATE
          A file could not be created.
static int PKI_E_FILE_OPEN
          A file could not be opened.
static int PKI_E_FILE_READ
          A file could not be read.
static int PKI_E_FILE_SEEK
          The size of a file could not be determined.
static int PKI_E_FILE_WRITE
          A file could not be written.
static int PKI_E_GENERATE_KEY
          Not currently used.
static int PKI_E_INIT_ERROR
          The client could not initialize the required eDirectory context.
static int PKI_E_INSUFFICIENT_MEMORY
          Memory could not be allocated on either the client workstation or the server.
static int PKI_E_INTERNAL_ERROR
          An unexpected internal error has occurred.
static int PKI_E_INVALID_ALGORITHM
          The cryptographic algorithm is not supported.
static int PKI_E_INVALID_CERTIFICATE_TIME
          The validity period requested for the certificate is not valid.
static int PKI_E_INVALID_CONTEXT
          The specified context is not currently valid.
static int PKI_E_INVALID_CREATE_CA_REQUEST
          Not currently used.
static int PKI_E_INVALID_DIGEST
          Not currently used.
static int PKI_E_INVALID_KDK_ID
          Not currently used.
static int PKI_E_INVALID_KEY_ID
          The specified certificate nickname could not be found.
static int PKI_E_INVALID_NAME
          A specified name is not valid for the requested operation.
static int PKI_E_INVALID_NICKNAME
          A User Certificate with the specified nickname does not exist.
static int PKI_E_INVALID_OBJECT
          The specified object is not the expected type or does not contain the expected information.
static int PKI_E_INVALID_OPERATION
          The requested operation cannot be performed by the Novell Certificate Server.
static int PKI_E_INVALID_SIGNATURE
          Not currently used.
static int PKI_E_KDK_TABLE_FULL
          Not currently used.
static int PKI_E_KEY_FAILURE
          An error occurred while transporting a private key to the client.
static int PKI_E_KEY_SIZE_NOT_SUPPORTED
          The requested key size is not supported by NICI.
static int PKI_E_KEYS_ALREADY_EXIST
          A key pair already exists for the organizational CA.
static int PKI_E_NICI_OUTOF_SYNC
          An NICI session error occurred while attempting to transfer a private key.
static int PKI_E_NICKNAME_IN_USE
          The nickname specified is already being used.
static int PKI_E_NO_IP_ADDRESSES
          No IP address cannot be found for the specified server.
static int PKI_E_NO_KEY_FILE
          Not currently used.
static int PKI_E_NO_RIGHTS
          The user does not have the appropriate eDirectory rights to perform the operation.
static int PKI_E_NO_SECURITY_CONTAINER
          The Security container cannot be found.
static int PKI_E_NO_TREE_CA
          An organizational CA does not exist for the eDirectory tree.
static int PKI_E_NOT_CONNECTED_TO_SERVICE
          You are not currently connected to a server that can perform the requested operation.
static int PKI_E_NOT_SUPPORTED
          Novell Certificate Server does not support the requested operation.
static int PKI_E_ONLY_ONE_TREE_CA
          An attempt was made to create an organizational CA when one already exists.
static int PKI_E_PARSE_CERTIFICATE
          Novell Certificate Server was unable to parse a certificate that has been stored or is being stored.
static int PKI_E_PUBLIC_KEY_COMPARISON_FAILURE
          The public key stored in the Server Certificate object is not the same as the public key within the certificate being stored.
static int PKI_E_SERVICE_NOT_AVAILABLE
          The service is not available.
static int PKI_E_SUBJECT_NAME_COMPARISON_FAILURE
          The subject name stored in the server certificate object is not the same as the subject name within the certificate that is being stored.
static int PKI_E_SYSTEM_RESOURCES
          The server could not allocate the required eDirectory context or the required NICI context.
static int PKI_E_UNKNOWN_ATTRIBUTE
          The requested subject name, issuer name, or alternative name contains a name type that is not understood by Novell Certificate Server.
static int PKI_E_UPDATE_KMO
          A certificate with the specified key pair name already exists for the specified server.
static int PKI_E_USER_ALREADY_IN_LIST
          Not currently used.
static int PKI_E_USER_CERT_NOT_FOUND
          Not currently used.
static int PKI_E_USER_NOT_FOUND_IN_LIST
          Not currently used.
static int PKI_E_WRONG_VERSION
          An unrecognized version of an NCP has been sent to the server.
static int PKI_EXTENSION_CRITICAL
          Use to set the extension as critical in the certificate.
static int PKI_EXTENSION_DONT_INCLUDE
          Use to exclude the extension from the certificate.
static int PKI_EXTENSION_INCLUDE
          Use to include the extension in the certificate.
static int PKI_EXTENSION_NON_CRITICAL
          Use to set the extension as non-critical in the certificate.
static int PKI_EXTERNAL_KEY_PAIR
          Indicates that the key pair was generated external to the Novell PKI service.
static int PKI_HOURS
          Specifies a time unit of hours.
static int PKI_INTERNAL_KEY_PAIR
          Indicates a key pair was generated by Novell PKI service and the private key is stored in eDirectory.
static int PKI_INVALID
          Specifies flags for invalidity reasons.
static int PKI_MINUTES
          Specifies a time unit of minutes.
static int PKI_MONTHS
          Specifies a time unit of months.
static int PKI_NO_CA
          Indicates a CA is either not installed and/or not operational on the specified server.
static int PKI_NOVELL_CERTIFICATE
          Other flags to use with the storeServerCertificates used to specify which cert in a chain should be treated as the root certificate.
static int PKI_NS_DOS
          Specifies the type of name space on the NetWare volume.
static int PKI_NS_FTAM
          Specifies the type of name space on the NetWare volume.
static int PKI_NS_MACINTOSH
          Specifies the type of name space on the NetWare volume.
static int PKI_NS_OS2
          Specifies the type of name space on the NetWare volume.
static int PKI_NS_UNIX
          Specifies the type of name space on the NetWare volume.
static int PKI_OBJECT_KEY_CERTIFICATE
          Flags to use with the getCACertificates, getServerCertificates, and storeServerCertificates to determine which certificates are returned.
static int PKI_ORG_CA_CERTIFICATE
          Use the self-signed organizational certificate as the trusted root.
static int PKI_ORGANIZATIONAL_CA
          Indicates an organizational CA is installed and operational on the specified server.
static int PKI_OVERWRITE_KEYPAIR
          Overwrites any information currently associated with this key pair.
static int PKI_PRIVATE_KEY_EXPORTABLE
          Enables the extraction of the private key into a PKCS#12 file.
static int PKI_PRIVATE_KEY_NOT_IN_NDS
          Indicates that the certificate that is present does not have the private key.
static int PKI_RETRY
          Indicates if the call is a retry.
static int PKI_RSA_ALGORITHM
          Indicates support of the RSA key generation algorithm.
static int PKI_SELF_SIGNED_CERTIFICATE
          Specifies a DER encoder X.509 self-signed certificate; not used with getServerCertificates.
static int PKI_SERVER_HEALTH_CHECK
          Use this flag to have the PKI Health Check run on the server.
static int PKI_SERVER_INFO
          Use this flag when querying for information about creating a server certificate.
static int PKI_SERVICE_INFO
          Not supported, will cause an error.
static int PKI_SIGN_WITH_RSA_AND_MD2
          Indicates support of the MD2 with RSA encryption signing algorithm.
static int PKI_SIGN_WITH_RSA_AND_MD5
          Indicates support of the MD5 with RSA encryption signing algorithm.
static int PKI_SIGN_WITH_RSA_AND_SHA_256
          Indicates support of the SHA 256 (SHA2) with RSA encryption signing algorithm.
static int PKI_SIGN_WITH_RSA_AND_SHA_384
          Indicates support of the SHA 384 (SHA2) with RSA encryption signing algorithm.
static int PKI_SIGN_WITH_RSA_AND_SHA_512
          Indicates support of the SHA 512 (SHA2) with RSA encryption signing algorithm.
static int PKI_SIGN_WITH_RSA_AND_SHA1
          Indicates support of the SHA1 with RSA encryption signing algorithm.
static int PKI_SORT
          Use to sort the entries.
static int PKI_SORT_LIST
          Deprecated.
static int PKI_STORE_PRIVKEY_IN_OBJECT
          Stores encrypted private key in CA object.
static int PKI_SUB_ORGANIZATIONAL_CA
          Indicates an subordinate CA is installed and operational on the specified server (currently not supported).
static int PKI_SUCCESS
          Indicates that the eDirectory object exists and that the requested operation completed successfully.
static int PKI_TERISA_ADD_CERTIFICATE_ERROR
          The server could not store the specified certificate or certificate chain in the Server Certificate object.
static int PKI_TERISA_ADD_KEYS_ERROR
          The server could not store the public and private keys in the Server Certificate object.
static int PKI_TERISA_ADD_ROOT_ERROR
          The server could not add the specified certificate as a trusted root to the Server Certificate object.
static int PKI_TERISA_ESTABLISH_CONTEXT_ERROR
          The server could not establish a Terisa context.
static int PKI_TRUSTED_ROOT_CERTIFICATE
          Use this flag when exporting or retrieving information on the trusted root certificate.
static int PKI_TYPE_CERTIFICATE_CONTAINER
          Specifies the PKI conatiner to be of type certificate.
static int PKI_TYPE_CRL_CONTAINER
          Specifies the PKI conatiner to be of type CRL.
static int PKI_UNKNOWN_ALGORITM
          Indicates that the specified algorithm is unknown and not supported.
static int PKI_USER_INFO
          Use this flag when querying for information about creating a user certificate.
static int PKI_VENDOR_ENTRUST
          Specifies an Entrust certificate.
static int PKI_VENDOR_EXTERNAL
          Specifies an external vendor.
static int PKI_VENDOR_NOVELL
          Specifies a Novell certificate.
static int PKI_VENDOR_UNKNOWN
          Indicates that an unregistered vendor has been selected.
static int PKI_VENDOR_VERISIGN
          Specfies a Verisign certificate.
static int PKI_WAIVE_SUBJECT_NAME_IN_CERTIFICATE
          Use when storing an external certificate whose subject name does not match original subject name.
static int PKI_WEEKS
          Specifies a time unit of weeks.
static int PKIS_VERSION_ONE
          Specifies PKI Services Version 1.
static int PKIS_VERSION_ONE_FIVE
          Specifies PKI Services Version 1.5.
static int PKIS_VERSION_ONE_ZERO_FIVE
          Specifies PKI Services Version 1.0.5.
static int PKIS_VERSION_ONE_ZERO_NINE
          Specifies PKI Services Version 1.0.9.
static int PKIS_VERSION_ONE_ZERO_ZERO
          Specifies PKI Services Version 1.0.0.
static int PKIS_VERSION_THREE_ONE_ONE
          Specifies PKI Services Version 3.1.1.
static int PKIS_VERSION_THREE_ONE_ZERO
          Specifies PKI Services Version 3.1.0.
static int PKIS_VERSION_THREE_ZERO_ZERO
          Specifies PKI Services Version 3.0.0.
static int PKIS_VERSION_TWO
          Specifies PKI Services Version 2.
static int PKIS_VERSION_TWO_FIVE_FOUR
          Specifies PKI Services Version 2.5.4.
static int PKIS_VERSION_TWO_FIVE_TWO
          Specifies PKI Services Version 2.5.2.
static int PKIS_VERSION_TWO_FIVE_ZERO
          Specifies PKI Services Version 2.5.0.
static int PKIS_VERSION_TWO_FOUR_ZERO
          Specifies PKI Services Version 2.4.0.
static int PKIS_VERSION_TWO_ONE_ONE
          Specifies PKI Services Version 2.1.1.
static int PKIS_VERSION_TWO_SEVEN_EIGHT
          Specifies PKI Services Version 2.7.8.
static int PKIS_VERSION_TWO_SEVEN_FIVE
          Specifies PKI Services Version 2.7.5.
static int PKIS_VERSION_TWO_SEVEN_FOUR
          Specifies PKI Services Version 2.7.4.
static int PKIS_VERSION_TWO_SEVEN_NINE
          Specifies PKI Services Version 2.7.9.
static int PKIS_VERSION_TWO_SEVEN_SEVEN
          Specifies PKI Services Version 2.7.7.
static int PKIS_VERSION_TWO_SEVEN_SIX
          Specifies PKI Services Version 2.7.6.
static int PKIS_VERSION_TWO_SEVEN_THREE
          Specifies PKI Services Version 2.7.3.
static int PKIS_VERSION_TWO_SEVEN_TWO
          Specifies PKI Services Version 2.7.2.
static int PKIS_VERSION_TWO_SEVEN_ZERO
          Specifies PKI Services Version 2.7.0.
static int PKIS_VERSION_TWO_SIX_ZERO
          Specifies PKI Services Version 2.6.0.
static int PKIS_VERSION_TWO_TWO_ONE
          Specifies PKI Services Version 2.2.1.
static int PKIS_VERSION_TWO_TWO_ZERO
          Specifies PKI Services Version 2.2.0.
static int PKIS_VERSION_TWO_ZERO_THREE
          Specifies PKI Services Version 2.0.3.
static int PKIS_VERSION_TWO_ZERO_TWO
          Specifies PKI Services Version 2.0.2.
static int PKIS_VERSION_TWO_ZERO_ZERO
          Specifies PKI Services Version 2.0.0.
static int PRIVATE_KEY
          Use for all certificates.
static int PRIVATE_KEY_EXTRACTABLE
          Use to allow a key to be extracted out of NICI.
static int PUBLIC_KEY_EXTERNAL_CA
          Use when the CA is external to Novell.
static int PUBLIC_KEY_ORGANIZATIONAL_CA
          Public Key Flags to use when creating an Organizational CA.
static int PUBLIC_KEY_SINGLE_SERVER
          Use when the key generation server is the same as the CA server.
static int PUBLIC_KEY_TWO_SERVER
          Use when the key generation server is not the same as the CA server.
static int SELF_SIGNED_CERT
          Use this flag when exporting or retrieving information on the self-signed certificate.
static int SUB_CA_OPERATIONAL
          Indicates an organizational CA is installed and operational on the specified server (currently not supported).
static int TREE_CA_CERT
          Deprecated.
static int TREE_CA_OPERATIONAL
          The server hosts the organizational CA.
static int TRUSTED_ROOT_CERT
          Use this flag when exporting or retrieving information on the trusted root certificate.
static int TWO_DIGIT_YEAR
          Identifies dates that have either a two-digit year.
static int UNKNOWN_VERSION
          Indicates that the specified version of the certificate is unknown and not supported.
static int USER_CERT_RETRY_COUNT
          Specifies the number of tries the system attempt when storeing a user certificate.
static int VERSION_ONE
          The decoded certificate is a version one certificate.
static int VERSION_THREE
          The decoded certificate is a version three certificate.
static int VERSION_TWO
          The decoded certificate is a version two certificate.
static int WAIVE_SUBJECT_NAME_COMPARISON
          Normally storeServerCertificates and storeServerCertificatesFromCertificateList check that the requested name and and the subject name in the certifcate match.
static int X509_BASIC_CONSTRAINTS_CA
          The X.509 basic constraints extension is used to specify that a certificate belongs to a CA (CA).
static int X509_GENERAL_NAME_DIRECTORY_NAME
          The alternative name must be encoded as a Name choice as specified in X.501.
static int X509_GENERAL_NAME_DNS_NAME
          The alternative name must be a unicode representation of an IA5String.
static int X509_GENERAL_NAME_EDI_PARTY_NAME
          The alternative name must be encoded as an EDIPartyName sequence as specified RFC 3280 section 4.2.1.7.
static int X509_GENERAL_NAME_IP_ADDRESS
          The alternative name must be an OCTET STRING in "network byte order" as specified in ASN.1.
static int X509_GENERAL_NAME_OTHER_NAME
          The alternative name must be ASN.1 encoded as an OtherName sequence as specified in RFC 3280 section 4.2.1.7.
static int X509_GENERAL_NAME_REGISTERED_ID
          The alternative name must be encoded as an OBJECT IDENTIFIER as specified in ASN.1.
static int X509_GENERAL_NAME_RFC822_NAME
          The alternative name must be a unicode representation of an IA5String.
static int X509_GENERAL_NAME_UNIFORM_RESOURCE_IDENTIFIER
          The alternative name must be a unicode representation of an IA5String.
static int X509_GENERAL_NAME_X400_ADDRESS
          The alternative name must be encoded as an ORAddress sequence as specified in RFC 3280 section 4.2.1.7.
static int X509_KEY_USAGE_CRL_SIGN
          Designates that the key is used to sign CRL's (Certificate Revocation Lists).
static int X509_KEY_USAGE_DATA_ENCIPHERMENT
          Designates that the key is used to directly encrypt data.
static int X509_KEY_USAGE_DECIPHER_ONLY
          Not valid for RSA keys.
static int X509_KEY_USAGE_DIGITAL_SIGNATURE
          Designates that the key is used to create digital signatures.
static int X509_KEY_USAGE_ENCIPHER_ONLY
          Not valid for RSA keys.
static int X509_KEY_USAGE_KEY_AGREEMENT
          Not valid for RSA keys.
static int X509_KEY_USAGE_KEY_CERT_SIGN
          Designates that the key is used to sign certificates.
static int X509_KEY_USAGE_KEY_ENCIPHERMENT
          Designates that the key is used to encrypt other keys.
static int X509_KEY_USAGE_NON_REPUDIATION
          Designates that the key is used for non-repudiation.
static int X509_SUBJECT_ALT_NAME_DIRECTORY_NAME
          Depricated -- Use X509_GENERAL_NAME_DIRECTORY_NAME
static int X509_SUBJECT_ALT_NAME_DNS_NAME
          Depricated -- Use X509_GENERAL_NAME_DNS_NAME
static int X509_SUBJECT_ALT_NAME_EDI_PARTY_NAME
          Depricated -- Use X509_GENERAL_NAME_EDI_PARTY_NAME
static int X509_SUBJECT_ALT_NAME_IP_ADDRESS
          Depricated -- Use X509_GENERAL_NAME_IP_ADDRESS
static int X509_SUBJECT_ALT_NAME_OTHER_NAME
          Depricated -- Use X509_GENERAL_NAME_OTHER_NAME
static int X509_SUBJECT_ALT_NAME_REGISTERED_ID
          Depricated -- Use X509_GENERAL_NAME_REGISTERED_ID
static int X509_SUBJECT_ALT_NAME_RFC822_NAME
          Depricated -- Use X509_GENERAL_NAME_RFC822_NAME
static int X509_SUBJECT_ALT_NAME_UNIFORM_RESOURCE_IDENTIFIER
          Depricated -- Use X509_GENERAL_NAME_UNIFORM_RESOURCE_IDENTIFIER
static int X509_SUBJECT_ALT_NAME_X400_ADDRESS
          Depricated -- Use X509_GENERAL_NAME_X400_ADDRESS
 
Constructor Summary
NPKIAPI()
          Establishes methods and protocols to implement a CA (CA) that issues, stores, and manages digital certificates.
 
Method Summary
 NPKI_CertificateName additionalCertificate(int index)
          Retrieves the name of the specified certificate.
 byte[] additionalRootsInfo(int index)
          Returns a pointer to the specified X.509 additional root certificate, and the size of the certificate.
 int certificateList(byte[] certificate, int flags)
          Stores a certificate (such as, X.509) or set of certificates (such as, PKCS #7) to an internal structure.
 byte[] certInfo()
          Use to retrieve a newly created X.509 certificate.
 byte[] chainCertInfo(int index)
          Returns a byte array containing the specified X.509 certificate from the certificate chain.
 void connectToAddress(int flags, int type, short size, byte[] data)
          Connects to server address.
 void connectToIPAddress(int flags, short port, byte[] ipAddress)
          Establishes a connection to the server at the specified IP address.
 void connectToIPAddress(int flags, short port, byte[] ipAddress, java.lang.String[] treeName, java.lang.String[] serverDN)
          Establishes a connection to the server at the specified IP address.
 void createContext()
          Creates a new PKI context structure and initializes it with default values.
 void createCRLConfiguration(int flags, java.lang.String objectName, java.lang.String contextDN, java.lang.String hostServerDN)
          Creates an ndspkiCRLConfiguration object.
 void createCRLDistributionPoint(int flags, java.lang.String objectName, java.lang.String contextDN, java.lang.String linkObjectDN)
          Creates a cRLDistributionPoint object and optionally links it to linkObjectDN.
 int createDefaultCertificates(java.lang.String serverDN, NPKI_CertificateNamesList certificateNames, java.lang.Integer flags)
          This method can be used to accomplish any or all of the three tasks listed below: Create the default server certificates.
 java.lang.String createOrganizationalCA(java.lang.String serverDN, java.lang.String organizationalCAName, int keyType, int keySize, java.lang.String subjectDN, int signatureAlgorithm, int dateFlags, int validFrom, int validTo, int publicKeyFlags, int privateKeyFlags, NPKI_Extension keyUsage, NPKI_Extension basicConstraints, NPKI_ExtAltNames altNames, NPKI_Extension NovellAttr, NPKI_ASN1_Extensions extensions, int retryFlag)
          Creates an orgainizational (that is, Tree) certificate authority (CA) object in the Security container if one does not already exist.
 void createPKIContainer(int flags, java.lang.String objectName, java.lang.String contextDN, int type, java.lang.String linkObjectDN)
          Creates an ndspkiContainer object and optionally links it to linkObjectDN.
 void createSASServiceObject(java.lang.String serverName, java.lang.String contextDN)
          Creates a Secure Authentication Services (SAS) object to maintain a list of server certificates for the specified server.
 void createServerCertificate(java.lang.String keyGenServerDN, java.lang.String signServerDN, java.lang.String certificateName, int keyType, int keySize, java.lang.String subjectDN, int signatureAlgorithm, int dateFlags, int validFrom, int validTo, int publicKeyFlags, int privateKeyFlags, NPKI_Extension keyUsage, NPKI_Extension basicConstraints, NPKI_ExtAltNames altNames, NPKI_Extension NovellAttr, NPKI_ASN1_Extensions extensions)
          Creates a server key pair as well as the corresponding X.509 certificate.
 void createTrustedRoot(java.lang.String objectDN, byte[] certificate)
          Creates a Trusted Root object and stores the specified X.509 root (or CA) certificate in the eDirectory object.
 void createTrustedRootContainer(java.lang.String objectDN)
          Creates a container where Trusted Root objects can be created.
 void createUserCertificate(java.lang.String keyGenServerDN, java.lang.String signServerDN, java.lang.String userDN, java.lang.String nickName, int keyType, int keySize, java.lang.String subjectDN, int signatureAlgorithm, int dateFlags, int validFrom, int validTo, int publicKeyFlags, int privateKeyFlags, NPKI_Extension keyUsage, NPKI_Extension basicConstraints, NPKI_ExtAltNames altNames, NPKI_Extension NovellAttr, NPKI_ASN1_Extensions extensions)
          Generates a key pair as well as the corresponding X.509 certificate.
 void cRLConfigurationDN(int index, java.lang.Integer objectFlags, java.lang.String[] objectDN, java.lang.String[] data)
          Returns infomation about the specified Certificate Authority (CA), specifically how many CRL configurations are assocated with the CA.
 byte[] csrInfo()
          Returns a byte array containing the PKCS #10 Certificate Signing Request (CSR).
 void deleteDSObject(java.lang.String odn)
          Can be used to delete any eDirectory object.
 void deleteUserCertificate(java.lang.String userDN, java.lang.String nickName, int flags, byte[] certificate)
          Deletes a user's certificate.
 void destroy()
           
 void dsConnectToReferral(byte[] referral)
           
 void dsLogin(java.lang.String objectDN, java.lang.String password)
          Performs all authentication operations needed to establish a client's connection to a network.
 void DSLoginAsServer()
           
 void dsLogout()
          Terminates an object's connection to the network.
 boolean dsObjectExists(java.lang.String objectDN)
          Determines whether or not the eDirectory object exists.
 byte[] exportCAKey(java.lang.String organizationalCAName, java.lang.String password, int flags)
          Exports the CA's private key and corresonding certificates in " Personal Information Exchange Syntax" (PFX) format.
 byte[] exportServerKey(java.lang.String serverDN, java.lang.String certificateName, java.lang.String password, int flags)
          Exports a server's private key and corresonding certificates in "Personal Information Exchange Syntax" (PFX) format.
 byte[] exportUserKey(java.lang.String nickname, java.lang.String password, int flags)
          Exports a private key and the corresponding certificates for the currently logged-in user in "Personal Information Exchange Syntax" (PFX) format.
 void finalize()
           
 int findKeyGenServersForUser(java.lang.String nameContextDN)
          Finds all servers that can be used to generate a public/private key pair for users which reside in the specified name context.
 java.lang.String findOrganizationalCA()
          Finds the name of the Certificate Authority (CA) for the current tree.
 int findServerCertificateNames(java.lang.String serverDN)
          Finds all of the server certificate names for the specified server.
 int findServersInContext(java.lang.String nameContextDN)
          Finds all of the NCP servers in the name context supplied.
 int findTrustedRootsInContext(java.lang.String nameContextDN)
          Finds all of the Trusted Root objects within the specified (Trusted Root) container and returns the number found.
 int findUserCertificates(java.lang.String userDN, java.lang.String nickName, byte[] serialNumber, int keyType, int minKeySize, int maxKeySize, int searchOnKeyUsage, short keyUsageValue, java.lang.String issuerDN, java.lang.String subjectDN, int certificateValid, int vendorID, int certificateStatus)
          Finds all of the certificates for the userDN that meets the search criteria, stores the certificates in context specific values, and returns the number of certificates that meet the search criteria.
 void freeContext()
          Frees a previously allocated NPKIAPI context and all associated memory.
 void generateCertificateFromCSR(java.lang.String caServerDN, byte[] extCSR, java.lang.String subjectDN, int signatureAlgorithm, int dateFlags, int validFrom, int validTo, NPKI_Extension keyUsage, NPKI_Extension basicConstraints, NPKI_ExtAltNames altNames, NPKI_Extension NovellAttr, NPKI_ASN1_Extensions extensions)
          Accepts a PKCS #10 Certificate Signing Request (CSR) from an external source and sends the request to caServerDN, which then creates and returns an X.509 certificate.
 void getAlgorithmInfo(int algorithm, java.lang.Integer maxKeyEncryptKeySize, java.lang.Integer maxSigningKeySize, java.lang.Integer maxDataEncryptKeySize)
          Returns the supported key sizes for the specified algorithm.
 byte[] getCACertificates(java.lang.String objectDN, int flags, java.lang.Integer numberOfChainCerts, java.lang.Integer rootCertIndex)
          Reads the CA (CA) certificates for objectDN and stores them in context specific values.
 void getCAInfo(java.lang.String objectDN, java.lang.Integer numberOfCRLConfigurations)
          Returns infomation about the specified CA (Certificate Authority) specifically how many CRL configuration are assocated with the CA.
 void getCRLConfigurationInfo(java.lang.String objectDN, java.lang.Integer status, java.lang.Integer cRLNumber, java.lang.Integer issueTime, java.lang.Integer attemptTime, java.lang.Integer nextIssueTime, java.lang.Integer intervalUnitType, java.lang.Integer intervalNumberOfUnits, java.lang.Integer fileNameSpaceType, java.lang.String[] fileVolumeDN, java.lang.String[] fileVolumePath, java.lang.Integer numberOfCRLDistributionPoints, java.lang.String[] cLRdistributionPointDN, java.lang.String[] certificateAuthorityDN)
          Reads all CRL Configuration information for the object specified
 void getCRLDistributionPoint(int index, java.lang.String[] cRLDistributionPoint)
          Retrieves the CRL Distribution Point specified
 java.lang.String getDefaultDSContactServerDN()
          Retrieves the fully distinguished name of the default eDirectory contact server; the server that the API uses when making modifications to eDirectory.
 java.lang.String getHostServerDN(java.lang.String objectDN)
          Reads the eDirectory attribute A_HOST_SERVER of objectDN and returns the value in serverDN.
 void getLocalServerInfo(java.lang.String[] treeName, java.lang.String[] serverDN)
          Retrieves data about the local server.
 java.lang.String getSAServiceName(java.lang.String serverDN)
          Reads the SAS:Service attribute of serverDN to get the Secure Authentication Service (SAS) service name of the specified server object.
 byte[] getServerCertificates(java.lang.String serverDN, java.lang.String certificateName, int flags, java.lang.Integer numberOfChainCerts, java.lang.Integer rootCertIndex)
          Reads the certificates specified by certificateName for serverDN and stores them in context-specific values.
 int getServerCertificateStatus(java.lang.String serverDN, java.lang.String certificateName)
          Determines the status of the server certificate.
 java.lang.String getServerDNSName(int index)
          Retrieves the specified DNS Name.
 void getServerInfo(java.lang.String serverDN, int flags, java.lang.Integer keyGenerationAlgorithms, java.lang.Integer signingAlgorithms, java.lang.Integer maxValidFromTime, java.lang.Integer maxValidToTime, java.lang.Integer caOperational, java.lang.Integer pathLength, java.lang.Integer healthCheckCcode, java.lang.Integer serverVersion)
          Opens a connection to the specified server and sends a PKI ping NCP to determine supported values for the server.
 byte[] getServerIPAddress(int index, java.lang.Short ipLength, java.lang.String[] ipNumber, java.lang.Short numberOfDNSNames)
          Retrieves information about the specified IP address.
 int getServerIPAndDNSInfo(java.lang.String serverDN)
          Discovers IP and DNS information about the specified server by querying DNS.
 void getServerKMOInfo(int cacheContext, java.lang.String serverDN, java.lang.String certificateName, int flags, byte[][] objectCert, java.lang.Integer numberOfChainCerts, java.lang.Integer rootCertIndex, byte[][] wrappedKey, java.lang.Integer numberOfAdditionalRoots, byte[][] terisaKeyFile)
          Reads all KMO information for the KMO specified by certificateName for serverDN and stores the information in context-specific values.
 int getServerUTCTime(java.lang.String serverDN)
          Returns the time according to UTC (Universal Time Coordinated) on the server whose eDirectory fully distinguished name is specified.
 byte[] getTrustedRootInfo(int index, java.lang.String[] name, java.lang.String[] validFrom, java.lang.String[] validTo, java.lang.String[] subjectName)
          Retrieves information about the specified Trusted Root.
 byte[] getWrappedServerKey(java.lang.String serverDN, java.lang.String serverCertificateName)
          Returns a server private key cryptographically wrapped in the server's key storage key.
 void importCAKey(java.lang.String hostServerDN, java.lang.String organizationalCAName, java.lang.String password, int flags, byte[] pfx)
          Imports an organization's certificate authority (CA) private key and corresponding certificate(s) from a "Personal Information Exchange Syntax" (PFX) format (also known as Public Key Cryptography Standards [PKCS] #12) to a CA object.
 void importServerKey(java.lang.String serverDN, java.lang.String certificateName, java.lang.String password, int flags, byte[] pfx)
          Imports a server's private key and corresonding certificates from a "Personal Information Exchange Syntax" (PFX) format to a Key Material object.
 void importUserKey(java.lang.String userDN, java.lang.String nickName, java.lang.String password, int flags, byte[] pfx)
          Imports a user's private key from a "Personal Information Exchange Syntax" (PFX) format to the specified user.
 void initialize()
          Initializes the NPKIAPI context.
 void issueCRL(java.lang.String cRLConfiguationDN, int flags)
          Issues an emergency CRL.
 void KMOExportAddValue(java.lang.String certificateName, java.lang.String certificatePath, java.lang.String keyPath, int keyType)
          Used to add a value to the list of KMOExport values.
 void KMOExportClearAllValues()
          Used to clear all values from the list of KMOExport values.
 void KMOExportClearValue(int index)
          Used to clear a value from the list of KMOExport values.
 void KMOExportRead(java.lang.String objectDN, java.lang.Integer numberOfValues)
          Reads the ndspkiKMOExport attribute on the specified SAS:Service object.
 void KMOExportValue(int index, java.lang.String[] certificateName, java.lang.String[] certificatePath, java.lang.String[] keyPath, java.lang.Integer keyType)
          Used to get the KMOExport values.
 void KMOExportWrite(java.lang.String objectDN)
          Writes the KMOExportValues into the ndspkiKMOExport attribute on the specified SAS:Service object.
 java.lang.String nickName(int index)
          Returns the specified certificate nickname.
 int readAllNickNames(java.lang.String userDN)
          Reads all of the certificate nicknames for userDN and stores them in context-specific data values.
 void readSecurityRightsLevel(java.lang.String objectDN, java.lang.Integer securityRightsLevel)
          Returns the value of the Security Rights Level attribute for the specified CA (Certificate Authority).
 void revokeCertificate(java.lang.String cRLConfiguationDN, java.lang.String ndsObject, byte[] certificate, int flags, int reasonCode, int invalidityDate, java.lang.String comment, java.lang.Integer nextIssuanceDate)
          Revokes the specified certificate.
 java.lang.String serverCertificateName(int index)
          Returns a server certificate name.
 void serverNames(int index, java.lang.String[] serverDN, java.lang.String[] serverName)
          Obtains the specified eDirectory server's leaf name and fully distinguished name.
 void setCertificateAuthorityDN(java.lang.String objectDN, java.lang.String certificateAuthorityDN)
          Sets the Certificate Authority DN (ndspkiCADN) attribute on the specified CRLConfiguration object.
 void setCRLFileName(java.lang.String objectDN, int nameSpaceType, java.lang.String volumeDN, java.lang.String volumePath)
          Sets the CRL filename (ndspkiCRLFilename) attribute on the specified CRLConfiguration object.
 void setDefaultDSContactServerDN(java.lang.String serverDN)
          Sets the fully distinguished name of the Default eDir Contact Server.
 void setDistributionPointDNList(java.lang.String objectDN, int flags, int objectFlags, java.lang.String linkObjectDN, java.lang.String data)
          Adds or deletes a link from the CA object to a CRL Configuration object.
 void setDistributionPoints(java.lang.String objectDN, int flags, java.lang.String distributionPoint)
          Sets the CRL Distribution Points (ndspkiDistributionPoints) attribute on the specified CRLConfiguration object.
 void setIdentity(int idContext)
           
 void setNextIssueTime(java.lang.String objectDN, int nextIssueTime)
          Sets the CRL next issue time (ndspkiNextIssueTime) attribute on the specified CRLConfiguration object.
 void setSecurityRightsLevel(java.lang.String objectDN, int securityRightsLevel)
          Set the value of the Security Rights Level attribute for the specified CA (Certificate Authority).
 void setTimeInterval(java.lang.String objectDN, int unitType, int numberOfUnits)
          Sets the CRL issueance time interval (ndspkiTimeInterval) attribute on the specified CRLConfiguration object.
 void setTreeName(java.lang.String treeName)
          Sets the specified tree name into the context.
 void storeServerCertificates(java.lang.String serverDN, java.lang.String certificateName, int flags, int trustedRoot, byte[] certificate)
          Used to store server certificates after a successful call to createServerCertificate.
 void storeServerCertificatesFromCertificateList(java.lang.String serverDN, java.lang.String certificateName, int flags, int trustedRootIndex)
          Used to store server certificates after a successful call to createServerCertificate.
 void storeUserCertificate(java.lang.String userDN, java.lang.String nickName, java.lang.String signerDN, int flags, byte[] cert, int vendorID)
          Stores a certificate on a user object.
 byte[] userCertInfo(int index, java.lang.String[] nickName, java.lang.Integer certStatus, java.lang.Integer vendorID)
          Returns information about a user certificate.
 void verifyCertificateWithTrustedRoots(byte[] certificate, java.lang.String TRContextDN, int flags, java.lang.Integer cRLReason, java.lang.Integer cRLHoldInstruction, java.lang.Integer cRLRevocationTime, java.lang.Integer cRLInvalidityDateTime, java.lang.Integer certInvalidityReason)
          Construct a certificate chain starting with the specified certificate and using all of the Trusted Root objects within the specified Trusted Root container.
 int versionInfo()
          Returns the version info of the client module, NPKIAPI.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PKI_SUCCESS

public static final int PKI_SUCCESS
Indicates that the eDirectory object exists and that the requested operation completed successfully.

(PKI_SUCCESS = 0)

See Also:
Constant Field Values

PKI_E_FILE_CREATE

public static final int PKI_E_FILE_CREATE
A file could not be created.

(PKI_E_FILE_CREATE = -1201)

See Also:
Constant Field Values

PKI_E_FILE_OPEN

public static final int PKI_E_FILE_OPEN
A file could not be opened.

(PKI_E_FILE_OPEN = -1202)

See Also:
Constant Field Values

PKI_E_FILE_READ

public static final int PKI_E_FILE_READ
A file could not be read.

(PKI_E_FILE_READ = -1203)

See Also:
Constant Field Values

PKI_E_FILE_WRITE

public static final int PKI_E_FILE_WRITE
A file could not be written.

(PKI_E_FILE_WRITE = -1204)

See Also:
Constant Field Values

PKI_E_FILE_SEEK

public static final int PKI_E_FILE_SEEK
The size of a file could not be determined.

(PKI_E_FILE_SEEK = -1205)

See Also:
Constant Field Values

PKI_E_CRYPT_INIT

public static final int PKI_E_CRYPT_INIT
Not currently used.

(PKI_E_CRYPT_INIT = -1206)

See Also:
Constant Field Values

PKI_E_NO_KEY_FILE

public static final int PKI_E_NO_KEY_FILE
Not currently used.

(PKI_E_NO_KEY_FILE = -1207)

See Also:
Constant Field Values

PKI_E_GENERATE_KEY

public static final int PKI_E_GENERATE_KEY
Not currently used.

(PKI_E_GENERATE_KEY = -1208)

See Also:
Constant Field Values

PKI_E_KEY_SIZE_NOT_SUPPORTED

public static final int PKI_E_KEY_SIZE_NOT_SUPPORTED
The requested key size is not supported by NICI.

(PKI_E_KEY_SIZE_NOT_SUPPORTED = -1209)

See Also:
Constant Field Values

PKI_E_KEYS_ALREADY_EXIST

public static final int PKI_E_KEYS_ALREADY_EXIST
A key pair already exists for the organizational CA.

(PKI_E_KEYS_ALREADY_EXIST = -1210)

See Also:
Constant Field Values

PKI_E_UPDATE_KMO

public static final int PKI_E_UPDATE_KMO
A certificate with the specified key pair name already exists for the specified server.

(PKI_E_UPDATE_KMO = -1211)

See Also:
Constant Field Values

PKI_E_INSUFFICIENT_MEMORY

public static final int PKI_E_INSUFFICIENT_MEMORY
Memory could not be allocated on either the client workstation or the server.

(PKI_E_INSUFFICIENT_MEMORY = -1212)

See Also:
Constant Field Values

PKI_E_BUFFER_OVERFLOW

public static final int PKI_E_BUFFER_OVERFLOW
An internal data buffer overflow occurred.

(PKI_E_BUFFER_OVERFLOW = -1213)

See Also:
Constant Field Values

PKI_E_BAD_REQUEST_SYNTAX

public static final int PKI_E_BAD_REQUEST_SYNTAX
An invalid request was made to the client or server.

(PKI_E_BAD_REQUEST_SYNTAX = -1214)

See Also:
Constant Field Values

PKI_E_DSIO

public static final int PKI_E_DSIO
Not currently used.

(PKI_E_DSIO = -1215)

See Also:
Constant Field Values

PKI_E_CREATE_CERTIFICATE_OR_CSR

public static final int PKI_E_CREATE_CERTIFICATE_OR_CSR
The certificate or certificate signing request could not be generated.

(PKI_E_CREATE_CERTIFICATE_OR_CSR = -1216)

See Also:
Constant Field Values

PKI_E_ALGORITHM_NOT_SUPPORTED

public static final int PKI_E_ALGORITHM_NOT_SUPPORTED
The requested key generation or signature algorithm is not allowed by NICI.

(PKI_E_ALGORITHM_NOT_SUPPORTED = -1217)

See Also:
Constant Field Values

PKI_E_UNKNOWN_ATTRIBUTE

public static final int PKI_E_UNKNOWN_ATTRIBUTE
The requested subject name, issuer name, or alternative name contains a name type that is not understood by Novell Certificate Server.

(PKI_E_UNKNOWN_ATTRIBUTE = -1218)

See Also:
Constant Field Values

PKI_E_INVALID_NAME

public static final int PKI_E_INVALID_NAME
A specified name is not valid for the requested operation.

(PKI_E_INVALID_NAME = -1219)

See Also:
Constant Field Values

PKI_E_INVALID_CREATE_CA_REQUEST

public static final int PKI_E_INVALID_CREATE_CA_REQUEST
Not currently used.

(PKI_E_INVALID_CREATE_CA_REQUEST = -1220)

See Also:
Constant Field Values

PKI_E_INVALID_OBJECT

public static final int PKI_E_INVALID_OBJECT
The specified object is not the expected type or does not contain the expected information.

(PKI_E_INVALID_OBJECT = -1221)

See Also:
Constant Field Values

PKI_E_NOT_SUPPORTED

public static final int PKI_E_NOT_SUPPORTED
Novell Certificate Server does not support the requested operation.

(PKI_E_NOT_SUPPORTED = -1222)

See Also:
Constant Field Values

PKI_E_ADD_TRUSTED_ROOT

public static final int PKI_E_ADD_TRUSTED_ROOT
Not currently used.

(PKI_E_ADD_TRUSTED_ROOT = -1223)

See Also:
Constant Field Values

PKI_E_ADD_KEYPAIR

public static final int PKI_E_ADD_KEYPAIR
Not currently used.

(PKI_E_ADD_KEYPAIR = -1224)

See Also:
Constant Field Values

PKI_E_ADD_CERTIFICATE

public static final int PKI_E_ADD_CERTIFICATE
The User Certificate created was not stored in the User object.

(PKI_E_ADD_CERTIFICATE = -1225)

See Also:
Constant Field Values

PKI_E_EXPECTING_CERTIFICATE

public static final int PKI_E_EXPECTING_CERTIFICATE
An attempt to store a certificate or a certificate chain with an invalid encoding into a Server Certificate object was made.

(PKI_E_EXPECTING_CERTIFICATE = -1226)

See Also:
Constant Field Values

PKI_E_BROKEN_CHAIN

public static final int PKI_E_BROKEN_CHAIN
The certificate chain being stored in a Server Certificate object is invalid or corrupted.

(PKI_E_BROKEN_CHAIN = -1227)

See Also:
Constant Field Values

PKI_E_INIT_ERROR

public static final int PKI_E_INIT_ERROR
The client could not initialize the required eDirectory context.

(PKI_E_INIT_ERROR = -1228)

See Also:
Constant Field Values

PKI_E_WRONG_VERSION

public static final int PKI_E_WRONG_VERSION
An unrecognized version of an NCP has been sent to the server. Data stored in the User object is not in a recognized format.

(PKI_E_WRONG_VERSION = -1229)

See Also:
Constant Field Values

PKI_E_ONLY_ONE_TREE_CA

public static final int PKI_E_ONLY_ONE_TREE_CA
An attempt was made to create an organizational CA when one already exists. Only one organizational CA is permitted in an eDirectory tree.

(PKI_E_ONLY_ONE_TREE_CA = -1230)

See Also:
Constant Field Values

PKI_E_BAD_ROOT_INDEX

public static final int PKI_E_BAD_ROOT_INDEX
The certificate chain stored in a Server Certificate object Server_Certificate_Object has been corrupted. The certificate chain stored in the organizational CA object has been corrupted.

(PKI_E_BAD_ROOT_INDEX = -1231)

See Also:
Constant Field Values

PKI_E_SUBJECT_NAME_COMPARISON_FAILURE

public static final int PKI_E_SUBJECT_NAME_COMPARISON_FAILURE
The subject name stored in the server certificate object is not the same as the subject name within the certificate that is being stored. The subject name of a certificate in the organizational CA's certificate chain does not match the expected value. The subject name of a certificate in the NICI Machine Unique Certificate Authority's certificate chain does not match the expected value.

(PKI_E_SUBJECT_NAME_COMPARISON_FAILURE = -1232)

See Also:
Constant Field Values

PKI_E_PUBLIC_KEY_COMPARISON_FAILURE

public static final int PKI_E_PUBLIC_KEY_COMPARISON_FAILURE
The public key stored in the Server Certificate object is not the same as the public key within the certificate being stored.

(PKI_E_PUBLIC_KEY_COMPARISON_FAILURE = -1233)

See Also:
Constant Field Values

PKI_E_NO_RIGHTS

public static final int PKI_E_NO_RIGHTS
The user does not have the appropriate eDirectory rights to perform the operation.

(PKI_E_NO_RIGHTS = -1234)

See Also:
Constant Field Values

PKI_TERISA_ESTABLISH_CONTEXT_ERROR

public static final int PKI_TERISA_ESTABLISH_CONTEXT_ERROR
The server could not establish a Terisa context.

(PKI_TERISA_ESTABLISH_CONTEXT_ERROR = -1235)

See Also:
Constant Field Values

PKI_TERISA_ADD_ROOT_ERROR

public static final int PKI_TERISA_ADD_ROOT_ERROR
The server could not add the specified certificate as a trusted root to the Server Certificate object.

(PKI_TERISA_ADD_ROOT_ERROR = -1236)

See Also:
Constant Field Values

PKI_TERISA_ADD_KEYS_ERROR

public static final int PKI_TERISA_ADD_KEYS_ERROR
The server could not store the public and private keys in the Server Certificate object.

(PKI_TERISA_ADD_KEYS_ERROR = -1237)

See Also:
Constant Field Values

PKI_TERISA_ADD_CERTIFICATE_ERROR

public static final int PKI_TERISA_ADD_CERTIFICATE_ERROR
The server could not store the specified certificate or certificate chain in the Server Certificate object.

(PKI_TERISA_ADD_CERTIFICATE_ERROR = -1238)

See Also:
Constant Field Values

PKI_E_SYSTEM_RESOURCES

public static final int PKI_E_SYSTEM_RESOURCES
The server could not allocate the required eDirectory context or the required NICI context.

(PKI_E_SYSTEM_RESOURCES = -1239)

See Also:
Constant Field Values

PKI_E_PARSE_CERTIFICATE

public static final int PKI_E_PARSE_CERTIFICATE
Novell Certificate Server was unable to parse a certificate that has been stored or is being stored.

(PKI_E_PARSE_CERTIFICATE = -1240)

See Also:
Constant Field Values

PKI_E_NO_TREE_CA

public static final int PKI_E_NO_TREE_CA
An organizational CA does not exist for the eDirectory tree.

(PKI_E_NO_TREE_CA = -1241)

See Also:
Constant Field Values

PKI_E_INVALID_NICKNAME

public static final int PKI_E_INVALID_NICKNAME
A User Certificate with the specified nickname does not exist.

(PKI_E_INVALID_NICKNAME = -1242)

See Also:
Constant Field Values

PKI_E_USER_ALREADY_IN_LIST

public static final int PKI_E_USER_ALREADY_IN_LIST
Not currently used.

(PKI_E_USER_ALREADY_IN_LIST = -1243)

See Also:
Constant Field Values

PKI_E_USER_NOT_FOUND_IN_LIST

public static final int PKI_E_USER_NOT_FOUND_IN_LIST
Not currently used.

(PKI_E_USER_NOT_FOUND_IN_LIST = -1244)

See Also:
Constant Field Values

PKI_E_USER_CERT_NOT_FOUND

public static final int PKI_E_USER_CERT_NOT_FOUND
Not currently used.

(PKI_E_USER_CERT_NOT_FOUND = -1246)

See Also:
Constant Field Values

PKI_E_INVALID_ALGORITHM

public static final int PKI_E_INVALID_ALGORITHM
The cryptographic algorithm is not supported.

(PKI_E_INVALID_ALGORITHM = -1247)

See Also:
Constant Field Values

PKI_E_INVALID_OPERATION

public static final int PKI_E_INVALID_OPERATION
The requested operation cannot be performed by the Novell Certificate Server.

(PKI_E_INVALID_OPERATION = -1248)

See Also:
Constant Field Values

PKI_E_INVALID_DIGEST

public static final int PKI_E_INVALID_DIGEST
Not currently used.

(PKI_E_INVALID_DIGEST = -1249)

See Also:
Constant Field Values

PKI_E_DATA_NOT_READY

public static final int PKI_E_DATA_NOT_READY
The requested data is not available.

(PKI_E_DATA_NOT_READY = -1251)

See Also:
Constant Field Values

PKI_E_INVALID_KDK_ID

public static final int PKI_E_INVALID_KDK_ID
Not currently used.

(PKI_E_INVALID_KDK_ID = -1252)

See Also:
Constant Field Values

PKI_E_INTERNAL_ERROR

public static final int PKI_E_INTERNAL_ERROR
An unexpected internal error has occurred.

(PKI_E_INTERNAL_ERROR = -1253)

See Also:
Constant Field Values

PKI_E_INVALID_CERTIFICATE_TIME

public static final int PKI_E_INVALID_CERTIFICATE_TIME
The validity period requested for the certificate is not valid. The Organizational CA is not yet operational.

(PKI_E_INVALID_CERTIFICATE_TIME = -1254)

See Also:
Constant Field Values

PKI_E_EXPIRED_CERTIFICATE

public static final int PKI_E_EXPIRED_CERTIFICATE
A certificate is no longer valid because it has expired.

(PKI_E_EXPIRED_CERTIFICATE = -1255)

See Also:
Constant Field Values

PKI_E_INVALID_SIGNATURE

public static final int PKI_E_INVALID_SIGNATURE
Not currently used.

(PKI_E_INVALID_SIGNATURE = -1256)

See Also:
Constant Field Values

PKI_E_KDK_TABLE_FULL

public static final int PKI_E_KDK_TABLE_FULL
Not currently used.

(PKI_E_KDK_TABLE_FULL = -1257)

See Also:
Constant Field Values

PKI_E_CERT_INVALID

public static final int PKI_E_CERT_INVALID
The certificate is invalid.

(PKI_E_CERT_INVALID = -1258)

See Also:
Constant Field Values

PKI_E_CA_ALREADY_INSTALLED

public static final int PKI_E_CA_ALREADY_INSTALLED
Not currently used.

(PKI_E_CA_ALREADY_INSTALLED = -1259)

See Also:
Constant Field Values

PKI_E_CA_NOT_OPERATIONAL

public static final int PKI_E_CA_NOT_OPERATIONAL
The specified server is not a CA. The server specified is not running the Novell Certificate Server.

(PKI_E_CA_NOT_OPERATIONAL = -1260)

See Also:
Constant Field Values

PKI_E_KEY_FAILURE

public static final int PKI_E_KEY_FAILURE
An error occurred while transporting a private key to the client.

(PKI_E_KEY_FAILURE = -1261)

See Also:
Constant Field Values

PKI_E_INVALID_KEY_ID

public static final int PKI_E_INVALID_KEY_ID
The specified certificate nickname could not be found.

(PKI_E_INVALID_KEY_ID = -1262)

See Also:
Constant Field Values

PKI_E_ACCESS_DENIED

public static final int PKI_E_ACCESS_DENIED
The user does not have the appropriate eDirectory rights to perform the operation.

(PKI_E_ACCESS_DENIED = -1263)

See Also:
Constant Field Values

PKI_E_NICI_OUTOF_SYNC

public static final int PKI_E_NICI_OUTOF_SYNC
An NICI session error occurred while attempting to transfer a private key.

(PKI_E_NICI_OUTOF_SYNC = -1264)

See Also:
Constant Field Values

PKI_E_NO_SECURITY_CONTAINER

public static final int PKI_E_NO_SECURITY_CONTAINER
The Security container cannot be found.

(PKI_E_NO_SECURITY_CONTAINER = -1265)

See Also:
Constant Field Values

PKI_E_NO_IP_ADDRESSES

public static final int PKI_E_NO_IP_ADDRESSES
No IP address cannot be found for the specified server.

(PKI_E_NO_IP_ADDRESSES = -1266)

See Also:
Constant Field Values

PKI_E_NICKNAME_IN_USE

public static final int PKI_E_NICKNAME_IN_USE
The nickname specified is already being used.

(PKI_E_NICKNAME_IN_USE = -1267)

See Also:
Constant Field Values

PKI_E_NOT_CONNECTED_TO_SERVICE

public static final int PKI_E_NOT_CONNECTED_TO_SERVICE
You are not currently connected to a server that can perform the requested operation.

(PKI_E_NOT_CONNECTED_TO_SERVICE = -1268)

See Also:
Constant Field Values

PKI_E_DUPLICATE

public static final int PKI_E_DUPLICATE
Not currently used.

(PKI_E_DUPLICATE = -1269)

See Also:
Constant Field Values

PKI_E_CRL_INVALID

public static final int PKI_E_CRL_INVALID
The CRL is invalid.

(PKI_E_CRL_INVALID = -1270)

See Also:
Constant Field Values

PKI_E_CERT_NOT_FOUND

public static final int PKI_E_CERT_NOT_FOUND
The specified certificate could not be found.

(PKI_E_CERT_NOT_FOUND = -1271)

See Also:
Constant Field Values

PKI_E_INVALID_CONTEXT

public static final int PKI_E_INVALID_CONTEXT
The specified context is not currently valid.

(PKI_E_INVALID_CONTEXT = -1272)

See Also:
Constant Field Values

PKI_E_SERVICE_NOT_AVAILABLE

public static final int PKI_E_SERVICE_NOT_AVAILABLE
The service is not available.

(PKI_E_SERVICE_NOT_AVAILABLE = -1273)

See Also:
Constant Field Values

NPKI_INVALID_CONTEXT

public static final int NPKI_INVALID_CONTEXT
Specifies the context values.

See Also:
Constant Field Values

PKI_DEFAULT_CONFIGURATION

public static final int PKI_DEFAULT_CONFIGURATION
Specifies that this configuration is the default configuration.

(PKI_DEFAULT_CONFIGURATION = 0x0000

See Also:
Constant Field Values

PUBLIC_KEY_ORGANIZATIONAL_CA

public static final int PUBLIC_KEY_ORGANIZATIONAL_CA
Public Key Flags to use when creating an Organizational CA.

(PUBLIC_KEY_ORGANIZATIONAL_CA = 0x0001 | 0x0002 | 0x0020)

See Also:
Constant Field Values

PKI_EXTENSION_INCLUDE

public static final int PKI_EXTENSION_INCLUDE
Use to include the extension in the certificate.

(PKI_EXTENSION_INCLUDE = 0x0000)

See Also:
Constant Field Values

PKI_EXTENSION_DONT_INCLUDE

public static final int PKI_EXTENSION_DONT_INCLUDE
Use to exclude the extension from the certificate.

(PKI_EXTENSION_DONT_INCLUDE = 0x0001)

See Also:
Constant Field Values

PKI_EXTENSION_NON_CRITICAL

public static final int PKI_EXTENSION_NON_CRITICAL
Use to set the extension as non-critical in the certificate.

(PKI_EXTENSION_NON_CRITICAL = 0x0000)

See Also:
Constant Field Values

PKI_EXTENSION_CRITICAL

public static final int PKI_EXTENSION_CRITICAL
Use to set the extension as critical in the certificate.

NOTE: If an extension is set to critical, application software should understand the extension, or fail verification of the certificate.

(PKI_EXTENSION_CRITICAL = 0x0002)

See Also:
Constant Field Values

X509_BASIC_CONSTRAINTS_CA

public static final int X509_BASIC_CONSTRAINTS_CA

The X.509 basic constraints extension is used to specify that a certificate belongs to a CA (CA). The X.509 basic constraints extension has essentially two parts:

CAs must have the basic constraints extension encoded. Certificates for non-CAs should not have the basic constraints extension encoded. The Basic Constraints extension uses the general-purpose extension structure.

(X509_BASIC_CONSTRAINTS_CA = 0x0100)

See Also:
Constant Field Values

NOVELL_EXTENSION_SERVER_DEFAULT

public static final int NOVELL_EXTENSION_SERVER_DEFAULT
Used to specify that the key-pair is for a server.

( NOVELL_EXTENSION_SERVER_DEFAULT = 0x00100)

See Also:
Constant Field Values

NOVELL_EXTENSION_USER_DEFAULT

public static final int NOVELL_EXTENSION_USER_DEFAULT
Specifies that the key-pair is for a user.

(NOVELL_EXTENSION_USER_DEFAULT = 0x00200)

See Also:
Constant Field Values

NOVELL_EXTENSION_ORGCA_DEFAULT

public static final int NOVELL_EXTENSION_ORGCA_DEFAULT
Specifies that the key-pair is for the organizational CA.

(NOVELL_EXTENSION_ORGCA_DEFAULT = 0x00400)

See Also:
Constant Field Values

NOVELL_EXTENSION_EXTRACTABLE_KEY

public static final int NOVELL_EXTENSION_EXTRACTABLE_KEY
An additional flag that specifies that the private key can be extracted from Novell International Cryptographic Infrastructure (NICI). Setting this flag reduces the cryptographic quality. This flag only applies to keys generated by Novell PKIS.

(NOVELL_EXTENSION_EXTRACTABLE_KEY = 0x10000)

See Also:
Constant Field Values

X509_KEY_USAGE_DIGITAL_SIGNATURE

public static final int X509_KEY_USAGE_DIGITAL_SIGNATURE
Designates that the key is used to create digital signatures.

(X509_KEY_USAGE_DIGITAL_SIGNATURE = 0x8000)

See Also:
Constant Field Values

X509_KEY_USAGE_NON_REPUDIATION

public static final int X509_KEY_USAGE_NON_REPUDIATION
Designates that the key is used for non-repudiation. This type of key usually has legal ramifications.

(X509_KEY_USAGE_NON_REPUDIATION = 0x4000)

See Also:
Constant Field Values

X509_KEY_USAGE_KEY_ENCIPHERMENT

public static final int X509_KEY_USAGE_KEY_ENCIPHERMENT
Designates that the key is used to encrypt other keys.

(X509_KEY_USAGE_KEY_ENCIPHERMENT = 0x2000)

See Also:
Constant Field Values

X509_KEY_USAGE_DATA_ENCIPHERMENT

public static final int X509_KEY_USAGE_DATA_ENCIPHERMENT
Designates that the key is used to directly encrypt data.

(X509_KEY_USAGE_DATA_ENCIPHERMENT = 0x1000)

See Also:
Constant Field Values

X509_KEY_USAGE_KEY_AGREEMENT

public static final int X509_KEY_USAGE_KEY_AGREEMENT
Not valid for RSA keys.

(X509_KEY_USAGE_KEY_AGREEMENT = 0x0800)

See Also:
Constant Field Values

X509_KEY_USAGE_KEY_CERT_SIGN

public static final int X509_KEY_USAGE_KEY_CERT_SIGN
Designates that the key is used to sign certificates.

(X509_KEY_USAGE_KEY_CERT_SIGN = 0x0400)

See Also:
Constant Field Values

X509_KEY_USAGE_CRL_SIGN

public static final int X509_KEY_USAGE_CRL_SIGN
Designates that the key is used to sign CRL's (Certificate Revocation Lists).

(X509_KEY_USAGE_CRL_SIGN = 0x0200)

See Also:
Constant Field Values

X509_KEY_USAGE_ENCIPHER_ONLY

public static final int X509_KEY_USAGE_ENCIPHER_ONLY
Not valid for RSA keys.

(X509_KEY_USAGE_ENCIPHER_ONLY = 0x0100)

See Also:
Constant Field Values

X509_KEY_USAGE_DECIPHER_ONLY

public static final int X509_KEY_USAGE_DECIPHER_ONLY
Not valid for RSA keys.

(X509_KEY_USAGE_DECIPHER_ONLY = 0x0080)

See Also:
Constant Field Values

X509_GENERAL_NAME_OTHER_NAME

public static final int X509_GENERAL_NAME_OTHER_NAME
The alternative name must be ASN.1 encoded as an OtherName sequence as specified in RFC 3280 section 4.2.1.7.

(X509_GENERAL_NAME_OTHER_NAME = 0x0000)

See Also:
Constant Field Values

X509_GENERAL_NAME_RFC822_NAME

public static final int X509_GENERAL_NAME_RFC822_NAME
The alternative name must be a unicode representation of an IA5String.

(X509_GENERAL_NAME_RFC822_NAME = 0x0001)

See Also:
Constant Field Values

X509_GENERAL_NAME_DNS_NAME

public static final int X509_GENERAL_NAME_DNS_NAME
The alternative name must be a unicode representation of an IA5String.

(X509_GENERAL_NAME_DNS_NAME = 0x0002)

See Also:
Constant Field Values

X509_GENERAL_NAME_X400_ADDRESS

public static final int X509_GENERAL_NAME_X400_ADDRESS
The alternative name must be encoded as an ORAddress sequence as specified in RFC 3280 section 4.2.1.7.

(X509_GENERAL_NAME_X400_ADDRESS = 0x0003)

See Also:
Constant Field Values

X509_GENERAL_NAME_DIRECTORY_NAME

public static final int X509_GENERAL_NAME_DIRECTORY_NAME
The alternative name must be encoded as a Name choice as specified in X.501.

(X509_GENERAL_NAME_DIRECTORY_NAME = 0x0004)

See Also:
Constant Field Values

X509_GENERAL_NAME_EDI_PARTY_NAME

public static final int X509_GENERAL_NAME_EDI_PARTY_NAME
The alternative name must be encoded as an EDIPartyName sequence as specified RFC 3280 section 4.2.1.7.

(X509_GENERAL_NAME_EDI_PARTY_NAME = 0x0005)

See Also:
Constant Field Values

X509_GENERAL_NAME_UNIFORM_RESOURCE_IDENTIFIER

public static final int X509_GENERAL_NAME_UNIFORM_RESOURCE_IDENTIFIER
The alternative name must be a unicode representation of an IA5String.

(X509_GENERAL_NAME_UNIFORM_RESOURCE_IDENTIFIER = 0x0006)

See Also:
Constant Field Values

X509_GENERAL_NAME_IP_ADDRESS

public static final int X509_GENERAL_NAME_IP_ADDRESS
The alternative name must be an OCTET STRING in "network byte order" as specified in ASN.1. (Network byte order specified in RFC 791.)

(X509_GENERAL_NAME_IP_ADDRESS = 0x0007)

See Also:
Constant Field Values

X509_GENERAL_NAME_REGISTERED_ID

public static final int X509_GENERAL_NAME_REGISTERED_ID
The alternative name must be encoded as an OBJECT IDENTIFIER as specified in ASN.1.

(X509_GENERAL_NAME_REGISTERED_ID = 0x0008)

See Also:
Constant Field Values

X509_SUBJECT_ALT_NAME_OTHER_NAME

public static final int X509_SUBJECT_ALT_NAME_OTHER_NAME
Depricated -- Use X509_GENERAL_NAME_OTHER_NAME

See Also:
Constant Field Values

X509_SUBJECT_ALT_NAME_RFC822_NAME

public static final int X509_SUBJECT_ALT_NAME_RFC822_NAME
Depricated -- Use X509_GENERAL_NAME_RFC822_NAME

See Also:
Constant Field Values

X509_SUBJECT_ALT_NAME_DNS_NAME

public static final int X509_SUBJECT_ALT_NAME_DNS_NAME
Depricated -- Use X509_GENERAL_NAME_DNS_NAME

See Also:
Constant Field Values

X509_SUBJECT_ALT_NAME_X400_ADDRESS

public static final int X509_SUBJECT_ALT_NAME_X400_ADDRESS
Depricated -- Use X509_GENERAL_NAME_X400_ADDRESS

See Also:
Constant Field Values

X509_SUBJECT_ALT_NAME_DIRECTORY_NAME

public static final int X509_SUBJECT_ALT_NAME_DIRECTORY_NAME
Depricated -- Use X509_GENERAL_NAME_DIRECTORY_NAME

See Also:
Constant Field Values

X509_SUBJECT_ALT_NAME_EDI_PARTY_NAME

public static final int X509_SUBJECT_ALT_NAME_EDI_PARTY_NAME
Depricated -- Use X509_GENERAL_NAME_EDI_PARTY_NAME

See Also:
Constant Field Values

X509_SUBJECT_ALT_NAME_UNIFORM_RESOURCE_IDENTIFIER

public static final int X509_SUBJECT_ALT_NAME_UNIFORM_RESOURCE_IDENTIFIER
Depricated -- Use X509_GENERAL_NAME_UNIFORM_RESOURCE_IDENTIFIER

See Also:
Constant Field Values

X509_SUBJECT_ALT_NAME_IP_ADDRESS

public static final int X509_SUBJECT_ALT_NAME_IP_ADDRESS
Depricated -- Use X509_GENERAL_NAME_IP_ADDRESS

See Also:
Constant Field Values

X509_SUBJECT_ALT_NAME_REGISTERED_ID

public static final int X509_SUBJECT_ALT_NAME_REGISTERED_ID
Depricated -- Use X509_GENERAL_NAME_REGISTERED_ID

See Also:
Constant Field Values

PKI_RSA_ALGORITHM

public static final int PKI_RSA_ALGORITHM
Indicates support of the RSA key generation algorithm.

(PKI_RSA_ALGORITHM = 0x01)

See Also:
Constant Field Values

PKI_UNKNOWN_ALGORITM

public static final int PKI_UNKNOWN_ALGORITM
Indicates that the specified algorithm is unknown and not supported.

(PKI_UNKNOWN_ALGORITM = 0x00)

See Also:
Constant Field Values

PKI_SIGN_WITH_RSA_AND_MD2

public static final int PKI_SIGN_WITH_RSA_AND_MD2
Indicates support of the MD2 with RSA encryption signing algorithm.

(PKI_SIGN_WITH_RSA_AND_MD2 = 0x01)

See Also:
Constant Field Values

PKI_SIGN_WITH_RSA_AND_MD5

public static final int PKI_SIGN_WITH_RSA_AND_MD5
Indicates support of the MD5 with RSA encryption signing algorithm.

(PKI_SIGN_WITH_RSA_AND_MD5 = 0x02)

See Also:
Constant Field Values

PKI_SIGN_WITH_RSA_AND_SHA1

public static final int PKI_SIGN_WITH_RSA_AND_SHA1
Indicates support of the SHA1 with RSA encryption signing algorithm.

(PKI_SIGN_WITH_RSA_AND_SHA1 = 0x04)

See Also:
Constant Field Values

PKI_SIGN_WITH_RSA_AND_SHA_256

public static final int PKI_SIGN_WITH_RSA_AND_SHA_256
Indicates support of the SHA 256 (SHA2) with RSA encryption signing algorithm.

(PKI_SIGN_WITH_RSA_AND_SHA_256 = 0x08)

See Also:
Constant Field Values

PKI_SIGN_WITH_RSA_AND_SHA_384

public static final int PKI_SIGN_WITH_RSA_AND_SHA_384
Indicates support of the SHA 384 (SHA2) with RSA encryption signing algorithm.

(PKI_SIGN_WITH_RSA_AND_SHA_384 = 0x10)

See Also:
Constant Field Values

PKI_SIGN_WITH_RSA_AND_SHA_512

public static final int PKI_SIGN_WITH_RSA_AND_SHA_512
Indicates support of the SHA 512 (SHA2) with RSA encryption signing algorithm.

(PKI_SIGN_WITH_RSA_AND_SHA_512 = 0x20)

See Also:
Constant Field Values

OBJECT_KEY_CERT

public static final int OBJECT_KEY_CERT
Use this flag when exporting or retrieving information on the object certificate.

(OBJECT_KEY_CERT = 0x01)

See Also:
Constant Field Values

TRUSTED_ROOT_CERT

public static final int TRUSTED_ROOT_CERT
Use this flag when exporting or retrieving information on the trusted root certificate.

(TRUSTED_ROOT_CERT = 0x02)

See Also:
Constant Field Values

CHAIN_CERT

public static final int CHAIN_CERT
Use this flag when exporting or retrieving information on the certificate chain.

(CHAIN_CERT = 0x04)

See Also:
Constant Field Values

CHAIN_CERT_DESCENDING

public static final int CHAIN_CERT_DESCENDING
Use this flag to get the certificate chain in descending order.

(CHAIN_CERT_DESCENDING = 0x8)

See Also:
Constant Field Values

SELF_SIGNED_CERT

public static final int SELF_SIGNED_CERT
Use this flag when exporting or retrieving information on the self-signed certificate.

NOTE: This flag is NOT for use with getServerCertificates.

(SELF_SIGNED_CERT = 0x10)

See Also:
Constant Field Values

WAIVE_SUBJECT_NAME_COMPARISON

public static final int WAIVE_SUBJECT_NAME_COMPARISON
Normally storeServerCertificates and storeServerCertificatesFromCertificateList check that the requested name and and the subject name in the certifcate match. This optional flag waives the check, enabling the certifcate to be stored even if the requested name and certificate name are not the same.

(WAIVE_SUBJECT_NAME_COMPARISON = 0x100)

See Also:
Constant Field Values

PRIVATE_KEY

public static final int PRIVATE_KEY
Use for all certificates.

(PRIVATE_KEY = 0x0002)

See Also:
Constant Field Values

PRIVATE_KEY_EXTRACTABLE

public static final int PRIVATE_KEY_EXTRACTABLE
Use to allow a key to be extracted out of NICI. This is valid for all certificates.

NOTE: When using the PRIVATE_KEY_EXTRACTABLE flag and including the Novell Security Attributes Extension, it is necessary to bitwise-OR the extractable option (that is, NOVELL_EXTENSION_EXTRACTABLE_KEY) along with the appropriate Novell attribute to the flags field in the Novell Security Attributes Extension.

(PRIVATE_KEY_EXTRACTABLE = 0x0004)

See Also:
Constant Field Values

PKI_NO_CA

public static final int PKI_NO_CA
Indicates a CA is either not installed and/or not operational on the specified server.

(PKI_NO_CA = 0x00)

See Also:
Constant Field Values

PKI_ORGANIZATIONAL_CA

public static final int PKI_ORGANIZATIONAL_CA
Indicates an organizational CA is installed and operational on the specified server.

(PKI_ORGANIZATIONAL_CA = 0x01)

See Also:
Constant Field Values

PKI_SUB_ORGANIZATIONAL_CA

public static final int PKI_SUB_ORGANIZATIONAL_CA
Indicates an subordinate CA is installed and operational on the specified server (currently not supported).

(PKI_SUB_ORGANIZATIONAL_CA = 0x02)

See Also:
Constant Field Values

NOVELL_CERT

public static final int NOVELL_CERT
Deprecated. When calling storeServerCertificates to finish the process of creating a server certificate, you should normally specify the trustedRoot paramater as TREE_CA_CERT. This will cause the self-signed certificate to be used as the as the Trusted Root certificate.

NOTE: If NOVELL_CERT is specified, the developer's relying software must understand and be able to handle the Novell Security Attribute extension.(see X.509 Extensions).

(NOVELL_CERT = 0x00080000)

See Also:
Constant Field Values

TREE_CA_CERT

public static final int TREE_CA_CERT
Deprecated. When calling storeServerCertificates to finish the process of creating a server certificate, you should normally specify the trustedRoot paramater as TREE_CA_CERT. This will cause the self-signed certificate to be used as the as the Trusted Root certificate.

NOTE: If NOVELL_CERT is specified, the developer's relying software must understand and be able to handle the Novell Security Attribute extension.(see X.509 Extensions).

(TREE_CA_CERT = 0x00100000)

See Also:
Constant Field Values

DEFAULT_YEAR_ENCODING

public static final int DEFAULT_YEAR_ENCODING
Specifies the X.509 default for date encoding (see RFC 2459 for more details).

(DEFAULT_YEAR_ENCODING = 0x00)

See Also:
Constant Field Values

TWO_DIGIT_YEAR

public static final int TWO_DIGIT_YEAR
Identifies dates that have either a two-digit year.

(TWO_DIGIT_YEAR = 0x00)

See Also:
Constant Field Values

FOUR_DIGIT_YEAR

public static final int FOUR_DIGIT_YEAR
Identifies dates that have either a four-digit year.

(FOUR_DIGIT_YEAR = 0x01)

See Also:
Constant Field Values

PKI_SERVICE_INFO

public static final int PKI_SERVICE_INFO
Not supported, will cause an error.

(PKI_SERVICE_INFO = 0)

See Also:
Constant Field Values

PKI_CA_INFO

public static final int PKI_CA_INFO
Use PKI_CA_INFO when querying information about creating or using a certificate authority. Setting the flags field to PKI_CA_INFO will ensure that the proper information for creating or using a CA is retrieved.

(PKI_CA_INFO = 1)

See Also:
Constant Field Values

PKI_USER_INFO

public static final int PKI_USER_INFO
Use this flag when querying for information about creating a user certificate. Setting the flags field to PKI_USER_INFO ensures that the proper information for creating a user certificate is retrieved.

(PKI_USER_INFO = 2)

See Also:
Constant Field Values

PKI_SERVER_INFO

public static final int PKI_SERVER_INFO
Use this flag when querying for information about creating a server certificate. Setting the flags field to PKI_SERVER_INFO ensures that the proper information for creating a server certificate is retrieved.

(PKI_SERVER_INFO = 3)

See Also:
Constant Field Values

PKI_SERVER_HEALTH_CHECK

public static final int PKI_SERVER_HEALTH_CHECK
Use this flag to have the PKI Health Check run on the server.

(PKI_SERVER_HEALTH_CHECK = 4)

See Also:
Constant Field Values

PKI_OVERWRITE_KEYPAIR

public static final int PKI_OVERWRITE_KEYPAIR
Overwrites any information currently associated with this key pair.

(PKI_OVERWRITE_KEYPAIR = 0x0001)

See Also:
Constant Field Values

PKI_STORE_PRIVKEY_IN_OBJECT

public static final int PKI_STORE_PRIVKEY_IN_OBJECT
Stores encrypted private key in CA object.

(PKI_STORE_PRIVKEY_IN_OBJECT = 0x0002)

See Also:
Constant Field Values

PKI_PRIVATE_KEY_EXPORTABLE

public static final int PKI_PRIVATE_KEY_EXPORTABLE
Enables the extraction of the private key into a PKCS#12 file.

(PKI_PRIVATE_KEY_EXPORTABLE = 0x0004)

See Also:
Constant Field Values

PKI_CUSTOM_SUBJECT_NAME

public static final int PKI_CUSTOM_SUBJECT_NAME
Use when the subject name is not the default.

(PKI_CUSTOM_SUBJECT_NAME = 0x00001000)

See Also:
Constant Field Values

PUBLIC_KEY_SINGLE_SERVER

public static final int PUBLIC_KEY_SINGLE_SERVER
Use when the key generation server is the same as the CA server.

(PUBLIC_KEY_SINGLE_SERVER = 0x0002 | 0x0010 | 0x0020 | 0x0100)

See Also:
Constant Field Values

PUBLIC_KEY_TWO_SERVER

public static final int PUBLIC_KEY_TWO_SERVER
Use when the key generation server is not the same as the CA server.

(PUBLIC_KEY_TWO_SERVER = 0x0004 | 0x0010 | 0x0100)

See Also:
Constant Field Values

PUBLIC_KEY_EXTERNAL_CA

public static final int PUBLIC_KEY_EXTERNAL_CA
Use when the CA is external to Novell.

(PUBLIC_KEY_EXTERNAL_CA = 0x0004 | 0x0010 | 0x0100)

See Also:
Constant Field Values

KMO_EMPTY

public static final int KMO_EMPTY
Indicates no certificates or key pair have been stored.

(KMO_EMPTY = 0)

See Also:
Constant Field Values

KMO_KEY_PAIR_PRESENT

public static final int KMO_KEY_PAIR_PRESENT
Indicates a key pair has been stored, but no certificates have been stored.

(KMO_KEY_PAIR_PRESENT = 1)

See Also:
Constant Field Values

KMO_TRUSTED_ROOT_PRESENT

public static final int KMO_TRUSTED_ROOT_PRESENT
Indicates a key pair and the root certificate have been stored, but the object certificate has not been stored.

(KMO_TRUSTED_ROOT_PRESENT = 2)

See Also:
Constant Field Values

KMO_CERTIFICATE_PRESENT

public static final int KMO_CERTIFICATE_PRESENT
Indicates all certificates as well as the key pair have been stored, and the object is in working order.

(KMO_CERTIFICATE_PRESENT = 3)

See Also:
Constant Field Values

KMO_CERTIFICATE_INVALID

public static final int KMO_CERTIFICATE_INVALID
Indicates the object is in an invalid state.

(KMO_CERTIFICATE_INVALID = 0xFFFFFFFF)

See Also:
Constant Field Values

NO_CA_OPERATIONAL

public static final int NO_CA_OPERATIONAL
Indicates a CA is either not installed and/or not operational on the specified server.

(NO_CA_OPERATIONAL = 0x00)

See Also:
Constant Field Values

TREE_CA_OPERATIONAL

public static final int TREE_CA_OPERATIONAL
The server hosts the organizational CA.

(TREE_CA_OPERATIONAL = 0x01)

See Also:
Constant Field Values

SUB_CA_OPERATIONAL

public static final int SUB_CA_OPERATIONAL
Indicates an organizational CA is installed and operational on the specified server (currently not supported).

(SUB_CA_OPERATIONAL = 0x02)

See Also:
Constant Field Values

MAX_CERTIFICATE_SIZE

public static final int MAX_CERTIFICATE_SIZE
Flags to use when creating a KMO using PKI verb #3 -- Create RSA key pair.

(MAX_CERTIFICATE_SIZE = 65536)

See Also:
Constant Field Values

MAX_SINGLE_CERTIFICATE_SIZE

public static final int MAX_SINGLE_CERTIFICATE_SIZE
Maximum size in bytes that the server certificate can be set.

(MAX_SINGLE_CERTIFICATE_SIZE = 8192)

See Also:
Constant Field Values

MAX_CSR_SIZE

public static final int MAX_CSR_SIZE
Size of the certificate signing request (CSR).

(MAX_CSR_SIZE = 8192)

See Also:
Constant Field Values

MAX_NICK_NAME_BYTES

public static final int MAX_NICK_NAME_BYTES
Size in bytes of the nickname.

(MAX_NICK_NAME_BYTES = 1024)

See Also:
Constant Field Values

MAX_NICK_NAME_CHARS

public static final int MAX_NICK_NAME_CHARS
Maximum characters in nickname.

(MAX_NICK_NAME_CHARS = 512)

See Also:
Constant Field Values

PKI_RETRY

public static final int PKI_RETRY
Indicates if the call is a retry.

(PKI_RETRY = 1)

See Also:
Constant Field Values

PKI_INVALID

public static final int PKI_INVALID
Specifies flags for invalidity reasons.

(PKI_INVALID = 0xFFFFFFFF)

See Also:
Constant Field Values

USER_CERT_RETRY_COUNT

public static final int USER_CERT_RETRY_COUNT
Specifies the number of tries the system attempt when storeing a user certificate.

(USER_CERT_RETRY_COUNT = 3)

See Also:
Constant Field Values

UNKNOWN_VERSION

public static final int UNKNOWN_VERSION
Indicates that the specified version of the certificate is unknown and not supported.

(UNKNOWN_VERSION = 0)

See Also:
Constant Field Values

VERSION_ONE

public static final int VERSION_ONE
The decoded certificate is a version one certificate.

(VERSION_ONE = 1)

See Also:
Constant Field Values

VERSION_TWO

public static final int VERSION_TWO
The decoded certificate is a version two certificate.

(VERSION_TWO = 2)

See Also:
Constant Field Values

VERSION_THREE

public static final int VERSION_THREE
The decoded certificate is a version three certificate.

(VERSION_THREE = 3)

See Also:
Constant Field Values

FIELD_NON_CRITICAL

public static final int FIELD_NON_CRITICAL
Specifies a non-critical field.

(FIELD_NON_CRITICAL = 0)

See Also:
Constant Field Values

FIELD_CRITICAL

public static final int FIELD_CRITICAL
Specifies a critical field in a certificate.

(FIELD_CRITICAL = 1)

See Also:
Constant Field Values

PKI_INTERNAL_KEY_PAIR

public static final int PKI_INTERNAL_KEY_PAIR
Indicates a key pair was generated by Novell PKI service and the private key is stored in eDirectory.

(PKI_INTERNAL_KEY_PAIR = 0x01)

See Also:
Constant Field Values

PKI_EXTERNAL_KEY_PAIR

public static final int PKI_EXTERNAL_KEY_PAIR
Indicates that the key pair was generated external to the Novell PKI service.

(PKI_EXTERNAL_KEY_PAIR = 0x02)

See Also:
Constant Field Values

DIGITAL_SIGNATURE

public static final int DIGITAL_SIGNATURE
Designates that the key is used to create digital signatures.

(DIGITAL_SIGNATURE = 0x8000)

See Also:
Constant Field Values

NON_REPUDIATION

public static final int NON_REPUDIATION
Designates that the key is used for non-repudiation. This type of key usually has legal ramifications.

(NON_REPUDIATION = 0x4000)

See Also:
Constant Field Values

KEY_ENCIPHERMENT

public static final int KEY_ENCIPHERMENT
Designates that the key is used to encrypt other keys.

(KEY_ENCIPHERMENT = 0x2000)

See Also:
Constant Field Values

DATA_ENCIPHERMENT

public static final int DATA_ENCIPHERMENT
Designates that the key is used to directly encrypt data.

(DATA_ENCIPHERMENT = 0x1000)

See Also:
Constant Field Values

KEY_AGREEMENT

public static final int KEY_AGREEMENT
Not valid for RSA keys.

(KEY_AGREEMENT = 0x0800)

See Also:
Constant Field Values

KEY_CERT_SIGN

public static final int KEY_CERT_SIGN
Designates that the key is used to sign certificates.

(KEY_CERT_SIGN = 0x0400)

See Also:
Constant Field Values

CRL_SIGN

public static final int CRL_SIGN
Designates that the key is used to sign CRLs (Certificate Revocation Lists).

(CRL_SIGN = 0x0200)

See Also:
Constant Field Values

ENCIPHER_ONLY

public static final int ENCIPHER_ONLY
Not valid for RSA keys.

(ENCIPHER_ONLY = 0x0100)

See Also:
Constant Field Values

DECIPHER_ONLY

public static final int DECIPHER_ONLY
Not valid for RSA keys.

(DECIPHER_ONLY = 0x0080)

See Also:
Constant Field Values

PKIS_VERSION_ONE

public static final int PKIS_VERSION_ONE
Specifies PKI Services Version 1.

(PKIS_VERSION_ONE = 0x00010000)

See Also:
Constant Field Values

PKIS_VERSION_ONE_FIVE

public static final int PKIS_VERSION_ONE_FIVE
Specifies PKI Services Version 1.5.

(PKIS_VERSION_ONE_FIVE = 0x00010005)

See Also:
Constant Field Values

PKIS_VERSION_TWO

public static final int PKIS_VERSION_TWO
Specifies PKI Services Version 2.

(PKIS_VERSION_TWO = 0x00020000)

See Also:
Constant Field Values

PKIS_VERSION_ONE_ZERO_ZERO

public static final int PKIS_VERSION_ONE_ZERO_ZERO
Specifies PKI Services Version 1.0.0.

(PKIS_VERSION_ONE_ZERO_ZERO = 0x00010000)

See Also:
Constant Field Values

PKIS_VERSION_ONE_ZERO_FIVE

public static final int PKIS_VERSION_ONE_ZERO_FIVE
Specifies PKI Services Version 1.0.5.

(PKIS_VERSION_ONE_ZERO_FIVE = 0x00010005)

See Also:
Constant Field Values

PKIS_VERSION_ONE_ZERO_NINE

public static final int PKIS_VERSION_ONE_ZERO_NINE
Specifies PKI Services Version 1.0.9.

(PKIS_VERSION_ONE_ZERO_NINE = 0x00010009)

See Also:
Constant Field Values

PKIS_VERSION_TWO_ZERO_ZERO

public static final int PKIS_VERSION_TWO_ZERO_ZERO
Specifies PKI Services Version 2.0.0.

(PKIS_VERSION_TWO_ZERO_ZERO = 0x00020000)

See Also:
Constant Field Values

PKIS_VERSION_TWO_ZERO_TWO

public static final int PKIS_VERSION_TWO_ZERO_TWO
Specifies PKI Services Version 2.0.2.

(PKIS_VERSION_TWO_ZERO_TWO = 0x00020002)

See Also:
Constant Field Values

PKIS_VERSION_TWO_ZERO_THREE

public static final int PKIS_VERSION_TWO_ZERO_THREE
Specifies PKI Services Version 2.0.3.

(PKIS_VERSION_TWO_ZERO_THREE = 0x00020003)

See Also:
Constant Field Values

PKIS_VERSION_TWO_ONE_ONE

public static final int PKIS_VERSION_TWO_ONE_ONE
Specifies PKI Services Version 2.1.1.

(PKIS_VERSION_TWO_ONE_ONE = 0x00020011)

See Also:
Constant Field Values

PKIS_VERSION_TWO_TWO_ZERO

public static final int PKIS_VERSION_TWO_TWO_ZERO
Specifies PKI Services Version 2.2.0.

(PKIS_VERSION_TWO_TWO_ZERO = 0x00020200)

See Also:
Constant Field Values

PKIS_VERSION_TWO_TWO_ONE

public static final int PKIS_VERSION_TWO_TWO_ONE
Specifies PKI Services Version 2.2.1.

(PKIS_VERSION_TWO_TWO_ONE = 0x00020201)

See Also:
Constant Field Values

PKIS_VERSION_TWO_FOUR_ZERO

public static final int PKIS_VERSION_TWO_FOUR_ZERO
Specifies PKI Services Version 2.4.0.

(PKIS_VERSION_TWO_FOUR_ZERO = 0x00020400)

See Also:
Constant Field Values

PKIS_VERSION_TWO_FIVE_ZERO

public static final int PKIS_VERSION_TWO_FIVE_ZERO
Specifies PKI Services Version 2.5.0.

(PKIS_VERSION_TWO_FIVE_ZERO = 0x00020500)

See Also:
Constant Field Values

PKIS_VERSION_TWO_FIVE_TWO

public static final int PKIS_VERSION_TWO_FIVE_TWO
Specifies PKI Services Version 2.5.2.

(PKIS_VERSION_TWO_FIVE_TWO = 0x00020502)

See Also:
Constant Field Values

PKIS_VERSION_TWO_FIVE_FOUR

public static final int PKIS_VERSION_TWO_FIVE_FOUR
Specifies PKI Services Version 2.5.4.

(PKIS_VERSION_TWO_FIVE_FOUR = 0x00020504)

See Also:
Constant Field Values

PKIS_VERSION_TWO_SIX_ZERO

public static final int PKIS_VERSION_TWO_SIX_ZERO
Specifies PKI Services Version 2.6.0.

(PKIS_VERSION_TWO_SIX_ZERO = 0x00020600)

See Also:
Constant Field Values

PKIS_VERSION_TWO_SEVEN_ZERO

public static final int PKIS_VERSION_TWO_SEVEN_ZERO
Specifies PKI Services Version 2.7.0.

(PKIS_VERSION_TWO_SEVEN_ZERO = 0x00020700)

See Also:
Constant Field Values

PKIS_VERSION_TWO_SEVEN_TWO

public static final int PKIS_VERSION_TWO_SEVEN_TWO
Specifies PKI Services Version 2.7.2.

(PKIS_VERSION_TWO_SEVEN_TWO = 0x00020702)

See Also:
Constant Field Values

PKIS_VERSION_TWO_SEVEN_THREE

public static final int PKIS_VERSION_TWO_SEVEN_THREE
Specifies PKI Services Version 2.7.3.

(PKIS_VERSION_TWO_SEVEN_THREE = 0x00020703)

See Also:
Constant Field Values

PKIS_VERSION_TWO_SEVEN_FOUR

public static final int PKIS_VERSION_TWO_SEVEN_FOUR
Specifies PKI Services Version 2.7.4.

(PKIS_VERSION_TWO_SEVEN_FOUR = 0x00020704)

See Also:
Constant Field Values

PKIS_VERSION_TWO_SEVEN_FIVE

public static final int PKIS_VERSION_TWO_SEVEN_FIVE
Specifies PKI Services Version 2.7.5.

(PKIS_VERSION_TWO_SEVEN_FIVE = 0x00020705)

See Also:
Constant Field Values

PKIS_VERSION_TWO_SEVEN_SIX

public static final int PKIS_VERSION_TWO_SEVEN_SIX
Specifies PKI Services Version 2.7.6.

(PKIS_VERSION_TWO_SEVEN_SIX = 0x00020706)

See Also:
Constant Field Values

PKIS_VERSION_TWO_SEVEN_SEVEN

public static final int PKIS_VERSION_TWO_SEVEN_SEVEN
Specifies PKI Services Version 2.7.7.

(PKIS_VERSION_TWO_SEVEN_SEVEN = 0x00020707)

See Also:
Constant Field Values

PKIS_VERSION_TWO_SEVEN_EIGHT

public static final int PKIS_VERSION_TWO_SEVEN_EIGHT
Specifies PKI Services Version 2.7.8.

(PKIS_VERSION_TWO_SEVEN_EIGHT = 0x00020708)

See Also:
Constant Field Values

PKIS_VERSION_TWO_SEVEN_NINE

public static final int PKIS_VERSION_TWO_SEVEN_NINE
Specifies PKI Services Version 2.7.9.

(PKIS_VERSION_TWO_SEVEN_NINE = 0x00020709)

See Also:
Constant Field Values

PKIS_VERSION_THREE_ZERO_ZERO

public static final int PKIS_VERSION_THREE_ZERO_ZERO
Specifies PKI Services Version 3.0.0.

(PKIS_VERSION_THREE_ZERO_ZERO = 0x00030000)

See Also:
Constant Field Values

PKIS_VERSION_THREE_ONE_ZERO

public static final int PKIS_VERSION_THREE_ONE_ZERO
Specifies PKI Services Version 3.1.0.

(PKIS_VERSION_THREE_ONE_ZERO = 0x00030100)

See Also:
Constant Field Values

PKIS_VERSION_THREE_ONE_ONE

public static final int PKIS_VERSION_THREE_ONE_ONE
Specifies PKI Services Version 3.1.1.

(PKIS_VERSION_THREE_ONE_ONE = 0x00030101)

See Also:
Constant Field Values

PKI_CERTIFICATE_NORMAL

public static final int PKI_CERTIFICATE_NORMAL
Indicates that a certiifcate has been issued and the key pair is present.

(PKI_CERTIFICATE_NORMAL = 0x0004)

See Also:
Constant Field Values

PKI_CSR_PENDING

public static final int PKI_CSR_PENDING
Indicates that the user certificate has not been issued by the CA.

(PKI_CSR_PENDING = 0x0001 | 0x0008)

See Also:
Constant Field Values

PKI_PRIVATE_KEY_NOT_IN_NDS

public static final int PKI_PRIVATE_KEY_NOT_IN_NDS
Indicates that the certificate that is present does not have the private key.

(PKI_PRIVATE_KEY_NOT_IN_NDS = 0x0002 | 0x0004)

See Also:
Constant Field Values

PKI_CERTIFICATE_ON_HOLD

public static final int PKI_CERTIFICATE_ON_HOLD
Indicates that the certificate is on hold.

(PKI_CERTIFICATE_ON_HOLD = 0x0001 | 0x0004 | 0x10000)

See Also:
Constant Field Values

PKI_ALL_VENDORS

public static final int PKI_ALL_VENDORS
Lists all certificate vendors.

(PKI_ALL_VENDORS = 0)

See Also:
Constant Field Values

PKI_VENDOR_UNKNOWN

public static final int PKI_VENDOR_UNKNOWN
Indicates that an unregistered vendor has been selected.

(PKI_VENDOR_UNKNOWN = 1)

See Also:
Constant Field Values

PKI_VENDOR_EXTERNAL

public static final int PKI_VENDOR_EXTERNAL
Specifies an external vendor.

(PKI_VENDOR_EXTERNAL = 2)

See Also:
Constant Field Values

PKI_VENDOR_NOVELL

public static final int PKI_VENDOR_NOVELL
Specifies a Novell certificate.

(PKI_VENDOR_NOVELL = 3)

See Also:
Constant Field Values

PKI_VENDOR_ENTRUST

public static final int PKI_VENDOR_ENTRUST
Specifies an Entrust certificate.

(PKI_VENDOR_ENTRUST = 4)

See Also:
Constant Field Values

PKI_VENDOR_VERISIGN

public static final int PKI_VENDOR_VERISIGN
Specfies a Verisign certificate.

(PKI_VENDOR_VERISIGN = 5)

See Also:
Constant Field Values

PKI_OBJECT_KEY_CERTIFICATE

public static final int PKI_OBJECT_KEY_CERTIFICATE
Flags to use with the getCACertificates, getServerCertificates, and storeServerCertificates to determine which certificates are returned.

Use this flag when exporting or retrieving information on the object certificate.

(PKI_OBJECT_KEY_CERTIFICATE = 0x01)

See Also:
Constant Field Values

PKI_TRUSTED_ROOT_CERTIFICATE

public static final int PKI_TRUSTED_ROOT_CERTIFICATE
Use this flag when exporting or retrieving information on the trusted root certificate.

(PKI_TRUSTED_ROOT_CERTIFICATE = 0x02)

See Also:
Constant Field Values

PKI_CHAIN_CERTIFICATE

public static final int PKI_CHAIN_CERTIFICATE
Use this flag when exorting or retrieving information on the certificate chain.

(PKI_CHAIN_CERTIFICATE = 0x04)

See Also:
Constant Field Values

PKI_SELF_SIGNED_CERTIFICATE

public static final int PKI_SELF_SIGNED_CERTIFICATE
Specifies a DER encoder X.509 self-signed certificate; not used with getServerCertificates.

(PKI_SELF_SIGNED_CERTIFICATE = 0x10)

See Also:
Constant Field Values

PKI_CA_KEY_AND_CERTS

public static final int PKI_CA_KEY_AND_CERTS
Use this flag when exporting the CA self-signed certificate, public certificate, and the CA's chain.

(PKI_CA_KEY_AND_CERTS = 0x04 | 0x10 | 0x01)

See Also:
Constant Field Values

PKI_NOVELL_CERTIFICATE

public static final int PKI_NOVELL_CERTIFICATE
Other flags to use with the storeServerCertificates used to specify which cert in a chain should be treated as the root certificate. Use the Novell Root Certifier Certificate as the trusted root. (Use this option only if your software understands the Novell Security Attribute.)

NOTE: If PKI_NOVELL_CERTIFICATE is used, the developer's relying software must be configured to handle the Novell Security Attributes extensions.

(PKI_NOVELL_CERTIFICATE = 0x00080000)

See Also:
Constant Field Values

PKI_ORG_CA_CERTIFICATE

public static final int PKI_ORG_CA_CERTIFICATE
Use the self-signed organizational certificate as the trusted root. This is the most commonly used option.

NOTE: This is the flag developers typically should use.

(PKI_ORG_CA_CERTIFICATE = 0x00100000)

See Also:
Constant Field Values

PKI_WAIVE_SUBJECT_NAME_IN_CERTIFICATE

public static final int PKI_WAIVE_SUBJECT_NAME_IN_CERTIFICATE
Use when storing an external certificate whose subject name does not match original subject name. Normally storeServerCertificates checks that the requested name and the subject name in the certificate match. This optional flag waives the check, enabling the certificate to be stored even if the requested name and certificate name are dissimilar.

NOTE: The flags PKI_CHAIN_CERTIFICATE, PKI_TRUSTED_ROOT_CERTIFICATE and PKI_SELF_SIGNED_CERTIFICATE are mutually exclusive. PKI_OBJECT_KEY_CERTIFICATE and PKI_TRUSTED_ROOT_CERTIFICATE also are mutually exclusive.

(PKI_WAIVE_SUBJECT_NAME_IN_CERTIFICATE = 0x100)

See Also:
Constant Field Values

PKI_TYPE_CRL_CONTAINER

public static final int PKI_TYPE_CRL_CONTAINER
Specifies the PKI conatiner to be of type CRL. This type of container is used to store CRL confiuration objects.

(PKI_TYPE_CRL_CONTAINER = 0x01)

See Also:
Constant Field Values

PKI_TYPE_CERTIFICATE_CONTAINER

public static final int PKI_TYPE_CERTIFICATE_CONTAINER
Specifies the PKI conatiner to be of type certificate. This type of container4 is used to store certificate objects.

(PKI_TYPE_CERTIFICATE_CONTAINER = 0x02)

See Also:
Constant Field Values

PKI_MINUTES

public static final int PKI_MINUTES
Specifies a time unit of minutes.

(PKI_MINUTES = 1)

See Also:
Constant Field Values

PKI_HOURS

public static final int PKI_HOURS
Specifies a time unit of hours.

(PKI_HOURS = 2)

See Also:
Constant Field Values

PKI_DAYS

public static final int PKI_DAYS
Specifies a time unit of days.

(PKI_DAYS = 3)

See Also:
Constant Field Values

PKI_WEEKS

public static final int PKI_WEEKS
Specifies a time unit of weeks.

(PKI_PKI_WEEKS = 4)

See Also:
Constant Field Values

PKI_MONTHS

public static final int PKI_MONTHS
Specifies a time unit of months.

(PKI_MONTHS = 5)

See Also:
Constant Field Values

PKI_NS_DOS

public static final int PKI_NS_DOS
Specifies the type of name space on the NetWare volume.

(PKI_DS_DOS = 0)

See Also:
Constant Field Values

PKI_NS_MACINTOSH

public static final int PKI_NS_MACINTOSH
Specifies the type of name space on the NetWare volume.

(PKI_DS_DOS = 0)

See Also:
Constant Field Values

PKI_NS_UNIX

public static final int PKI_NS_UNIX
Specifies the type of name space on the NetWare volume.

(PKI_DS_MACINTOSH = 0)

See Also:
Constant Field Values

PKI_NS_FTAM

public static final int PKI_NS_FTAM
Specifies the type of name space on the NetWare volume.

(PKI_DS_DOS = 0)

See Also:
Constant Field Values

PKI_NS_OS2

public static final int PKI_NS_OS2
Specifies the type of name space on the NetWare volume.

(PKI_DS_DOS = 0)

See Also:
Constant Field Values

PKI_CLEAR

public static final int PKI_CLEAR
Use to remove (or clear) all the entries. This flag cannot be combined with any other flag.

(PKI_CLEAR = 0x01)

See Also:
Constant Field Values

PKI_ADD

public static final int PKI_ADD
Use to add an entry. This flag can be used alone or with PKI_SORT.

(PKI_ADD = 0x02)

See Also:
Constant Field Values

PKI_DELETE

public static final int PKI_DELETE
Use to remove an entry. This flag can be used alone or with PKI_SORT.

(PKI_DELETE = 0x04)

See Also:
Constant Field Values

PKI_SORT

public static final int PKI_SORT
Use to sort the entries. This flag can be used alone or with any one of the following flags: PKI_ADD, PKI_DELETE.

(PKI_SORT = 0x10)

See Also:
Constant Field Values

PKI_CLEAR_CERTS

public static final int PKI_CLEAR_CERTS
Deprecated. Use PKI_CLEAR.

See Also:
Constant Field Values

PKI_ADD_CERT

public static final int PKI_ADD_CERT
Deprecated. Use PKI_ADD.

See Also:
Constant Field Values

PKI_DEL_CERT

public static final int PKI_DEL_CERT
Deprecated. Use PKI_DELETE.

See Also:
Constant Field Values

PKI_SORT_LIST

public static final int PKI_SORT_LIST
Deprecated. Use PKI_SORT.

See Also:
Constant Field Values

EXTENSION_DONT_ENCODE

public static final int EXTENSION_DONT_ENCODE
Use to exclude the extension from the certificate.

(EXTENSION_DONT_ENCODE = 0x0001)

See Also:
Constant Field Values

EXTENSION_CRITICAL

public static final int EXTENSION_CRITICAL
Use to set the extension as critical in the certificate.

NOTE: If an extension is set to critical, application software should understand the extension, or fail verification of the certificate.

(EXTENSION_CRITICAL = 0x0002)

See Also:
Constant Field Values

NPKI_CERTIFICATE_CREATE_NORMAL

public static final int NPKI_CERTIFICATE_CREATE_NORMAL
The default flag for createDefaultCertificates. The default certificates will be overwritten with a new key pair and new certificate if and only if one of the following conditons is true:
  1. They have expired
  2. They will expire within 60 days
  3. The subject name does not match the default IP or default DNS as discovered by WinSock/DNS
  4. They do not contain a CRL distribution point and the current CA is configured with a valid CRL distribution point.
However, if the "SSL CertificateIP" or "SSL CertificateDNS" is not signed by the current Organizational CA, then they will not be overwritten even if one of the conditions previously stated is met, unless the flag NPKI_CERTIFICATE_CREATE_CA_CHANGE_FORCE is also specified.

See Also:
Constant Field Values

NPKI_CERTIFICATE_CREATE_FORCE

public static final int NPKI_CERTIFICATE_CREATE_FORCE
This flag will cause createDefaultCertificates to overwrite all default certificates with a new key pair and a new certificate.

NOTE: NOTE: this flag should not be 'or'ed with NPKI_CERTIFICATE_CREATE_NO_OVERWRITE or NPKI_CERTIFICATE_CREATE_CA_CHANGE_FORCE.

See Also:
Constant Field Values

NPKI_CERTIFICATE_CREATE_NO_OVERWRITE

public static final int NPKI_CERTIFICATE_CREATE_NO_OVERWRITE
This flag will cause createDefaultCertificates to create the default certificates if they do not exit, but none of the current default certificates will be overwritten.

NOTE: NOTE: this flag should not be 'or'ed with NPKI_CERTIFICATE_CREATE_FORCE or NPKI_CERTIFICATE_CREATE_CA_CHANGE_FORCE.

See Also:
Constant Field Values

NPKI_CERTIFICATE_CREATE_CA_CHANGE_FORCE

public static final int NPKI_CERTIFICATE_CREATE_CA_CHANGE_FORCE
This flag will cause createDefaultCertificates to force the re-creation of the default server certificates if the Trusted Root certificate for the default server certificate objects (KMOs) are not the same as the Organizational CA's root certificate. This flag adds this condition to the list of possible reasons why a certificate would be replaced. See NPKI_CERTIFICATE_CREATE_NORMAL above.

NOTE: NOTE: this flag should not be 'or'ed with NPKI_CERTIFICATE_CREATE_FORCE or NPKI_CERTIFICATE_CREATE_NO_OVERWRITE.

See Also:
Constant Field Values

NPKI_DONT_QUERY_IP_AND_DNS

public static final int NPKI_DONT_QUERY_IP_AND_DNS
Use this flag if you do not want createDefaultCertificates to queary WinSock/DNS for the default IP and DNS info.

See Also:
Constant Field Values

NPKI_DONT_REPLACE_SSL_IP

public static final int NPKI_DONT_REPLACE_SSL_IP
Use this flag if you do not want createDefaultCertificates to overwrite the 'SSL CertificateIP' KMO.

See Also:
Constant Field Values

NPKI_DONT_REPLACE_SSL_DNS

public static final int NPKI_DONT_REPLACE_SSL_DNS
Use this flag if you do not want createDefaultCertificates to overwrite the 'SSL CertificateDNS' KMO.

See Also:
Constant Field Values

NPKI_CA_RIGHTS_DEFAULT

public static final int NPKI_CA_RIGHTS_DEFAULT
Specifies the system default Security Rights Level.

(NPKI_CA_RIGHTS_DEFAULT = 0x0000)

See Also:
Constant Field Values

NPKI_CA_RIGHTS_READ_NCP

public static final int NPKI_CA_RIGHTS_READ_NCP
Specifies that the 'Security Rights Level' only requires read (R) rights for any object to opereate the Certificate Authority.

(NPKI_CA_RIGHTS_READ_NCP = 0x0001)

See Also:
Constant Field Values

NPKI_CA_RIGHTS_WRITE_ALL

public static final int NPKI_CA_RIGHTS_WRITE_ALL
Specifies that the 'Security Rights Level' requires Write (W) rights for all objects to opereate the Certificate Authority.

(NPKI_CA_RIGHTS_WRITE_ALL = 0x0002)

See Also:
Constant Field Values

NPKI_CA_RIGHTS_SELF_PROVISION_SERVER

public static final int NPKI_CA_RIGHTS_SELF_PROVISION_SERVER
Specifies that the 'Security Rights Level' allows servers to create their own certificates, without specific rights to the Certificate Authority, provided that the certificates encode a subject name that is consistant with the server's IP Address, DNS Name or eDirectory identity.

(NPKI_CA_RIGHTS_SELF_PROVISION_SERVER = 0x0004)

See Also:
Constant Field Values

NPKI_CA_RIGHTS_SELF_PROVISION_USER

public static final int NPKI_CA_RIGHTS_SELF_PROVISION_USER
Specifies that the 'Security Rights Level' allows users to create their own certificates, without specific rights to the Certificate Authority, provided that the certificates encode a subject name that is consistant with the user's eDirectory identity.

(NPKI_CA_RIGHTS_SELF_PROVISION_USER = 0x0008)

See Also:
Constant Field Values

NPKI_CA_RIGHTS_ISSUE_CRL_ALL

public static final int NPKI_CA_RIGHTS_ISSUE_CRL_ALL
Specifies that the 'Security Rights Level' allows any authenticated eDirectory user to issue an emergency CRL without specific rights to the CRL Configuration object.

(NPKI_CA_RIGHTS_ISSUE_CRL_ALL = 0x0010)

See Also:
Constant Field Values

NPKI_CA_CHANGE_HEALTH_CHECK_FORCE

public static final int NPKI_CA_CHANGE_HEALTH_CHECK_FORCE
Use this value to set the 'Security Rights Level' to specify that the PKI Health Check code should force the re-creation of the default server certificates if the Trusted Root certificate for the default server certificate objects (KMOs) are not the same as the Organizational CA's root certificate. Note that for this value to be meaningful, it must be used in conjuction with the NPKI_CA_RIGHTS_SELF_PROVISION_SERVER value.

(NPKI_CA_CHANGE_HEALTH_CHECK_FORCE = 0x0020)

See Also:
Constant Field Values
Constructor Detail

NPKIAPI

public NPKIAPI()
        throws NPKI_Exception
Establishes methods and protocols to implement a CA (CA) that issues, stores, and manages digital certificates. This API can help you use the functionality of Novell eDirectory to further enhance or customize your security solutions and easily build on the certificates issued by Novell Certificate Server without re-writing your own technology.

NOTE: Novell Certificate Server requires the cryptography services of Novell International Cryptographic Infrastructure (NICI). NICI is the underlying cryptographic infrastructure that provides the cryptography for Novell Certificate Server and other Novell applications. Novell Certificate Server will not function if cryptography services are not fully installed.

NICI availability and cryptography strength is restricted if your network is located in an entity listed on the U.S. Government Restricted Party List or in a country with import controls on cryptography products or technologies.

Throws:
NPKI_Exception - Returns 0 if successful, or an eDirectory or PKI error code if not successful.
Method Detail

createContext

public void createContext()
                   throws NPKI_Exception
Creates a new PKI context structure and initializes it with default values.

Throws:
NPKI_Exception - If an eDirectory, NICI or PKI error occurs.

freeContext

public void freeContext()
                 throws NPKI_Exception
Frees a previously allocated NPKIAPI context and all associated memory.

Throws:
NPKI_Exception - If a PKI error occurs.

setTreeName

public void setTreeName(java.lang.String treeName)
                 throws NPKI_Exception
Sets the specified tree name into the context.

Parameters:
treeName - Specifies the tree name. This must be a valid eDirectory tree.
Throws:
NPKI_Exception - If an eDirectory or PKI error occurs.
See Also:
dsLogin

setDefaultDSContactServerDN

public void setDefaultDSContactServerDN(java.lang.String serverDN)
                                 throws NPKI_Exception
Sets the fully distinguished name of the Default eDir Contact Server. This is the server which the API will try to use when making modifications to eDirectory.

Parameters:
serverDN - The fully distinguished name of the server.
Throws:
NPKI_Exception - If an eDirectory or PKI error occurs.

getDefaultDSContactServerDN

public java.lang.String getDefaultDSContactServerDN()
                                             throws NPKI_Exception
Retrieves the fully distinguished name of the default eDirectory contact server; the server that the API uses when making modifications to eDirectory.

Returns:
The fully distinguished name of the server.
Throws:
NPKI_Exception - If an eDirectory or PKI error occurs.

dsLogin

public void dsLogin(java.lang.String objectDN,
                    java.lang.String password)
             throws NPKI_Exception
Performs all authentication operations needed to establish a client's connection to a network.

Parameters:
objectDN - Specifies the fully distinguished name of the object logging in to the network.
password - Specifies the object's password.
Throws:
NPKI_Exception - If an eDirectory or PKI error occurs.
See Also:
dsLogout, setTreeName

setIdentity

public void setIdentity(int idContext)
                 throws NPKI_Exception
NPKI_Exception

dsLogout

public void dsLogout()
              throws NPKI_Exception
Terminates an object's connection to the network.

Throws:
NPKI_Exception - If an eDirectory or PKI error occurs.
See Also:
dsLogin, setTreeName

dsConnectToReferral

public void dsConnectToReferral(byte[] referral)
                         throws NPKI_Exception
NPKI_Exception

deleteDSObject

public void deleteDSObject(java.lang.String odn)
                    throws NPKI_Exception
Can be used to delete any eDirectory object.

Parameters:
odn - Specifies the fully distinguished name of the eDirectory object to be deleted.
Throws:
NPKI_Exception - If an eDirectory error occurs.

findKeyGenServersForUser

public int findKeyGenServersForUser(java.lang.String nameContextDN)
                             throws NPKI_Exception
Finds all servers that can be used to generate a public/private key pair for users which reside in the specified name context.

The requriement for a server to generate a key pair for a user are:

findKeyGenServersForUser finds all of the servers that meet the first requirement. A Call to getServerInfo can be made to determine if the selected server meets the second requirement.

After a successful call to findKeyGenServersForUser, the server names can be accessed by calling serverNames.

Parameters:
nameContextDN - Specifies the eDirectory fully distinguished name context of the user(s) for which you wish to find a key generation server. This must be a valid eDirectory container in the current tree.
Returns:
The number of servers.
Throws:
NPKI_Exception - If an eDirectory or PKI error occurs.
See Also:
serverNames

findServersInContext

public int findServersInContext(java.lang.String nameContextDN)
                         throws NPKI_Exception
Finds all of the NCP servers in the name context supplied. After a successfull call, the server names can be accessed be calling serverNames.

Parameters:
nameContextDN - Specifes the eDirectory fully distinguished name for which you want to find an NCP server. This must be a valid eDirectory container in the current tree.
Returns:
Number of NCP servers in the specified context.
Throws:
NPKI_Exception - If an eDirectory or PKI error occurs.
See Also:
serverNames

serverNames

public void serverNames(int index,
                        java.lang.String[] serverDN,
                        java.lang.String[] serverName)
                 throws NPKI_Exception
Obtains the specified eDirectory server's leaf name and fully distinguished name.

Parameters:
index - Specifies which server name is to be returned.
    NOTE:index is 0 based.
serverDN - Returns the eDirectory fully distinguished name of the server.
serverName - Returns the leaf name of the server.
Throws:
NPKI_Exception - If an eDirectory or PKI error occurs.

findOrganizationalCA

public java.lang.String findOrganizationalCA()
                                      throws NPKI_Exception
Finds the name of the Certificate Authority (CA) for the current tree.

Returns:
The fully distinguished name of the CA.
Throws:
NPKI_Exception - If an eDirectory or PKI error occurs.

readSecurityRightsLevel

public void readSecurityRightsLevel(java.lang.String objectDN,
                                    java.lang.Integer securityRightsLevel)
                             throws NPKI_Exception
Returns the value of the Security Rights Level attribute for the specified CA (Certificate Authority). The currently support values are:
  • NPKI_CA_RIGHTS_DEFAULT
  • NPKI_CA_RIGHTS_READ_NCP
  • NPKI_CA_RIGHTS_WRITE_ALL
  • NPKI_CA_RIGHTS_SELF_PROVISION_SERVER
  • NPKI_CA_RIGHTS_SELF_PROVISION_USER
  • NPKI_CA_RIGHTS_ISSUE_CRL_ALL

    Parameters:
    objectDN - (IN) Specifies the Certificate Authority's fully distinguished name.
    securityRightsLevel - (OUT) Returns the value of the Security Rights Level attribute.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    findOrganizationalCA, setSecurityRightsLevel

  • setSecurityRightsLevel

    public void setSecurityRightsLevel(java.lang.String objectDN,
                                       int securityRightsLevel)
                                throws NPKI_Exception
    Set the value of the Security Rights Level attribute for the specified CA (Certificate Authority). The currently support values are:
  • NPKI_CA_RIGHTS_DEFAULT
  • NPKI_CA_RIGHTS_READ_NCP
  • NPKI_CA_RIGHTS_WRITE_ALL
  • NPKI_CA_RIGHTS_SELF_PROVISION_SERVER
  • NPKI_CA_RIGHTS_SELF_PROVISION_USER
  • NPKI_CA_RIGHTS_ISSUE_CRL_ALL

    Parameters:
    objectDN - (IN) Specifies the Certificate Authority's fully distinguished name.
    securityRightsLevel - (IN) Specifies the value of the Security Rights Level attribute.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    findOrganizationalCA, readSecurityRightsLevel

  • getCAInfo

    public void getCAInfo(java.lang.String objectDN,
                          java.lang.Integer numberOfCRLConfigurations)
                   throws NPKI_Exception
    Returns infomation about the specified CA (Certificate Authority) specifically how many CRL configuration are assocated with the CA. After a successful call, a call to cRLConfigurationDN can be made to retieve information about any CRL Configurations associated with the CA.

    Parameters:
    objectDN - (IN) Specifies the Certificate Authority's fully distinguished name.
    numberOfCRLConfigurations - (OUT) Returns the number of CRL Configurations for the CA.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    cRLConfigurationDN, findOrganizationalCA

    cRLConfigurationDN

    public void cRLConfigurationDN(int index,
                                   java.lang.Integer objectFlags,
                                   java.lang.String[] objectDN,
                                   java.lang.String[] data)
                            throws NPKI_Exception
    Returns infomation about the specified Certificate Authority (CA), specifically how many CRL configurations are assocated with the CA. A successful call to getCAInfo must be made prior to calling this routine. Configurations associated with the CA.

    Parameters:
    index - (IN) Specifies which CRL Configuration DN is to be returned.
      NOTE: index is 0 based; is used to denote which CRL configuration is the default one.
    objectFlags - (OUT) The object flags field for the specified CRL Configuration.
    objectDN - (OUT) Returns the fully distinguished name of the specified CRL Configuration object.
    data - (OUT) Returns any special data associated with the CRL Configuration object.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    getCAInfo, findOrganizationalCA

    getServerUTCTime

    public int getServerUTCTime(java.lang.String serverDN)
                         throws NPKI_Exception
    Returns the time according to UTC (Universal Time Coordinated) on the server whose eDirectory fully distinguished name is specified.

    Parameters:
    serverDN - Specifies the eDirectory Server's fully distinguished name. This must be a valid eDirectory server in the current tree.
    Returns:
    The server's current UTC time, represented as the number of seconds since 00:00:00 UTC January 1, 1970.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    getServerInfo

    getHostServerDN

    public java.lang.String getHostServerDN(java.lang.String objectDN)
                                     throws NPKI_Exception
    Reads the eDirectory attribute A_HOST_SERVER of objectDN and returns the value in serverDN. The eDirectory A_HOST_SERVER attribute is used on PKI and SAS objects to identifiy which server hosts the object (or service).

    Parameters:
    objectDN - (IN) Specifies the fully distinguished name of the object being read. This must be a valid eDirectory object name.
    Returns:
    The eDirectory Server's fully distinguished name. This is a valid eDirectory object name.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    createServerCertificate, getServerInfo, userCertInfo

    getServerCertificateStatus

    public int getServerCertificateStatus(java.lang.String serverDN,
                                          java.lang.String certificateName)
                                   throws NPKI_Exception
    Determines the status of the server certificate.

    Parameters:
    serverDN - (IN) Specifies the fully distinguished name of the eDirectory server. This must be a valid eDirectory server in the current tree.
    certificateName - (IN) Specifies the certificate name that you want to get information about. This must be a valid certificate for the specified server.
    Returns:
    The status of the server certificate. The possible server certificate status are:
  • KMO_EMPTY
  • KMO_KEY_PAIR_PRESENT
  • KMO_TRUSTED_ROOT_PRESENT
  • KMO_CERTIFICATE_PRESENT
  • KMO_CERTIFICATE_INVALID
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    createServerCertificate, findServerCertificateNames, getCACertificates, serverCertificateName, storeServerCertificatesFromCertificateList, storeServerCertificates

  • getSAServiceName

    public java.lang.String getSAServiceName(java.lang.String serverDN)
                                      throws NPKI_Exception
    Reads the SAS:Service attribute of serverDN to get the Secure Authentication Service (SAS) service name of the specified server object.

    Parameters:
    serverDN - (IN) Specifies the eDirectory server for which you want to get the SAS service associated name. This must be a valid eDirectory server in the current tree with SAS installed.
    Returns:
    Returns the SAS service name.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.

    getServerInfo

    public void getServerInfo(java.lang.String serverDN,
                              int flags,
                              java.lang.Integer keyGenerationAlgorithms,
                              java.lang.Integer signingAlgorithms,
                              java.lang.Integer maxValidFromTime,
                              java.lang.Integer maxValidToTime,
                              java.lang.Integer caOperational,
                              java.lang.Integer pathLength,
                              java.lang.Integer healthCheckCcode,
                              java.lang.Integer serverVersion)
                       throws NPKI_Exception
    Opens a connection to the specified server and sends a PKI ping NCP to determine supported values for the server.

    Parameters:
    serverDN - (IN) Specifies the eDirectory server's fully distinguished name. This must be a valid eDirectory server in the current tree.
    flags - (IN) Specifies which information the ping requests. The three possible flags and the corresponding information acquired are listed below:
    • PKI_CA_INFO - Setting the flags field to PKI_CA_INFO will ensure that the proper information for creating or using a CA is retrieved.
    • PKI_SERVER_INFO - Setting the flags field to PKI_SERVER_INFO will ensure that the proper information for creating a server certificate is retrieved.
    • PKI_USER_INFO - Setting the flags field to PKI_USER_INFO will ensure that the proper information for creating a user certificate is retrieved.
    • PKI_SERVER_HEALTH_CHECK - Setting the flags field to PKI_SERVER_HEALTH_CHECK will cause the PKI Health Check to run on the server.
    keyGenerationAlgorithms - (OUT) Returns a bit mask indicating which key generation algorithms are available on the server. For each of the algorithms, a call to getAlgorithmInfo can be made to determine the maximum key size supported. (This key generation algorithm is used as an argument in the getAlgorithmInfo method to identify the maximum supported key sizes for key-generation). Currently only the PKI_RSA_ALGORITHM key generation algorithm is supported.
    signingAlgorithms - (OUT) Returns a bit mask indicating which signing algorithms are available on the server. The currently supported signing algorithms are listed below:
    maxValidFromTime - (OUT) Returns the maximum starting validity period, represented as the number of seconds since 00:00:00 UTC January 1, 1970.
    maxValidToTime - (OUT) Returns the maximum ending validity period, represented as the number of seconds since 00:00:00 UTC January 1, 1970.
    caOperational - (OUT) Returns a bit mask indicating whether a CA (CA) is installed and operational on the server specified in the call to getServerInfo. The current possible bit values are as follows:
    • PKI_NO_CA_PRESENT - The server does not host a CA.
    • PKI_TREE_CA_PRESENT - The server hosts the organizational CA.
    pathLength - (OUT) Indicates the path length of the CA certificates. See the X.509 basic constraints extension section for more details.
      NOTE:This parameter is valid only when flags is set to PKI_CA_INFO.
    healthCheckCcode - (OUT) Returns the completion code from the PKI Health Check when the flags field is set to PKI_SERVER_HEALTH_CHECK.
    serverVersion - (OUT) This returns the version of the PKI.NLM, PKI.DLM or pkiserver.so running on the server specified in the the serverDN parameter.
    Throws:
    NPKI_Exception - Throws an NPKI_Exception If an eDirectory, NICI or PKI error occurs.
    See Also:
    getAlgorithmInfo

    getAlgorithmInfo

    public void getAlgorithmInfo(int algorithm,
                                 java.lang.Integer maxKeyEncryptKeySize,
                                 java.lang.Integer maxSigningKeySize,
                                 java.lang.Integer maxDataEncryptKeySize)
                          throws NPKI_Exception
    Returns the supported key sizes for the specified algorithm. A successfull call to getServerInfo must have been made immediately before calling this method.

    Parameters:
    algorithm - (IN) Specifies a bit mask indicating which algorithm information to return. The correct algorithm(s) to use are the key-generation algorithm(s) (not the signing algorithms) returned from getServerInfo. Currently only the PKI_RSA_ALGORITHM key generation algorithm is supported.
    maxKeyEncryptKeySize - (OUT) Returns the maximum key size supported for use as a key encrypting key.
    maxSigningKeySize - (OUT) Returns the maximum key size supported for use as a key signing key.
    maxDataEncryptKeySize - (OUT) Returns the maximum key size supported for use as a data encrypting key.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    getServerInfo

    generateCertificateFromCSR

    public void generateCertificateFromCSR(java.lang.String caServerDN,
                                           byte[] extCSR,
                                           java.lang.String subjectDN,
                                           int signatureAlgorithm,
                                           int dateFlags,
                                           int validFrom,
                                           int validTo,
                                           NPKI_Extension keyUsage,
                                           NPKI_Extension basicConstraints,
                                           NPKI_ExtAltNames altNames,
                                           NPKI_Extension NovellAttr,
                                           NPKI_ASN1_Extensions extensions)
                                    throws NPKI_Exception
    Accepts a PKCS #10 Certificate Signing Request (CSR) from an external source and sends the request to caServerDN, which then creates and returns an X.509 certificate.

    Parameters:
    caServerDN - (IN) Specifies the eDirectory fully distinguished name of the server that hosts the CA. This must be a valid eDirectory server in the current tree.
    extCSR - (IN) Specifies the PKCS #10 CSR that is to be sent to the CA in order to create the X.509 certificate.
    subjectDN - (IN) Not supported in this release. Specifies a subject name to use in the certificate, rather than using the subject name in the CSR. At this time, this parameter will be ignored regardless of the given value.
    signatureAlgorithm - (IN) Not supported in this release. Specifies a signature algorithm to use to sign the certificate, rather than using the signature algorithm in the CSR. A call to getServerInfo can be made to determine which signature algorithms are supported. At this time, this parameter will be ignored regardless of the given value.
    dateFlags - (IN) Specifies whether dates have either a two-digit year or a four-digit year. For this release, this should be set to DEFAULT_YEAR_ENCODING.
    validFrom - (IN) Specifies the beginning of the period of validity, represented as the number of seconds since 00:00:00 UTC Jan 1, 1970, or 0xFFFFFFFF to represent the current time on the server.
      NOTE: A call to getServerInfo can be made to determine the supported validity period available on the server.
    validTo - (IN) Specifies the end of the period of validity, represented as the number of seconds since 00:00:00 UTC Jan 1, 1970, or 0xFFFFFFFF to represent the greatest validity period available on the server.
      NOTE: A call to getServerInfo can be made to determine the supported validity period available on the server.
    keyUsage - (IN) Specifies the X.509 key usage extension. See X.509 Extensions and Key Usage Extension sections for more details.
      NOTE: The Key Usage extension is not included in the certificate if null is passed into this extension.
    basicConstraints - Specifies the X.509 basic constraints extension. See X.509 Extensions and Basic Constraints Extension sections for more details.
      NOTE: The Basic Constraints extension is not included in the certificate if null is passed into this field.
    altNames - (IN) Specifies the X.509 subject alternative name extension. See the X.509 Extensions and the Subject Alternative Names Extension sections for more details.
      NOTE: The Subject Alternative Names extension is not included in the certificate if null is passed into this field.
    NovellAttr - (IN) Specifies the Novell Security Attributes extension. See the sections X.509 Extensions and Novell Security Attributes Extension sections for more details.
      NOTE: A null passed into this field results in the default Novell Security Attributes extension for a key pair created outside of the system.
    extensions - (IN) Specifies any generic ASN.1 encoded extensions to add to the certificate.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    certInfo, getServerInfo

    dsObjectExists

    public boolean dsObjectExists(java.lang.String objectDN)
                           throws NPKI_Exception
    Determines whether or not the eDirectory object exists.

    Parameters:
    objectDN - (IN) The fully distinguished name of the object to be checked.
    Returns:
    True if object exists, false if it does not.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.

    createServerCertificate

    public void createServerCertificate(java.lang.String keyGenServerDN,
                                        java.lang.String signServerDN,
                                        java.lang.String certificateName,
                                        int keyType,
                                        int keySize,
                                        java.lang.String subjectDN,
                                        int signatureAlgorithm,
                                        int dateFlags,
                                        int validFrom,
                                        int validTo,
                                        int publicKeyFlags,
                                        int privateKeyFlags,
                                        NPKI_Extension keyUsage,
                                        NPKI_Extension basicConstraints,
                                        NPKI_ExtAltNames altNames,
                                        NPKI_Extension NovellAttr,
                                        NPKI_ASN1_Extensions extensions)
                                 throws NPKI_Exception
    Creates a server key pair as well as the corresponding X.509 certificate.

    When calling createServerCertificate, three different modes can be used:

    Depending on the mode selected, different NCPs will be sent and different results will occur.

    Parameters:
    keyGenServerDN - (IN) Specifies the eDirectory FDN of the server for which an X.509 certificate will be generated.
    signServerDN - (IN) Specifies the eDirectory FDN of the server that hosts the CA that will be used to sign the X.509 certificate.
    certificateName - (IN) Specifies the certificate name to be used to identify the key pair and corresponding certificate.
    keyType - (IN) Specifies the type of key that is to be generated. For this release, the only supported key type is RSA or a value of PKI_RSA_ALGORITHM.
    keySize - (IN) Specifies the requested size of the key to be generated. If the key size requested could not be generated, an exception will be thrown and no key will be generated. A call to getServerInfo with flags set to PKI_SERVER_INFO followed by a call to getAlgorithmInfo can be made to get the supported key sizes on this server. The intersection of the key sizes and algorithms supported by the keyGenServerDN and the signServerDN are the valid key sizes and algorithms.
    subjectDN - (IN) Specifies the subjectDN. This is the name to be encoded in the subject field in the X.509 certificate. The subject field identifies the entity associated with the public/private key pair. (For more information see RFC 2459 Section 4.1.2.6.)
    signatureAlgorithm - (IN) Specifies which signature algorithm will be used to sign the certificate. A call to getServerInfo can be made to determine which signature algorithms are supported.
    dateFlags - (IN) Specifies whether dates have either a two-digit year or a four-digit year. For this release, this should be set to DEFAULT_YEAR_ENCODING.
    validFrom - (IN) Specifies the beginning of the period of validity, represented as the number of seconds since 00:00:00 UTC Jan 1, 1970, or 0xFFFFFFFF to represent the current time on the server.
      NOTE: A call to getServerInfo can be made to determine the validity period supported by the server.
    validTo - (IN) Specifies the end of the period of validity, represented as the number of seconds since 00:00:00 UTC Jan 1, 1970, or 0xFFFFFFFF to represent the greatest validity period available on the server.
      NOTE: A call to getServerInfo can be made to determine the validity period supported by the server.
    publicKeyFlags - (IN) Specifies the public key options to use when creating the key pair. Use one of the following flags, together with any optional public key flags:
    • PUBLIC_KEY_SINGLE_SERVER - Used when the signing server is the same as the key generation server.
        NOTE: This is only possible when the key generation server also hosts a CA.
    • PUBLIC_KEY_TWO_SERVER - Used when the signing server is not the same as the key generation server.
    • PUBLIC_KEY_EXTERNAL_CA - Used when an external Certificate Authority will sign the certificate.
    privateKeyFlags - (IN) Specifies the private key options to use when creating the key pair. For this release use the define PRIVATE_KEY.
      NOTE: There currently is one optional Private Key Flag PRIVATE_KEY_EXTRACTABLE. To use this optional flag, it must be OR'ed with the value PRIVATE_KEY to enable extraction of the server's private key into PKCS12 file (PKCS12 is the standard format for extracting and importing keys). When using the PRIVATE_KEY_EXTRACTABLE flag and including the Novell Security Attributes Extension, it's necessary to bitwise-OR the extractable option (that is, NOVELL_EXTENSION_EXTRACTABLE_KEY along with the appropriate Novell attribute NOVELL_EXTENSION_SERVER_DEFAULT to the flags field in the Novell Security Attributes Extension.
    keyUsage - (IN) Specifies the X.509 key usage extension. See the X.509 Extensions and the Key Usage Extension sections for more details.
      NOTE: The Key Usage extension is not included in the certificate if null is passed in this field.
    basicConstraints - Specifies the X.509 basic constraints extension. See X.509 Extensions and Basic Constraints Extension sections for more details.
      NOTE: The Basic Constraints extension is not included in the certificate if null is passed in this field.
    altNames - (IN) Specifies the X.509 subject alternative name extension. See the X.509 Extensions and the Subject Alternative Names Extension sections for more details.
      NOTE: The Subject Alternative Names extension is not included in the certificate if null is passed in this field.
    NovellAttr - (IN) Specifies the Novell Security Attributes extension. See the sections X.509 Extensions and Novell Security Attributes Extension sections for more details.
      NOTE: A null passed in this field results in the default Novell Security Attributes extension for a server certificate being included in the certificate.
    extensions - (IN) Specifies any generic ASN.1 encoded extensions to add to the certificate.
    Throws:
    NPKI_Exception - If an eDirectory, NICI or PKI error occurs.
    See Also:
    getServerCertificateStatus, getCACertificates, getServerInfo, storeServerCertificates, certificateList, storeServerCertificatesFromCertificateList, csrInfo, certInfo, findServerCertificateNames, serverCertificateName

    csrInfo

    public byte[] csrInfo()
                   throws NPKI_Exception
    Returns a byte array containing the PKCS #10 Certificate Signing Request (CSR).

    A successful call to createServerCertificate (using the external CA method) must be made just prior to calling this routine.

    Returns:
    The PKCS #10 CSR.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    createServerCertificate

    certInfo

    public byte[] certInfo()
                    throws NPKI_Exception
    Use to retrieve a newly created X.509 certificate.

    A successful call to either generateCertificateFromCSR or createServerCertificate must have been made just prior to calling this routine.

    Returns:
    The X.509 certificate.
    Throws:
    NPKI_Exception - If a PKI error occurs.
    See Also:
    generateCertificateFromCSR, createServerCertificate

    createUserCertificate

    public void createUserCertificate(java.lang.String keyGenServerDN,
                                      java.lang.String signServerDN,
                                      java.lang.String userDN,
                                      java.lang.String nickName,
                                      int keyType,
                                      int keySize,
                                      java.lang.String subjectDN,
                                      int signatureAlgorithm,
                                      int dateFlags,
                                      int validFrom,
                                      int validTo,
                                      int publicKeyFlags,
                                      int privateKeyFlags,
                                      NPKI_Extension keyUsage,
                                      NPKI_Extension basicConstraints,
                                      NPKI_ExtAltNames altNames,
                                      NPKI_Extension NovellAttr,
                                      NPKI_ASN1_Extensions extensions)
                               throws NPKI_Exception
    Generates a key pair as well as the corresponding X.509 certificate.

    The key pair is stored securely in eDirectory as an attribute on the user's object. The private key is cryptographically wrapped using NICI (Novell International Cryptographic Infrastructure) to protect the key.

    When calling createUserCertificate, three different modes can be used: single server mode, dual server mode, or external mode (external mode is not supported in this release). Depending on the mode selected, different NCPs will be sent and different results will occur.

    The signServerDN must host a CA in the current tree. Calls to findKeyGenServersForUser and getServerInfo can be made to determine which servers meet the requirements to act as a CA for a specified user.

    After a successful call to createUserCertificate, the certificate can be obtained by making a call to userCertInfo using a parameter of 0 in the index field.

    Parameters:
    keyGenServerDN - (IN) Specifies the eDirectory fully distinguished name of the server that will be used to generate the user's key pair.
    signServerDN - (IN) Specifies the eDirectory fully distinguished name of the server that hosts the CA that will be used to generate the X.509 certificate.
    userDN - (IN) Specifies the fully distinguished name of a user object for which a certificate will be generated. This must be a valid eDirectory user object in the current tree.
    nickName - (IN) Specifies the certificate nickname. This name will be used to identify the key pair and associated certificate. This name must be unique for the specified user.
    keyType - (IN) Specifies the type of key that the caller wants to be generated. A call to getServerInfo can be made to get the supported key generation algorithms. For this release, the only supported key type is PKI_RSA_ALGORITHM.
    keySize - (IN) Specifies the requested size of the key to be generated. If the key size requested cannot be generated, an exception will be thrown and no key will be generated. A call to getServerInfo followed by a call to getAlgorithmInfo can be made to get the supported key sizes on this server. The intersection of the key sizes and algorithms supported by the keyGenServerDN and the signServerDN are the valid key sizes and algorithms.
    subjectDN - (IN) Specifies the subjectDN. This is the name to be encoded in the subject field in the X.509 certificate. The subject field identifies the entity associated with the public/private key pair. (For more information see RFC 2459 Section 4.1.2.6.) This field should be null if the subject name (in the user certificate) is to be the user's typed fully distinguished eDirectory name. If a name other than the eDirectory username is desired, then this field must contain that typed fully distinguished name (and publicKeyFlags must include the flag PKI_CUSTOM_SUBJECT_NAME).
    signatureAlgorithm - (IN) Specifies the signature algorithm to use to sign the certificate. To get the supported algorithms, the call getServerInfo must be made. For this release, signatureAlgorithm must be set to one of the following:
    • PKI_SIGN_WITH_RSA_AND_MD2
    • PKI_SIGN_WITH_RSA_AND_MD5
    • PKI_SIGN_WITH_RSA_AND_SHA1
    • PKI_SIGN_WITH_RSA_AND_SHA_256
    • PKI_SIGN_WITH_RSA_AND_SHA_384
    • PKI_SIGN_WITH_RSA_AND_SHA_512
    dateFlags - (IN) Specifies whether dates have either a two-digit year or a four-digit year. For this release, this should be set to DEFAULT_YEAR_ENCODING.
    validFrom - (IN) Specifies the beginning of the period of validity, represented as the number of seconds since 00:00:00 UTC Jan 1, 1970, or 0xFFFFFFFF to represent the current time on the server.
      NOTE: A call to getServerInfo can be made to determine the greatest validity period available on the server.
    validTo - (IN) Specifies the end of the period of validity, represented as the number of seconds since 00:00:00 UTC Jan 1, 1970, or 0xFFFFFFFF to represent the greatest validity period available on the server.
      NOTE: A call to getServerInfo can be made to determine the greatest validity period available on the server.
    publicKeyFlags - (IN) Specifies the public key options to use when creating the key pair. Use one of the following flags, together with any optional public key flags:
    • PUBLIC_KEY_SINGLE_SERVER - Used when the signing server is the same as the key generation server.
        NOTE: This is possible only when the key generation server also hosts a CA.
    • PUBLIC_KEY_TWO_SERVER - Used when the signing server is not the same as the key generation server.
    privateKeyFlags - (IN) Specifies the private key options to use when creating the key pair. For this release use the define PRIVATE_KEY together with any optional private key flags.

    There currently is one Optional Private Key Flag (PRIVATE_KEY_EXTRACTABLE). To use this optional flag, it must be bitwise-OR'ed with the value PRIVATE_KEY to enable extraction of a user's private key into a PKCS12 file (PKCS12 is the standard format to import keys into a browser).

    When using the PRIVATE_KEY_EXTRACTABLE flag and including the Novell Security Attributes Extension, it's necessary to bitwise-OR the extractable option (i.e, NOVELL_EXTENSION_EXTRACTABLE_KEY along with the appropriate Novell attribute (NOVELL_EXTENSION_USER_DEFAULT).

    keyUsage - (IN) Specifies the X.509 key usage extension. See X.509 Extensions and Key Usage Extension sections for more details.
      NOTE: The Key Usage extension is not included in the certificate if null is passed into this extension.
    basicConstraints - Specifies the X.509 basic constraints extension. See X.509 Extensions and Basic Constraints Extension section for more details.
      NOTE: The Basic Constraints extension is not included in the certificate if null is passed into this field.
    altNames - (IN) Specifies the X.509 subject alternative name extension. See X.509 Extensions and Subject Alternative Names Extension section for more details.
      NOTE: The Subject Alternative Names extension is not included in the certificate if null is passed into this field.
    NovellAttr - (IN) Specifies the Novell Security Attributes extension. See the sections X.509 Extensions and Novell Security Attributes Extension sections for more details.
      NOTE: A null passed into this field results in the default Novell Security Attributes for a user certificate being included in the certificate.
    extensions - (IN) Specifies any generic ASN.1 encoded extensions to add to the certificate. See the X.509 Extensions for more details.
    Throws:
    NPKI_Exception - If an eDirectory, NICI or PKI error occurs.
    See Also:
    findUserCertificates, userCertInfo, storeUserCertificate, deleteUserCertificate

    deleteUserCertificate

    public void deleteUserCertificate(java.lang.String userDN,
                                      java.lang.String nickName,
                                      int flags,
                                      byte[] certificate)
                               throws NPKI_Exception
    Deletes a user's certificate.

    The certificate field is used if there is no nickname for the user certificate. This can happen if the certificate was added through LDAP. If the nickname field has a value, then certificate can be null.

    WARNING: Deleting a certificate can have severe consequences such as the inability to read encrypted email or encrypted files.

    Parameters:
    userDN - (IN) Specifies the fully distinguished name of a user object. This must be a valid eDirectory user object in the current tree.
    nickName - (IN) Specifies the certificate nickname. This name is used to identify the key pair and associated certificate. This name must be unique for the specified user.
    flags - (IN) This should currently be set to 0.
    certificate - (IN) Specifies the DER encoded X.509 certificate you wish to be deleted.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    findUserCertificates, createUserCertificate

    readAllNickNames

    public int readAllNickNames(java.lang.String userDN)
                         throws NPKI_Exception
    Reads all of the certificate nicknames for userDN and stores them in context-specific data values.

    Calls to nickName can be made to retrieve each of the nicknames.

    Parameters:
    userDN - (IN) Specifies the eDirectory user's fully distinguished name for which you want to read certificate names. userDN must be a valid user object in the current tree.
    Returns:
    the number of nicknames of certificates for the specified user.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    findUserCertificates, nickName

    nickName

    public java.lang.String nickName(int index)
                              throws NPKI_Exception
    Returns the specified certificate nickname. A successful call to readAllNickNames must be made before calling this routine.

    Parameters:
    index - (IN) Specifies which nickname is to be returned.
      NOTE: index is 0 based.
    Returns:
    The specified Nickname.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    findUserCertificates, readAllNickNames

    storeUserCertificate

    public void storeUserCertificate(java.lang.String userDN,
                                     java.lang.String nickName,
                                     java.lang.String signerDN,
                                     int flags,
                                     byte[] cert,
                                     int vendorID)
                              throws NPKI_Exception
    Stores a certificate on a user object.

    Parameters:
    userDN - (IN) Specifies the fully distinguished name of a user object. This must be a valid eDirectory user object in the current tree.
    nickName - (IN) Specifies the certificate nickname. This name will be used to identify the key pair and associated certificate. This name must be unique for the specified user.
    signerDN - (IN) Specifies the eDirectory fully distinguished name of the object that signed the certificate. If the certificate is an external certificate, signerDN can be set to point to the trusted root object that contains the certificate of the signing CA, or it can be set to the user object.
    flags - (IN) Specifies options when storing user certificates. If the key pair was generated by the Novell Certificate Server and the private key is stored in eDirectory, then the flag PKI_INTERNAL_KEY_PAIR should be used. If the key pair was generated external to the Novell Certificate Server, then the flag PKI_EXTERNAL_KEY_PAIR should be used.
    cert - (IN) Specifies the DER encoded X.509 certificate you want to store. (A null can be passed in this field if a call to createUserCertificate was made just prior, and an error PKI_E_ADD_CERTIFICATE was returned. The flag PKI_INTERNAL_KEY_PAIR must be set when passing a null.)
    vendorID - (IN) Specifies which vendor supplied the certificate. If the flag PKI_INTERNAL_KEY_PAIR is set, then this field is ignored, and the vendorID is set to PKI_VENDOR_NOVELL.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    createUserCertificate, findUserCertificates

    certificateList

    public int certificateList(byte[] certificate,
                               int flags)
                        throws NPKI_Exception
    Stores a certificate (such as, X.509) or set of certificates (such as, PKCS #7) to an internal structure. Each call to certificateList can store, remove, and/or sort the internal certificate chain structure. A subsequent call to storeServerCertificatesFromCertificateList will store the chain of certificates to a Key Material Object (KMO).

    Parameters:
    certificate - (IN) The X.509 certificate or PKCS#7 certificate to be acted upon.
    flags - (IN) Specifies the task to perform on the certificate being passed in. Use one or more of the following flags:
    • PKI_ADD - Used to add a certificate to the certificate list. When using this flag, the field certificate must point to a valid X.509 DER encoded certificate. This flag can be used alone or with PKI_SORT. Using this flag with PKI_DELETE causes an error.
    • PKI_DELETE - Used to remove a certifcate from the certificate list. When using this flag, the field certificate must point to a valid X.509 DER encoded certificate. This flag can be used alone or with PKI_SORT. Using this flag with PKI_ADD causes an error.
    • PKI_CLEAR - Used to remove all the certificates from the certificate list. When using this flag, the field certificate should be set to null. This flag must be used alone.
    • PKI_SORT - Used to sort the certificates in the certificate list. This flag can be used with either PKI_ADD or PKI_DELETE. When used alone, the field certificate should be null. If the certificates in the certificate list do not form a complete chain, the PKI_E_BROKEN_CHAIN exception will be thrown.
    Returns:
    The number of certificates in the certificate list.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.

    storeServerCertificatesFromCertificateList

    public void storeServerCertificatesFromCertificateList(java.lang.String serverDN,
                                                           java.lang.String certificateName,
                                                           int flags,
                                                           int trustedRootIndex)
                                                    throws NPKI_Exception
    Used to store server certificates after a successful call to createServerCertificate.

    Two of the three modes of calling createServerCertificate require subsequent calls to certificateList and storeServerCertificatesFromCertificateList.

    In the two server mode, after successfully calling createServerCertificate, a successful call to getCACertificates should be made to retrieve the CA's self-signed certificate. Call certificateList to add the self-signed certificate to the list. Then call certInfo to retrieve the newly created server certificate. Next call certificateList to add it to the list. Then call storeServerCertificatesFromCertificateList to store the certificates,

    In the external certificate authority mode, calls to certificateList should be made for each of the certificates to store the whole certificate chain from root to leaf. Then a call to storeServerCertificatesFromCertificateList should be made to store the newly formed chain to the KMO.

    Parameters:
    serverDN - (IN) The distinguished name of the server.
    certificateName - (IN) Identifies which server certificate you want to store.
    flags - (IN) Reserved; pass in zero
    trustedRootIndex - (IN) Specifies which certificate will be marked as the trusted root. Use one of the following defines:
    • PKI_ORG_CA_CERTIFICATE - Use the self-signed organizational certificate as the trusted root. This is the most commonly used option. NOTE: This is is the default flag developers typically should use.
    • PKI_NOVELL_CERTIFICATE - Use the Novell Root Certifier. Certificate as the trusted root. (Use this option only if your software understands the Novell Security Attribute.) NOTE: If PKI_NOVELL_CERTIFICATE is used, the developer's relying software must be configured to handle the Novell Security Attributes extensions (see X.509 Extensions).
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    getCACertificates, createServerCertificate, findServerCertificateNames, serverCertificateName

    findUserCertificates

    public int findUserCertificates(java.lang.String userDN,
                                    java.lang.String nickName,
                                    byte[] serialNumber,
                                    int keyType,
                                    int minKeySize,
                                    int maxKeySize,
                                    int searchOnKeyUsage,
                                    short keyUsageValue,
                                    java.lang.String issuerDN,
                                    java.lang.String subjectDN,
                                    int certificateValid,
                                    int vendorID,
                                    int certificateStatus)
                             throws NPKI_Exception
    Finds all of the certificates for the userDN that meets the search criteria, stores the certificates in context specific values, and returns the number of certificates that meet the search criteria.

    Making calls to userCertInfo can access the certificates and their sizes. If nickName is specified, then the certificate matching the nickname is returned (assuming a valid nickname) and all the other search parameters are ignored. For all other cases, the set of certificates will match all of the search criteria. If no search criteria are specified, then all certificates for the user will be available.

    Sample Code: FindUserCerts.java

    Parameters:
    userDN - (IN) Specifies the eDirectory user's fully distinguished name for which you want to find a certificate. userDN must be a valid user object in the current tree.
    nickName - (IN) (Optional) Specifies the certificate nickname that identifies which user certificate is to be read. nickName must be either null or a valid certificate nickname for the specified user.
    serialNumber - (IN) (Optional) Specifies the certificate serial number. serialNumber must be either null or the serial number of a certificate for the specified user.
    keyType - (IN) (Optional) Specifies the algorithm type used to generate the public/private key pair. Currently the only algorithm supported is RSA (see PKI_RSA_ALGORITHM). If keyType is not specified, then it should be set to zero.
    minKeySize - (IN) (Optional) Specifies the minimum key size of the public/private key pair. If minKeySize is not specified, then it should be set to zero.
    maxKeySize - (IN) (Optional) Specifies the maximum key size of the public/private key pair. If maxKeySize is not specified, then it should be set to zero.
    searchOnKeyUsage - (IN) (Optional) Specifies whether to search using the keyUsageValue field. This field is necessary because a value of zero is valid for the keyUsageValue field. searchOnKeyUsage should be set to either TRUE or FALSE.
    keyUsageValue - (IN) (Optional) Specifies the X.509 certificate extension, Key Usage. keyUsage is a bit field, and can either be zero (that is, not present or not specified) or it can be constructed using any valid combination of the following defines:
    issuerDN - (IN) (Optional) Specifies the X.509 typed fully distinguished name of the CA that issued the certificate. If issuerDN is not specified, then it should be set to null.
    subjectDN - (IN) (Optional) Specifies the X.509 typed fully distinguished subject name of the certificate. If subjectDN is not specified, then it should be set to null.
    certificateValid - (IN) (Optional) Specifies a specific date on which the requested certificate will be valid. The date is represented as the number of seconds since 00:00:00 UTC January 1, 1970. If certificateValid is not specified, then it should be set to zero.
    vendorID - (IN) (Optional) Specifies the vendor that issued the certificate. This parameter can be used to narrow the search to certificates supplied by a specific vendor. If vendorID is not specified, then it should be set to zero or PKI_ALL_VENDORS.
    certificateStatus - (IN) (Optional) Specifies the status of the certificates you want to find. This field can be used to narrow the search to certificates that have a specific status. If certificateStatus is not specified, then it should be set to zero.
    Returns:
    Number of user certificates which meet the specified search criteria.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    userCertInfo, createUserCertificate, storeUserCertificate

    userCertInfo

    public byte[] userCertInfo(int index,
                               java.lang.String[] nickName,
                               java.lang.Integer certStatus,
                               java.lang.Integer vendorID)
                        throws NPKI_Exception
    Returns information about a user certificate.

    A successful call to either createUserCertificate or findUserCertificates must have been made just prior to calling this routine.

    Parameters:
    index - (IN) Specifies which certificate is to be returned.
      index is 0 based.
    nickName - (OUT) Returns the certificate nickname. This name is used to identify the key pair and associated certificate. This name must be unique for the specified user.
    certStatus - (OUT) Returns the status of the certificate.
    vendorID - (OUT) Returns the vendor ID associated with the certificate.
    Returns:
    the X.509 certificate.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    createUserCertificate, findUserCertificates

    importUserKey

    public void importUserKey(java.lang.String userDN,
                              java.lang.String nickName,
                              java.lang.String password,
                              int flags,
                              byte[] pfx)
                       throws NPKI_Exception
    Imports a user's private key from a "Personal Information Exchange Syntax" (PFX) format to the specified user. Any and all CA certificates are NOT imported. They should all be imported into the "CN=Trusted Roots.CN=Security" container in order to ensure full compatibility.

    PKI NCP Calls: 0x2222 93 10 Write Key

    Parameters:
    userDN - (IN) Specifies the user's fully distinguished name on which the to store the private key and certificate. This must be a valid user userver in the current tree.
    nickName - (IN) Specifies the nickname of the certificate and private key you want to import.
    password - (IN) Specifies the password used to decrypt the private key and certificate.
    flags - (IN) Specifies options for importing the server key and certificate. There are not currently any defined flags. Pass a Zero value.
    pfx - (IN) The PKCS #12 encoded data to import.
    Throws:
    NPKI_Exception - If an eDirectory, NICI or PKI error occurs.
    See Also:
    exportUserKey, createTrustedRootContainer, findTrustedRootsInContext

    importServerKey

    public void importServerKey(java.lang.String serverDN,
                                java.lang.String certificateName,
                                java.lang.String password,
                                int flags,
                                byte[] pfx)
                         throws NPKI_Exception
    Imports a server's private key and corresonding certificates from a "Personal Information Exchange Syntax" (PFX) format to a Key Material object.

    PKI NCP Calls: 0x2222 93 10 Write Key

    Parameters:
    serverDN - (IN) Specifies the eDirectory server's fully distinguished name. This must be a valid eDirectory server in the current tree.
    certificateName - (IN) Specifies the name of the certificate and private key you want to import. If the KMO corresponding to certificateName does not exist, one will be created.
    password - (IN) Specifies the password used to decrypt the private key and certificate.
    flags - (IN) Specifies options for importing the server key and certificate. The flags currently defined are:
    • PKI_OVERWRITE - Overwrites any information currently associated with this certificate name for the indicated server.
    pfx - (IN) The PKCS #12 encoded data to import.
    Throws:
    NPKI_Exception - If an eDirectory, NICI or PKI error occurs.
    See Also:
    exportServerKey

    importCAKey

    public void importCAKey(java.lang.String hostServerDN,
                            java.lang.String organizationalCAName,
                            java.lang.String password,
                            int flags,
                            byte[] pfx)
                     throws NPKI_Exception
    Imports an organization's certificate authority (CA) private key and corresponding certificate(s) from a "Personal Information Exchange Syntax" (PFX) format (also known as Public Key Cryptography Standards [PKCS] #12) to a CA object.

    NPKI NCP Calls: 0x2222 93 10 Write Key

    Parameters:
    hostServerDN - (IN) Specifies the fully distinguished name of the server that will host the CA.
    organizationalCAName - (IN) Specifies the name of the Organizational CA object. If the CA object does not exist, one will be created.
    password - (IN) Specifies the password used to decrypt the private key and certificate(s).
    flags - (IN) Specifies options for importing the server key and certificate. The flags currently defined are:
    • PKI_OVERWRITE - Overwrites any information currently associated with this certificate name for the indicated server.
    pfx - (IN) The PKCS #12 encoded data to import.
    Throws:
    NPKI_Exception - If an eDirectory, NICI or PKI error occurs.
    See Also:
    exportCAKey

    exportUserKey

    public byte[] exportUserKey(java.lang.String nickname,
                                java.lang.String password,
                                int flags)
                         throws NPKI_Exception
    Exports a private key and the corresponding certificates for the currently logged-in user in "Personal Information Exchange Syntax" (PFX) format.

    The key and certificate are encrypted using the input password as specified in the Public Key Cryptography Standards (PKCS) #12.

    PKI NCP Calls: 0x2222 93 09 Read Key

    Parameters:
    nickname - (IN) Specifies the certificate nickname that identifies which private key and certificates are to be exported. nickname must be a valid certificate nickname for the currently logged-in user in the current tree.
    password - (IN) Specifies the password to use to encrypt the private key and certificate.
    flags - (IN) Specifies options for exporting the user key and certificates. The flags currently defined are:
      PKI_CHAIN_CERTIFICATE - Exports the chain of certificates in the certification path along with the specified user certificate.
    Returns:
    The pfx data containing the encrypted private key and certificates.
    Throws:
    NPKI_Exception - If an eDirectory, NICI or PKI error occurs.

    exportServerKey

    public byte[] exportServerKey(java.lang.String serverDN,
                                  java.lang.String certificateName,
                                  java.lang.String password,
                                  int flags)
                           throws NPKI_Exception
    Exports a server's private key and corresonding certificates in "Personal Information Exchange Syntax" (PFX) format. The key and certificates are encrypted using the input password as specified in the Public Key Cryptography Standards (PKCS) #12.

    PKI NCP Calls: 0x2222 93 09 Read Key

    Parameters:
    serverDN - (IN) Specifies the fully distinguished name of the eDirectory Server whose private key and certificates you want to export. This must be a valid eDirectory server in the current tree.
    certificateName - (IN) Specifies which private key and certificates you want to export. Must be a valid certificate name for the specified server.
    password - (IN) Specifies the password to use to encrypt the private key and certificates.
    flags - (IN) Specifies options for exporting the server key and certificates. The flags currently defined are:
      PKI_CHAIN_CERTIFICATE - Exports the chain of certificates in the certification path along with the specified server certificate.
    Returns:
    The PFX data containing the encrypted private key and certificates.
    Throws:
    NPKI_Exception - If an eDirectory, NICI or PKI error occurs.

    exportCAKey

    public byte[] exportCAKey(java.lang.String organizationalCAName,
                              java.lang.String password,
                              int flags)
                       throws NPKI_Exception
    Exports the CA's private key and corresonding certificates in " Personal Information Exchange Syntax" (PFX) format. The private key and certificates are encrypted using the input password as specified in the Public Key Cryptography Standards (PKCS) #12.

    PKI NCP Calls: 0x2222 93 09 Read Key

    Parameters:
    organizationalCAName - (IN) Specifies the name of the CA object(ex. If your CA is called "Orginizational CA" and it exists in the Security container, this field should be set to "Orginizational CA").This must be a valid eDirectory name of a CA object in the current tree.
    password - (IN) Specifies the password to use to encrypt the private key and certificate.
    flags - (IN) Specifies options for exporting the server key and certificate. The flags currently defined are:
      PKI_CA_KEY_AND_CERTS - Exports the CA self-signed certificate and the chain of certificates in the certification.
    Returns:
    The pfx data containing the encrypted private key and certificates.
    Throws:
    NPKI_Exception - If an eDirectory, NICI or PKI error occurs.
    See Also:
    importCAKey

    KMOExportRead

    public void KMOExportRead(java.lang.String objectDN,
                              java.lang.Integer numberOfValues)
                       throws NPKI_Exception
    Reads the ndspkiKMOExport attribute on the specified SAS:Service object. Use KMOExportValue to acquire the values.

    Parameters:
    objectDN - (IN) Specifies the fully distinguished name of the SAS:Service object to read.
    numberOfValues - (OUT) Returns the number of configured values.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    getSAServiceName, KMOExportValue, KMOExportWrite

    KMOExportValue

    public void KMOExportValue(int index,
                               java.lang.String[] certificateName,
                               java.lang.String[] certificatePath,
                               java.lang.String[] keyPath,
                               java.lang.Integer keyType)
                        throws NPKI_Exception
    Used to get the KMOExport values. A successful call to either KMOExportRead or KMOExportAddValue must be made prior to making this call.

    Parameters:
    index - (IN) Specifies which value is to be returned.
      NOTE:index is 0 based.
    certificateName - (OUT) Returns the certificate name identifing which Server Certificate is to be exported.
    certificatePath - (OUT) Returns the complete file name and path (in UTF8) of the file where the server certificate chain is to be exported.
    keyType - (OUT) Returns the key type that the server private key is to be exported in. The supported key types are:
  • #NPKI_RAW_PRIVATE_KEY_INFO (PKCS#8)
  • #NPKI_RAW_PRIVATE_KEY (PKCS#1)
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    KMOExportRead, KMOExportAddValue, KMOExportClearValue, KMOExportClearAllValues, KMOExportWrite

  • KMOExportAddValue

    public void KMOExportAddValue(java.lang.String certificateName,
                                  java.lang.String certificatePath,
                                  java.lang.String keyPath,
                                  int keyType)
                           throws NPKI_Exception
    Used to add a value to the list of KMOExport values. NOTE: Changes are only stored in the eDirectory SAS:Service object after a successful call to KMOExportWrite.

    Parameters:
    certificateName - (IN) Specifies the certificate name identifing which Server Certificate is to be exported.
    certificatePath - (IN) Specifies the complete file name and path (in UTF8) of the file where the server certificate chain is to be exported.
    keyType - (IN) Specifies the key type that the server private key is to be exported in. The supported key types are:
  • #NPKI_RAW_PRIVATE_KEY_INFO (PKCS#8)
  • #NPKI_RAW_PRIVATE_KEY (PKCS#1)
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    KMOExportRead, KMOExportValue, KMOExportClearValue, KMOExportClearAllValues, KMOExportWrite

  • KMOExportClearValue

    public void KMOExportClearValue(int index)
                             throws NPKI_Exception
    Used to clear a value from the list of KMOExport values. NOTE: Changes are only stored in the eDirectory SAS:Service object after a successful call to KMOExportWrite.

    Parameters:
    index - (IN) Specifies which value is to be cleared.
      NOTE:index is 0 based.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    KMOExportRead, KMOExportValue, KMOExportAddValue, KMOExportClearAllValues, KMOExportWrite

    KMOExportClearAllValues

    public void KMOExportClearAllValues()
                                 throws NPKI_Exception
    Used to clear all values from the list of KMOExport values. NOTE: Changes are only stored in the eDirectory SAS:Service object after a successful call to KMOExportWrite.

    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    KMOExportRead, KMOExportValue, KMOExportAddValue, KMOExportClearValue, KMOExportWrite

    KMOExportWrite

    public void KMOExportWrite(java.lang.String objectDN)
                        throws NPKI_Exception
    Writes the KMOExportValues into the ndspkiKMOExport attribute on the specified SAS:Service object. Use KMOExportAddValue to add values to the list or KMOExportClearValue to remove values from the list.

    Parameters:
    objectDN - (IN) Specifies the fully distinguished name of the SAS:Service object to written to.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    KMOExportRead, KMOExportValue, KMOExportAddValue, KMOExportClearValue, KMOExportClearAllValues

    createOrganizationalCA

    public java.lang.String createOrganizationalCA(java.lang.String serverDN,
                                                   java.lang.String organizationalCAName,
                                                   int keyType,
                                                   int keySize,
                                                   java.lang.String subjectDN,
                                                   int signatureAlgorithm,
                                                   int dateFlags,
                                                   int validFrom,
                                                   int validTo,
                                                   int publicKeyFlags,
                                                   int privateKeyFlags,
                                                   NPKI_Extension keyUsage,
                                                   NPKI_Extension basicConstraints,
                                                   NPKI_ExtAltNames altNames,
                                                   NPKI_Extension NovellAttr,
                                                   NPKI_ASN1_Extensions extensions,
                                                   int retryFlag)
                                            throws NPKI_Exception
    Creates an orgainizational (that is, Tree) certificate authority (CA) object in the Security container if one does not already exist.

    This call gives serverDN supervisor (S) rights to the All_Attributes ACL of the CA object, sets the NDSPKI:Organizational CA DN attribute of the Security container to be the distinguished name of the CA object, and gives [Public] read (R) rights to the NDSPKI:Organizational CA DN attribute of the Security container.

    This call makes the Install CA NCP call to serverDN. This causes PKI services to generate an RSA key pair, create two X.509 certificates (one self-signed and one signed by the server's machine unique key) and store all of this information in the CA object.

    PKI NCP Calls: 0x 2222 92 02 Install CA

    Parameters:
    serverDN - (IN) Specifies the eDirectory Server that will host the organizational CA. This must be a valid eDirectory Server in contextDN.
    organizationalCAName - (IN) Specifies the CA object name.
    keyType - (IN) Specifies the type of key that the caller wants to be generated. For this release, the only supported key type is RSA or a value of PKI_RSA_ALGORITHM.
    keySize - (IN) Specifies the size of the key to be generated. If the key size requested cannot be generated, an exception will be thrown and no key will be generated. A call to getServerInfo with flags set to PKI_CA_INFO followed by a call to getAlgorithmInfo can be made to get the supported key sizes on the server.
    subjectDN - (IN) Specifies the subjectDN. This is the name to be encoded in the subject field in the X.509 certificate. The subject field identifies the entity associated with the public/private key pair. (For more information see RFC 2459 Section 4.1.2.6.)
    signatureAlgorithm - (IN) Specifies the algorithm to use to sign the certificate. A call to getServerInfo can be made to determine which signature algorithms are supported.
    dateFlags - (IN) Specifies whether dates have either a two-digit year or a four-digit year. For this release, this should be set to DEFAULT_YEAR_ENCODING.
    validFrom - (IN) Specifies the beginning of the period of validity, represented as the number of seconds since 00:00:00 UTC Jan 1, 1970, or as 0xFFFFFFFF to represent the current time on the server.
      NOTE: A call to getServerInfo can be made to determine the validity period supported by the server.
    validTo - (IN) Specifies the end of the period of validity, represented as the number of seconds since 00:00:00 UTC Jan 1, 1970, or as 0xFFFFFFFF to represent the greatest validity period available on the server.
      NOTE: A call to getServerInfo can be made to determine the validity period supported by the server.
    publicKeyFlags - (IN) Specifies the public key options to use when creating the key pair. For this release, use the define PUBLIC_KEY_SINGLE_SERVER, together with any optional public key flags.
    privateKeyFlags - (IN) Specifies the private key options to use when creating the key pair. For this release, use the define PRIVATE_KEY.
      NOTE: There currently is one optional Private Key Flag, PRIVATE_KEY_EXTRACTABLE. To use this optional flag, it must be ORed with the value PRIVATE_KEY to enable extraction of the CA's private key into a PKCS #12 file. (PKCS #12 is the standard format for extracting and importing keys). This flag must be used to enable backup of the CA's private key.
    keyUsage - (IN) Specifies the X.509 key usage extension. See the X.509 Extension and the Key Usage Extension sections for more details.
      NOTE: The Key Usage extension is not included in the certificate if null is passed in this field.
    basicConstraints - (IN) Specifies the X.509 basic constraints extension. See the X.509 Extensions and the Basic Constraints Extension sections for more details.
      NOTE: The Basic Constraints extension is not included in the certificate if null is passed in this field.
    altNames - (IN) Specifies the X.509 subject alternative name extension. See the X.509 Extensions and the Subject Alternative Names Extension for more details.
      NOTE: The Subject Alternative Names extension is not included in the certificate if null is passed in this field.
    NovellAttr - (IN) Specifies the Novell Security Attributes extension. See the sections X.509 Extensions and Novell Security Attributes Extension for more details.
      NOTE: A null passed into this field results in the default Novell Security Attributes for a CA being included in the certificate.
    extensions - Specifies any generic ASN.1 encoded extensions to add to the certificate. Pass in a null.
    retryFlag - (IN) Specifies if the call is a retry. When createOrganizationalCA is called, a CA object is created; however eDirectory may take some time to replicate the object. Because of the possibility of replication delay, subsequent calls to createOrganizationalCA may be necessary (for example, if previous calls fail due to replication delay); however, subsequent calls should be made with the retryFlag set to PKI_RETRY so that the system will not try to create a new CA object.
    Returns:
    (OUT) The CA object's distinguished name. The leaf name is supplied by the caller in the field organizationalCAName, and the system concatenates it with the Security container's name to get the CA object's FDN.
    Throws:
    NPKI_Exception - If an eDirectory, NICI or PKI error occurs.
    See Also:
    findOrganizationalCA, getServerUTCTime, getServerInfo, getAlgorithmInfo

    getCRLConfigurationInfo

    public void getCRLConfigurationInfo(java.lang.String objectDN,
                                        java.lang.Integer status,
                                        java.lang.Integer cRLNumber,
                                        java.lang.Integer issueTime,
                                        java.lang.Integer attemptTime,
                                        java.lang.Integer nextIssueTime,
                                        java.lang.Integer intervalUnitType,
                                        java.lang.Integer intervalNumberOfUnits,
                                        java.lang.Integer fileNameSpaceType,
                                        java.lang.String[] fileVolumeDN,
                                        java.lang.String[] fileVolumePath,
                                        java.lang.Integer numberOfCRLDistributionPoints,
                                        java.lang.String[] cLRdistributionPointDN,
                                        java.lang.String[] certificateAuthorityDN)
                                 throws NPKI_Exception
    Reads all CRL Configuration information for the object specified

    Parameters:
    objectDN - (IN) The fully distinguished name of the CRL Configuratin Object
    status - (OUT) Returns the status of the last attempted CRL issuance.
    cRLNumber - (OUT) Returns the CRL number of the last CRL issued.
    issueTime - (OUT) Returns the time the last CRL was issued.
    attemptTime - (OUT) Returns the time of the last attempt to issue a CRL.
    nextIssueTime - (OUT) Returns the next scheduled issue time.
    intervalUnitType - (OUT) Returns the interval unit type (i.e. hour, day, week etc).
    intervalNumberOfUnits - (OUT) Returns the interval number of units.
    fileNameSpaceType - (OUT) Returns the Name Space Type field of the CRL filename.
    fileVolumeDN - (OUT) Returns the Volume DN field of the CRL filename.
    fileVolumePath - (OUT) Returns the Volume Path field of the CRL filename.
    numberOfCRLDistributionPoints - (OUT) Returns the number of CRL Distribution Points. Calls to getCRLDistributionPoint() can be used to retrieve the CRL Distribution Points.
    cLRdistributionPointDN - (OUT) Returns the DN of the CRL Distribution Point object.
    certificateAuthorityDN - (OUT) Returns the DN of the Certificate Authority object.
    Throws:
    NPKI_Exception - Returns 0 if successful, or an NDS, or PKI error code if not successful.
    See Also:
    getCRLDistributionPoint, createCRLConfiguration

    getCRLDistributionPoint

    public void getCRLDistributionPoint(int index,
                                        java.lang.String[] cRLDistributionPoint)
                                 throws NPKI_Exception
    Retrieves the CRL Distribution Point specified

    Parameters:
    index - (IN) Specifies which CRL Distribtion Point to return. NOTE: index is 0 based.
    cRLDistributionPoint - (OUT) Returns the CRL Dristribution Point
    Throws:
    NPKI_Exception - Returns 0 if successful, or an NDS, or PKI error code if not successful.
    See Also:
    getCRLConfigurationInfo

    createPKIContainer

    public void createPKIContainer(int flags,
                                   java.lang.String objectName,
                                   java.lang.String contextDN,
                                   int type,
                                   java.lang.String linkObjectDN)
                            throws NPKI_Exception
    Creates an ndspkiContainer object and optionally links it to linkObjectDN.

    Parameters:
    flags - (IN) No flags are currently defined; pass in NULL.
    objectName - (IN) The name of object to be created.
    contextDN - (IN) The context in which the object will be created.
    type - (IN) (Optional) Specifies which type of PKI container to create. The possible types of containers are listed below:
    linkObjectDN - (IN) (Optional) Specifies which object to create a link on. Currently all links should be created on the Certificate Authority object (ex. "CN=Orgizational CA.CN=Security").
    Throws:
    NPKI_Exception - Returns 0 if successful, or an NDS, or PKI error code if not successful.

    createCRLConfiguration

    public void createCRLConfiguration(int flags,
                                       java.lang.String objectName,
                                       java.lang.String contextDN,
                                       java.lang.String hostServerDN)
                                throws NPKI_Exception
    Creates an ndspkiCRLConfiguration object.

    Parameters:
    flags - (IN) No flags are currently defined; pass in NULL.
    objectName - (IN) The name of object to be created.
    contextDN - (IN) The context in which the object will be created.
    hostServerDN - (IN) The server which will host the CRL generation.
    Throws:
    NPKI_Exception - Returns 0 if successful, or an NDS, or PKI error code if not successful.
    See Also:
    createPKIContainer, getCRLConfigurationInfo, setCRLFileName, setNextIssueTime, setTimeInterval, setDistributionPoints, setCertificateAuthorityDN, setDistributionPointDNList

    setCRLFileName

    public void setCRLFileName(java.lang.String objectDN,
                               int nameSpaceType,
                               java.lang.String volumeDN,
                               java.lang.String volumePath)
                        throws NPKI_Exception
    Sets the CRL filename (ndspkiCRLFilename) attribute on the specified CRLConfiguration object. This attribute specifies where on the file system of the Host server, the CRL file will be written.

    Parameters:
    objectDN - (IN) The fully distinguished name of the CRL Configuratin Object
    nameSpaceType - (IN) The Name Space Type field of the CRL filename. This field is really only relevant on NetWare and the specified name space must be supported on the NetWare volume. On all other platforms pass a zero. The possible name space types are listed below:
    volumeDN - (IN) The Volume DN field of the CRL filename on NetWare. On all other platforms use the DN of the Server object.
    volumePath - (IN) The Volume Path field of the CRL filename.
    Throws:
    NPKI_Exception - Returns 0 if successful, or an NDS, or PKI error code if not successful.
    See Also:
    createCRLConfiguration, getCRLConfigurationInfo

    setNextIssueTime

    public void setNextIssueTime(java.lang.String objectDN,
                                 int nextIssueTime)
                          throws NPKI_Exception
    Sets the CRL next issue time (ndspkiNextIssueTime) attribute on the specified CRLConfiguration object. This attribute specifies the next scheduled CRL issuance time.

    NOTE: After successfully calling setNextIssueTime, a call to issueCRL should be made in order for the changes to take affect immediately. If the call to issueCRL is not made, the changes will not take a affect until the next regurlarly scheduled CRL issuance.

    Parameters:
    objectDN - (IN) The fully distinguished name of the CRL Configuratin Object
    nextIssueTime - (IN) The next issuance time according to UTC, represented as the number of seconds since 00:00:00 UTC January 1, 1970.
    Throws:
    NPKI_Exception - Returns 0 if successful, or an NDS, or PKI error code if not successful.
    See Also:
    createCRLConfiguration, getCRLConfigurationInfo, issueCRL

    setTimeInterval

    public void setTimeInterval(java.lang.String objectDN,
                                int unitType,
                                int numberOfUnits)
                         throws NPKI_Exception
    Sets the CRL issueance time interval (ndspkiTimeInterval) attribute on the specified CRLConfiguration object. This attribute determines how often the CRL is issued.

    NOTE: After successfully calling setTimeInterval, a call to issueCRL should be made in order for the changes to take affect immediately. If the call to issueCRL is not made, the changes will not take a affect until the next regurlarly scheduled CRL issuance.

    Parameters:
    objectDN - (IN) The fully distinguished name of the CRL Configuratin Object
    unitType - (IN) The interval unit type. The possible unit types are listed below:
    numberOfUnits - (IN) The interval number of units.
    Throws:
    NPKI_Exception - Returns 0 if successful, or an NDS, or PKI error code if not successful.
    See Also:
    createCRLConfiguration, getCRLConfigurationInfo, issueCRL

    setDistributionPoints

    public void setDistributionPoints(java.lang.String objectDN,
                                      int flags,
                                      java.lang.String distributionPoint)
                               throws NPKI_Exception
    Sets the CRL Distribution Points (ndspkiDistributionPoints) attribute on the specified CRLConfiguration object.

    Parameters:
    objectDN - (IN) The fully distinguished name of the CRL Configuratin Object
    flags - (IN) Specifies which operation to perform. Use one of the following flags:
    • PKI_ADD - Adds the specified CRL Distribution Point. This flag must be used alone.
    • PKI_DELETE - Deletes the specified CRL Distribution Point. This flag must be used alone.
    • PKI_CLEAR - Clears all CRL Distribution Points. This flag must be used alone.
    distributionPoint - (IN) Specifies the CRL Distribution Point,
    Throws:
    NPKI_Exception - Returns 0 if successful, or an NDS, or PKI error code if not successful.
    See Also:
    createCRLConfiguration, getCRLConfigurationInfo

    setCertificateAuthorityDN

    public void setCertificateAuthorityDN(java.lang.String objectDN,
                                          java.lang.String certificateAuthorityDN)
                                   throws NPKI_Exception
    Sets the Certificate Authority DN (ndspkiCADN) attribute on the specified CRLConfiguration object.

    Parameters:
    objectDN - (IN) The fully distinguished name of the CRL Configuratin Object (ex. "CN=One - Configuration.CN=CRL Container.CN=Security").
    certificateAuthorityDN - (IN) Specifies the DN of the Certificate Authority object (ex. "CN=Organizational CA.CN=Security").
    Throws:
    NPKI_Exception - Returns 0 if successful, or an NDS, or PKI error code if not successful.
    See Also:
    createCRLConfiguration, getCRLConfigurationInfo

    createCRLDistributionPoint

    public void createCRLDistributionPoint(int flags,
                                           java.lang.String objectName,
                                           java.lang.String contextDN,
                                           java.lang.String linkObjectDN)
                                    throws NPKI_Exception
    Creates a cRLDistributionPoint object and optionally links it to linkObjectDN.

    Parameters:
    flags - (IN) No flags are currently defined; pass in NULL.
    objectName - (IN) The name of object to be created.
    contextDN - (IN) The context in which the object will be created.
    linkObjectDN - (IN) (Optional) Specifies which object to create a link on. The link object should be the corresponding CRL Configuration object. NOTE: The linkObjectDN is optional ONLY when the CRL Distribution Point to be created is NOT to be used as part of the Novell Certificate Server.
    Throws:
    NPKI_Exception - Returns 0 if successful, or an NDS, or PKI error code if not successful.
    See Also:
    createPKIContainer, createCRLConfiguration

    setDistributionPointDNList

    public void setDistributionPointDNList(java.lang.String objectDN,
                                           int flags,
                                           int objectFlags,
                                           java.lang.String linkObjectDN,
                                           java.lang.String data)
                                    throws NPKI_Exception
    Adds or deletes a link from the CA object to a CRL Configuration object.

    NOTE: Currently the system only supports one Configuration Object linked to the CA.

    Parameters:
    objectDN - (IN) The fully distinguished name of the CA Object
    flags - (IN) Specifies the task to perform on the attribute. Use one of the following flags:
    • PKI_ADD - Used to add a DN to the list. When using this flag, the field linkObjectDN must point to a valid CRL Configuration object. This flag must be used alone.
    • PKI_DELETE - Used to remove a DN from the list. When using this flag, the field linkObjectDN must point to a valid CRL Configuration object. This flag must be used alone.
    • PKI_CLEAR - Used to remove all the entries from the list. When using this flag, the field linkObjectDN should be set to null. This flag must be used alone.
    objectFlags - (IN) Specifies information about the CRL Configuration object. Currently only one value is valid:
    linkObjectDN - (IN) The fully distinguished name of the CRL Configuratin Object.
    data - (IN) Not currently used.
    Throws:
    NPKI_Exception - Returns 0 if successful, or an NDS, or PKI error code if not successful.
    See Also:
    createCRLConfiguration

    issueCRL

    public void issueCRL(java.lang.String cRLConfiguationDN,
                         int flags)
                  throws NPKI_Exception
    Issues an emergency CRL. The call does not change the date of the next regularly Scheduled CRL.

    PKI NCP Calls: 0x2222 93 16 PKI ISSUE CRL

    Parameters:
    cRLConfiguationDN - (IN) Specifies the CRL configuration object from which the CRL is to be generated.
    flags - (IN) Specifies any flags. Currently no flags are defined; pass in NULL.
    Throws:
    NPKI_Exception - Returns 0 if successful, or an NDS, PKI, or NICI error code if not successful.
    See Also:
    revokeCertificate

    revokeCertificate

    public void revokeCertificate(java.lang.String cRLConfiguationDN,
                                  java.lang.String ndsObject,
                                  byte[] certificate,
                                  int flags,
                                  int reasonCode,
                                  int invalidityDate,
                                  java.lang.String comment,
                                  java.lang.Integer nextIssuanceDate)
                           throws NPKI_Exception
    Revokes the specified certificate. The certificate must have been signed by the Novell Certificate Authority.

    PKI NCP Calls: 0x2222 93 15 PKI Revoke Certificate

    Parameters:
    cRLConfiguationDN - (IN) Specifies the CRL configuration object that will be used to revoke the certificate. This should be the same configuration object that was in use when the certificate was issued.

    NOTE: The X.500 type CRL distribution point encoded in the certificate can be used to determine the correct configuration object (the configuration object is the parent of the CRL object).

    ndsObject - (IN) The the ndsObject which the certificate was created for.
    certificate - (IN) The certificate to be revoked.
    flags - (IN) Specifies any flags. Currently no flags are defined; pass in NULL.
    reasonCode - (IN) Specifies the reason the certificate is being revoked. Possible reasons include:
    • PKI_KEY_COMPROMISED - the certificate's private key has been compromised.
    • PKI_CA_COMPROMISED - the Certificate Authority's private key has been compromised.
    • PKI_AFFILIATION_CHANGED - the subject of the certificate is no longer affilated with the issuer of the certificate.
    • PKI_SUPERSEDED - a new certificate has been issued.
    • PKI_CESSATION_OF_OPERATION - the Certificate Authority is no longer operating.
    • PKI_CERTIFICATE_HOLD - the certificate is temporarily on hold.
    • PKI_UNSPECIFIED - no reason is specified for the revocation.
    invalidityDate - (IN) (Optional) Specifies the date on which it is known or suspected that the certificate became invalid.
    comment - Comment (IN) (Optional) Specifies any additional comments that the revolker wishes to record in the CRL database. The comment will not be put into the CRL.
    nextIssuanceDate - (OUT) Indicates when the CRL is next scheduled to be issued.
    Throws:
    NPKI_Exception - Returns 0 if successful, or an NDS, PKI, or NICI error code if not successful.
    See Also:
    issueCRL

    getServerKMOInfo

    public void getServerKMOInfo(int cacheContext,
                                 java.lang.String serverDN,
                                 java.lang.String certificateName,
                                 int flags,
                                 byte[][] objectCert,
                                 java.lang.Integer numberOfChainCerts,
                                 java.lang.Integer rootCertIndex,
                                 byte[][] wrappedKey,
                                 java.lang.Integer numberOfAdditionalRoots,
                                 byte[][] terisaKeyFile)
                          throws NPKI_Exception
    Reads all KMO information for the KMO specified by certificateName for serverDN and stores the information in context-specific values. It will optionally add all of the information to the NPKIT cache specified by cacheContext.

    Parameters:
    cacheContext - (IN) (Optional) Specifies a context handle to a NPKIT Cache context previously created. The flag PKI_READ_AND_CACHE_DATA must be set in order for the API to put information into the Cache context.
    serverDN - (IN) Specifies the eDirectory Server's fully distinguished name whose KMO infomation you want to get. This must be a valid eDirectory server in the current tree.
    certificateName - (IN) Specifies which server certificate set you want to get.
    flags - (IN) Specifies what is done with the information. The flags currently defined are the following:
    • PKI_READ_DATA - read all of the data.
    • PKI_READ_AND_CACHE_DATA - reads all of the data and adds it to the NPKIT cache context provided the cacheContext is valid.
    objectCert - (OUT) Returns the object certificate for the specified server.
    numberOfChainCerts - (OUT) Returns the number of certificates in the certificate chain. Calls to chainCertInfo can be used to retrieve the certificates in the certificate chain.
    rootCertIndex - (OUT) Returns which certificate in the certificate chain is marked as the root certificate.
    wrappedKey - (OUT) Returns the wrapped private key.
    numberOfAdditionalRoots - (OUT) Returns the number of additional root certificates in the KMO. Calls to additionalRootsInfo can be used to retrieve the additional root certificates.
    terisaKeyFile - (OUT) Returns the Terisa Key File, if it exists.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    findServerCertificateNames, serverCertificateName, chainCertInfo, additionalRootsInfo

    getServerCertificates

    public byte[] getServerCertificates(java.lang.String serverDN,
                                        java.lang.String certificateName,
                                        int flags,
                                        java.lang.Integer numberOfChainCerts,
                                        java.lang.Integer rootCertIndex)
                                 throws NPKI_Exception
    Reads the certificates specified by certificateName for serverDN and stores them in context-specific values. The flags field determines which certificates are read.

    PKI NCP Calls: 0x2222 93 05 PKI Get Certificate

    Parameters:
    serverDN - (IN) Specifies the eDirectory Server's fully distinguished name whose certificates you want to get. This must be a valid eDirectory server in the current tree.
    certificateName - (IN) Specifies which server certificate set you want to get.
    flags - (IN) Specifies which certificates are read and stored. The flags currently defined are the following:
    • PKI_CHAIN_CERTIFICATE - Retrieves the certificate chain.
    • PKI_TRUSTED_ROOT_CERTIFICATE - Retrieves the trusted root certificate.
    • PKI_OBJECT_KEY_CERTIFICATE - Retrieves the object certificate (that is, the certificate for the specified object).
      NOTE: PKI_CHAIN_CERTIFICATE and PKI_TRUSTED_ROOT_CERTIFICATE cannot be combined.
    numberOfChainCerts - (OUT) Returns the number of certificates in the certificate chain. Calls to chainCertInfo can be used to retrieve the certificates in the certificate chain.
    rootCertIndex - (OUT) Returns which certificate in the certificate chain is marked as the root certificate.
    Returns:
    (OUT) Returns either null or the object certificate.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    createServerCertificate, getCACertificates, storeServerCertificatesFromCertificateList, storeServerCertificates, chainCertInfo, findServerCertificateNames, serverCertificateName

    getCACertificates

    public byte[] getCACertificates(java.lang.String objectDN,
                                    int flags,
                                    java.lang.Integer numberOfChainCerts,
                                    java.lang.Integer rootCertIndex)
                             throws NPKI_Exception
    Reads the CA (CA) certificates for objectDN and stores them in context specific values. The flags field determines which certificates are read. A call to chainCertInfo can be made to access the certificates in the chain.

    PKI NCP Calls: 0x2222 93 05 PKI Get Certificate

    Parameters:
    objectDN - (IN) Specifies the fully distinguished name of the object whose CA certificates you want to get. objectDN must be a valid CA object in the current tree.
    flags - (IN) Specifies which certificates are read and stored. The flags currently defined are the following:
    • PKI_CHAIN_CERTIFICATE - Retrieves the certificate chain (that is, the chain rooted in the Novell Certifier CA). Only software that natively understands and processes the Novell Security Attributes Extension should use this chain.
    • PKI_TRUSTED_ROOT_CERTIFICATE - Retrieves the trusted root certificate. Only software that natively understands and processes the Novell Security Attributes Extension should use this certificate.
    • PKI_SELF_SIGNED_CERTIFICATE - Retrieves the self-signed certificate.
    • PKI_OBJECT_KEY_CERTIFICATE - Retrieves the object certificate (that is, the certificate for the specified object). Only software that natively understands and processes the Novell Security Attributes Extension should use this certificate.
      NOTE: PKI_OBJECT_KEY_CERTIFICATE can be combined with any of the other flags, but none of the other flags can be used together at one time. Also, getServerCertificates and getCACertificates use the same internal variables to store results, each call to one of these functions destroys the result of any previous call.
    numberOfChainCerts - (OUT) Returns the number of certificates in the certificate chain.
      NOTE: Calls to chainCertInfo can be made to retrieve the certificates in the certificate chain.
    rootCertIndex - (OUT) Returns which certificate in the certificate chain is marked as the root certificate.
    Returns:
    (OUT) Returns either null, the self-signed certificate or the object certificate.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    chainCertInfo, findOrganizationalCA

    additionalRootsInfo

    public byte[] additionalRootsInfo(int index)
                               throws NPKI_Exception
    Returns a pointer to the specified X.509 additional root certificate, and the size of the certificate.

    A successful call to getServerKMOInfo must have been made prior to calling this routine.

    Parameters:
    index - (IN) Specifies which additional root certificate is to be returned. NOTE: index is 0 based.
    Returns:
    The specified X.509 root certificate.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.

    chainCertInfo

    public byte[] chainCertInfo(int index)
                         throws NPKI_Exception
    Returns a byte array containing the specified X.509 certificate from the certificate chain.

    A successful call to either getCACertificates or getServerCertificates must have been made prior to calling this routine.

    Parameters:
    index - (IN) Indicates which certificate is to be returned.
      NOTE: index is 0 based.
    Returns:
    The speciifed X.509 certificate.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    getCACertificates, getServerCertificates

    storeServerCertificates

    public void storeServerCertificates(java.lang.String serverDN,
                                        java.lang.String certificateName,
                                        int flags,
                                        int trustedRoot,
                                        byte[] certificate)
                                 throws NPKI_Exception
    Used to store server certificates after a successful call to createServerCertificate. This call has been deprecated because it can only handle a chain of two certificates use certificateList and storeServerCertificatesFromCertificateList.

    Two of the three modes of calling createServerCertificate require subsequent calls to storeServerCertificates. In the two server mode, after successfully calling createServerCertificate, a successful call to getCACertificates should be made to retrieve the CA's self signed certificate. Then a call to storeServerCertificates should be made to store the certificates.

    In the external certificate authority mode, two calls to storeServerCertificates should be made. One call should store the certificate chain and the other should store the newly created certificate. The field certificate provides the capability to send in a certificate to be stored.

    PKI NCP Calls: 00x2222 93 07 Store Certificate

    Parameters:
    serverDN - (IN) Specifies the fully distinguished name of the eDirectory server (that is, the server which the certificate(s) are for.) This must be a valid eDirectory server in the current tree.
    certificateName - (IN) Specifies which server certificate you want to store.
    flags - (IN) Specifies which certificates are stored. The flags currently defined are as follows:
      NOTE: The flags PKI_CHAIN_CERTIFICATE, PKI_TRUSTED_ROOT_CERTIFICATE, and PKI_SELF_SIGNED_CERTIFICATE are mutually exclusive. In addition, PKI_OBJECT_KEY_CERTIFICATE and PKI_TRUSTED_ROOT_CERTIFICATE are also mutually exclusive.
    trustedRoot - (IN) Specifies which certificate will be marked as the trusted root. Use one of the following defines:
    • PKI_ORG_CA_CERTIFICATE - Use the self-signed organizational certificate as the trusted root. This is the most commonly used option.
      NOTE: This is is the default flag developers typically should use.
    • PKI_NOVELL_CERTIFICATE - Use the Novell Root Certifier Certificate as the trusted root. (Use this option only if your software can natively understand and process the Novell Security Attribute.)
      If PKI_NOVELL_CERTIFICATE is used, the developer's relying software must be configured to handle the Novell Security Attributes extensions. Also see X.509 Extensions.
    certificate - (IN) (Optional) Specifies a DER encoded X.509 certificate.
      NOTE: If the certificate field is not used, a successful call to getCACertificates must have been made immediately prior to storeServerCertificates.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    getCACertificates, createServerCertificate, findServerCertificateNames, serverCertificateName, certificateList, storeServerCertificatesFromCertificateList

    findServerCertificateNames

    public int findServerCertificateNames(java.lang.String serverDN)
                                   throws NPKI_Exception
    Finds all of the server certificate names for the specified server.

    Calls to serverCertificateName can be made to retrieve the server certificate names.

    Parameters:
    serverDN - (IN) Specifies the eDirectory fully distinguished name of the sever.
    Returns:
    Number of certificatess
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    createServerCertificate, serverCertificateName

    serverCertificateName

    public java.lang.String serverCertificateName(int index)
                                           throws NPKI_Exception
    Returns a server certificate name.

    A successful call to findServerCertificateNames must have been made just prior to calling this routine.

    Parameters:
    index - (IN) Specifies which server certificate name is to be returned.

    NOTE: index is 0 based.

    Returns:
    the Name of server certificate.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    findServerCertificateNames

    getWrappedServerKey

    public byte[] getWrappedServerKey(java.lang.String serverDN,
                                      java.lang.String serverCertificateName)
                               throws NPKI_Exception
    Returns a server private key cryptographically wrapped in the server's key storage key.

    Parameters:
    serverDN - (IN) Specifies the eDirectory fully distinguished server name.
    serverCertificateName - (IN) Specifies which server key to retrieve.
    Returns:
    The wrapped server key.
    Throws:
    NPKI_Exception - If an eDirectory, NICI or PKI error occurs.
    See Also:
    createServerCertificate, findServerCertificateNames, serverCertificateName

    getServerIPAndDNSInfo

    public int getServerIPAndDNSInfo(java.lang.String serverDN)
                              throws NPKI_Exception
    Discovers IP and DNS information about the specified server by querying DNS. Returns the number of IP addresses assigned to the server. To retrieve the details about each of the IP addresses call getServerIPAddress for each of the addresses.

    PKI NCP Calls: 0x2222 93 14 GET IP AND DNS ADDRESSES

    Parameters:
    serverDN - (IN) Specifies the fully distinguished name of the eDirectory Server.
    Returns:
    The number of IP addresses for the server
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    getServerIPAddress, getServerDNSName

    getServerIPAddress

    public byte[] getServerIPAddress(int index,
                                     java.lang.Short ipLength,
                                     java.lang.String[] ipNumber,
                                     java.lang.Short numberOfDNSNames)
                              throws NPKI_Exception
    Retrieves information about the specified IP address.

    The call can only be used after a successful call to getServerIPAndDNSInfo.

    Parameters:
    index - (IN) Specifies which IP address is to be returned.
      NOTE: index is 0 based.
    ipLength - (OUT) Returns the length of the IP address (that is, the length of this method's return value).
    ipNumber - (OUT) Returns to the IP address in Unicode format.
    numberOfDNSNames - (OUT) Returns to the number of DNS names associated with the IP Address.
    Returns:
    The IP address in network byte order (hex).
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    getServerIPAndDNSInfo, getServerDNSName

    getServerDNSName

    public java.lang.String getServerDNSName(int index)
                                      throws NPKI_Exception
    Retrieves the specified DNS Name.

    The call can only be used after a successful call to getServerIPAndDNSInfo followed by a successful call to getServerIPAddress.

    Parameters:
    index - (IN) Specifies which DNS Name is to be returned. This DNS name is associated with the IP address returned in the prior successful call to getServerIPAddress.

    NOTE: index is 0 based.

    Returns:
    The specified DNS name
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    getServerIPAddress, getServerDNSName

    createTrustedRootContainer

    public void createTrustedRootContainer(java.lang.String objectDN)
                                    throws NPKI_Exception
    Creates a container where Trusted Root objects can be created.

    Trusted Root containers along with Trusted Root objects provide a method of logically grouping, managing, and accessing X.509 root (or CA) certificates within a directory service.

    Sample Code: CreateTrustedRootContainer.java

    Parameters:
    objectDN - (IN) Specifies the eDirectory fully distinguished name of the Trusted Root container that is to be created.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    createTrustedRoot, findTrustedRootsInContext, getTrustedRootInfo

    createTrustedRoot

    public void createTrustedRoot(java.lang.String objectDN,
                                  byte[] certificate)
                           throws NPKI_Exception
    Creates a Trusted Root object and stores the specified X.509 root (or CA) certificate in the eDirectory object.

    Trusted Root containers along with Trusted Root objects provide a method of logically grouping, managing, and accessing X.509 root (or CA) certificates within a directory service.

    Parameters:
    objectDN - (IN) Specifes the eDirectory fully distinguished name of the Trusted Root object to be created.
      NOTE: TrustedRoot Objects can be created only within a Trusted Root Container.
    certificate - (IN) Specifies the DER encoded X.509 root (or CA) certificate you wish to store in the Trusted Root object.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    createTrustedRootContainer, findTrustedRootsInContext, getTrustedRootInfo

    findTrustedRootsInContext

    public int findTrustedRootsInContext(java.lang.String nameContextDN)
                                  throws NPKI_Exception
    Finds all of the Trusted Root objects within the specified (Trusted Root) container and returns the number found.

    For each root found, a call to getTrustedRootInfo can be made to retrieve the relevant information about the root.

    Trusted Root containers, along with Trusted Root objects, provide a method of logically grouping, managing, and accessing X.509 root (or CA) certificates within a directory service.

    Parameters:
    nameContextDN - (IN) Specifies of the eDirectory fully distinguished name of the Trusted Root container that is to be searched.
    Returns:
    Number of trusted roots.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    createTrustedRootContainer, createTrustedRoot, getTrustedRootInfo

    getTrustedRootInfo

    public byte[] getTrustedRootInfo(int index,
                                     java.lang.String[] name,
                                     java.lang.String[] validFrom,
                                     java.lang.String[] validTo,
                                     java.lang.String[] subjectName)
                              throws NPKI_Exception
    Retrieves information about the specified Trusted Root.

    A successful call to findTrustedRootsInContext should be made before calling this method. Trusted Root containers, along with Trusted Root objects, provide a method of logically grouping, managing and accessing X.509 root (or CA) certificates within a directory service.

    Parameters:
    index - (IN) Specifies which Trusted Root object information is to be returned.
      NOTE: Index is 0 based.
    name - (OUT) Returns the eDirectory fully distinguished name of the specified Trusted Root object.
    validFrom - (OUT) Returns a Unicode string representation of the starting validity of the X.509 certificate stored in the specified Trusted Root object.
      NOTE: The date is in the form of YYYYMMDDSS.
    validTo - (OUT) Returns a Unicode string representation of the ending validity of the X.509 certificate stored in the specified Trusted Root object.
      NOTE: The date is in the form of YYYYMMDDSS.
    subjectName - (OUT) Returns a Unicode representation of the subject name of the X.509 certificate stored in the specified Trusted Root object.
    Returns:
    The X.509 trusted root certificate.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.
    See Also:
    createTrustedRootContainer, createTrustedRoot, findTrustedRootsInContext

    verifyCertificateWithTrustedRoots

    public void verifyCertificateWithTrustedRoots(byte[] certificate,
                                                  java.lang.String TRContextDN,
                                                  int flags,
                                                  java.lang.Integer cRLReason,
                                                  java.lang.Integer cRLHoldInstruction,
                                                  java.lang.Integer cRLRevocationTime,
                                                  java.lang.Integer cRLInvalidityDateTime,
                                                  java.lang.Integer certInvalidityReason)
                                           throws NPKI_Exception
    Construct a certificate chain starting with the specified certificate and using all of the Trusted Root objects within the specified Trusted Root container.

    The chain is considered complete once a self-signed certificate has been found. Once the complete certificate chain has been constructed, it is verified. Certificate revocation checking is supported.

    Parameters:
    certificate - (IN) Specifies the DER encoded X.509 certificate you wish to be verified.
    TRContextDN - (IN) Specifies the eDirectory fully distinguished name of the Trusted Root container that is to be searched.
    flags - Specifies whether to verfiy the certificate, check certificate revocation, both, or neither. See related flag definitions, NPKIx509 Certificate Invalidity Reasons and NPKIx509 CRL Hold Types.
    cRLReason - (OUT) Returns the reason code, if the certificate has been revoked (that is the reason the certificate has been revoked -- private key compromised, affiliate change, superseded, etc.). This field is set only if the exception PKI_E_CERT_INVALID is thrown and certInvalidityReason is set to NPKIx509Invalid_Certificate_On_CRL.
    cRLHoldInstruction - (OUT) Returns the hold instruction from the CRL, if the certificate has been revoked, and the reason code is certificateHold. This field is set only if the exception PKI_E_CERT_INVALID is thrown and certInvalidityReason is set to NPKIx509Invalid_Certificate_On_CRL and the cRLReason is set to PKI_CERTIFICATE_HOLD.
    cRLRevocationTime - Returns the date the certificate became invalid. This field is set only if the exception PKI_E_CERT_INVALID is thrown and certInvalidityReason is set to NPKIx509Invalid_Certificate_On_CRL.
    cRLInvalidityDateTime - Returns the date the CRL becomes invalid.
    certInvalidityReason - (OUT) Returns the reason why the certificate is invalid. (that is, Revoked, invalid issuer, unreadable extensions, expired, etc.). This field is set only if the exception PKI_E_CERT_INVALID is thrown
    Throws:
    NPKI_Exception - If an eDirectory, NICI or PKI error occurs.
    See Also:
    createTrustedRootContainer, createTrustedRoot, findTrustedRootsInContext, getTrustedRootInfo

    createSASServiceObject

    public void createSASServiceObject(java.lang.String serverName,
                                       java.lang.String contextDN)
                                throws NPKI_Exception
    Creates a Secure Authentication Services (SAS) object to maintain a list of server certificates for the specified server.

    Parameters:
    serverName - (IN) Specifies the name of the server for which to create SAS service object.
    contextDN - (IN) Specifies the context of the server.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.

    connectToIPAddress

    public void connectToIPAddress(int flags,
                                   short port,
                                   byte[] ipAddress)
                            throws NPKI_Exception
    Establishes a connection to the server at the specified IP address.

    This call should come after setTreeName and before dsLogin.

    Parameters:
    flags - (IN) Reserved for future use, pass zero.
    port - (IN) Indicates the port number to be used. If zero is passed in, the default IP port (524) is used.
    ipAddress - (IN) Indicates the IP address to use in the format XXX.XXX.XXX.XXX.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.

    connectToIPAddress

    public void connectToIPAddress(int flags,
                                   short port,
                                   byte[] ipAddress,
                                   java.lang.String[] treeName,
                                   java.lang.String[] serverDN)
                            throws NPKI_Exception
    Establishes a connection to the server at the specified IP address.

    This call should come before dsLogin. It is no longer necessary to call setTreeName if this call is successfully made.

    Parameters:
    flags - (IN) Reserved for future use, pass zero.
    port - (IN) Indicates the port number to be used. If zero is passed in, the default IP port (524) is used.
    ipAddress - (IN) Indicates the IP address to use in the format XXX.XXX.XXX.XXX.
    treeName - (OUT) Returns the name of the tree that the server is in.
    serverDN - (OUT) Returns the fully distinguished name of the server.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.

    getLocalServerInfo

    public void getLocalServerInfo(java.lang.String[] treeName,
                                   java.lang.String[] serverDN)
                            throws NPKI_Exception
    Retrieves data about the local server. WARNING - This method only works when your process runs within DHost.

    Parameters:
    treeName - Returns the name of the tree that the local server is in.
    serverDN - Returns the fully distinguished name of the local server.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.

    connectToAddress

    public void connectToAddress(int flags,
                                 int type,
                                 short size,
                                 byte[] data)
                          throws NPKI_Exception
    Connects to server address.

    Parameters:
    flags - Reserved for future use, pass zero.
    type - Indicates type of address connection.
    size - Identifies address size.
    data - Byte array of the address.
    Throws:
    NPKI_Exception - If an eDirectory or PKI error occurs.

    versionInfo

    public int versionInfo()
                    throws NPKI_Exception
    Returns the version info of the client module, NPKIAPI.

    NOTE: A context does not need to be created in order to call this function.

    Sample Code: VersionInfo.java

    Returns:
    The version number of the client module.
    Throws:
    NPKI_Exception - If a PKI error occurs

    createDefaultCertificates

    public int createDefaultCertificates(java.lang.String serverDN,
                                         NPKI_CertificateNamesList certificateNames,
                                         java.lang.Integer flags)
                                  throws NPKI_Exception
    This method can be used to accomplish any or all of the three tasks listed below:
    1. Create the default server certificates.
    2. Update existing default server certificates.
    3. Create specified server certificates using default values.

    After a successful call, if the method attemped to create any certificates which were not specifically specified in the certificateNames parameter, then the field numberOfAdditionalCertificates will be set to the number attempted and the names of the additional certificates as well as the success code can be acquired by calling additionalCertificate. The success code for any certificates specified in the certificateNames field will be returned within the appropiate NPKI_CertificateNames object.

    Parameters:
    serverDN - Specifies the DN of the server object.
    certificateNames - Specifies the name(s) of any additional server certificates you want created.
    flags - Specifies the DN of the server object.
    Returns:
    The number of additional certificates (from the certificate name list) that were successfully created.
    Throws:
    NPKI_Exception - If a eDirectory, NICI or PKI error occurs.
    See Also:
    additionalCertificate

    additionalCertificate

    public NPKI_CertificateName additionalCertificate(int index)
                                               throws NPKI_Exception
    Retrieves the name of the specified certificate. A successfull call to createDefaultCertificates must have been made immediately before calling this method.

    Parameters:
    index - Specifies which name is to be returned.
      NOTE:index is 0 based.
    Returns:
    The name of the specified certificate.
    Throws:
    NPKI_Exception - If a PKI error occurs.

    DSLoginAsServer

    public void DSLoginAsServer()
                         throws NPKI_Exception
    NPKI_Exception

    initialize

    public void initialize()
                    throws NPKI_Exception
    Initializes the NPKIAPI context.

    Throws:
    NPKI_Exception - If a PKI error occurs.

    destroy

    public void destroy()

    finalize

    public void finalize()
                  throws java.lang.Throwable
    Overrides:
    finalize in class java.lang.Object
    java.lang.Throwable