diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-08-09 12:46:17 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-08-09 12:46:17 +0100 |
commit | 03aa3490726177fb3cf9da5b80f63dc9bf5993dc (patch) | |
tree | c3a2cd1ccb3a4eae0571744d5e3b61cb67aa75fd | |
parent | 12c12bdf0c00438d0cb37d02dae5a34f41066865 (diff) | |
download | rspamd-03aa3490726177fb3cf9da5b80f63dc9bf5993dc.tar.gz rspamd-03aa3490726177fb3cf9da5b80f63dc9bf5993dc.zip |
[Minor] Oops, fix pubkey loading
-rw-r--r-- | src/libcryptobox/keypair.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libcryptobox/keypair.c b/src/libcryptobox/keypair.c index f6f932957..96389dce8 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; } |