Home | History | Annotate | Download | only in base

Lines Matching defs:bio

18 #include <openssl/bio.h>
161 BIO* temp_memory_bio = BIO_new(BIO_s_mem());
163 LOG_F(LS_ERROR) << "Failed to allocate temporary memory bio";
197 BIO* bio = BIO_new_mem_buf(const_cast<char*>(pem_string.c_str()), -1);
198 if (!bio)
200 BIO_set_mem_eof_return(bio, 0);
201 X509 *x509 = PEM_read_bio_X509(bio, NULL, NULL,
203 BIO_free(bio); // Frees the BIO, but not the pointed-to string.
254 BIO* bio = BIO_new(BIO_s_mem());
255 if (!bio) {
259 if (!PEM_write_bio_X509(bio, x509_)) {
260 BIO_free(bio);
264 BIO_write(bio, "\0", 1);
266 BIO_get_mem_data(bio, &buffer);
268 BIO_free(bio);
277 BIO* bio = BIO_new(BIO_s_mem());
278 if (!bio) {
282 if (!i2d_X509_bio(bio, x509_)) {
283 BIO_free(bio);
288 size_t length = BIO_get_mem_data(bio, &data);
290 BIO_free(bio);
335 BIO* bio = BIO_new_mem_buf(const_cast<char*>(private_key.c_str()), -1);
336 if (!bio) {
337 LOG(LS_ERROR) << "Failed to create a new BIO buffer.";
340 BIO_set_mem_eof_return(bio, 0);
341 EVP_PKEY *pkey = PEM_read_bio_PrivateKey(bio, NULL, NULL,
343 BIO_free(bio); // Frees the BIO, but not the pointed-to string.