Skip to content

Commit

Permalink
Misc fixes for Austroads Test Event.
Browse files Browse the repository at this point in the history
Handle not having `displayName` in a Trust Point for the reader. This
can happen when importing trust points from a VICAL where there's no
display name. Just use the subject X500 principal name instead.

Register the OWF Test IACA _after_ the VICAL so our display name and
icon is actually used.

Add missing description for PhotoID data element.

Test: Manually tested.
Signed-off-by: David Zeuthen <[email protected]>
  • Loading branch information
davidz25 committed Oct 2, 2024
1 parent db47747 commit b9807bf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ object PhotoID {
.addMdocAttribute(
DocumentAttributeType.Blob,
"dg_content_info",
"",
"eMRTD Content Info",
"Binary data of the DTCContentInfo",
false,
DTC_NAMESPACE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@ class ReaderModel(
)
if (trustResult.isTrusted) {
val trustPoint = trustResult.trustPoints[0]
infoTexts.add(res.getString(R.string.reader_model_info_in_trust_list, trustPoint.displayName))
val displayName = trustPoint.displayName
?: trustPoint.certificate.subjectX500Principal.name
infoTexts.add(res.getString(R.string.reader_model_info_in_trust_list, displayName))
} else {
val dsCert = readerAuthChain[0]
val displayName = dsCert.issuerX500Principal.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,6 @@ class WalletApplication : Application() {

// init TrustManager for issuers (used in reader)
//
issuerTrustManager.addTrustPoint(
displayName = "OWF Identity Credential TEST IACA",
certificateResourceId = R.raw.iaca_certificate,
displayIconResourceId = R.drawable.owf_identity_credential_reader_display_icon
)
val signedVical = SignedVical.parse(
resources.openRawResource(R.raw.austroad_test_event_vical_20241002).readBytes()
)
Expand All @@ -253,6 +248,11 @@ class WalletApplication : Application() {
)
)
}
issuerTrustManager.addTrustPoint(
displayName = "OWF Identity Credential TEST IACA",
certificateResourceId = R.raw.iaca_certificate,
displayIconResourceId = R.drawable.owf_identity_credential_reader_display_icon
)


documentModel = DocumentModel(
Expand Down

0 comments on commit b9807bf

Please sign in to comment.