From 5168bb86d80c40a70662e20a195920a24916c6f6 Mon Sep 17 00:00:00 2001 From: c0de Date: Wed, 4 Oct 2023 12:14:38 -0500 Subject: [PATCH] Enable Extended Length command chaining by default --- patches/support_extended_length.patch | 13 ------------- src/dev/c0de/smartpgp/Constants.java | 5 ++++- 2 files changed, 4 insertions(+), 14 deletions(-) delete mode 100644 patches/support_extended_length.patch diff --git a/patches/support_extended_length.patch b/patches/support_extended_length.patch deleted file mode 100644 index 16e4f6e..0000000 --- a/patches/support_extended_length.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/dev/c0de/smartpgp/Constants.java b/src/dev/c0de/smartpgp/Constants.java -index b3c0f80..2ee1107 100644 ---- a/src/dev/c0de/smartpgp/Constants.java -+++ b/src/dev/c0de/smartpgp/Constants.java -@@ -149,7 +149,7 @@ public final class Constants { - (byte)0x73, /* card capabilities */ - (byte)0xC0, /* 1st byte: "methods supported" see ISO 7816-4 */ - (byte)0x01, /* 2nd byte: "data coding byte" idem */ -- (byte)0x80, /* 3rd byte: command chaining (not extended length by default as all readers do not support them...) */ -+ (byte)0xC0, /* 3rd byte: command chaining + extended length */ - - (byte)0x05, /* status indicator byte : operational state */ - (byte)0x90, /* SW1 */ diff --git a/src/dev/c0de/smartpgp/Constants.java b/src/dev/c0de/smartpgp/Constants.java index c1091da..5ee43bf 100644 --- a/src/dev/c0de/smartpgp/Constants.java +++ b/src/dev/c0de/smartpgp/Constants.java @@ -148,7 +148,10 @@ public final class Constants { (byte)0x73, /* card capabilities */ (byte)0xC0, /* 1st byte: "methods supported" see ISO 7816-4 */ (byte)0x01, /* 2nd byte: "data coding byte" idem */ - (byte)0x80, /* 3rd byte: command chaining (not extended length by default as all readers do not support them...) */ + + /* 3rd byte: command chaining + extended length; Set to 0x80 if + extended length is not supported by card or reader */ + (byte)0xC0, (byte)0x05, /* status indicator byte : operational state */ (byte)0x90, /* SW1 */