Cross-Platform C++

ot::ssl
class SSLSession  (abstract)

#include "ot/ssl/SSLSession.h"

ot::ManagedObject An abstract interface class providing a means for client applications to access and control SSL session information. A SSL session represents the set of parameters and secret keys negotiated during a handshake between two entities, but the SSLSession interface provides only limited access to this information.

A SSL connection uses a SSL session, but that session may be used by many connections. The SSL session used by a connection may be replaced by a different SSL session if SSL renegotiation takes place.

See also:
SSLSocket::getSession()



Method Summary
 virtual String getCipherSuite() const=0
         Returns the name of the cipher suite being employed by this SSLSession.
 virtual ByteString getId() const=0
         Returns the SSL session identifier assigned to this SSLSession by the server.
 virtual String getPeerCertDomainName() const=0
         Returns the domain name contained within the peer's certificate.
 virtual String getPeerCertIssuerName() const=0
         Returns the name of the principal who signed and issued the peer's certificate.
 virtual String getPeerCertSubjectName() const=0
         Returns the subject name field from the peer's certificate.
 virtual String getPeerHost() const=0
         Returns the host name of the peer.
 virtual int getPeerPort() const=0
         Returns the port number of the peer.
 virtual String getProtocol() const=0
         Returns a string representation of the SSL/TLS protocol being employed by this SSLSession.
 virtual void invalidate()=0
         Invalidates the SSL session.
 virtual bool isValid()=0
         Returns a boolean flag indicating if this SSLSession represents a successfully negotiated session between two peers.

Methods inherited from class ot::ManagedObject
addRef(), getRefCount(), onFinalRelease(), operator=(const ManagedObject&), release()

Method Detail

getCipherSuite

virtual String getCipherSuite() const=0
Returns the name of the cipher suite being employed by this SSLSession.


getId

virtual ByteString getId() const=0
Returns the SSL session identifier assigned to this SSLSession by the server.


getPeerCertDomainName

virtual String getPeerCertDomainName() const=0
Returns the domain name contained within the peer's certificate. Historically, the domain name was coded in the Common Name (CN) field within the subject name of the x509 certificate (see getPeerCertSubjectName() ). More recently, this information is contained within the dNSName field of the subjectAltName extension.

This method first checks for a subjectAltName extension and, failing that, extracts the Common Name from the Subject Name.

Returns:
the fully-qualified domain name or an empty string if no certificate was exchanged.

getPeerCertIssuerName

virtual String getPeerCertIssuerName() const=0
Returns the name of the principal who signed and issued the peer's certificate. The issuer name field of a certificate contains a X.500 distinguished name (DN). This describes a hierarchical name composed of attributes, such as country name, organization name etc. The following is an example:-
    /CN=ElCel CA/ST=London/C=UK/emailAddress=ca@elcel.com/O=ElCel Technology

Returns:
the issuer name or an empty string if no certificate was exchanged.

getPeerCertSubjectName

virtual String getPeerCertSubjectName() const=0
Returns the subject name field from the peer's certificate. The subject name field of a certificate contains a X.500 distinguished name (DN). This describes a hierarchical name composed of attributes, such as common name, organization name etc. The following is an example subject name:-
    /CN=www.elcel.com/ST=London/C=UK/emailAddress=info@elcel.com/O=ElCel Technology

Returns:
the subject name or an empty string if no certificate was exchanged.

getPeerHost

virtual String getPeerHost() const=0
Returns the host name of the peer. This will be the host name specified when connecting a SSLSocket.


getPeerPort

virtual int getPeerPort() const=0
Returns the port number of the peer. This will be the port number specified when connecting a SSLSocket.


getProtocol

virtual String getProtocol() const=0
Returns a string representation of the SSL/TLS protocol being employed by this SSLSession.


invalidate

virtual void invalidate()=0
Invalidates the SSL session. Future connections will not be able to resume or join this session, but existing connections using this session can continue to use the session until the connection is closed or a SSL renegotiation takes place.


isValid

virtual bool isValid()=0
Returns a boolean flag indicating if this SSLSession represents a successfully negotiated session between two peers.

Returns:
true if the SSL session has been successfully negotiated; false otherwise.


Cross-Platform C++

Found a bug or missing feature? Please email us at support@elcel.com

Copyright © 2000-2005 ElCel Technology   Trademark Acknowledgements