Skip to content

Commit 2bae839

Browse files
author
Amos Shi
committed
8325022: Incorrect error message on client authentication
Backport-of: fe78c0f1911c9fdc1d30e23847d102748dfa2063
1 parent 7592a6b commit 2bae839

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/java.base/share/classes/sun/security/ssl/CertificateMessage.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ private void onCertificate(ServerHandshakeContext shc,
388388
ClientAuthType.CLIENT_AUTH_REQUESTED) {
389389
// unexpected or require client authentication
390390
throw shc.conContext.fatal(Alert.BAD_CERTIFICATE,
391-
"Empty server certificate chain");
391+
"Empty client certificate chain");
392392
} else {
393393
return;
394394
}
@@ -405,7 +405,7 @@ private void onCertificate(ServerHandshakeContext shc,
405405
}
406406
} catch (CertificateException ce) {
407407
throw shc.conContext.fatal(Alert.BAD_CERTIFICATE,
408-
"Failed to parse server certificates", ce);
408+
"Failed to parse client certificates", ce);
409409
}
410410

411411
checkClientCerts(shc, x509Certs);
@@ -1247,7 +1247,7 @@ private static X509Certificate[] checkClientCerts(
12471247
}
12481248
} catch (CertificateException ce) {
12491249
throw shc.conContext.fatal(Alert.BAD_CERTIFICATE,
1250-
"Failed to parse server certificates", ce);
1250+
"Failed to parse client certificates", ce);
12511251
}
12521252

12531253
// find out the types of client authentication used

0 commit comments

Comments
 (0)