diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-09 19:58:05 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-09 19:58:05 +0000 |
commit | 65bf3316cf384588453604be6b4f0ed3751a8b0f (patch) | |
tree | 996a5f57d4a68c53473382e45cb22f574cb3e4db /libjava/classpath/javax/net/ssl/HandshakeCompletedEvent.java | |
parent | 8fc56618a84446beccd45b80381cdfe0e94050df (diff) | |
download | ppe42-gcc-65bf3316cf384588453604be6b4f0ed3751a8b0f.tar.gz ppe42-gcc-65bf3316cf384588453604be6b4f0ed3751a8b0f.zip |
Merged gcj-eclipse branch to trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120621 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/javax/net/ssl/HandshakeCompletedEvent.java')
-rw-r--r-- | libjava/classpath/javax/net/ssl/HandshakeCompletedEvent.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/libjava/classpath/javax/net/ssl/HandshakeCompletedEvent.java b/libjava/classpath/javax/net/ssl/HandshakeCompletedEvent.java index 743f1372672..b65dff06c8e 100644 --- a/libjava/classpath/javax/net/ssl/HandshakeCompletedEvent.java +++ b/libjava/classpath/javax/net/ssl/HandshakeCompletedEvent.java @@ -38,6 +38,7 @@ exception statement from your version. */ package javax.net.ssl; +import java.security.Principal; import java.security.cert.Certificate; import javax.security.cert.X509Certificate; @@ -108,6 +109,20 @@ public class HandshakeCompletedEvent extends java.util.EventObject } /** + * Returns the local identity used in this connection, or + * <code>null</code> if there is none. + * + * @return The local identity. + * @since 1.5 + */ + public Principal getLocalPrincipal () + { + if (session != null) + return session.getLocalPrincipal (); + return null; + } + + /** * Returns the peer's certificates being used in this connection. * * @return The peer's certificates. @@ -129,6 +144,22 @@ public class HandshakeCompletedEvent extends java.util.EventObject } /** + * Returns the peer's identity, or <code>null</code> if there is + * none. + * + * @return The peer's identity. + * @throws SSLPeerUnverifiedException If the remote peer's identity + * could not be verified. + * @since 1.5 + */ + public Principal getPeerPrincipal () throws SSLPeerUnverifiedException + { + if (session != null) + return session.getPeerPrincipal (); + return null; + } + + /** * Returns the SSL session object associated with this connection. * * @return The session object. |