diff --git a/client/SslCertificate.cpp b/client/SslCertificate.cpp index f43e29df3..045f50484 100644 --- a/client/SslCertificate.cpp +++ b/client/SslCertificate.cpp @@ -262,7 +262,9 @@ QStringList SslCertificate::policies() const } bool SslCertificate::showCN() const -{ return subjectInfo( "GN" ).isEmpty() && subjectInfo( "SN" ).isEmpty(); } +{ + return subjectInfo("GN").isEmpty() || subjectInfo("SN").isEmpty(); +} QString SslCertificate::signatureAlgorithm() const { diff --git a/client/widgets/InfoStack.cpp b/client/widgets/InfoStack.cpp index d182057df..6c74a8a06 100644 --- a/client/widgets/InfoStack.cpp +++ b/client/widgets/InfoStack.cpp @@ -111,6 +111,8 @@ void InfoStack::update(const QSmartCardData &t) certType = t.authCert().type(); expiry = t.data(QSmartCardData::Expiry).toDateTime(); ui->valueGivenNames->setText(t.data(QSmartCardData::FirstName).toString()); + ui->valueGivenNames->setHidden(ui->valueGivenNames->text().isEmpty()); + ui->labelGivenNames->setHidden(ui->valueGivenNames->text().isEmpty()); ui->valueSurname->setText(t.data(QSmartCardData::SurName).toString()); ui->valuePersonalCode->setText(t.data(QSmartCardData::Id).toString()); ui->valueCitizenship->setText(t.data(QSmartCardData::Citizen).toString());