Kea  1.9.9-git
isc::asiolink::TlsStreamBase< Callback, TlsStreamImpl > Class Template Referenceabstract

TLS stream base class. More...

#include <common_tls.h>

+ Inheritance diagram for isc::asiolink::TlsStreamBase< Callback, TlsStreamImpl >:

Public Member Functions

 TlsStreamBase (IOService &service, TlsContextPtr context)
 Constructor. More...
 
virtual ~TlsStreamBase ()
 Destructor. More...
 
virtual std::string getIssuer ()=0
 Return the commonName part of the issuerName of the peer certificate. More...
 
TlsRole getRole () const
 Returns the role. More...
 
virtual std::string getSubject ()=0
 Return the commonName part of the subjectName of the peer certificate. More...
 
virtual void handshake (Callback &callback)=0
 TLS Handshake. More...
 
virtual void shutdown (Callback &callback)=0
 TLS shutdown. More...
 

Public Attributes

TlsRole role_
 The role i.e. client or server. More...
 

Detailed Description

template<typename Callback, typename TlsStreamImpl>
class isc::asiolink::TlsStreamBase< Callback, TlsStreamImpl >

TLS stream base class.

Template Parameters
CallbackThe type of callbacks.
TlsStreamImplThe type of underlying TLS streams.

Definition at line 126 of file common_tls.h.

Constructor & Destructor Documentation

template<typename Callback , typename TlsStreamImpl >
isc::asiolink::TlsStreamBase< Callback, TlsStreamImpl >::TlsStreamBase ( IOService service,
TlsContextPtr  context 
)

Constructor.

Parameters
serviceI/O Service object used to manage the stream.
contextPointer to the TLS context.
Note
The caller must not provide a null pointer to the TLS context.
template<typename Callback , typename TlsStreamImpl >
virtual isc::asiolink::TlsStreamBase< Callback, TlsStreamImpl >::~TlsStreamBase ( )
inlinevirtual

Destructor.

Definition at line 137 of file common_tls.h.

Member Function Documentation

template<typename Callback , typename TlsStreamImpl >
virtual std::string isc::asiolink::TlsStreamBase< Callback, TlsStreamImpl >::getIssuer ( )
pure virtual

Return the commonName part of the issuerName of the peer certificate.

First commonName when there are more than one, in UTF-8. The issuerName is the subjectName of the signing certificate (the issue in PKIX terms). The idea is to encode a group as members of an intermediate certification authority.

Returns
The commonName part of the issuerName or the empty string.
template<typename Callback , typename TlsStreamImpl >
TlsRole isc::asiolink::TlsStreamBase< Callback, TlsStreamImpl >::getRole ( ) const
inline

Returns the role.

Definition at line 140 of file common_tls.h.

References isc::asiolink::TlsStreamBase< Callback, TlsStreamImpl >::role_.

template<typename Callback , typename TlsStreamImpl >
virtual std::string isc::asiolink::TlsStreamBase< Callback, TlsStreamImpl >::getSubject ( )
pure virtual

Return the commonName part of the subjectName of the peer certificate.

First commonName when there are more than one, in UTF-8. RFC 3280 provides as a commonName example "Susan Housley", to idea to give access to this come from the Role Based Access Control experiment.

Returns
The commonName part of the subjectName or the empty string.
template<typename Callback , typename TlsStreamImpl >
virtual void isc::asiolink::TlsStreamBase< Callback, TlsStreamImpl >::handshake ( Callback &  callback)
pure virtual

TLS Handshake.

Parameters
callbackCallback object.
template<typename Callback , typename TlsStreamImpl >
virtual void isc::asiolink::TlsStreamBase< Callback, TlsStreamImpl >::shutdown ( Callback &  callback)
pure virtual

TLS shutdown.

Parameters
callbackCallback object.

Member Data Documentation

template<typename Callback , typename TlsStreamImpl >
TlsRole isc::asiolink::TlsStreamBase< Callback, TlsStreamImpl >::role_

The role i.e. client or server.

Definition at line 177 of file common_tls.h.

Referenced by isc::asiolink::TlsStreamBase< Callback, TlsStreamImpl >::getRole().


The documentation for this class was generated from the following file: