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


gsk_delete_record()

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

Deletes a record from a key or request database.

Format

   #include <gskcms.h>

   gsk_status gsk_delete_record (  
                                  gsk_handle         db_handle,   
                                  gsk_int32          record_id)

Parameters

db_handle
Specifies the database handle return by the gsk_create_database() routine or the gsk_open_database() routine.
record_id
Specifies the database record to be deleted.

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_BACKUP_EXISTS]
The backup file already exists.
[CMSERR_BAD_HANDLE]
The database handle is not valid.
[CMSERR_IO_ERROR]
Unable to write record.
[CMSERR_NO_MEMORY]
Insufficient storage is available.
[CMSERR_RECORD_NOT_FOUND]
Record is not found.
[CMSERR_SIGNED_CERTS]
The database contains records signed using the certificate.
[CMSERR_UPDATE_NOT_ALLOWED]
Database is not open for update or update attempted on a FIPS mode database while in non-FIPS mode.

Usage

The gsk_delete_record() routine deletes a record from a key or request database. The database must be open for update in order to delete records. The unique record identifier identifies the record to be deleted. A certificate record cannot be deleted from a key database if the database contains records that were signed using the certificate.

The database file is updated as part of the gsk_delete_record() processing. A temporary database file is created using the same name as the database file with ".new" appended to the name. The database file is then overwritten and the temporary database file is deleted. The temporary database file will not be deleted if an error occurs while rewriting the database file.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014