/* These functions write a private key in PKCS#8 format: it is a "drop in" replacement for PEM_write_bio_PrivateKey() and friends. As usual if 'enc' is NULL then it uses the unencrypted private key form. The 'nid' versions uses PKCS#5 v1.5 PBE algorithms whereas the others use PKCS#5 v2.0.  */
int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, EVP_PKEY *x, int nid, char *kstr, int klen, pem_password_cb *cb, void *u)
/* These functions write a private key in PKCS#8 format: it is a "drop in" replacement for PEM_write_bio_PrivateKey() and friends. As usual if 'enc' is NULL then it uses the unencrypted private key form. The 'nid' versions uses PKCS#5 v1.5 PBE algorithms whereas the others use PKCS#5 v2.0.  */
int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, EVP_PKEY *x, int nid, char *kstr, int klen, pem_password_cb *cb, void *u)
{
    return do_pk8pkey(bp, x, 0, nid, NULL, kstr, klen, cb, u);
}