com.rsa.certj.spi.pki

Class PKIStatusInfo

java.lang.Object
  |
  +--com.rsa.certj.spi.pki.PKIStatusInfo

public class PKIStatusInfo
extends Object

This class contains information about whether a PKI transaction succeeded or failed. It is generally contained in a response message.

     PKIStatusInfo ::= SEQUENCE {
         status        PKIStatus,
         statusString  PKIFreeText     OPTIONAL,
         failInfo      PKIFailureInfo  OPTIONAL
     }

Copyright © RSA Security Inc., 1999-2001. All rights reserved.


Field Summary

static int

PKI_FAIL_ADD_INFO_NOT_AVAILABLE

Indicates that add info is not available.

static int

PKI_FAIL_BAD_ALG

Indicates an unrecognized or unsupported algorithm identifier.

static int

PKI_FAIL_BAD_CERT_ID

Indicates that no certificate matches the criteria specified in the request.

static int

PKI_FAIL_BAD_CERT_TEMPLATE

Indicates that a certificate template is bad.

static int

PKI_FAIL_BAD_DATA_FORMAT

Indicates that the submitted data has the wrong format.

static int

PKI_FAIL_BAD_MESSAGE_CHECK

Indicates that the integrity check failed; for example, the signature did not verify.

static int

PKI_FAIL_BAD_POP

Indicates that the proof-of-possession failed.

static int

PKI_FAIL_BAD_RECIPIENT_NONCE

Indicates that a recipient nonce is bad.

static int

PKI_FAIL_BAD_REQUEST

Indicates that the transaction is not permitted or supported.

static int

PKI_FAIL_BAD_SENDER_NONCE

Indicates that a sender nonce is bad.

static int

PKI_FAIL_BAD_TIME

Indicates that the message time was not sufficiently close to the system time as defined by local policy.

static int

PKI_FAIL_CERT_CONFIRMED

Indicates that a certificate is confirmed.

static int

PKI_FAIL_CERT_REVOKED

Indicates that a certificate is revoked.

static int

PKI_FAIL_INCORRECT_DATA

Indicates that the requester's data is incorrect.

static int

PKI_FAIL_MISSING_TIMESTAMP

Indicates that the time stamp is missing, but it should be there according to the local policy.

static int

PKI_FAIL_REMOTE_SERVER_ERROR

Indicates that a back-end server behind the responder failed.

static int

PKI_FAIL_SERVER_ERROR

Indicates that the requester was unable to contact the responder.

static int

PKI_FAIL_SIGNER_NOT_TRUSTED

Indicates that a signer is not trusted.

static int

PKI_FAIL_TIME_NOT_AVALIABLE

Indicates that time is not available.

static int

PKI_FAIL_TRANSACTION_ID_IN_USE

Indicates that a transaction ID is in use.

static int

PKI_FAIL_UNACCEPTED_EXTENSION

Indicates that an extension is unaccepted.

static int

PKI_FAIL_UNACCEPTED_POLICY

Indicates that a policy is unaccepted.

static int

PKI_FAIL_UNSUPPORTED_VERSION

Indicates that a version is unsupported.

static int

PKI_FAIL_WRONG_AUTHORITY

Indicates that the authority indicated in the request is different from the one creating the response message.

static int

PKI_FAIL_WRONG_INTEGRITY

Indicates that an integrity is wrong.

static int

PKI_REVOCATION

Indicates that a revocation has occurred.

static int

PKI_STATUS_GRANTED

Indicates that the application was approved exactly as requested.

static int

PKI_STATUS_GRANTED_MODS

Indicates that the request was approved, but that the recipient modified the request to fulfill it.

static int

PKI_STATUS_REJECTED

Indicates that the request was rejected.

static int

PKI_STATUS_REVOCATION

Indicates that a revocation has occurred.

static int

PKI_STATUS_WAITING

Indicates that the request has not yet been processed and that the processing will be done later (in some cases, you must poll the recipient for updated status).

static int

PKI_STATUS_WARNING_KEY_UPDATE

Indicates that the requested key update had been performed previously.

static int

PKI_STATUS_WARNING_REVOCATION

Indicates that this message contains a warning that a revocation is imminent.

 

Constructor Summary

PKIStatusInfo(byte[] ber, int offset, int special)

Constructs a PKIStatusInfo object whose BER-encoding is provided in the ber array, starting at offset.

PKIStatusInfo(int status, int failInfo, String[] statusStrings, int failInfoAux)

Constructs a PKIStatusInfo object and initializes it with the given values.

 

Method Summary

 int

getDEREncoding(byte[] der, int offset, int special)

Places the DER encoding of this object into the der array, beginning at offset.

 int

getDERLen(int special)

Returns the number of bytes that will be used by the DER encoding of this object.

 int

getFailInfo()

Returns an integer indicating additional information about a failure.

 int

getFailInfoAux()

Returns an integer indicating a PKI service provider-specific failure code.

 int

getStatus()

Returns an integer indicating the overall status of the requested operation.

 String[]

getStatusStrings()

Returns a list of text strings that can be displayed to an end user to indicate the status.

 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PKI_STATUS_GRANTED

public static final int PKI_STATUS_GRANTED
Indicates that the application was approved exactly as requested.

PKI_STATUS_GRANTED_MODS

public static final int PKI_STATUS_GRANTED_MODS
Indicates that the request was approved, but that the recipient modified the request to fulfill it. The requester is responsible for ascertaining the differences between the request and the response.

PKI_STATUS_REJECTED

public static final int PKI_STATUS_REJECTED
Indicates that the request was rejected. More information is usually found elsewhere in the message.

PKI_STATUS_WAITING

public static final int PKI_STATUS_WAITING
Indicates that the request has not yet been processed and that the processing will be done later (in some cases, you must poll the recipient for updated status).

PKI_STATUS_WARNING_REVOCATION

public static final int PKI_STATUS_WARNING_REVOCATION
Indicates that this message contains a warning that a revocation is imminent.

PKI_REVOCATION

public static final int PKI_REVOCATION
Indicates that a revocation has occurred.

PKI_STATUS_REVOCATION

public static final int PKI_STATUS_REVOCATION
Indicates that a revocation has occurred.

PKI_STATUS_WARNING_KEY_UPDATE

public static final int PKI_STATUS_WARNING_KEY_UPDATE
Indicates that the requested key update had been performed previously.

PKI_FAIL_BAD_ALG

public static final int PKI_FAIL_BAD_ALG
Indicates an unrecognized or unsupported algorithm identifier.

PKI_FAIL_BAD_MESSAGE_CHECK

public static final int PKI_FAIL_BAD_MESSAGE_CHECK
Indicates that the integrity check failed; for example, the signature did not verify.

PKI_FAIL_BAD_REQUEST

public static final int PKI_FAIL_BAD_REQUEST
Indicates that the transaction is not permitted or supported.

PKI_FAIL_BAD_TIME

public static final int PKI_FAIL_BAD_TIME
Indicates that the message time was not sufficiently close to the system time as defined by local policy.

PKI_FAIL_BAD_CERT_ID

public static final int PKI_FAIL_BAD_CERT_ID
Indicates that no certificate matches the criteria specified in the request.

PKI_FAIL_BAD_DATA_FORMAT

public static final int PKI_FAIL_BAD_DATA_FORMAT
Indicates that the submitted data has the wrong format.

PKI_FAIL_WRONG_AUTHORITY

public static final int PKI_FAIL_WRONG_AUTHORITY
Indicates that the authority indicated in the request is different from the one creating the response message.

PKI_FAIL_INCORRECT_DATA

public static final int PKI_FAIL_INCORRECT_DATA
Indicates that the requester's data is incorrect.

PKI_FAIL_MISSING_TIMESTAMP

public static final int PKI_FAIL_MISSING_TIMESTAMP
Indicates that the time stamp is missing, but it should be there according to the local policy.

PKI_FAIL_BAD_POP

public static final int PKI_FAIL_BAD_POP
Indicates that the proof-of-possession failed.

PKI_FAIL_SERVER_ERROR

public static final int PKI_FAIL_SERVER_ERROR
Indicates that the requester was unable to contact the responder.

PKI_FAIL_REMOTE_SERVER_ERROR

public static final int PKI_FAIL_REMOTE_SERVER_ERROR
Indicates that a back-end server behind the responder failed.

PKI_FAIL_CERT_REVOKED

public static final int PKI_FAIL_CERT_REVOKED
Indicates that a certificate is revoked.

PKI_FAIL_CERT_CONFIRMED

public static final int PKI_FAIL_CERT_CONFIRMED
Indicates that a certificate is confirmed.

PKI_FAIL_WRONG_INTEGRITY

public static final int PKI_FAIL_WRONG_INTEGRITY
Indicates that an integrity is wrong.

PKI_FAIL_BAD_RECIPIENT_NONCE

public static final int PKI_FAIL_BAD_RECIPIENT_NONCE
Indicates that a recipient nonce is bad.

PKI_FAIL_TIME_NOT_AVALIABLE

public static final int PKI_FAIL_TIME_NOT_AVALIABLE
Indicates that time is not available.

PKI_FAIL_UNACCEPTED_POLICY

public static final int PKI_FAIL_UNACCEPTED_POLICY
Indicates that a policy is unaccepted.

PKI_FAIL_UNACCEPTED_EXTENSION

public static final int PKI_FAIL_UNACCEPTED_EXTENSION
Indicates that an extension is unaccepted.

PKI_FAIL_ADD_INFO_NOT_AVAILABLE

public static final int PKI_FAIL_ADD_INFO_NOT_AVAILABLE
Indicates that add info is not available.

PKI_FAIL_BAD_SENDER_NONCE

public static final int PKI_FAIL_BAD_SENDER_NONCE
Indicates that a sender nonce is bad.

PKI_FAIL_BAD_CERT_TEMPLATE

public static final int PKI_FAIL_BAD_CERT_TEMPLATE
Indicates that a certificate template is bad.

PKI_FAIL_SIGNER_NOT_TRUSTED

public static final int PKI_FAIL_SIGNER_NOT_TRUSTED
Indicates that a signer is not trusted.

PKI_FAIL_TRANSACTION_ID_IN_USE

public static final int PKI_FAIL_TRANSACTION_ID_IN_USE
Indicates that a transaction ID is in use.

PKI_FAIL_UNSUPPORTED_VERSION

public static final int PKI_FAIL_UNSUPPORTED_VERSION
Indicates that a version is unsupported.
Constructor Detail

PKIStatusInfo

public PKIStatusInfo(byte[] ber,
                     int offset,
                     int special)
              throws PKIException
Constructs a PKIStatusInfo object whose BER-encoding is provided in the ber array, starting at offset. To indicate that the BER-encoding should follow any special instructions, use the special argument.

Parameters

         ber  

A byte array that contains BER encoding of this object.

         offset  

An int indicating the starting offset in the ber array.

         special  

An int indicating special circumstances of the BER encoding, if there are any. The following ASN.1 constants are possible values for special: APP_IMPLICIT, APP_EXPLICIT, PRIVATE_IMPLICIT, PRIVATE_EXPLICIT, OPTIONAL, DEFAULT, CONTEXT_IMPLICIT, or CONTEXT_EXPLICIT.

Throws

PKIException - If the BER-encoding is invalid.

PKIStatusInfo

public PKIStatusInfo(int status,
                     int failInfo,
                     String[] statusStrings,
                     int failInfoAux)
Constructs a PKIStatusInfo object and initializes it with the given values.

Parameters

         status  

An int indicating the overall status of a PKI operation. The value represents one of the PKI_STATUS_* flags previously listed in this class.

         failInfo  

An int value that indicates additional information about a failure. It is a collection of PKI_FAIL_* bit values previously listed in this class.

         statusStrings  

A String array that describes the status of a PKI operation, in the form of text that can be displayed to the end user.

         failInfoAux  

An int value indicating a PKI service provider-specific failure code.

Method Detail

getStatus

public int getStatus()
Returns an integer indicating the overall status of the requested operation. The value represents one of the PKI_STATUS_* fields previously listed in this class.

Returns

An int value indicating the status of the requested operation.

getFailInfo

public int getFailInfo()
Returns an integer indicating additional information about a failure. Because a request can fail in more than one way, the failure codes are defined as one-bit flags that are OR'd together bitwise. The flag values represent PKI_FLAG_* fields previously listed in this class. The returned value only makes sense if the status value returned by getStatus is PKI_STATUS_REJECTED.

Returns

An int indicating the failure information.

getStatusStrings

public String[] getStatusStrings()
Returns a list of text strings that can be displayed to an end user to indicate the status. Usually, multiple text strings are present only when the same text is provided in multiple languages. Each string contains the text in a different language and should only consist of UTF8 characters. The language tag should be specified at the beginning of the string. If there is no language tag, the sender and recepient should have some prior agreement for the language of the string.

Returns

A String array that contains status strings.

getFailInfoAux

public int getFailInfoAux()
Returns an integer indicating a PKI service provider-specific failure code. See the service provider documentation for the definition of specific field values. The returned value only makes sense if the value returned by getStatus is PKI_STATUS_REJECTED.

Returns

An int indicating the provider-specific failure code.

getDERLen

public int getDERLen(int special)
              throws PKIException
Returns the number of bytes that will be used by the DER encoding of this object.

Parameters

         special  

An int value indicating the special DER circumstances of the encoding, if there are any.

Returns

An int value indicating the number of bytes the DER encoding of this object will be. The following ASN.1 constants are possible values for special: APP_IMPLICIT, APP_EXPLICIT, PRIVATE_IMPLICIT, PRIVATE_EXPLICIT, OPTIONAL, DEFAULT, CONTEXT_IMPLICIT, or CONTEXT_EXPLICIT.

Throws

PKIException - If the method cannot get the DER encoding length.

getDEREncoding

public int getDEREncoding(byte[] der,
                          int offset,
                          int special)
                   throws PKIException
Places the DER encoding of this object into the der array, beginning at offset. To determine how long the encoding will be, call getDERLen.

Parameters

         der  

A byte array that will hold the DER-encoding of this object.

         offset  

An int value indicating the offset into the der array where the encoding begins.

         special  

An int value that contains any special ASN.1 info, such as OPTIONAL. The following ASN.1 constants are possible values for special: APP_IMPLICIT, APP_EXPLICIT, PRIVATE_IMPLICIT, PRIVATE_EXPLICIT, OPTIONAL, DEFAULT, CONTEXT_IMPLICIT, or CONTEXT_EXPLICIT.

Returns

An int value indicating the number of bytes actually placed into the der array.

Throws

PKIException - If this object cannot be encoded.


RSA BSAFE ® Cert-J 2.1.1 001-047007-211-001-000