FreeRDP
opensslcompat.c
1 
20 #include "opensslcompat.h"
21 
22 #if OPENSSL_VERSION_NUMBER < 0x10100000L || \
23  (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
24 
25 BIO_METHOD* BIO_meth_new(int type, const char* name)
26 {
27  BIO_METHOD* m;
28  if (!(m = calloc(1, sizeof(BIO_METHOD))))
29  return NULL;
30  m->type = type;
31  m->name = name;
32  return m;
33 }
34 
35 void RSA_get0_key(const RSA* r, const BIGNUM** n, const BIGNUM** e, const BIGNUM** d)
36 {
37  if (n != NULL)
38  *n = r->n;
39  if (e != NULL)
40  *e = r->e;
41  if (d != NULL)
42  *d = r->d;
43 }
44 
45 #endif /* OPENSSL < 1.1.0 || LIBRESSL */