Home | History | Annotate | Download | only in pem

Lines Matching defs:bp

69 static int do_pk8pkey(BIO *bp, EVP_PKEY *x, int isder,
73 static int do_pk8pkey_fp(FILE *bp, EVP_PKEY *x, int isder,
84 int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, EVP_PKEY *x, int nid,
88 return do_pk8pkey(bp, x, 0, nid, NULL, kstr, klen, cb, u);
91 int PEM_write_bio_PKCS8PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc,
95 return do_pk8pkey(bp, x, 0, -1, enc, kstr, klen, cb, u);
98 int i2d_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc,
102 return do_pk8pkey(bp, x, 1, -1, enc, kstr, klen, cb, u);
105 int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, EVP_PKEY *x, int nid,
109 return do_pk8pkey(bp, x, 1, nid, NULL, kstr, klen, cb, u);
112 static int do_pk8pkey(BIO *bp, EVP_PKEY *x, int isder, int nid, const EVP_CIPHER *enc,
140 if(isder) ret = i2d_PKCS8_bio(bp, p8);
141 else ret = PEM_write_bio_PKCS8(bp, p8);
145 if(isder) ret = i2d_PKCS8_PRIV_KEY_INFO_bio(bp, p8inf);
146 else ret = PEM_write_bio_PKCS8_PRIV_KEY_INFO(bp, p8inf);
152 EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u)
159 p8 = d2i_PKCS8_bio(bp, NULL);
216 BIO *bp;
218 if(!(bp = BIO_new_fp(fp, BIO_NOCLOSE))) {
222 ret = do_pk8pkey(bp, x, isder, nid, enc, kstr, klen, cb, u);
223 BIO_free(bp);
229 BIO *bp;
231 if(!(bp = BIO_new_fp(fp, BIO_NOCLOSE))) {
235 ret = d2i_PKCS8PrivateKey_bio(bp, x, cb, u);
236 BIO_free(bp);