]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
argon2: Fixed an thread availability error string
authorPIums <jzh52503@gmail.com>
Wed, 4 Sep 2024 02:37:11 +0000 (22:37 -0400)
committerTomas Mraz <tomas@openssl.org>
Thu, 5 Sep 2024 15:32:01 +0000 (17:32 +0200)
Correctly display the number of requested threads and the number
of available threads.

CLA: trivial

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25375)

providers/implementations/kdfs/argon2.c

index fe84ab54cad7c399b75010867ae537d30dfc243a..6acf47fb1a95ed9e952224b03a5499e89e7ff55a 100644 (file)
@@ -1071,8 +1071,8 @@ static int kdf_argon2_derive(void *vctx, unsigned char *out, size_t outlen,
 # else
         if (ctx->threads > ossl_get_avail_threads(ctx->libctx)) {
             ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_THREAD_POOL_SIZE,
-                           "requested %u threads, available: 1",
-                           ossl_get_avail_threads(ctx->libctx));
+                           "requested %u threads, available: %u",
+                           ctx->threads, ossl_get_avail_threads(ctx->libctx));
             return 0;
         }
 # endif