Skip to content

Commit 6d0b5a2

Browse files
author
z4yx
committed
test openpgp Get Challenge
1 parent da60447 commit 6d0b5a2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test-via-pcsc/openpgp_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ func TestOpenPGPApplet(t *testing.T) {
107107
So(res, ShouldResemble, []byte{2, 2, 0x05, 0x3C, 2, 2, 0x05, 0x3C}) // 1340 bytes
108108
})
109109

110+
Convey("Get challenge", func(ctx C) {
111+
res, code, err := app.Send([]byte{0x00, 0x84, 0x00, 0x00, 0x00, 0x05, 0x3C})
112+
So(err, ShouldBeNil)
113+
So(code, ShouldEqual, 0x9000)
114+
So(len(res), ShouldEqual, 0x53C) // 1340 bytes
115+
})
116+
110117
Convey("Admin PIN retry times", func(ctx C) {
111118
_, code, err := app.Send([]byte{0x00, 0x20, 0x00, 0x83})
112119
So(err, ShouldBeNil)

0 commit comments

Comments
 (0)