Maj Wincrypt

This commit is contained in:
cyd01
2019-12-31 17:56:57 +01:00
parent 1b0335f66a
commit 38ba039930
3 changed files with 14 additions and 4 deletions
+3 -2
View File
@@ -159,7 +159,6 @@ CFLAGS += -D__WINE__ \
-DMOD_RUTTY \
-DMOD_ADB \
-DMOD_BACKGROUNDIMAGE \
-DHAS_WINX509 -DMOD_WINCRYPT \
-I.././ -I../../ \
-I../charset/ -I../windows/ -I../unix/ -I../mac/ \
-I../macosx \
@@ -420,7 +419,9 @@ putty.exe: agentf.o aqsync.o be_all_s.o be_misc.o callback.o cmdline.o \
../../md5/MD5check.a ../../mini/mini.a ../../regex/libregex.a \
-ladvapi32 -lcomdlg32 -lgdi32 -limm32 -lpsapi -lole32 -lshell32 \
-luser32 -lwsock32 -lwtsapi32 \
# -lcomctl32 -lwinmm -lwinspool -lole32 -lcrypt32
#-lcrypt32 \
#/c/Windows/system32/crypt32.dll /c/windows/system32/ncrypt.dll \
# -lcomctl32 -lwinmm -lwinspool -lole32
puttygen.exe: conf.o ecc.o import.o marshal.o memory.o misc.o mpint.o \
notiming.o puttygen.res.o sshaes.o sshauxcrypt.o sshbcrypt.o \
+2 -2
View File
@@ -9,8 +9,8 @@
#include <windows.h>
#include <wincrypt.h>
//#include <bcrypt.h>
//#include <ncrypt.h>
#include "bcrypt.h"
#include "ncrypt.h"
#include "wincrypt/wincrypto.h"
/*
+9
View File
@@ -1,7 +1,16 @@
#ifdef MOD_WINCRYPT
#ifdef HAS_WINX509
BOOL capi_load_key(const Filename **filename, BinarySink *bs) ;
#define ALG_SID_SHA_256 12
#define ALG_SID_SHA_512 14
#define CALG_SHA_256 (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA_256)
#define CALG_SHA_512 (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA_512)
#define CRYPT_ACQUIRE_PREFER_NCRYPT_KEY_FLAG 0x20000
#define HCRYPTPROV_LEGACY void*
typedef unsigned int ALG_ID;
BOOL CryptHashCertificate(
HCRYPTPROV_LEGACY hCryptProv,
ALG_ID Algid,