From ac7fbb1db493503215bb7caa4a4e45bc86c7012d Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Sun, 28 Jan 2024 09:18:38 +0000 Subject: [PATCH] secp256k1 extension mod: compatibility fix for pre-bookworm distros --- extmod/secp256k1mod.c | 4 +++- mmgen/data/version | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/extmod/secp256k1mod.c b/extmod/secp256k1mod.c index 568cf1a9..efd38c32 100755 --- a/extmod/secp256k1mod.c +++ b/extmod/secp256k1mod.c @@ -84,7 +84,9 @@ static PyObject * pubkey_gen(PyObject *self, PyObject *args) { size_t pubkey_bytes_len = compressed == 1 ? 33 : 65; unsigned char pubkey_bytes[pubkey_bytes_len]; secp256k1_pubkey pubkey; - secp256k1_context *ctx = secp256k1_context_create(SECP256K1_CONTEXT_NONE); + /* use deprecated context flags (see libsecp256k1 CHANGELOG) for backward compatibility (pre-bookworm) */ + secp256k1_context *ctx = secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY); + /* secp256k1_context *ctx = secp256k1_context_create(SECP256K1_CONTEXT_NONE); */ /* for bookworm and later */ if (ctx == NULL) { PyErr_SetString(PyExc_RuntimeError, "Context initialization failed"); return NULL; diff --git a/mmgen/data/version b/mmgen/data/version index 5f837c8a..ea667bcd 100644 --- a/mmgen/data/version +++ b/mmgen/data/version @@ -1 +1 @@ -14.1.dev5 +14.1.dev6