Skip to content

Commit a9e37ba

Browse files
committed
fix rsa_st not being defined in node12
1 parent 7e4eddd commit a9e37ba

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

main.c

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,33 @@
2323
#include <openssl/bio.h>
2424
#include <openssl/x509.h>
2525

26+
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
27+
28+
struct rsa_st {
29+
/*
30+
* #legacy
31+
* The first field is used to pickup errors where this is passed
32+
* instead of an EVP_PKEY. It is always zero.
33+
* THIS MUST REMAIN THE FIRST FIELD.
34+
*/
35+
int dummy_zero;
36+
37+
int32_t version;
38+
const RSA_METHOD *meth;
39+
/* functional reference if 'meth' is ENGINE-provided */
40+
ENGINE *engine;
41+
BIGNUM *n;
42+
BIGNUM *e;
43+
BIGNUM *d;
44+
BIGNUM *p;
45+
BIGNUM *q;
46+
BIGNUM *dmp1;
47+
BIGNUM *dmq1;
48+
BIGNUM *iqmp;
49+
};
50+
51+
#endif
52+
2653
#include <string.h>
2754

2855
static napi_value

0 commit comments

Comments
 (0)