summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-12-22 20:15:08 +0100
committerCarl Hetherington <cth@carlh.net>2020-12-22 20:15:08 +0100
commita298c25e5b9a4d154a46ee21b76f419168358f01 (patch)
tree37cabf99036e7e03374289ced26e704fcb7792d7 /src
parent79ff3ff3929470bcdcf9f36474d393ff9f7b22ed (diff)
Accept serial numbers with A prefix entered by user.
Diffstat (limited to 'src')
-rw-r--r--src/wx/gdc_certificate_panel.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wx/gdc_certificate_panel.cc b/src/wx/gdc_certificate_panel.cc
index bc1087fd1..f7f86895d 100644
--- a/src/wx/gdc_certificate_panel.cc
+++ b/src/wx/gdc_certificate_panel.cc
@@ -49,11 +49,16 @@ GDCCertificatePanel::GDCCertificatePanel (DownloadCertificateDialog* dialog)
void
GDCCertificatePanel::do_download ()
{
+ string serial = wx_to_std (_serial->GetValue());
+ if (!serial.empty() && serial[0] == 'A') {
+ /* We're adding the A ourselves */
+ serial = serial.substr(1);
+ }
string const url = String::compose(
"ftp://%1:%2@ftp.gdc-tech.com/SHA256/A%3.crt.pem",
Config::instance()->gdc_username().get(),
Config::instance()->gdc_password().get(),
- wx_to_std(_serial->GetValue())
+ serial
);
optional<string> error = get_from_url (url, true, false, boost::bind(&DownloadCertificatePanel::load_certificate, this, _1));