mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-24 19:54:25 -04:00
[pki] add RSA-2048 signature validation for all server downloads
* Closes #1172 * Also fix a MinGW warning in badblocks.c
This commit is contained in:
parent
2d262df8f3
commit
fdfc9ff82d
8 changed files with 331 additions and 85 deletions
|
@ -512,6 +512,22 @@ static __inline int PathGetDriveNumberU(char* lpPath)
|
|||
return ret;
|
||||
}
|
||||
|
||||
// This one is tricky since we can't blindly convert a
|
||||
// UTF-16 position to a UTF-8 one. So we do it manually.
|
||||
static __inline const char* PathFindFileNameU(const char* szPath)
|
||||
{
|
||||
size_t i;
|
||||
if (szPath == NULL)
|
||||
return NULL;
|
||||
for (i = strlen(szPath); i != 0; i--) {
|
||||
if ((szPath[i] == '/') || (szPath[i] == '\\')) {
|
||||
i++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return &szPath[i];
|
||||
}
|
||||
|
||||
// This function differs from regular GetTextExtentPoint in that it uses a zero terminated string
|
||||
static __inline BOOL GetTextExtentPointU(HDC hdc, const char* lpString, LPSIZE lpSize)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue