Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
Change version check to only use SHA-256 on Win8 or higher (continue …
Browse files Browse the repository at this point in the history
…ith SHA1 on Win7)
  • Loading branch information
DarkCloud14 committed Jun 13, 2018
1 parent 216e6f7 commit c943a69
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libusbK/src/dpscat/pki.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@

#define CATSIGN_STANDALONE

#ifndef _WIN32_WINNT_WIN8
#define _WIN32_WINNT_WIN8 0x0602
#endif

static BOOL ShouldUseSHA256()
{
const WORD wMajorVersion = HIBYTE(_WIN32_WINNT_WIN7);
const WORD wMinorVersion = LOBYTE(_WIN32_WINNT_WIN7);
const WORD wMajorVersion = HIBYTE(_WIN32_WINNT_WIN8);
const WORD wMinorVersion = LOBYTE(_WIN32_WINNT_WIN8);
const WORD wServicePackMajor = 0;

OSVERSIONINFOEXW osvi = { sizeof(osvi), 0, 0, 0, 0, {0}, 0, 0 };
Expand Down

0 comments on commit c943a69

Please sign in to comment.