]> 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:47 +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 bac8f342085fb726f03d462de805d7f64eae5136..1f92ba2ae7de4543b87d8bbb05f35e8c87a667a4 100644 (file)
@@ -4926,7 +4926,7 @@ int ssl_encapsulate(SSL *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;
     }