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


gsk_factor_private_key()

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

Factorizes a private key into its component values.

Format

   #include <gskcms.h>

   gsk_status gsk_factor_private_key(
                                      pkcs_private_key_info *    private_key,
                                      gsk_private_key *          private_key_factors)

Parameters

private_key
Specifies the private key.
private_key_factors
Returns the private key components.

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:
[ASN_ELEMENTS_MISSING]
Required data element is missing.
[CMSERR_ALG_NOT_SUPPORTED]
Cryptographic algorithm is not supported.
[CMSERR_PRIVATE_KEY_INFO_NOT_SUPPLIED]
Private key information not supplied.
[CMSERR_PRIVATE_KEY_NOT_SUPPLIED]
Private key structure not supplied.
[CMSERR_STRUCTURE_TOO_SMALL]
Size specified for supplied structure is too small.

Usage

The gsk_factor_private_key() function deconstructs the private key into its private key components, formatted for use with ICSF PKCS #11 tokens.

Before calling the function, the application must initialize the size field in private_key_factors to the size of the gsk_private_key structure. It must also prime private_key with the appropriate private key to be factorized before calling the routine.

The routine will return the factorized components of the private key in private_key_factors. The x509_algorithm_identifier is set with the appropriate value for the private key type when returned.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014