| Kea 3.0.2-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 >:
[legend]

## Public Member Functions
| TlsStreamBase (const IOServicePtr &service, TlsContextPtr context)
| Constructor.
virtual | ~TlsStreamBase ()
| Destructor.
virtual std::string | getIssuer ()=0
| Return the commonName part of the issuerName of the peer certificate.
TlsRole | getRole () const
| Returns the role.
virtual std::string | getSubject ()=0
| Return the commonName part of the subjectName of the peer certificate.
virtual void | handshake (Callback &callback)=0
| TLS Handshake.
virtual void | shutdown (Callback &callback)=0
| TLS shutdown.
Public Member Functions inherited from isc::asiolink::StreamService
| StreamService (const IOServicePtr &io_service, TlsContextPtr &tls_context)
| Constructor.

## Public Attributes
TlsRole | role_
| The role i.e. client or server.

## Detailed Description

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

TLS stream base class.

Template Parameters

  Callback | The type of callbacks.
  TlsStreamImpl | The type of underlying TLS streams.

Definition at line 140 of file common_tls.h.

## Constructor & Destructor Documentation

## ◆ TlsStreamBase()

template<typename Callback, typename TlsStreamImpl>

isc::asiolink::TlsStreamBase< Callback, TlsStreamImpl >::TlsStreamBase | ( | const IOServicePtr & | service,
|  | TlsContextPtr | context )

Constructor.

Parameters

  service | I/O Service object used to manage the stream.
  context | Pointer to the TLS context.

Note
  The caller must not provide a null pointer to the TLS context.

## ◆ ~TlsStreamBase()

template<typename Callback, typename TlsStreamImpl>

virtual isc::asiolink::TlsStreamBase< Callback, TlsStreamImpl >::~TlsStreamBase | ( |  | ) |
| inline virtual

Destructor.

Definition at line 151 of file common_tls.h.

## Member Function Documentation

## ◆ getIssuer()

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.

## ◆ getRole()

template<typename Callback, typename TlsStreamImpl>

TlsRole isc::asiolink::TlsStreamBase< Callback, TlsStreamImpl >::getRole | ( |  | ) | const
| inline

Returns the role.

Definition at line 154 of file common_tls.h.

References role_.

## ◆ getSubject()

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.

## ◆ handshake()

template<typename Callback, typename TlsStreamImpl>

virtual void isc::asiolink::TlsStreamBase< Callback, TlsStreamImpl >::handshake | ( | Callback & | callback | ) |
| pure virtual

TLS Handshake.

Parameters

  callback | Callback object.

## ◆ shutdown()

template<typename Callback, typename TlsStreamImpl>

virtual void isc::asiolink::TlsStreamBase< Callback, TlsStreamImpl >::shutdown | ( | Callback & | callback | ) |
| pure virtual

TLS shutdown.

Parameters

  callback | Callback object.

## Member Data Documentation

## ◆ role_

template<typename Callback, typename TlsStreamImpl>

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

The role i.e. client or server.

Definition at line 191 of file common_tls.h.

Referenced by getRole().

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

- common_tls.h