gsk_get_certificate_algorithms()
Get the public key and certificate signature algorithms for a database record.
Format
#include <gskcms.h>
gsk_status gsk_get_certificate_algorithms (
gsk_handle * db_handle,
const char * label,
x509_algorithm_type * public_key_algorithm,
x509_algorithm_type * signature_algorithm,
x509_algorithm_type * signature_key_algorithm)
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. The database must be a key database, SAF key ring or z/OS PKCS #11 token.
- label
- Specifies the label for the database record. The label is specified in the local code page.
- public_key_algorithm
- Returns the key algorithm for the subject public key in the certificate.
- signature_algorithm
- Returns the signature algorithm used to sign the certificate.
- signature_key_algorithm
- Returns the signature key algorithm used to sign the certificate.
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_LABEL]
- Multiple certificates exist for label.
- [CMSERR_NO_MEMORY]
- Insufficient storage is available.
- [CMSERR_RECORD_DELETED]
- The requested record is deleted.
- [CMSERR_RECORD_NOT_FOUND]
- The request record is not found.
Usage
The gsk_get_certificate_algorithms() routine returns the public key algorithm, certificate signature algorithm, and signature key algorithm for the database record specified by the label parameter.