Changeset View
Changeset View
Standalone View
Standalone View
swh/web/tests/resources/contents/code/extensions/test.pas
- This file was added.
unit DigitalSignature; | |||||
interface | |||||
uses | |||||
Windows, SysUtils; | |||||
type | |||||
TDigitalSignature = class | |||||
private | |||||
FFilename: string; | |||||
public | |||||
constructor Create(const Filename: string); | |||||
function IsCodeSigned: Boolean; | |||||
function SignerCompany: string; | |||||
end; | |||||
implementation | |||||
{ TDigitalSignature } | |||||
const | |||||
CERT_SECTION_TYPE_ANY = $FF; // Any Certificate type | |||||
function ImageEnumerateCertificates(FileHandle: THandle; TypeFilter: WORD; | |||||
out CertificateCount: DWORD; Indicies: PDWORD; IndexCount: Integer): BOOL; | |||||
stdcall; external 'Imagehlp.dll'; | |||||
function ImageGetCertificateHeader(FileHandle: THandle; | |||||
CertificateIndex: Integer; var CertificateHeader: TWinCertificate): BOOL; | |||||
stdcall; external 'Imagehlp.dll'; | |||||
function ImageGetCertificateData(FileHandle: THandle; CertificateIndex: Integer; | |||||
Certificate: PWinCertificate; var RequiredLength: DWORD): BOOL; stdcall; | |||||
external 'Imagehlp.dll'; |