- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
GSsl::Library Class Reference

A RAII class for initialising the underlying ssl library. More...

`#include <gssl.h>`

## Public Types
typedef Protocol::LogFn | LogFn

## Public Member Functions
| Library ()
| Constructor. More...
| Library (bool active, const std::string &pem_file, unsigned int flags, LogFn=NULL)
| Constructor. More...
| ~Library ()
| Destructor. Cleans up the underlying ssl library. More...
bool | enabled (bool for_serving=false) const
| Returns true if this is a real and enabled ssl library. More...

## Static Public Member Functions
static Library * | instance ()
| Returns a pointer to a library object, if any. More...
static std::string | credit (const std::string &prefix, const std::string &eol, const std::string &final)
| Returns a credit string. More...

## Friends
class | GSsl::Protocol

## Detailed Description

A RAII class for initialising the underlying ssl library.

Definition at line 147 of file gssl.h.

## Member Typedef Documentation

typedef Protocol::LogFn GSsl::Library::LogFn

Definition at line 150 of file gssl.h.

## Constructor & Destructor Documentation

GSsl::Library::Library | ( |  | ) |

Constructor.

Initialises the underlying ssl library for use as a client.

Definition at line 230 of file gssl_openssl.cpp.

GSsl::Library::Library | ( | bool | active,
|  | const std::string & | pem_file,
|  | unsigned int | flags,
|  | LogFn | log_fn = `NULL`
| ) |  |

Constructor.

Initialises the underlying ssl library or not (if the first parameter is false). The pem file is required if acting as a server. The flags should default to zero; their meaning are opaque at this interface.

Definition at line 238 of file gssl_openssl.cpp.

GSsl::Library::~Library | ( |  | ) |

Destructor. Cleans up the underlying ssl library.

Definition at line 247 of file gssl_openssl.cpp.

## Member Function Documentation

std::string GSsl::Library::credit | ( | const std::string & | prefix,
|  | const std::string & | eol,
|  | const std::string & | final
| ) |  |
| static

Returns a credit string.

Definition at line 271 of file gssl_openssl.cpp.

Referenced by Main::Admin::newServer(), and Main::CommandLineImp::showCredit().

bool GSsl::Library::enabled | ( | bool | for_serving = `false` | ) | const

Returns true if this is a real and enabled ssl library.

Definition at line 259 of file gssl_openssl.cpp.

Referenced by GPop::ServerPeer::securityEnabled(), GSmtp::ServerProtocol::ServerProtocol(), and GNet::SocketProtocol::sslCapable().

GSsl::Library * GSsl::Library::instance | ( |  | ) |
| static

Returns a pointer to a library object, if any.

Definition at line 254 of file gssl_openssl.cpp.

Referenced by GPop::ServerPeer::securityEnabled(), GSmtp::ServerProtocol::ServerProtocol(), and GNet::SocketProtocol::sslCapable().

## Friends And Related Function Documentation

friend class GSsl::Protocol
| friend

Definition at line 182 of file gssl.h.

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

- gssl.h
- gssl_openssl.cpp