From: Vsevolod Stakhov Date: Fri, 9 Aug 2024 11:46:17 +0000 (+0100) Subject: [Minor] Oops, fix pubkey loading X-Git-Tag: 3.10.0~42^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5099%2Fhead;p=thirdparty%2Frspamd.git [Minor] Oops, fix pubkey loading --- diff --git a/src/libcryptobox/keypair.c b/src/libcryptobox/keypair.c index f6f9329571..96389dce85 100644 --- a/src/libcryptobox/keypair.c +++ b/src/libcryptobox/keypair.c @@ -325,16 +325,13 @@ rspamd_pubkey_from_bin(const unsigned char *raw, gsize len, enum rspamd_cryptobox_keypair_type type) { - gsize expected_len; unsigned int pklen; struct rspamd_cryptobox_pubkey *pk; unsigned char *pk_data; g_assert(raw != NULL && len > 0); - (type == RSPAMD_KEYPAIR_KEX) ? crypto_box_PUBLICKEYBYTES : crypto_sign_PUBLICKEYBYTES; - - if (len != expected_len) { + if (len != crypto_box_PUBLICKEYBYTES) { return NULL; }