SOL9 Sample: CertSystemStore
|
1 Screenshot
2 Source code
/*
* CertSystemStore.cpp
* Copyright (c) 2015 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED.
*/
//2009/02/17
#include <sol\crypt\CryptServiceProvider.h>
#include <sol\crypt\CertSystemStore.h>
void _tmain(int argc, TCHAR** argv)
{
try {
CryptServiceProvider csp;
printf("CertSystemStore:Root\n");
CertSystemStore root(csp, _T("Root"));
root.enumCertificates();
printf("\n");
printf("CertSystemStore:CA\n");
CertSystemStore ca(csp, _T("CA"));
ca.enumCertificates();
printf("\n");
printf("CertSystemStore:Trust\n");
CertSystemStore trust(csp, _T("Trust"));
trust.enumCertificates();
printf("\n");
printf("CertSystemStore:MY\n");
CertSystemStore my(csp, _T("MY"));
my.enumCertificates();
printf("\n");
printf("CertSystemStore:Disallowed\n");
CertSystemStore disallowed(csp, _T("Disallowed"));
disallowed.enumCertificates();
printf("\n");
} catch (Exception& ex) {
printf("Exception %s\n", ex.getErrorMessage());
}
}
Last modified: 2 May 2016
Copyright (c) 2016 Antillia.com ALL RIGHTS RESERVED.