Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Win32 SSPI: Implemented Win32 SSPI support using code from Xestia Address Book
[xestiacalendar/.git] / source / common / win32ssl.cpp
1 // win32ssl.cpp - Win32 SSPI (SSL) support.
2 //
3 // (c) 2016-2017 Xestia Software Development.
4 //
5 // This file is part of Xestia Calendar (originally from Xestia Address Book).
6 //
7 // Xestia Address Book is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by the
9 // Free Software Foundation, version 3 of the license.
10 //
11 // Xestia Address Book is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License along
17 // with Xestia Address Book. If not, see <http://www.gnu.org/licenses/>
19 #include "win32ssl.h"
20 #include "../objects/CalDAV/CalDAV.h"
22 CRYPTUI_VIEWCERTIFICATE_STRUCTW BuildCertificateData(void *CalDAVObjectData, HWND WindowHandle){
24         PCCERT_CONTEXT CertificateContext = static_cast<CalDAV*>(CalDAVObjectData)->BuildSSLCollection();
25         HCERTSTORE CertificateStore = CertificateContext->hCertStore;
26         CRYPTUI_VIEWCERTIFICATE_STRUCTW CertificateData = { 0 };
27         CertificateData.hwndParent = WindowHandle;
28         CertificateData.dwFlags = CRYPTUI_ENABLE_ADDTOSTORE | CRYPTUI_DISABLE_HTMLLINK;
29         CertificateData.pCertContext = CertificateContext;
30         CertificateData.cStores = 1;
31         CertificateData.rghStores = &CertificateStore;
32         CertificateData.szTitle = _("Certificate Information");
33         CertificateData.nStartPage = 0;
34         CertificateData.dwSize = sizeof(CertificateData);
36         return CertificateData;
38 }
40 CRYPTUI_VIEWCERTIFICATE_STRUCTW BuildCertificateData(PCCERT_CONTEXT CertificateContext, HWND WindowHandle){
42         HCERTSTORE CertificateStore = CertificateContext->hCertStore;
43         CRYPTUI_VIEWCERTIFICATE_STRUCTW CertificateData = { 0 };
44         CertificateData.hwndParent = WindowHandle;
45         CertificateData.dwFlags = CRYPTUI_DISABLE_HTMLLINK;
46         CertificateData.pCertContext = CertificateContext;
47         CertificateData.cStores = 1;
48         CertificateData.rghStores = &CertificateStore;
49         CertificateData.szTitle = _("Certificate Information");
50         CertificateData.nStartPage = 0;
51         CertificateData.dwSize = sizeof(CertificateData);
53         return CertificateData;
55 }
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy