Skip to content

Commit e7e92e0

Browse files
author
Amos Shi
committed
8325022: Incorrect error message on client authentication
Backport-of: fe78c0f1911c9fdc1d30e23847d102748dfa2063
1 parent d85b7c1 commit e7e92e0

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
@@ -382,7 +382,7 @@ private void onCertificate(ServerHandshakeContext shc,
382382
ClientAuthType.CLIENT_AUTH_REQUESTED) {
383383
// unexpected or require client authentication
384384
throw shc.conContext.fatal(Alert.BAD_CERTIFICATE,
385-
"Empty server certificate chain");
385+
"Empty client certificate chain");
386386
} else {
387387
return;
388388
}
@@ -399,7 +399,7 @@ private void onCertificate(ServerHandshakeContext shc,
399399
}
400400
} catch (CertificateException ce) {
401401
throw shc.conContext.fatal(Alert.BAD_CERTIFICATE,
402-
"Failed to parse server certificates", ce);
402+
"Failed to parse client certificates", ce);
403403
}
404404

405405
checkClientCerts(shc, x509Certs);
@@ -1216,7 +1216,7 @@ private static X509Certificate[] checkClientCerts(
12161216
}
12171217
} catch (CertificateException ce) {
12181218
throw shc.conContext.fatal(Alert.BAD_CERTIFICATE,
1219-
"Failed to parse server certificates", ce);
1219+
"Failed to parse client certificates", ce);
12201220
}
12211221

12221222
// find out the types of client authentication used

0 commit comments

Comments
 (0)