]> 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:07 +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)

ssl/s3_lib.c

index e6177950c9234792cd7c1e1c99e6c6e0b3668aa6..14373cdfa0294faeb398c0d677ff16c3367af565 100644 (file)
@@ -5144,7 +5144,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;
     }