}
};
+/** I/O hook provider for SSL modules. */
+class SSLIOHookProvider : public IOHookProvider
+{
+public:
+ SSLIOHookProvider(Module* mod, const std::string& Name)
+ : IOHookProvider(mod, "ssl/" + Name, IOH_SSL)
+ {
+ }
+};
+
class SSLIOHook : public IOHook
{
protected:
return 0;
}
-class GnuTLSIOHookProvider : public IOHookProvider
+class GnuTLSIOHookProvider : public SSLIOHookProvider
{
GnuTLS::Profile profile;
public:
GnuTLSIOHookProvider(Module* mod, GnuTLS::Profile::Config& config)
- : IOHookProvider(mod, "ssl/" + config.name, IOHookProvider::IOH_SSL)
+ : SSLIOHookProvider(mod, config.name)
, profile(config)
{
ServerInstance->Modules->AddService(*this);
bool IsHandshakeDone() const { return (status == ISSL_HANDSHAKEN); }
};
-class mbedTLSIOHookProvider : public IOHookProvider
+class mbedTLSIOHookProvider : public SSLIOHookProvider
{
mbedTLS::Profile profile;
public:
mbedTLSIOHookProvider(Module* mod, mbedTLS::Profile::Config& config)
- : IOHookProvider(mod, "ssl/" + config.name, IOHookProvider::IOH_SSL)
+ : SSLIOHookProvider(mod, config.name)
, profile(config)
{
ServerInstance->Modules->AddService(*this);
return ret;
}
-class OpenSSLIOHookProvider : public IOHookProvider
+class OpenSSLIOHookProvider : public SSLIOHookProvider
{
OpenSSL::Profile profile;
public:
OpenSSLIOHookProvider(Module* mod, const std::string& profilename, ConfigTag* tag)
- : IOHookProvider(mod, "ssl/" + profilename, IOHookProvider::IOH_SSL)
+ : SSLIOHookProvider(mod, profilename)
, profile(profilename, tag)
{
ServerInstance->Modules->AddService(*this);