SOL9 Sample: TrustVerifier
|
1 Screenshot
2 Source code
/*
* TrustVerifier.cpp
* Copyright (c) 2015 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED.
*/
// SOL9
// 2009/03/18 This is a simple program to use SOL::TrustVerifier class
// and verify method call of the class.
#include <sol/crypt/TrustVerifier.h>
void _tmain(int argc, TCHAR** argv)
{
if (argc != 2) {
_tprintf(_T("%s application.exe or some.dll\n"), argv[0]);
return;
}
if (GetFileAttributes(argv[1]) == 0xffffffff) {
_tprintf(_T("File not found:%s\n"), argv[1]);
return;
}
try {
//Signed Object
TrustVerifier trustVerifier;
_tprintf(_T("1 Try to trustVerifiert.verify() %s\n"), argv[1]);
HRESULT hr = S_OK;
if (SUCCEEDED(hr = trustVerifier.verify(argv[1]))) {
_tprintf(_T("2 OK, trustVerifier.verify %s\n"), argv[1]);
} else {
_tprintf(_T("3 Failed to trustVerifier.verify() %s %x\n"),
argv[1], hr);
}
} catch (...) {
printf("4 Exception \n");
}
}
Last modified: 2 May 2016
Copyright (c) 2016 Antillia.com ALL RIGHTS RESERVED.