From b9d99c1bfe4833ba272969eef1b059aa6cc8ab4f Mon Sep 17 00:00:00 2001 From: Raul Metsma Date: Fri, 7 Jul 2023 13:55:10 +0300 Subject: [PATCH] Fix Personal data read (#1201) IB-7750, IB-7540 Signed-off-by: Raul Metsma --- client/QPKCS11.cpp | 4 ++-- client/widgets/VerifyCert.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/QPKCS11.cpp b/client/QPKCS11.cpp index d73911d69..fae6b759f 100644 --- a/client/QPKCS11.cpp +++ b/client/QPKCS11.cpp @@ -32,7 +32,7 @@ template QString toQString(const Container &c) { - return QString::fromLatin1(QByteArray::fromRawData((const char*)std::data(c), std::size(c)).toUpper()); + return QString::fromLatin1((const char*)std::data(c), std::size(c)); } QByteArray QPKCS11::Private::attribute(CK_SESSION_HANDLE session, CK_OBJECT_HANDLE obj, CK_ATTRIBUTE_TYPE type) const @@ -177,7 +177,7 @@ bool QPKCS11::load( const QString &driver ) << QStringLiteral("%1 (%2.%3)").arg(toQString(info.libraryDescription)) .arg(info.libraryVersion.major).arg(info.libraryVersion.minor) << '\n' << "Flags:" << info.flags; - d->isFinDriver = toQString(info.libraryDescription).contains(QLatin1String("MPOLLUX")); + d->isFinDriver = toQString(info.libraryDescription).contains(QLatin1String("MPOLLUX"), Qt::CaseInsensitive); return true; } diff --git a/client/widgets/VerifyCert.cpp b/client/widgets/VerifyCert.cpp index 5043e3364..c42163f76 100644 --- a/client/widgets/VerifyCert.cpp +++ b/client/widgets/VerifyCert.cpp @@ -169,7 +169,7 @@ void VerifyCert::update() ui->validUntil->setText(tr("The PUK code is located in your envelope")); ui->validUntil->setHidden(isBlockedPuk); ui->changePIN->setText(tr("CHANGE PUK")); - ui->changePIN->setHidden(cardData.version() == isBlockedPuk); + ui->changePIN->setHidden(isBlockedPuk); ui->forgotPinLink->hide(); ui->details->hide(); ui->checkCert->hide();