Skip to content

Commit

Permalink
Added output for DG11/12 fields
Browse files Browse the repository at this point in the history
  • Loading branch information
osanderson committed Jul 16, 2024
1 parent 998a6b0 commit d3eb6eb
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.22.1

require (
github.com/dumacp/smartcard v0.1.5
github.com/gmrtd/gmrtd v0.0.0-20240714160803-273738c15e41
github.com/gmrtd/gmrtd v0.0.0-20240716155539-7d90ae6935fe
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
)

Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ github.com/gmrtd/gmrtd v0.0.0-20240630033517-2a49d86315b9 h1:QwIjDTm4KNCrVtK3PHf
github.com/gmrtd/gmrtd v0.0.0-20240630033517-2a49d86315b9/go.mod h1:yMi0ExfvEj/Tb1LZ1dfAyGe7ZVuv6kasax77Oj6HD8I=
github.com/gmrtd/gmrtd v0.0.0-20240714160803-273738c15e41 h1:YQmQp/Z40gcmUYxJtriJBJzVHzd/LePfxy54S7+ib/A=
github.com/gmrtd/gmrtd v0.0.0-20240714160803-273738c15e41/go.mod h1:yMi0ExfvEj/Tb1LZ1dfAyGe7ZVuv6kasax77Oj6HD8I=
github.com/gmrtd/gmrtd v0.0.0-20240716155539-7d90ae6935fe h1:osFAkpALxsJXxJM9CSCxWA0H0ZnqP9zPpSGlhgFxq58=
github.com/gmrtd/gmrtd v0.0.0-20240716155539-7d90ae6935fe/go.mod h1:yMi0ExfvEj/Tb1LZ1dfAyGe7ZVuv6kasax77Oj6HD8I=
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=
golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
Expand Down
30 changes: 30 additions & 0 deletions template.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,23 @@ OptionalData2 : {{.Dg1.Mrz.OptionalData2}}
<div><pre>
{{.Dg11.RawData | TlvBytesToString}}
</pre></div>

<div><pre>
NameOfHolder : {{.Dg11.Details.NameOfHolder}}
OtherNames : {{.Dg11.Details.OtherNames}}
PersonalNumber : {{.Dg11.Details.PersonalNumber}}
FullDateOfBirth : {{.Dg11.Details.FullDateOfBirth}}
PlaceOfBirth : {{.Dg11.Details.PlaceOfBirth}}
Address : {{.Dg11.Details.Address}}
Telephone : {{.Dg11.Details.Telephone}}
Profession : {{.Dg11.Details.Profession}}
Title : {{.Dg11.Details.Title}}
PersonalSummary : {{.Dg11.Details.PersonalSummary}}
ProofOfCitizenship : {{.Dg11.Details.ProofOfCitizenship | BytesToHex}}
OtherTravelDocuments: {{.Dg11.Details.OtherTravelDocuments}}
CustodyInformation : {{.Dg11.Details.CustodyInformation}}
</div></pre>

{{else}}
<i>No data</i>
{{end}}
Expand All @@ -178,6 +195,19 @@ OptionalData2 : {{.Dg1.Mrz.OptionalData2}}
<div><pre>
{{.Dg12.RawData | TlvBytesToString}}
</pre></div>

<div><pre>
IssuingAuthority : {{.Dg12.Details.IssuingAuthority}}
DateOfIssue : {{.Dg12.Details.DateOfIssue}}
OtherPersons : {{.Dg12.Details.OtherPersons}}
EndorsementsAndObservations: {{.Dg12.Details.EndorsementsAndObservations}}
TaxExitRequirements : {{.Dg12.Details.TaxExitRequirements}}
ImageFront : {{.Dg12.Details.ImageFront | BytesToHex}}
ImageRear : {{.Dg12.Details.ImageRear | BytesToHex}}
PersoDateTime : {{.Dg12.Details.PersoDateTime}}
PersoSystemSerialNumber : {{.Dg12.Details.PersoSystemSerialNumber}}
</pre></div>

{{else}}
<i>No data</i>
{{end}}
Expand Down

0 comments on commit d3eb6eb

Please sign in to comment.