Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IPkcs12::exportAsP12 ( const P6WCHAR pszFilename,
const P6CHAR pszPassword,
p6ICryptoKey pPrivateKey,
p6ICert pClientCert,
p6ICert **  ppCACertsArray,
P6UINT32  caCount,
P6PKCS12_OPTIONS pOptions 
)
pure virtual

Generate an PKCS #12 file given the following components: private key, certificate for the private key, and the certificate chain to the root certificate authority (CA).

Parameters
pszFilename[ in ] Full path to where to write the ".p12" file (file must be writable).
pszPassword[ in ] Define the pass phrase that the user of the ".p12" file needs to unencrypt it.
pPrivateKey[ in ] Private key to put into the ".p12" file
pClientCert[ in ] The certificate for the private key
ppCACertsArray[ in ] A pointer to an array of pointers to p6ICert objects composing the certificate chain to the root CA.
caCount[ in ] The number of entries in the ppCACertsArray
pOptions[ in ] (optional can be NULL) allows the caller to fine tune the PKCS #12 file
Returns
FailureP6R::eNotInitializedA successful call to initialize() is required.
P6R::eWrongKeyTypepClientCert is not the cert for the pPrivateKey parameter.
P6R::eInvalidArgpszFilename, pszPassword, pPrivateKey, or pClientCert is NULL.
P6R::eNoMemoryFailed to create internal data structures to create the pkcs12 file.
P6R::eAccessCould not create or write to pszFilename