public abstract Principal getPeerPrincipal () throws SSLPeerUnverifiedException

Returns the server's principal which was established as part of defining the session during the original connection that retrieved the network resource.

Returns:  the server's principal. Returns an X500Principal of the end-entity certiticate for X509-based cipher suites, and KerberosPrincipal for Kerberos cipher suites.

Exceptions:
SSLPeerUnverifiedException    if the peer was not verified.

See also:
getServerCertificateChain(), getLocalPrincipal()