unsigned char *kstr, int klen, pem_password_cb *cb)
char *kstr, int klen, pem_password_cb *cb)
int PEM_write_bio_PKCS8PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc,             unsigned char *kstr, int klen, pem_password_cb *cb){	X509_SIG *p8;	PKCS8_PRIV_KEY_INFO *p8inf;	char buf[PEM_BUFSIZE];	int ret;	if(!(p8inf = EVP_PKEY2PKCS8(x))) {		PEMerr(PEM_F_PEM_WRITE_BIO_PKCS8PRIVATEKEY,					PEM_R_ERROR_CONVERTING_PRIVATE_KEY);		return 0;	}	if(enc) {		if(!kstr) {			if(!cb) klen = def_callback(buf, PEM_BUFSIZE, 1);			else klen = cb(buf, PEM_BUFSIZE, 1);			if(klen <= 0) {				PEMerr(PEM_F_PEM_WRITE_BIO_PKCS8PRIVATEKEY,								PEM_R_READ_KEY);				PKCS8_PRIV_KEY_INFO_free(p8inf);				return 0;			}							kstr = buf;		}		p8 = PKCS8_encrypt(-1, enc, kstr, klen, NULL, 0, 0, p8inf);		if(kstr == (unsigned char *)buf) memset(buf, 0, klen);		PKCS8_PRIV_KEY_INFO_free(p8inf);		ret = PEM_write_bio_PKCS8(bp, p8);		X509_SIG_free(p8);		return ret;	} else {		ret = PEM_write_bio_PKCS8_PRIV_KEY_INFO(bp, p8inf);		PKCS8_PRIV_KEY_INFO_free(p8inf);		return ret;	}}