Lines 122-128
Link Here
|
122 |
|
122 |
|
123 |
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) |
123 |
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) |
124 |
/* From OpenSSL 1.1.0 */ |
124 |
/* From OpenSSL 1.1.0 */ |
125 |
static int |
125 |
int |
126 |
RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d) { |
126 |
RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d) { |
127 |
|
127 |
|
128 |
/* |
128 |
/* |
Lines 149-155
Link Here
|
149 |
return 1; |
149 |
return 1; |
150 |
} |
150 |
} |
151 |
|
151 |
|
152 |
static int |
152 |
int |
153 |
RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q) { |
153 |
RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q) { |
154 |
|
154 |
|
155 |
/* |
155 |
/* |
Lines 171-177
Link Here
|
171 |
return 1; |
171 |
return 1; |
172 |
} |
172 |
} |
173 |
|
173 |
|
174 |
static int |
174 |
int |
175 |
RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp) { |
175 |
RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp) { |
176 |
/* |
176 |
/* |
177 |
* If the fields dmp1, dmq1 and iqmp in r are NULL, the |
177 |
* If the fields dmp1, dmq1 and iqmp in r are NULL, the |
Lines 198-204
Link Here
|
198 |
return 1; |
198 |
return 1; |
199 |
} |
199 |
} |
200 |
|
200 |
|
201 |
static void |
201 |
void |
202 |
RSA_get0_key(const RSA *r, |
202 |
RSA_get0_key(const RSA *r, |
203 |
const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) |
203 |
const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) |
204 |
{ |
204 |
{ |
Lines 210-216
Link Here
|
210 |
*d = r->d; |
210 |
*d = r->d; |
211 |
} |
211 |
} |
212 |
|
212 |
|
213 |
static void |
213 |
void |
214 |
RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q) { |
214 |
RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q) { |
215 |
if (p != NULL) |
215 |
if (p != NULL) |
216 |
*p = r->p; |
216 |
*p = r->p; |
Lines 218-224
Link Here
|
218 |
*q = r->q; |
218 |
*q = r->q; |
219 |
} |
219 |
} |
220 |
|
220 |
|
221 |
static void |
221 |
void |
222 |
RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1, |
222 |
RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1, |
223 |
const BIGNUM **iqmp) |
223 |
const BIGNUM **iqmp) |
224 |
{ |
224 |
{ |
Lines 230-236
Link Here
|
230 |
*iqmp = r->iqmp; |
230 |
*iqmp = r->iqmp; |
231 |
} |
231 |
} |
232 |
|
232 |
|
233 |
static int |
233 |
int |
234 |
RSA_test_flags(const RSA *r, int flags) { |
234 |
RSA_test_flags(const RSA *r, int flags) { |
235 |
return (r->flags & flags); |
235 |
return (r->flags & flags); |
236 |
} |
236 |
} |