Mercurial > trustbridge
comparison ui/certificatelist.cpp @ 31:37fc66967517
Implement signature verification wiht polarssl
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Thu, 13 Mar 2014 18:12:16 +0000 |
parents | dc1e1e9e62ce |
children | 64c8c6350e60 |
comparison
equal
deleted
inserted
replaced
30:381558ff6f26 | 31:37fc66967517 |
---|---|
7 CertificateList::CertificateList(const char *fileName) | 7 CertificateList::CertificateList(const char *fileName) |
8 { | 8 { |
9 char *data = NULL; | 9 char *data = NULL; |
10 size_t size = 0; | 10 size_t size = 0; |
11 | 11 |
12 mStatus = readAndVerifyList(fileName, &data, &size); | 12 mStatus = read_and_verify_list(fileName, &data, &size); |
13 | 13 |
14 if (!isValid()) { | 14 if (!isValid()) { |
15 return; | 15 return; |
16 } | 16 } |
17 | 17 |
47 QByteArray::fromBase64(curLine.remove(0,2).toLatin1())); | 47 QByteArray::fromBase64(curLine.remove(0,2).toLatin1())); |
48 } else if (curLine.startsWith("R:")) { | 48 } else if (curLine.startsWith("R:")) { |
49 mCertificatesInstall << Certificate( | 49 mCertificatesInstall << Certificate( |
50 QByteArray::fromBase64(curLine.remove(0,2).toLatin1())); | 50 QByteArray::fromBase64(curLine.remove(0,2).toLatin1())); |
51 } else if (curLine.startsWith("S:")) { | 51 } else if (curLine.startsWith("S:")) { |
52 // Signature is verified in readAndVerifyList | 52 // Signature is verified in read_and_verify_list |
53 continue; | 53 continue; |
54 } else if (!curLine.isEmpty()){ | 54 } else if (!curLine.isEmpty()){ |
55 qDebug () << "Don't know how to handle: " << curLine; | 55 qDebug () << "Don't know how to handle: " << curLine; |
56 } | 56 } |
57 } | 57 } |