RSA Security logo

RSA BSAFE Cert-C
API Reference

certsurr.h File Reference

This file defines the Cert-C surrender interface.

#include "service.h"

Go to the source code of this file.

Functions

A_SURRENDER_CTX * C_GetSurrenderCtx (CERTC_CTX ctx)
 Returns a pointer to the Cert-C surrender context, A_SURRENDER_CTX. More...


Function Documentation

A_SURRENDER_CTX* C_GetSurrenderCtx CERTC_CTX    ctx ;
 

Returns a pointer to the Cert-C surrender context, A_SURRENDER_CTX. The surrender context specifies the default callback function, Surrender, that is supplied by the currently registered text-surrender service provider. You can substitute an application-defined Surrender function for the default function. (If there is no registered service provider of type SPT_SURRENDER, the C_GetSurrenderCtx() function returns NULL_PTR.) The purpose of the Surrender function is to allow Cert-C to surrender control to your application. Cert-C and Crypto-C call the Surrender function at the beginning of any operation that typically takes an extended period of time, such as key generation. This allows your application to send progress messages to the end user, return an error to Cert-C if you want to cancel the Cert-C operation, or perform other tasks. Before returning the surrender context, the C_GetSurrenderCtx() function calls the text-surrender service provider's Reset function. This allows the service provider to distinguish the beginning of a Cert-C or Crypto-C operation from an iterated surrender call to the Surrender function from within that operation.

Parameters:
ctx This input parameter contains an initialized Cert-C context.
Returns:
This function returns either a pointer to an A_SURRENDER_CTX structure or NULL_PTR. The A_SURRENDER_CTX structure specifies the default Surrender function supplied by the text-surrender service provider. A return of NULL_PTR indicates that no text-surrender service provider has been registered.



RSA BSAFE® Cert-C 2.7 API Reference