Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6ICertInit::loadCertFromFile2 ( const P6WCHAR pszCertFile,
P6CRYPTCERTFMT  nFormat,
const P6CHAR pszPassPhrase,
p6ICert **  parCACerts,
P6UINT32  cCACerts,
P6UINT32 pcReturned 
)
pure virtual

This method is used to load certificate(s) from the specified file containing data of the type specified by the nFormat argument.

Only PEM and PKCS12 formatted data can contain more than one certficiate and/or be encrypted. In the case where there is more than one certificate, the subject certificate is loaded into the current instance of p6ICert and the CA certificates are returned in the supplied array in parCACerts.

Parameters
pszCertFile[ in ] A pointer to the NULL terminated pathname of the file to load the certificate data from.
nFormat[ in ] A P6CRYPTCERTFMT value indicating the format of the data in pBuffer.
pszPassPhrase[ in ] (optional) A pointer to a NULL terminated string containing the passphrase needed to decrypt the data in pBuffer.
parCACerts[ out ] (optional) The address of an array of pointer to p6ICert interfaces in which will be placed up to the requested number (specified by cCACerts) of certificate interfaces representing each CA cert in the chain. NULL can be passed to indicate that additional CA certificates should not be loaded even if they exist. If NULL is passed, then cCACerts MUST be zero. CA certificates are returned in the order that they occur in the file.
cCACerts[ in ] The number of array entries in parCACerts.
pcReturned[ out ] (optional) The address of a P6UINT32 in which will be returned the number of CA certs placed into parCACerts if it was specified. Or NULL if this information is not needed and/or parCACerts was NULL.
Returns