z/OS Cryptographic Services System SSL Programming
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


gsk_get_default_label()

z/OS Cryptographic Services System SSL Programming
SC14-7495-00

Gets the label of the default key record.

Format

   #include <gskcms.h>

   gsk_status gsk_get_default_label (  
                                      gsk_handle         db_handle,   
                                      char **            label)

Parameters

db_handle
Specifies the database handle returned by the gsk_create_database() routine, the gsk_open_database() routine, or the gsk_open_keyring() routine.
label
Returns the label of the default key record. The application should call the gsk_free_string() routine to release the label when it is no longer needed.

Results

The function return value will be 0 if no error is detected. Otherwise, it will be one of the return codes listed in the gskcms.h include file. These are some possible errors:
[CMSERR_BAD_HANDLE]
The database handle is not valid.
[CMSERR_INCORRECT_DBTYPE]
The database does not support this operation.
[CMSERR_MULTIPLE_DEFAULT]
Multiple keys are marked as the default.
[CMSERR_NO_MEMORY]
Insufficient storage is available.
[CMSERR_RECORD_DELETED]
The requested record is deleted.
[CMSERR_RECORD_NOT_FOUND]
There is no default key for the database.

Usage

The gsk_get_default_label() routine returns the label of the default key record. An error will be returned if there is no default key.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014