Skip to content

Commit

Permalink
test openpgp Get Challenge
Browse files Browse the repository at this point in the history
  • Loading branch information
z4yx committed May 21, 2024
1 parent da60447 commit 6d0b5a2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test-via-pcsc/openpgp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ func TestOpenPGPApplet(t *testing.T) {
So(res, ShouldResemble, []byte{2, 2, 0x05, 0x3C, 2, 2, 0x05, 0x3C}) // 1340 bytes
})

Convey("Get challenge", func(ctx C) {
res, code, err := app.Send([]byte{0x00, 0x84, 0x00, 0x00, 0x00, 0x05, 0x3C})
So(err, ShouldBeNil)
So(code, ShouldEqual, 0x9000)
So(len(res), ShouldEqual, 0x53C) // 1340 bytes
})

Convey("Admin PIN retry times", func(ctx C) {
_, code, err := app.Send([]byte{0x00, 0x20, 0x00, 0x83})
So(err, ShouldBeNil)
Expand Down

0 comments on commit 6d0b5a2

Please sign in to comment.