Mercurial > trustbridge
diff ui/certificate.cpp @ 204:825b42da1855
Avoid printing an error when an empty certificate ist constructed
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 26 Mar 2014 13:32:47 +0100 |
parents | 2551ad24d3c2 |
children | 64e38886f903 |
line wrap: on
line diff
--- a/ui/certificate.cpp Wed Mar 26 13:29:09 2014 +0100 +++ b/ui/certificate.cpp Wed Mar 26 13:32:47 2014 +0100 @@ -15,6 +15,10 @@ x509_crt x509cert; + if (b64Line.isEmpty()) { + return; + } + /* Cut of the first two chars (e.g. I: and decode) */ QByteArray asn1data = QByteArray::fromBase64( b64Line.right(b64Line.size() - 2).toLatin1()); @@ -25,6 +29,7 @@ asn1data.size()); if (ret != 0) { qDebug() << "Parsing certificate failed with error: " << ret; + qDebug() << "Failed cert: " << asn1data.toBase64(); x509_crt_free(&x509cert); return; }