diff options
Diffstat (limited to 'src/userconfigdlg.cpp')
-rw-r--r-- | src/userconfigdlg.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/userconfigdlg.cpp b/src/userconfigdlg.cpp index 2fac3d6..f42325c 100644 --- a/src/userconfigdlg.cpp +++ b/src/userconfigdlg.cpp @@ -402,6 +402,10 @@ void UserConfigDialog::downloadPKICertificate() { for (it = m_user.pkiCertificates.begin(); it != m_user.pkiCertificates.end(); ++it) { PKICertificateEntry certificateData = *it; + // Don't attempt to load empty certificates + if (certificateData.second.size() < 1) + continue; + TQCString ssldata(certificateData.second); ssldata[certificateData.second.size()] = 0; ssldata.replace("-----BEGIN CERTIFICATE-----", ""); @@ -444,6 +448,10 @@ void UserConfigDialog::revokePKICertificate() { for (it = m_user.pkiCertificates.begin(); it != m_user.pkiCertificates.end(); ++it) { PKICertificateEntry certificateData = *it; + // Don't attempt to load empty certificates + if (certificateData.second.size() < 1) + continue; + TQCString ssldata(certificateData.second); ssldata[certificateData.second.size()] = 0; ssldata.replace("-----BEGIN CERTIFICATE-----", ""); |