diff ui/certificatelist.cpp @ 84:00a93409e93e

Keep raw data around to later pass it to the installer
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 20 Mar 2014 16:21:27 +0000
parents 1f27d6db5ee3
children 37580703a870
line wrap: on
line diff
--- a/ui/certificatelist.cpp	Thu Mar 20 16:20:44 2014 +0000
+++ b/ui/certificatelist.cpp	Thu Mar 20 16:21:27 2014 +0000
@@ -22,13 +22,13 @@
 
     // Take the data into the Qt Universe where memory is plentiful
     // and CPU's are fast :)
-    QStringList lines = QString::fromLatin1(data, size).split("\n");
+    mData = QString::fromLatin1(data, size);
     free(data);
     data = NULL;
+    QStringList lines = mData.split("\n");
 
     for (int i = 0; i < lines.size(); ++i) {
         QString curLine = lines[i].trimmed();
-        qDebug() << "Reading line: " << curLine;
         if (curLine.startsWith("F:")) {
             if (curLine.right(1) != PARSER_VERSION) {
                 qDebug() << "Invalid Format Version";
@@ -49,11 +49,9 @@
 
             mDate = QDateTime::fromMSecsSinceEpoch(timestamp * 1000);
         } else if (curLine.startsWith("I:")) {
-            mCertificatesInstall << Certificate(
-                    QByteArray::fromBase64(curLine.remove(0,2).toLatin1()));
+            mCertificatesInstall << Certificate(curLine);
         } else if (curLine.startsWith("R:")) {
-            mCertificatesInstall << Certificate(
-                    QByteArray::fromBase64(curLine.remove(0,2).toLatin1()));
+            mCertificatesInstall << Certificate(curLine);
         } else if (curLine.startsWith("S:")) {
             // Signature is verified in read_and_verify_list
             continue;

http://wald.intevation.org/projects/trustbridge/