Previous section.

Common Security: CDSA and CSSM
Copyright © 1997 The Open Group

NAME

CSSM_CL_CertRecoveryRequest

SYNOPSIS

CSSM_RETURN CSSMAPI CSSM_CL_CertRecoveryRequest
    (CSSM_CL_HANDLE CLHandle,
    const CSSM_DATA_PTR CACert,
    const CSSM_NET_ADDRESS_PTR CALocation,
    const CSSM_USER_AUTHENTICATION_PTR UserAuthentication,
    const CSSM_FIELD_PTR SelectedCertFieldValues,
    const uint32 NumberOfFieldValues,
    sint32 *EstimatedTime,
    const CSSM_DATA_PTR ReferenceIdentifier)

DESCRIPTION

This function submits a certificate recovery request to a Certificate Authority (CA) process (or other trusted backup facility) to prepare for the recovery of a set of certificates and their associated private keys. The caller can specify one or more certificate field values to limit the set of certificates selected for potential recovery. The recovery facility process may be local or remote.

The caller is required to provide authentication information so the CA process can determine whether the caller is authorized to recover a certificate. The specific format of the credential is specified by the CL module. The caller can query the CL Module Info structure to obtain this information. Additional authentication information may also be required. It can be provided in the substructure field named MoreAuthenticationData.

This function returns a ReferenceIdentifier and an EstimatedTime (specified in seconds). The estimated time defines the expected certificate recovery time. This time may be substantial when many certificates are being recovered or manual procedures are required. In contrast, the estimated time can be zero, meaning the set of recovered certificates can be obtained immediately. After the specified time has elapsed, the caller must use the CL module interface CSSM_CL_CertRecoveryRetrieve, with the reference identifier, to obtain the set of recovered certificates from the CA process.

PARAMETERS

CLHandle (input)

The handle that describes the add-in certificate library module used to perform this function.

CACert (input/optional)

The certificate of the certification authority that must perform the recovery operation. The caller can obtain the certificate for all of the certification authorities supported by the CL by querying the CSSM registry for the CL's CA information.

CALocation (input/optional)

A pointer to a network address directly or indirectly identifying the location of the CA process. If the input is NULL, the module can determine a CA process and its location based on the CACert input parameter or can assume a default CA process location. If a CACert is not specified and a default cannot be assumed, the request cannot be initiated and the operation fails.

UserAuthentication (input/optional)

A pointer to the CSSM_USER_AUTHENTICATION structure containing the authentication information to be used in association with this request. The authentication information may be a pass-phrase, a PIN, a completed registration form, a Certificate to facilitate a signing operation, and so on, depending on the context of the request. The required format for this credential is defined by the CL and recorded in the CLSubservice structure describing this module. If the supplied information is insufficient, additional information can be provided by the substructure field named MoreAuthenticationData. This field contains an immediate data value or a callback function to collect additional information from the user. If other information is not required, this parameter must be NULL.

SelectedCertFieldValues (input/optional)

An array of one or more field values that must be matched as part of the process of selecting certificates for recovery. If no certificate field values are specified, then the all of the caller's certificates (known to this CL module) will be selected for possible recovery.

NumberOfFieldValues (input)

The number of selected certificate field values listed in the array SelectedCertFieldValues. If no certificate field values are specified, then this value must be zero.

EstimatedTime (output)

The number of seconds estimated before the set of recovered certificates will be ready to be retrieved. A (default) value of zero indicates that the recovered certificates can be retrieved immediately via the corresponding CL_CertRecoveryRetrieve function call. When the recovery process cannot estimate the time required to prepare the recovered certificates, the output value for estimated time is CSSM_ESTIMATED_TIME_UNKNOWN.

ReferenceIdentifier (output)

A reference identifier which uniquely identifies this specific request. The handle must be used in all subsequent calls to retrieve the set of recovered certificates. The identifier persists across application executions until it is terminated by successful or failed completion of the CSSM_CL_CertRecoveryRetrieve function.

RETURN VALUE

A CSSM_OK return value signifies the requested operation has proceeded and that CL_CertRecoveryRetrieve should be called (after the specified amount of time) in order to retrieve the results. If CSSM_FAIL is returned, an error has occurred. Use CSSM_GetError to obtain the error code.

ERRORS

CSSM_CL_INVALID_CL_HANDLE

Invalid Certificate Library Handle.

CSSM_CL_INVALID_CSP_HANDLE

Invalid CSP Handle.

CSSM_CL_INVALID_DATA_POINTER

Invalid pointer input.

CSSM_AUTHENTICATION_FAIL

Invalid/unauthorized credential.

CSSM_CL_MEMORY_ERROR

Not enough memory.

CSSM_CL_CERT_REQUEST_FAIL

Unable to submit certificate recovery request.

SEE ALSO

CSSM_CL_CertRecoveryRetrieve, CSSM_CL_CertRecover,
CSSM_CL_CertKeyRecover, CSSM_CL_CertAbortRecovery

Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy of this publication.
You should also read the legal notice explaining the terms and conditions relating to the CDSA documentation.

Contents Next section Index