TLS context base class.  
 More...
#include <common_tls.h>
|  | 
| static void | configure (TlsContextPtr &context, TlsRole role, const std::string &ca_file, const std::string &cert_file, const std::string &key_file, bool cert_required=true) | 
|  | Configure. 
 | 
|  | 
| virtual void | loadCaFile (const std::string &ca_file)=0 | 
|  | Load the trust anchor aka certification authority. 
 | 
| virtual void | loadCaPath (const std::string &ca_path)=0 | 
|  | Load the trust anchor aka certification authority. 
 | 
| virtual void | loadCertFile (const std::string &cert_file)=0 | 
|  | Load the certificate file. 
 | 
| virtual void | loadKeyFile (const std::string &key_file)=0 | 
|  | Load the private key from a file. 
 | 
| virtual void | setCertRequired (bool cert_required)=0 | 
|  | Set the peer certificate requirement mode. 
 | 
TLS context base class. 
Definition at line 40 of file common_tls.h.
◆ ~TlsContextBase()
  
  | 
        
          | virtual isc::asiolink::TlsContextBase::~TlsContextBase | ( |  | ) |  |  | inlinevirtual | 
 
 
◆ TlsContextBase()
  
  | 
        
          | isc::asiolink::TlsContextBase::TlsContextBase | ( | TlsRole | role | ) |  |  | inlineexplicit | 
 
Create a fresh context. 
- Parameters
- 
  
    | role | The TLS role client or server. |  
 
Definition at line 48 of file common_tls.h.
References role_.
 
 
◆ configure()
  
  | 
        
          | void isc::asiolink::TlsContextBase::configure | ( | TlsContextPtr & | context, |  
          |  |  | TlsRole | role, |  
          |  |  | const std::string & | ca_file, |  
          |  |  | const std::string & | cert_file, |  
          |  |  | const std::string & | key_file, |  
          |  |  | bool | cert_required = true ) |  | static | 
 
Configure. 
- Note
- No need for a role set method.
- Parameters
- 
  
    | context | The TLS context to configure. |  | role | The TLS role client or server. |  | ca_file | The certificate file or directory name. |  | cert_file | The certificate file name. |  | key_file | The private key file name. |  | cert_required | True if peer certificates are required, false if they are optional. This is a server specific parameter. |  
 
- Exceptions
- 
  
  
Definition at line 22 of file common_tls.cc.
References isc_throw, and isc::util::file::isDir().
 
 
◆ getCertRequired()
  
  | 
        
          | virtual bool isc::asiolink::TlsContextBase::getCertRequired | ( |  | ) | const |  | pure virtual | 
 
Get the peer certificate requirement mode. 
- Returns
- True if peer certificates are required, false if they are optional. 
 
 
◆ getRole()
  
  | 
        
          | TlsRole isc::asiolink::TlsContextBase::getRole | ( |  | ) | const |  | inline | 
 
 
◆ loadCaFile()
  
  | 
        
          | virtual void isc::asiolink::TlsContextBase::loadCaFile | ( | const std::string & | ca_file | ) |  |  | protectedpure virtual | 
 
Load the trust anchor aka certification authority. 
- Parameters
- 
  
    | ca_file | The certificate file name. |  
 
- Exceptions
- 
  
  
 
 
◆ loadCaPath()
  
  | 
        
          | virtual void isc::asiolink::TlsContextBase::loadCaPath | ( | const std::string & | ca_path | ) |  |  | protectedpure virtual | 
 
Load the trust anchor aka certification authority. 
- Parameters
- 
  
    | ca_path | The certificate directory name. |  
 
- Exceptions
- 
  
  
 
 
◆ loadCertFile()
  
  | 
        
          | virtual void isc::asiolink::TlsContextBase::loadCertFile | ( | const std::string & | cert_file | ) |  |  | protectedpure virtual | 
 
Load the certificate file. 
- Parameters
- 
  
    | cert_file | The certificate file name. |  
 
- Exceptions
- 
  
  
 
 
◆ loadKeyFile()
  
  | 
        
          | virtual void isc::asiolink::TlsContextBase::loadKeyFile | ( | const std::string & | key_file | ) |  |  | protectedpure virtual | 
 
Load the private key from a file. 
- Parameters
- 
  
    | key_file | The private key file name. |  
 
- Exceptions
- 
  
  
 
 
◆ setCertRequired()
  
  | 
        
          | virtual void isc::asiolink::TlsContextBase::setCertRequired | ( | bool | cert_required | ) |  |  | protectedpure virtual | 
 
Set the peer certificate requirement mode. 
- Parameters
- 
  
    | cert_required | True if peer certificates are required, false if they are optional. |  
 
- Exceptions
- 
  
  
 
 
◆ role_
      
        
          | TlsRole isc::asiolink::TlsContextBase::role_ | 
      
 
 
The documentation for this class was generated from the following files: