Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Authenticator/UI/Helpers/SecCertificate+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ extension SecCertificate: Equatable {
SecCertificateCopyCommonName(self, &name)
return name as String?
}

var subjectSummary: String? {
SecCertificateCopySubjectSummary(self) as String?
}

func tokenObjectId() -> String {
let data = SecCertificateCopyData(self) as Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class SmartCardConfigurationController: UITableViewController {
} else {
let cell = tableView.dequeueReusableCell(withIdentifier: "CertificateCell", for: indexPath) as! CertificateCell
let certificate = certificates[indexPath.row - 1]
cell.name = "\(certificate.certificate.commonName ?? String(localized: "No name", comment: "PIV extension certificate with no name")) (slot \(String(format: "%02X", certificate.slot.rawValue)))"
cell.name = "\(certificate.certificate.subjectSummary ?? String(localized: "No name", comment: "PIV extension certificate with no name")) (slot \(String(format: "%02X", certificate.slot.rawValue)))"
if !tokens.contains(certificate.certificate) {
cell.action = { [weak self] in
self?.storeTokenCertificate(certificate: certificate.certificate)
Expand All @@ -236,7 +236,7 @@ class SmartCardConfigurationController: UITableViewController {
} else {
let cell = tableView.dequeueReusableCell(withIdentifier: "CertificateCell", for: indexPath) as! CertificateCell
let token = tokens[indexPath.row - 1]
cell.name = token.commonName
cell.name = token.subjectSummary
cell.setSymbol(symbol: "minus.circle")
cell.action = { [weak self] in
self?.removeTokenCertificate(certificate: token)
Expand Down
Loading