|
//
// CertificateMgr.h
//
// This is a helper class to manage certificates in your executable file.
//
// Compilation instruction:
// 1. Add imagehlp.lib file in your addtional libraries.
// Goto project Properties > Linker > Input > Additional Dependencies
//
// Author
// Manish Agarwal (manish.k.agarwal@gmail.com)
//
#include <windows.h>
class CertificateMgr
{
public:
CertificateMgr() : mFileHandle(INVALID_HANDLE_VALUE) {};
~CertificateMgr();
BOOL Init(const char * const imageName);
BOOL IsValidCopy();
BOOL SignDLL();
protected:
BOOL IsCertificatePresent();
BOOL AddCertificate(BOOL bSign = FALSE);
void RemoveCertificate(); // prototype just for future
int GetUniqueData(void *&pData);
int GetSigningData(void *&pData);
private:
HANDLE mFileHandle;
};
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Working with
Oracle. Using C/C++, VC++, MFC, STL, C#, Java etc. on various platform like Windows, Unix, Macintosh etc. from last 13+ years to convert various type of requirements into running software components. My core expertise is multithreaded desktop product and large scale enterprises software development.