Home | History | Annotate | Download | only in base

Lines Matching defs:bio

35 #include <openssl/bio.h>
178 BIO* temp_memory_bio = BIO_new(BIO_s_mem());
180 LOG_F(LS_ERROR) << "Failed to allocate temporary memory bio";
214 BIO* bio = BIO_new_mem_buf(const_cast<char*>(pem_string.c_str()), -1);
215 if (!bio)
217 BIO_set_mem_eof_return(bio, 0);
218 X509 *x509 = PEM_read_bio_X509(bio, NULL, NULL,
220 BIO_free(bio); // Frees the BIO, but not the pointed-to string.
271 BIO* bio = BIO_new(BIO_s_mem());
272 if (!bio) {
276 if (!PEM_write_bio_X509(bio, x509_)) {
277 BIO_free(bio);
281 BIO_write(bio, "\0", 1);
283 BIO_get_mem_data(bio, &buffer);
285 BIO_free(bio);
294 BIO* bio = BIO_new(BIO_s_mem());
295 if (!bio) {
299 if (!i2d_X509_bio(bio, x509_)) {
300 BIO_free(bio);
305 size_t length = BIO_get_mem_data(bio, &data);
307 BIO_free(bio);
352 BIO* bio = BIO_new_mem_buf(const_cast<char*>(private_key.c_str()), -1);
353 if (!bio) {
354 LOG(LS_ERROR) << "Failed to create a new BIO buffer.";
357 BIO_set_mem_eof_return(bio, 0);
358 EVP_PKEY *pkey = PEM_read_bio_PrivateKey(bio, NULL, NULL,
360 BIO_free(bio); // Frees the BIO, but not the pointed-to string.