bio_mem
struct bio_mem *bm;
struct bio_mem *bm;
struct bio_mem *bm;
struct bio_mem *bm = bio->ptr;
struct bio_mem *bm = bio->ptr;
struct bio_mem *bm = bio->ptr;
struct bio_mem *bm = bio->ptr;
bio_mem_pending(struct bio_mem *bm)
bio_mem_read_ptr(struct bio_mem *bm)
BIO *bio_mem = NULL;
if ((bio_mem = BIO_new_mem_buf(dh_test_key, -1)) == NULL)
if ((pkey = PEM_read_bio_PrivateKey(bio_mem, NULL, NULL, NULL)) == NULL) {
BIO_free_all(bio_mem);
if ((bio_mem = BIO_new(BIO_s_mem())) == NULL)
if (!PEM_write_bio_PrivateKey(bio_mem, pkey, NULL, NULL, 0, 0, NULL)) {
len = BIO_get_mem_data(bio_mem, &data);
BIO_free_all(bio_mem);
BIO *bio_mem = NULL;
if ((bio_mem = BIO_new_mem_buf((void *)dsa_test_key, -1)) == NULL)
if ((dsa_a = PEM_read_bio_DSAPrivateKey(bio_mem, NULL, NULL, NULL)) == NULL) {
BIO_free_all(bio_mem);
if ((bio_mem = BIO_new(BIO_s_mem())) == NULL)
if ((len = i2d_DSA_PUBKEY_bio(bio_mem, dsa_a)) < 0) {
len = BIO_get_mem_data(bio_mem, &data);
if ((dsa_b = d2i_DSA_PUBKEY_bio(bio_mem, NULL)) == NULL) {
BIO_free_all(bio_mem);
BIO *bio_mem = NULL;
if ((bio_mem = BIO_new_mem_buf((void *)ec_test_key, -1)) == NULL)
if ((ec_a = PEM_read_bio_ECPrivateKey(bio_mem, NULL, NULL, NULL)) == NULL) {
BIO_free_all(bio_mem);
if ((bio_mem = BIO_new(BIO_s_mem())) == NULL)
if ((len = i2d_EC_PUBKEY_bio(bio_mem, ec_a)) < 0) {
len = BIO_get_mem_data(bio_mem, &data);
if ((ec_b = d2i_EC_PUBKEY_bio(bio_mem, NULL)) == NULL) {
BIO_free_all(bio_mem);
BIO *bio_mem = NULL;
if ((bio_mem = BIO_new_mem_buf((void *)rsa_test_key, -1)) == NULL)
if ((rsa_a = PEM_read_bio_RSAPrivateKey(bio_mem, NULL, NULL, NULL)) == NULL) {
BIO_free_all(bio_mem);
if ((bio_mem = BIO_new(BIO_s_mem())) == NULL)
if ((len = i2d_RSA_PUBKEY_bio(bio_mem, rsa_a)) < 0) {
len = BIO_get_mem_data(bio_mem, &data);
if ((rsa_b = d2i_RSA_PUBKEY_bio(bio_mem, NULL)) == NULL) {
BIO_free_all(bio_mem);
BIO *bio_b64, *bio_mem;
bio_mem = BIO_new(BIO_s_mem());
if (bio_mem == NULL)
bio_mem = BIO_push(bio_b64, bio_mem);
len = BIO_write(bio_mem, bt->in, bt->in_len);
if (BIO_flush(bio_mem) < 0) {
len = BIO_get_mem_data(bio_mem, &out);
BIO_free_all(bio_mem);
BIO *bio_b64, *bio_mem;
bio_mem = BIO_new_mem_buf(input, inlen);
if (bio_mem == NULL)
bio_mem = BIO_push(bio_b64, bio_mem);
len = BIO_read(bio_mem, buf, BUF_SIZE);
BIO_free_all(bio_mem);
BIO *bio_mem = NULL;
if ((bio_mem = BIO_new_mem_buf(cms_cert_1, -1)) == NULL)
if ((cert = PEM_read_bio_X509(bio_mem, NULL, NULL, NULL)) == NULL)
BIO_free(bio_mem);
if ((bio_mem = BIO_new_mem_buf(cms_key_1, -1)) == NULL)
if ((pkey = PEM_read_bio_PrivateKey(bio_mem, NULL, NULL, NULL)) == NULL)
BIO_free(bio_mem);
if ((bio_mem = BIO_new_mem_buf(cms_msg, -1)) == NULL)
if ((ci = CMS_encrypt(certs, bio_mem, EVP_aes_256_cbc(), 0)) == NULL) {
BIO_free(bio_mem);
if ((bio_mem = BIO_new(BIO_s_mem())) == NULL)
if (!CMS_decrypt(ci, pkey, cert, NULL, bio_mem, 0)) {
if ((mem_len = BIO_get_mem_data(bio_mem, &p)) <= 0) {
BIO_free(bio_mem);
BIO *bio_mem = NULL;
if ((bio_mem = BIO_new_mem_buf(cert_pem, -1)) == NULL)
if ((cert = PEM_read_bio_X509(bio_mem, NULL, NULL, NULL)) == NULL)
BIO_free(bio_mem);
if ((bio_mem = BIO_new_mem_buf(ca_pem, -1)) == NULL)
if ((ca = PEM_read_bio_X509(bio_mem, NULL, NULL, NULL)) == NULL)
BIO_free(bio_mem);
if ((bio_mem = BIO_new_mem_buf(key_pem, -1)) == NULL)
if ((pkey = PEM_read_bio_PrivateKey(bio_mem, NULL, NULL, NULL)) == NULL)
BIO_free(bio_mem);
if ((bio_mem = BIO_new_mem_buf(cms_msg, -1)) == NULL)
if ((ci = CMS_sign(cert, pkey, NULL, bio_mem, 0)) == NULL) {
BIO_free(bio_mem);
if ((bio_mem = BIO_new(BIO_s_mem())) == NULL)
if (!CMS_verify(ci, certs, store, NULL, bio_mem, 0)) {
if ((mem_len = BIO_get_mem_data(bio_mem, &p)) <= 0) {
BIO_free(bio_mem);
BIO *bio_mem = NULL;
if ((bio_mem = BIO_new(BIO_s_mem())) == NULL)
if (i2d_ECPKParameters_bio(bio_mem, group_a) < 0) {
len = BIO_get_mem_data(bio_mem, &data);
if ((group_b = d2i_ECPKParameters_bio(bio_mem, NULL)) == NULL) {
BIO_free_all(bio_mem);