#include "inspircd.h"
-#include "socket.h"
-#include "xline.h"
#include "modules/hash.h"
#include "modules/ssl.h"
-#include "socketengine.h"
#include "main.h"
-#include "utils.h"
-#include "treeserver.h"
#include "link.h"
#include "treesocket.h"
-#include "resolvers.h"
const std::string& TreeSocket::GetOurChallenge()
{
return "AUTH:" + BinToBase64(sha256->hmac(password, challenge));
if (!challenge.empty() && !sha256)
- ServerInstance->Logs->Log("m_spanningtree",LOG_DEFAULT,"Not authenticating to server using SHA256/HMAC because we don't have m_sha256 loaded!");
+ ServerInstance->Logs->Log("m_spanningtree", LOG_DEFAULT, "Not authenticating to server using SHA256/HMAC because we don't have m_sha256 loaded!");
return password;
}
capab->auth_fingerprint = !link.Fingerprint.empty();
capab->auth_challenge = !capab->ourchallenge.empty() && !capab->theirchallenge.empty();
- std::string fp;
- if (GetIOHook())
- {
- SocketCertificateRequest req(this, Utils->Creator);
- if (req.cert)
- {
- fp = req.cert->GetFingerprint();
- }
- }
-
if (capab->auth_challenge)
{
std::string our_hmac = MakePass(link.RecvPass, capab->ourchallenge);
return false;
}
+ std::string fp = SSLClientCert::GetFingerprint(this);
if (capab->auth_fingerprint)
{
/* Require fingerprint to exist and match */