Lines Matching refs:bio
229 BIO* bio = BIO_new_mem_buf(const_cast<char*>(pem_string.c_str()), -1); in FromPEMString() local
230 if (!bio) in FromPEMString()
232 BIO_set_mem_eof_return(bio, 0); in FromPEMString()
233 X509* x509 = PEM_read_bio_X509(bio, NULL, NULL, const_cast<char*>("\0")); in FromPEMString()
234 BIO_free(bio); // Frees the BIO, but not the pointed-to string. in FromPEMString()
333 BIO* bio = BIO_new(BIO_s_mem()); in ToPEMString() local
334 if (!bio) { in ToPEMString()
337 if (!PEM_write_bio_X509(bio, x509_)) { in ToPEMString()
338 BIO_free(bio); in ToPEMString()
341 BIO_write(bio, "\0", 1); in ToPEMString()
343 BIO_get_mem_data(bio, &buffer); in ToPEMString()
345 BIO_free(bio); in ToPEMString()
354 BIO* bio = BIO_new(BIO_s_mem()); in ToDER() local
355 if (!bio) { in ToDER()
358 if (!i2d_X509_bio(bio, x509_)) { in ToDER()
359 BIO_free(bio); in ToDER()
363 size_t length = BIO_get_mem_data(bio, &data); in ToDER()
365 BIO_free(bio); in ToDER()
442 BIO* bio = BIO_new_mem_buf(const_cast<char*>(private_key.c_str()), -1); in FromPEMStrings() local
443 if (!bio) { in FromPEMStrings()
447 BIO_set_mem_eof_return(bio, 0); in FromPEMStrings()
449 PEM_read_bio_PrivateKey(bio, NULL, NULL, const_cast<char*>("\0")); in FromPEMStrings()
450 BIO_free(bio); // Frees the BIO, but not the pointed-to string. in FromPEMStrings()