View | Details | Raw Unified | Return to bug 213819
Collapse All | Expand All

(-)Crypto.h (-5 / +15 lines)
Lines 282-295 namespace crypto Link Here
282
282
283
// take care about openssl version
283
// take care about openssl version
284
#include <openssl/opensslv.h>
284
#include <openssl/opensslv.h>
285
#if (OPENSSL_VERSION_NUMBER < 0x010100000) // 1.1.0
285
#if (OPENSSL_VERSION_NUMBER < 0x010100000) || defined(LIBRESSL_VERSION_NUMBER) // 1.1.0 or LibreSSL
286
// define getters and setters introduced in 1.1.0
286
// define getters and setters introduced in 1.1.0
287
inline int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g) { d->p = p; d->q = q; d->g = g; return 1; }
287
288
inline int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) { d->pub_key = pub_key; d->priv_key = priv_key; return 1; } 
288
inline int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g)
289
	{ d->p = p; d->q = q; d->g = g; return 1; }
290
inline int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key)
291
	{ d->pub_key = pub_key; d->priv_key = priv_key; return 1; }
292
293
inline void DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key)
294
	{ *pub_key = d->pub_key; *priv_key = d->priv_key; }
295
inline int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s)
296
	{ sig->r = r; sig->s = s; return 1; }
297
inline void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps)
298
	{ *pr = sig->r; *ps = sig->s; }
289
299
290
#endif
300
#endif
291
301
292
}		
302
}
293
}	
303
}
294
304
295
#endif
305
#endif

Return to bug 213819