skip book previous and next navigation links
go up to top of book: HP Open Source Security for OpenVMS Volume 1:... HP Open Source Security for OpenVMS Volume 1:...
go to beginning of chapter: CDSA Programming Concepts CDSA Programming Concepts
go to previous page: CDSA Example Programs CDSA Example Programs
go to next page: API FunctionsAPI Functions
end of book navigation links

CDSA Error Resolution  



The CDSA implementation on OpenVMS supplies a special program that can be used to translate numeric CDSA error codes to text messages. This program resides in the SYS$SYSTEM directory and is called CDSA$OUTPUT_ERROR.EXE. It uses the routines described in this section to convert a numeric error code to its associated text label and error string. A foreign command, cdsa_error, has been defined in SYS$MANAGER:CDSA$SYMBOLS.COM to invoke this program. For details about using cdsa_error and its options, see CDSA Utility Programs.

The MDS example program provides two special routines for deciphering CDSA error codes within a user program. Because the CDSA include file that specifies error codes (CDSA_SYSDIR:[INCLUDES]CSSMERR.H) does not allow for easy translation from the numeric code to the associated error string, these routines can make the job of debugging a CDSA application easier. These routines are: Decode_CDSA_Error() and Print_CDSA_Error().

They are described in the following sections.

Decode_CDSA_Error() 

This function accepts a CDSA numeric error code and returns two strings: the ASCII name of the error and a description of the error.

SYNOPSIS 

#include <cssmerr.h>

API: 

void Decode_CDSA_Error(Error_Code,Error_Label_String,Error_String)
    CSSM_RETURN Error_Code;
    char *Error_Label_String;  
    char *Error_String;

RETURN VALUE 

None

Print_CDSA_Error() 

This function accepts a CDSA numeric error code, calls Decode_CDSA_Error, and prints the resulting strings to SYS$OUTPUT.

SYNOPSIS 

#include <cssmerr.h>

API: 

void Print_CDSA_Error(Error_Code)
    CSSM_RETURN Error_Code;

RETURN VALUE 

None


go to previous page: CDSA Example Programs CDSA Example Programs
go to next page: API FunctionsAPI Functions