LibreSSL: Fix dh5 code
Add LibreSSL check to old OpenSSL #ifdef guard as DH_{get0,set0}_key() is not implemented in LibreSSL. Signed-off-by: Christian Neukirchen <chneukirchen@gmail.com>
This commit is contained in:
parent
32d08d5bf6
commit
0d42179e12
1 changed files with 2 additions and 2 deletions
|
@ -611,7 +611,7 @@ void crypto_cipher_deinit(struct crypto_cipher *ctx)
|
||||||
|
|
||||||
void * dh5_init(struct wpabuf **priv, struct wpabuf **publ)
|
void * dh5_init(struct wpabuf **priv, struct wpabuf **publ)
|
||||||
{
|
{
|
||||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||||
DH *dh;
|
DH *dh;
|
||||||
struct wpabuf *pubkey = NULL, *privkey = NULL;
|
struct wpabuf *pubkey = NULL, *privkey = NULL;
|
||||||
size_t publen, privlen;
|
size_t publen, privlen;
|
||||||
|
@ -712,7 +712,7 @@ err:
|
||||||
|
|
||||||
void * dh5_init_fixed(const struct wpabuf *priv, const struct wpabuf *publ)
|
void * dh5_init_fixed(const struct wpabuf *priv, const struct wpabuf *publ)
|
||||||
{
|
{
|
||||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||||
DH *dh;
|
DH *dh;
|
||||||
|
|
||||||
dh = DH_new();
|
dh = DH_new();
|
||||||
|
|
Loading…
Reference in a new issue