aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-08-07 14:45:03 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2024-08-07 14:45:03 +0100
commitc1b3feb44e6ce7a8341ed003b7c286e29fe292e1 (patch)
tree3440e56c4a03f3b230983842554c7a9d373dfc5e
parent830131db46761dd7abdcda5734dc4d9e8aaf5125 (diff)
downloadrspamd-c1b3feb44e6ce7a8341ed003b7c286e29fe292e1.tar.gz
rspamd-c1b3feb44e6ce7a8341ed003b7c286e29fe292e1.zip
[Fix] Fix compatibility with OSSL 1.0
-rw-r--r--src/libcryptobox/cryptobox.c7
-rw-r--r--src/libserver/dkim.c1
2 files changed, 2 insertions, 6 deletions
diff --git a/src/libcryptobox/cryptobox.c b/src/libcryptobox/cryptobox.c
index 120c6ea10..03b93b66b 100644
--- a/src/libcryptobox/cryptobox.c
+++ b/src/libcryptobox/cryptobox.c
@@ -368,7 +368,7 @@ void rspamd_cryptobox_keypair(rspamd_pk_t pk, rspamd_sk_t sk,
OSSL_LIB_CTX_free(libctx);
#else
const EC_POINT *ec_pub;
- EC_GROUP *group;
+ const EC_GROUP *group;
const BIGNUM *bn_sec;
EC_KEY *ec_sec;
@@ -395,8 +395,6 @@ void rspamd_cryptobox_keypair(rspamd_pk_t pk, rspamd_sk_t sk,
len = BN_num_bytes(bn_sec);
g_assert(len <= (int) sizeof(rspamd_sk_t));
BN_bn2bin(bn_sec, sk);
-
- EC_GROUP_free(group);
#endif
#endif
}
@@ -438,7 +436,7 @@ void rspamd_cryptobox_keypair_sig(rspamd_sig_pk_t pk, rspamd_sig_sk_t sk,
EC_KEY *ec_sec;
const BIGNUM *bn_sec;
const EC_POINT *ec_pub;
- EC_GROUP *group;
+ const EC_GROUP *group;
ec_sec = EC_KEY_new_by_curve_name(CRYPTOBOX_CURVE_NID);
g_assert(ec_sec != NULL);
@@ -462,7 +460,6 @@ void rspamd_cryptobox_keypair_sig(rspamd_sig_pk_t pk, rspamd_sig_sk_t sk,
len = BN_num_bytes(bn_sec);
g_assert(len <= (int) sizeof(rspamd_sk_t));
BN_bn2bin(bn_sec, sk);
- EC_GROUP_free(group);
#endif
#endif
diff --git a/src/libserver/dkim.c b/src/libserver/dkim.c
index 50a55ebaa..52ab09d95 100644
--- a/src/libserver/dkim.c
+++ b/src/libserver/dkim.c
@@ -25,7 +25,6 @@
#include <openssl/evp.h>
#include <openssl/rsa.h>
#include <openssl/engine.h>
-#include <openssl/param_build.h>
/* special DNS tokens */
#define DKIM_DNSKEYNAME "_domainkey"