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 ConceptsCDSA Programming Concepts
go to previous page: CDSA Example ProgramsCDSA 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 programthat 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 numericerror code to its associated text label and error string. A foreigncommand, cdsa_error, has been defined in SYS$MANAGER:CDSA$SYMBOLS.COMto invoke this program. For details about using cdsa_error and its options,see CDSA Utility Programs.

The MDS example program provides two special routines fordeciphering CDSA error codes within a user program. Because theCDSA include file that specifies error codes (CDSA_SYSDIR:[INCLUDES]CSSMERR.H)does not allow for easy translation from the numeric code to the associatederror string, these routines can make the job of debugging a CDSAapplication 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 returnstwo strings: the ASCII name of the error and a description of theerror.

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;

RETURNVALUE 

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;

RETURNVALUE 

None


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