-
Notifications
You must be signed in to change notification settings - Fork 30
Show warning when card requires activation #373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -50,7 +50,7 @@ EidCertificateAndPinInfo getCertificateWithStatusAndInfo(const ElectronicID::ptr | |||||
auto serialNumber = certificate.subjectInfo(QSslCertificate::SerialNumber).join(' '); | ||||||
|
||||||
// http://www.etsi.org/deliver/etsi_en/319400_319499/31941201/01.01.01_60/en_31941201v010101p.pdf | ||||||
if (serialNumber.size() > 6 && serialNumber.startsWith(QStringLiteral("PNO")) | ||||||
if (serialNumber.size() > 6 && serialNumber.startsWith(QLatin1String("PNO")) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there any reason not to use the QString operator:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need still support Qt 6.2 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need still support Qt 6.2. |
||||||
&& serialNumber[5] == '-') | ||||||
serialNumber.remove(0, 6); | ||||||
|
||||||
|
@@ -61,16 +61,29 @@ EidCertificateAndPinInfo getCertificateWithStatusAndInfo(const ElectronicID::ptr | |||||
CertificateInfo certInfo { | ||||||
certificateType, certificate.expiryDate() < QDateTime::currentDateTimeUtc(), | ||||||
certificate.effectiveDate() > QDateTime::currentDateTimeUtc(), std::move(subject)}; | ||||||
PinInfo pinInfo {certificateType.isAuthentication() ? eid->authPinMinMaxLength() | ||||||
: eid->signingPinMinMaxLength(), | ||||||
certificateType.isAuthentication() ? eid->authPinRetriesLeft() | ||||||
: eid->signingPinRetriesLeft(), | ||||||
eid->smartcard().readerHasPinPad()}; | ||||||
if (pinInfo.pinRetriesCount.first == 0) { | ||||||
pinInfo.pinIsBlocked = true; | ||||||
auto info = certificateType.isAuthentication() ? eid->authPinInfo() : eid->signingPinInfo(); | ||||||
PinInfo pinInfo {.pinMinMaxLength = certificateType.isAuthentication() | ||||||
? eid->authPinMinMaxLength() | ||||||
: eid->signingPinMinMaxLength(), | ||||||
.pinRetriesCount { | ||||||
info.retryCount, | ||||||
info.maxRetry, | ||||||
}, | ||||||
.readerHasPinPad = eid->smartcard().readerHasPinPad()}; | ||||||
bool cardActivated = info.pinActive; | ||||||
if (certificateType == CertificateType::AUTHENTICATION && eid->type() == ElectronicID::EstEID | ||||||
&& eid->name() == "EstEIDThales") { | ||||||
cardActivated = eid->signingPinInfo().pinActive; | ||||||
} | ||||||
|
||||||
return {eid, std::move(certificateDer), certificate, std::move(certInfo), std::move(pinInfo)}; | ||||||
return { | ||||||
.eid = eid, | ||||||
.certificateBytesInDer = std::move(certificateDer), | ||||||
.certificate = certificate, | ||||||
.certInfo = std::move(certInfo), | ||||||
.pinInfo = std::move(pinInfo), | ||||||
.cardActive = cardActivated, | ||||||
}; | ||||||
} | ||||||
|
||||||
} // namespace | ||||||
|
Uh oh!
There was an error while loading. Please reload this page.