-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathSspiHook.h
53 lines (38 loc) · 1.48 KB
/
SspiHook.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
////////////////////////////////////////////////////////////////////////////////////////////////////
// IeSwitchSsl
//
// Copyright ©2008 Liam Kirton <liam@int3.ws>
////////////////////////////////////////////////////////////////////////////////////////////////////
// SspiHook.h
//
// Created: 15/02/2008
////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma once
////////////////////////////////////////////////////////////////////////////////////////////////////
#define SECURITY_WIN32
#include <windows.h>
#include <schnlsp.h>
#include <security.h>
#include <vector>
////////////////////////////////////////////////////////////////////////////////////////////////////
class SspiHook
{
public:
static SspiHook &GetInstance();
bool bHook_;
bool bCertVerification_;
DWORD dwProtocols_;
DWORD dwCiphers_;
std::vector<ALG_ID> supportedAlgorithms_;
ALG_ID hookSupportedAlgorithmsBuffer[13];
private:
SspiHook();
~SspiHook();
void InstallHooks();
void UninstallHooks();
void InstallPrologueHook(unsigned char *lpFunction, unsigned char *lpHook);
void InstallEpilogueHook(unsigned char *lpFunction, unsigned char *lpHook);
void UninstallPrologueHook(unsigned char *lpFunction, unsigned char *lpHook);
void UninstallEpilogueHook(unsigned char *lpFunction, unsigned char *lpHook);
};
////////////////////////////////////////////////////////////////////////////////////////////////////