KHealthCertificate
icaovdsparser.cpp
36 cert.setDateOfBirth(QDate::fromString(pidObj.value(QLatin1String("dob")).toString(), Qt::ISODate));
82static KHealthCertificate::SignatureValidation verifyCertificate(const openssl::x509_ptr &x509Cert)
88 const auto keyIdStr = QString::fromUtf8(QByteArray(reinterpret_cast<const char*>(keyId->data), keyId->length).toHex());
92 QFile issuerCertFile(QLatin1String(":/org.kde.khealthcertificate/icao/certs/") + keyIdStr + QLatin1String(".der"));
105 for (QDirIterator it(QLatin1String(":/org.kde.khealthcertificate/icao/certs/") + keyIdStr, QDir::Files); it.hasNext();) {
123 return foundInvalid ? KHealthCertificate::InvalidSignature : KHealthCertificate::UnknownSignature;
148 const auto cert = QByteArray::fromBase64(sigObj.value(QLatin1String("cer")).toString().toUtf8(), QByteArray::Base64UrlEncoding);
156 const auto signature = QByteArray::fromBase64(sigObj.value(QLatin1String("sigvl")).toString().toUtf8(), QByteArray::Base64UrlEncoding);
163 valid = Verify::verifyECDSA(pkey, EVP_sha256(), signedData.constData(), signedData.size(), signature.constData(), signature.size());
165 valid = Verify::verifyECDSA(pkey, EVP_sha384(), signedData.constData(), signedData.size(), signature.constData(), signature.size());
167 valid = Verify::verifyECDSA(pkey, EVP_sha512(), signedData.constData(), signedData.size(), signature.constData(), signature.size());
220 cert.setDate(QDateTime::fromString(datObj.value(QLatin1String("sc")).toString(), Qt::ISODate).date());
static KCountry fromAlpha3(const char *alpha3Code)
SignatureValidation
Result of attempting to verify the cryptographic signature of a certificate.
Definition khealthcertificate.h:33
@ UncheckedSignature
signature verification was not attempted, e.g. as it's not yet implemented for the specific certifica...
Definition khealthcertificate.h:37
@ UnknownSignature
signature verification was attempted but didn't yield a result, e.g. due to a missing certificate of ...
Definition khealthcertificate.h:36
Type type(const QSqlDatabase &db)
char * toString(const EngineQuery &query)
QString name(StandardAction id)
Base64UrlEncoding
QByteArray fromBase64(const QByteArray &base64, Base64Options options)
qsizetype size() const const
QByteArray toHex(char separator) const const
QDate fromString(QStringView string, QStringView format, QCalendar cal)
QDateTime fromString(QStringView string, QStringView format, QCalendar cal)
Files
bool hasNext() const const
ReadOnly
Compact
QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error)
QJsonObject object() const const
QByteArray toJson(JsonFormat format) const const
QJsonValue value(QLatin1StringView key) const const
bool isDouble() const const
bool isString() const const
int toInt(int defaultValue) const const
QJsonObject toObject() const const
QString toString() const const
QString fromUtf8(QByteArrayView str)
bool isEmpty() const const
QString left(qsizetype n) const const
int toInt(bool *ok, int base) const const
CaseInsensitive
ISODate
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.