Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
i8ln invalid SSL text labels in frmInvalidSSLCertificate
[xestiaab/.git] / source / frmInvalidSSLCertificate.cpp
1 // frmInvalidSSLCertificate.cpp - Invalid SSL Certificate form.
2 //
3 // (c) 2012-2015 Xestia Software Development.
4 //
5 // This file is part of 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 "frmInvalidSSLCertificate.h"
20 #include "frmSSLCertificate.h"
22 frmInvalidSSLCertificate::frmInvalidSSLCertificate( wxWindow* parent )
23 :
24 frmInvalidSSLCertificateADT( parent )
25 {
27 }
29 void frmInvalidSSLCertificate::Accept( wxCommandEvent& event )
30 {
31         intResult = 1;
32         Close();
33 }
35 void frmInvalidSSLCertificate::Reject( wxCommandEvent& event )
36 {
37         intResult = 2;
38         Close();
39 }
41 void frmInvalidSSLCertificate::ViewCertificates( wxCommandEvent& event )
42 {
43         frmSSLCertificate *frameSSLCert = new frmSSLCertificate ( this );
44         frameSSLCert->StartCertFrom(0);
45         frameSSLCert->SetupCerts(CertData);
46         frameSSLCert->ShowModal();
47                 
48         delete frameSSLCert;
49         frameSSLCert = NULL;
50 }
52 void frmInvalidSSLCertificate::LoadData(SSLCertCollection CertDataInc, 
53                                         wxString AccountNameInc)
54 {
56         AccountName = AccountNameInc;
57         CertData = CertDataInc;
59         wxString SSLTextLabel;
60         
61         SSLTextLabel.Append(wxString::Format(_("An invalid SSL certificate was received from the server for the '%s' account.\n\n"), AccountName));
62         SSLTextLabel.Append(_("Click on one of the following buttons:\n\n"));
63         SSLTextLabel.Append(_("- Accept to accept the SSL certificate for this session and future sessions until the certificate changes.\n"));
64         SSLTextLabel.Append(_("- Reject to not use this certificate and disconnect (you will be asked again on subsequent reconnections to the server).\n"));
65         SSLTextLabel.Append(_("- View Certificates to review the certificates that were received."));
66         
67         lblSSLText->SetLabel(SSLTextLabel);
69 }
71 void frmInvalidSSLCertificate::LoadDataNew(SSLCertCollection CertDataInc, 
72                                         wxString DomainNameInc)
73 {
75         AccountName = DomainNameInc;
76         CertData = CertDataInc;
77         
78         wxString SSLTextLabel;
79         
80         SSLTextLabel.Append(wxString::Format(_("An invalid SSL certificate was received from the server for the '%s' account.\n\n"), AccountName));
81         SSLTextLabel.Append(_("Click on one of the following buttons:\n\n"));
82         SSLTextLabel.Append(_("- Accept to accept the SSL certificate for this session and future sessions until the certificate changes.\n"));
83         SSLTextLabel.Append(_("- Reject to not use this certificate and disconnect.\n"));
84         SSLTextLabel.Append(_("- View Certificates to review the certificates that were received."));
85         
86         lblSSLText->SetLabel(SSLTextLabel);
87         
88 }
90 int frmInvalidSSLCertificate::GetResult()
91 {
93         return intResult;
95 }
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