]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
s3_lib.c: Use illegal_parameter for failing encapsulation in ml_kem
authorNorbert Pocs <norbertp@openssl.org>
Thu, 15 May 2025 07:53:00 +0000 (09:53 +0200)
committerTomas Mraz <tomas@openssl.org>
Fri, 16 May 2025 09:11:33 +0000 (11:11 +0200)
Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27627)

(cherry picked from commit e66097fc6687750ac792986a71375b23793766c2)

ssl/s3_lib.c

index 4084cf724b0a94b50d9977210cf34a55476d7c5b..896c2be88d05fc5df477efe64bbd50b49231943d 100644 (file)
@@ -5006,7 +5006,7 @@ int ssl_encapsulate(SSL_CONNECTION *s, EVP_PKEY *pubkey,
     }
 
     if (EVP_PKEY_encapsulate(pctx, ct, &ctlen, pms, &pmslen) <= 0) {
-        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
+        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_KEY_SHARE);
         goto err;
     }