gnutls_certificate_set_dh_params(x509_cred, dh_params);
}
- virtual void OnRehash(std::string param)
+ virtual void OnRehash(const std::string ¶m)
{
if(param != "ssl")
return;
}
}
- virtual void OnUnloadModule(Module* mod, std::string name)
+ virtual void OnUnloadModule(Module* mod, const std::string &name)
{
if(mod == this)
{
List[I_OnSyncUserMetaData] = List[I_OnDecodeMetaData] = List[I_OnUnloadModule] = List[I_OnRehash] = List[I_OnWhois] = List[I_OnGlobalConnect] = 1;
}
- virtual void OnRawSocketAccept(int fd, std::string ip, int localport)
+ virtual void OnRawSocketAccept(int fd, const std::string &ip, int localport)
{
issl_session* session = &sessions[fd];
gnutls_credentials_set(session->sess, GNUTLS_CRD_CERTIFICATE, x509_cred);
gnutls_certificate_server_set_request(session->sess, GNUTLS_CERT_REQUEST); // Request client certificate if any.
gnutls_dh_set_prime_bits(session->sess, dh_bits);
+
+ /* This is an experimental change to avoid a warning on 64bit systems about casting between integer and pointer of different sizes
+ * This needs testing, but it's easy enough to rollback if need be
+ * Old: gnutls_transport_set_ptr(session->sess, (gnutls_transport_ptr_t) fd); // Give gnutls the fd for the socket.
+ */
+
gnutls_transport_set_ptr(session->sess, (gnutls_transport_ptr_t) fd); // Give gnutls the fd for the socket.
+ // gnutls_transport_set_ptr(session->sess, &fd); // Give gnutls the fd for the socket.
Handshake(session);
}
}
}
- virtual void OnSyncUserMetaData(userrec* user, Module* proto, void* opaque, std::string extname)
+ virtual void OnSyncUserMetaData(userrec* user, Module* proto, void* opaque, const std::string &extname)
{
// check if the linking module wants to know about OUR metadata
if(extname == "ssl")
}
}
- virtual void OnDecodeMetaData(int target_type, void* target, std::string extname, std::string extdata)
+ virtual void OnDecodeMetaData(int target_type, void* target, const std::string &extname, const std::string &extdata)
{
// check if its our metadata key, and its associated with a user
if ((target_type == TYPE_USER) && (extname == "ssl"))
{
return new ModuleSSLGnuTLSFactory;
}
-