NPKIExportCAKey
Exports the CA's private key and corresponding certificates
in Personal Information Exchange Syntax (PFX) format (formerly NWPKIExportCAKey).
Syntax
#include "npki.h"
void NPKIExportCAKey(
NPKIContext const context,
const unicode *organizationlCAName,
const unicode *password,
const nuint32 flags,
pnuint32 const pfxSize,
nuint8 const **pfx);
Parameters
- context
- (IN) Specifies the NPKI context for the request.
- organizationlCAName
- (IN) Specifies the FDN of the CA object (for example,
if your CA is called Organizational CA and it exists in the Security
container, this parameter should be set to Organizational CA). This must
be a valid eDirectory name of a CA object in the current tree.
- password
- (IN) Specifies the password with which to encrypt
the private key and certificate.
- flags
- (IN) Specifies options for exporting the server
key and certificate. The flags currently defined are:PKI_CA_KEY_AND_CERTS—Exports
the CA self-signed certificate and the chain of certificates in
the certification (see Section 4.8, NPKIExportCAKey Flags).
- pfxSize
- (OUT) Specifies the size of the exported data PFX.
- pfx
- (OUT) Points to the PKCS #12 encoded data.
Return Values
Returns 0 if successful, or an eDirectory, NICI, or PKI error
code if not successful.
PKI NCP Calls
0x2222 93 09 Read Key
Remarks
The private key and certificates are encrypted using the input
password as specified in the Public Key Cryptography Standards (PKCS) #12.