Lines Matching defs:bp
21 static int do_pk8pkey(BIO *bp, const EVP_PKEY *x, int isder,
28 static int do_pk8pkey_fp(FILE *bp, const EVP_PKEY *x, int isder,
41 int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, const EVP_PKEY *x, int nid,
45 return do_pk8pkey(bp, x, 0, nid, NULL, kstr, klen, cb, u, NULL);
48 int PEM_write_bio_PKCS8PrivateKey(BIO *bp, const EVP_PKEY *x, const EVP_CIPHER *enc,
52 return do_pk8pkey(bp, x, 0, -1, enc, kstr, klen, cb, u, NULL);
55 int i2d_PKCS8PrivateKey_bio(BIO *bp, const EVP_PKEY *x, const EVP_CIPHER *enc,
59 return do_pk8pkey(bp, x, 1, -1, enc, kstr, klen, cb, u, NULL);
62 int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, const EVP_PKEY *x, int nid,
66 return do_pk8pkey(bp, x, 1, nid, NULL, kstr, klen, cb, u, NULL);
69 static int do_pk8pkey(BIO *bp, const EVP_PKEY *x, int isder, int nid,
125 ret = ret && OSSL_ENCODER_to_bio(ctx, bp);
152 ret = i2d_PKCS8_bio(bp, p8);
154 ret = PEM_write_bio_PKCS8(bp, p8);
158 ret = i2d_PKCS8_PRIV_KEY_INFO_bio(bp, p8inf);
160 ret = PEM_write_bio_PKCS8_PRIV_KEY_INFO(bp, p8inf);
169 EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb,
178 p8 = d2i_PKCS8_bio(bp, NULL);
240 BIO *bp;
243 if ((bp = BIO_new_fp(fp, BIO_NOCLOSE)) == NULL) {
247 ret = do_pk8pkey(bp, x, isder, nid, enc, kstr, klen, cb, u, propq);
248 BIO_free(bp);
255 BIO *bp;
258 if ((bp = BIO_new_fp(fp, BIO_NOCLOSE)) == NULL) {
262 ret = d2i_PKCS8PrivateKey_bio(bp, x, cb, u);
263 BIO_free(bp);