32 #ifndef _QORE_QORESSLINTERN_H
34 #define _QORE_QORESSLINTERN_H
38 DLLLOCAL ~QoreBIO() {
if (b) BIO_free(b); }
40 DLLLOCAL
int writePEMX509(X509* cert) {
return PEM_write_bio_X509(b, cert); }
42 DLLLOCAL
long getMemData(
char** buf) {
return BIO_get_mem_data(b, buf); }
46 long len = BIO_get_mem_data(b, &buf);
52 long len = BIO_get_mem_data(b, &buf);
54 rv->append(buf, (
size_t)len);
58 DLLLOCAL X509* getX509(X509 **x) {
return d2i_X509_bio(b, x); }
60 DLLLOCAL BIO* getBIO() {
return b; }
61 DLLLOCAL BIO* operator*()
const {
return b; }
67 DLLLOCAL QoreBIO(BIO *n_b) : b(n_b) {}
70 class QoreMemBIO :
public QoreBIO {
72 DLLLOCAL QoreMemBIO() : QoreBIO(BIO_new(BIO_s_mem())) {}
73 DLLLOCAL QoreMemBIO(
const BinaryNode* b) : QoreBIO(BIO_new_mem_buf((void*)b->getPtr(), (int)b->size())) {}
74 DLLLOCAL QoreMemBIO(
const QoreString* str) : QoreBIO(BIO_new_mem_buf((void*)str->getBuffer(), (int)str->strlen())) {}
holds arbitrary binary data
Definition: BinaryNode.h:41
Qore's string type supported by the QoreEncoding class.
Definition: QoreString.h:93
Qore's string value type, reference counted, dynamically-allocated only.
Definition: QoreStringNode.h:50