| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
#ifndef VBOOT_REFERENCE_OPENSSL_COMPAT_H_ |
| 7 |
#define VBOOT_REFERENCE_OPENSSL_COMPAT_H_ |
| 8 |
|
| 9 |
#ifdef __cplusplus |
| 10 |
extern "C" { |
| 11 |
#endif |
| 12 |
|
| 13 |
#include <openssl/rsa.h> |
| 14 |
|
| 15 |
#if OPENSSL_VERSION_NUMBER < 0x10100000L |
| 16 |
|
| 17 |
static inline void RSA_get0_key(const RSA *rsa, const BIGNUM **n, |
| 18 |
const BIGNUM **e, const BIGNUM **d) |
| 19 |
{ |
| 20 |
if (n != NULL) |
| 21 |
*n = rsa->n; |
| 22 |
if (e != NULL) |
| 23 |
*e = rsa->e; |
| 24 |
if (d != NULL) |
| 25 |
*d = rsa->d; |
| 26 |
} |
| 27 |
|
| 28 |
#endif |
| 29 |
|
| 30 |
#ifdef __cplusplus |
| 31 |
} |
| 32 |
#endif |
| 33 |
|
| 34 |
#endif |