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


gsk_make_data_msg()

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

Creates a PKCS #7 Data message from application data.

Format

#include <gskcms.h>

gsk_status gsk_make_data_msg (
                              gsk_buffer *                  data,
                              gsk_buffer *                  stream)

Parameters

data
Specifies the application data.
stream
Returns the ASN.1 DER-encoded stream. The application should call the gsk_free_buffer() routine to release the stream when it is 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_NO_CONTENT_DATA]
The application data length is zero
[CMSERR_NO_MEMORY]
Insufficient storage is available

Usage

The gsk_make_data_msg() routine creates a PKCS #7 (Cryptographic Message Syntax) Data message and returns the ASN.1 DER-encoded ContentInfo sequence. The message content type will be Data. The gsk_read_data_msg() routine can be used to extract the application data from the stream.

Calling the gsk_make_data_msg() routine is equivalent to calling the gsk_make_data_content() routine followed by the gsk_make_content_msg() routine.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014