]> 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:27 +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 83c5af989e983e3b89557f039a70f42265e1022f..1dec0052143bdf5b008c124ef355804122450277 100644 (file)
@@ -5062,7 +5062,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;
     }