PKCS12_add_secret

Create a secretBag safeBag and append it to a stack of safeBags.

Synopsis

Declared in <openssl/pkcs12.h>

PKCS12_SAFEBAG*
PKCS12_add_secret(
    stack_st_PKCS12_SAFEBAG** pbags,
    int nid_type,
    unsigned char const* value,
    int len);

Return Value

The new safeBag, or NULL on error.

Parameters

NameDescription
pbagsAddress of safeBag stack pointer (created if *pbags is NULL).
nid_typeNID tagging the secret contents.
valueOctets of the secret value.
lenLength of value in bytes.