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


gsk_encode_private_key()

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

Encode a private key.

Format

   #include <gskcms.h>

   gsk_status gsk_encode_private_key ( 
                                      pkcs_private_key_info *          private_key,    
                                      gsk_buffer *                     stream)

Parameters

private_key
Specifies the private key.
stream
Returns the ASN.1 stream for the private key. The application should release the stream when it is no longer needed by calling the gsk_free_buffer() routine.

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_NO_MEMORY]
Insufficient memory is available.

Usage

The gsk_encode_private_key() routine will encode a private key as an ASN.1 stream. The name will be encoded as described in PKCS #8, Version 1.2: Private Key Information Syntax. The encoded private key will not be usable on another system if the private key information contains an ICSF key token.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014