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


gsk_get_record_labels()

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

Gets the record labels for a key or request database.

Format

   #include <gskcms.h>

   gsk_status gsk_get_record_labels (    
                                      gsk_handle          db_handle, 
                                      gsk_boolean         private_key, 
                                      int *               num_labels,   
                                      char ***            labels)

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.
private_key
Specify TRUE if labels for records containing a private key are to be returned. Specify FALSE if labels for records without a private key are to be returned.
num_labels
Returns the number of record labels.
labels
Returns an array of string addresses. The labels are returned using the local code page. The application should call the gsk_free_strings() routine to release the record labels when they are 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_NO_MEMORY]
Insufficient storage is available.

Usage

The gsk_get_record_labels() routine returns all of the record labels for a key or request database. The gsk_get_record_by_label() routine can then be used to retrieve a specific database record. The array address will be set to NULL and the number of labels will be set to 0 if there are no records in the database.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014