From 394129dbc476cb879876b7dfc05c403bcfe5ef46 Mon Sep 17 00:00:00 2001 From: Dmitry Belyavskiy Date: Sun, 11 Dec 2016 20:59:42 +0300 Subject: [PATCH] Fix return value of gost_ec_derive --- gost_ec_keyx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gost_ec_keyx.c b/gost_ec_keyx.c index 8c2af2a..325d962 100644 --- a/gost_ec_keyx.c +++ b/gost_ec_keyx.c @@ -124,7 +124,7 @@ int pkey_gost_ec_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen) if (key == NULL) { *keylen = 32; - return 32; + return 1; } EVP_PKEY_get_default_digest_nid(my_key, &dgst_nid); -- 2.39.5