mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8206355: SSLSessionImpl.getLocalPrincipal() throws NPE
Fixed SSLSessionImpl.getLocalPrincipal() implementation when client side authentication is not enabled. Reviewed-by: xuelei
This commit is contained in:
parent
7129c3e786
commit
99f911cc71
2 changed files with 345 additions and 1 deletions
|
@ -658,7 +658,7 @@ final class SSLSessionImpl extends ExtendedSSLSession {
|
|||
*/
|
||||
@Override
|
||||
public Principal getLocalPrincipal() {
|
||||
return ((localCerts == null && localCerts.length != 0) ? null :
|
||||
return ((localCerts == null || localCerts.length == 0) ? null :
|
||||
localCerts[0].getSubjectX500Principal());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue