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


gsk_encode_signature()

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

Encodes an ASN.1 stream and the accompanying signature.

Format

   #include <gskcms.h>

   gsk_status gsk_encode_signature (     
                                     gsk_buffer *                        unsigned_stream, 
                                     x509_algorithm_identifier *         algorithm,  
                                     gsk_bitstring *                     signature,   
                                     gsk_buffer *                        signed_stream)

Parameters

unsigned_stream
Specifies the unsigned ASN.1 stream.
algorithm
Specifies the algorithm used to compute the signature.
signature
Specifies the signature for the ASN.1 stream.
signed_stream
Returns the encoded signature stream. The application should call the gsk_free_buffer() routine to release the encoded 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. This is a possible error:
[ASN_NO_MEMORY]
Insufficient memory is available.

Usage

The gsk_encode_signature() routine is used to encode an unsigned ASN.1 stream and the digital signature generated for the stream. The signature is encoded using ASN.1 DER (Distinguished Encoding Rules). The application is responsible for ensuring the validity of the supplied information.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014