Skip to content

Commit

Permalink
Add a new ID card ATR
Browse files Browse the repository at this point in the history
  • Loading branch information
ubavic committed Aug 10, 2024
1 parent 7635564 commit 1fd14f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions card/card.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ func ReadCard(sc Card) (doc.Document, error) {
}
} else if slices.Equal(smartCardStatus.Atr, GEMALTO_ATR_3) {
card = Gemalto{smartCard: sc}
} else if slices.Equal(smartCardStatus.Atr, GEMALTO_ATR_4) {
card = Gemalto{smartCard: sc}
} else if slices.Equal(smartCardStatus.Atr, APOLLO_ATR) {
card = Apollo{smartCard: sc}
} else if slices.Equal(smartCardStatus.Atr, MEDICAL_ATR) {
Expand Down
7 changes: 7 additions & 0 deletions card/gemalto.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ var GEMALTO_ATR_3 = []byte{
0x31, 0x56, 0x30, 0x0D, 0x0A, 0x6F,
}

// Available since June 2024.
var GEMALTO_ATR_4 = []byte{
0x3B, 0x9E, 0x96, 0x80, 0x31, 0xFE, 0x45, 0x53,
0x43, 0x45, 0x20, 0x38, 0x2E, 0x30, 0x2D, 0x43,
0x32, 0x56, 0x30, 0x0D, 0x0A, 0x6C,
}

// Gemalto represents ID cards based with Gemalto Java OS. Gemalto replaced Apollo cards around 2014.
type Gemalto struct {
smartCard Card
Expand Down

0 comments on commit 1fd14f2

Please sign in to comment.