Home | History | Annotate | Download | only in crypto

Lines Matching defs:bio

7 #include <openssl/bio.h>
14 int bio_string_write(BIO* bio, const char* data, int len) {
15 reinterpret_cast<std::string*>(bio->ptr)->append(data, len);
19 int bio_string_puts(BIO* bio, const char* data) {
21 return bio_string_write(bio, data, strlen(data));
24 long bio_string_ctrl(BIO* bio, int cmd, long num, void* ptr) {
25 std::string* str = reinterpret_cast<std::string*>(bio->ptr);
41 int bio_string_new(BIO* bio) {
42 bio->ptr = NULL;
43 bio->init = 0;
47 int bio_string_free(BIO* bio) {
49 return bio != NULL;
53 // TODO(mattm): Should add some type number too? (bio.h uses 1-24)
68 BIO* BIO_new_string(std::string* out) {
69 BIO* bio = BIO_new(&bio_string_methods);
70 if (!bio)
71 return bio;
72 bio->ptr = out;
73 bio->init = 1;
74 return bio;