d2iPKCS8PrivateKey(3) OpenSL d2iPKCS8PrivateKey(3)
NAME
d2iPKCS8PrivateKeybio, d2iPKCS8PrivateKeyfp, i2dPKCS8Pri-
vateKeybio, i2dPKCS8PrivateKeyfp, i2dPKCS8PrivateKeynidbio,
i2dPKCS8PrivateKeynidfp - PKCS#8 format private key functions
SYNOPSIS
#include
EVPKEY *d2iPKCS8PrivateKeybio(BIO *bp, EVPKEY **x, pempasswordcb *cb, void *u);
EVPKEY *d2iPKCS8PrivateKeyfp(FILE *fp, EVPKEY **x, pempasswordcb *cb, void *u);
int i2dPKCS8PrivateKeybio(BIO *bp, EVPKEY *x, const EVPCIPHER *enc,
char *kstr, int klen,
pempasswordcb *cb, void *u);
int i2dPKCS8PrivateKeyfp(FILE *fp, EVPKEY *x, const EVPCIPHER *enc,
char *kstr, int klen,
pempasswordcb *cb, void *u);
int i2dPKCS8PrivateKeynidbio(BIO *bp, EVPKEY *x, int nid,
char *kstr, int klen,
pempasswordcb *cb, void *u);
int i2dPKCS8PrivateKeynidfp(FILE *fp, EVPKEY *x, int nid,
char *kstr, int klen,
pempasswordcb *cb, void *u);
DESCRIPTION
The PKCS#8 functions encode and decode private keys in PKCS#8 format
using both PKCS#5 v1.5 and PKCS#5 v2.0 password based encryption algo-
rithms.
Other than the use of DER as opposed to PEM these functions are identi-
cal to the corresponding PEM function as described in the pem(3) manual
page.
NOTES
Before using these functions OpenSLaddallalgorithms(3) should be
called to initialize the internal algorithm lookup tables otherwise
errors about unknown algorithms will occur if an attempt is made to
decrypt a private key.
These functions are currently the only way to store encrypted private
keys using DER format.
Currently all the functions use BIOs or FILE pointers, there are no
functions which work directly on memory: this can be readily worked
around by converting the buffers to memory BIOs, see BIOsmem(3) for
details.
SEE ALSO
pem(3)
0.9.7i 2002-10-09 d2iPKCS8PrivateKey(3)
|