]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix signing in openssl mode
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 3 Jun 2018 20:53:33 +0000 (21:53 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 3 Jun 2018 20:53:33 +0000 (21:53 +0100)
src/libcryptobox/cryptobox.c
src/libcryptobox/cryptobox.h

index c0857b094541719d72a11b01d9dc05effd289134..b58f84418a275caa64a68403388f279227a55cf0 100644 (file)
@@ -560,6 +560,10 @@ rspamd_cryptobox_sign (guchar *sig, gsize *siglen_p,
                                &diglen, kinv, rp, lk) == 1);
                g_assert (diglen <= sizeof (rspamd_signature_t));
 
+               if (siglen_p) {
+                       *siglen_p = diglen;
+               }
+
                EC_KEY_free (lk);
                EVP_MD_CTX_destroy (sha_ctx);
                BN_free (bn_sec);
index 1045547a25ca83fe53a07e37c5f10d1bdbc9724f..e5cdb8f6c5818287a1e9e456196c25ccf692adef 100644 (file)
@@ -40,7 +40,7 @@ struct rspamd_cryptobox_segment {
 #define rspamd_cryptobox_HASHSTATEBYTES 256
 #define rspamd_cryptobox_MAX_SIGSKBYTES 64
 #define rspamd_cryptobox_MAX_SIGPKBYTES 32
-#define rspamd_cryptobox_MAX_SIGBYTES 64
+#define rspamd_cryptobox_MAX_SIGBYTES 72
 
 #define CPUID_AVX2 0x1
 #define CPUID_AVX 0x2