smartcard 0.4.0-x86-mswin32-60 → 0.4.1-x86-mswin32-60
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +2 -0
- data/Manifest +37 -37
- data/lib/smartcard/iso/jcop_remote_transport.rb +4 -1
- data/lib/smartcard/pcsc.so +0 -0
- data/smartcard.gemspec +1 -1
- data/test/iso/jcop_remote_test.rb +19 -2
- metadata +1 -1
data/CHANGELOG
CHANGED
data/Manifest
CHANGED
@@ -1,37 +1,37 @@
|
|
1
|
-
BUILD
|
2
|
-
CHANGELOG
|
3
|
-
ext/smartcard_pcsc/extconf.rb
|
4
|
-
ext/smartcard_pcsc/pcsc.h
|
5
|
-
ext/smartcard_pcsc/pcsc_card.c
|
6
|
-
ext/smartcard_pcsc/pcsc_constants.c
|
7
|
-
ext/smartcard_pcsc/pcsc_context.c
|
8
|
-
ext/smartcard_pcsc/pcsc_exception.c
|
9
|
-
ext/smartcard_pcsc/pcsc_io_request.c
|
10
|
-
ext/smartcard_pcsc/pcsc_main.c
|
11
|
-
ext/smartcard_pcsc/pcsc_multi_strings.c
|
12
|
-
ext/smartcard_pcsc/pcsc_namespace.c
|
13
|
-
ext/smartcard_pcsc/pcsc_reader_states.c
|
14
|
-
ext/smartcard_pcsc/pcsc_surrogate_reader.h
|
15
|
-
ext/smartcard_pcsc/pcsc_surrogate_wintypes.h
|
16
|
-
lib/smartcard/gp/gp_card_mixin.rb
|
17
|
-
lib/smartcard/iso/auto_configurator.rb
|
18
|
-
lib/smartcard/iso/iso_card_mixin.rb
|
19
|
-
lib/smartcard/iso/jcop_remote_protocol.rb
|
20
|
-
lib/smartcard/iso/jcop_remote_server.rb
|
21
|
-
lib/smartcard/iso/jcop_remote_transport.rb
|
22
|
-
lib/smartcard/iso/pcsc_transport.rb
|
23
|
-
lib/smartcard/iso/transport.rb
|
24
|
-
lib/smartcard/pcsc/pcsc_exception.rb
|
25
|
-
lib/smartcard.rb
|
26
|
-
LICENSE
|
27
|
-
Manifest
|
28
|
-
Rakefile
|
29
|
-
README
|
30
|
-
smartcard.gemspec
|
31
|
-
test/gp/gp_card_mixin_test.rb
|
32
|
-
test/iso/auto_configurator_test.rb
|
33
|
-
test/iso/iso_card_mixin_test.rb
|
34
|
-
test/iso/jcop_remote_test.rb
|
35
|
-
test/pcsc/containers_test.rb
|
36
|
-
test/pcsc/smoke_test.rb
|
37
|
-
tests/ts_pcsc_ext.rb
|
1
|
+
BUILD
|
2
|
+
CHANGELOG
|
3
|
+
ext/smartcard_pcsc/extconf.rb
|
4
|
+
ext/smartcard_pcsc/pcsc.h
|
5
|
+
ext/smartcard_pcsc/pcsc_card.c
|
6
|
+
ext/smartcard_pcsc/pcsc_constants.c
|
7
|
+
ext/smartcard_pcsc/pcsc_context.c
|
8
|
+
ext/smartcard_pcsc/pcsc_exception.c
|
9
|
+
ext/smartcard_pcsc/pcsc_io_request.c
|
10
|
+
ext/smartcard_pcsc/pcsc_main.c
|
11
|
+
ext/smartcard_pcsc/pcsc_multi_strings.c
|
12
|
+
ext/smartcard_pcsc/pcsc_namespace.c
|
13
|
+
ext/smartcard_pcsc/pcsc_reader_states.c
|
14
|
+
ext/smartcard_pcsc/pcsc_surrogate_reader.h
|
15
|
+
ext/smartcard_pcsc/pcsc_surrogate_wintypes.h
|
16
|
+
lib/smartcard/gp/gp_card_mixin.rb
|
17
|
+
lib/smartcard/iso/auto_configurator.rb
|
18
|
+
lib/smartcard/iso/iso_card_mixin.rb
|
19
|
+
lib/smartcard/iso/jcop_remote_protocol.rb
|
20
|
+
lib/smartcard/iso/jcop_remote_server.rb
|
21
|
+
lib/smartcard/iso/jcop_remote_transport.rb
|
22
|
+
lib/smartcard/iso/pcsc_transport.rb
|
23
|
+
lib/smartcard/iso/transport.rb
|
24
|
+
lib/smartcard/pcsc/pcsc_exception.rb
|
25
|
+
lib/smartcard.rb
|
26
|
+
LICENSE
|
27
|
+
Manifest
|
28
|
+
Rakefile
|
29
|
+
README
|
30
|
+
smartcard.gemspec
|
31
|
+
test/gp/gp_card_mixin_test.rb
|
32
|
+
test/iso/auto_configurator_test.rb
|
33
|
+
test/iso/iso_card_mixin_test.rb
|
34
|
+
test/iso/jcop_remote_test.rb
|
35
|
+
test/pcsc/containers_test.rb
|
36
|
+
test/pcsc/smoke_test.rb
|
37
|
+
tests/ts_pcsc_ext.rb
|
@@ -28,7 +28,10 @@ class JcopRemoteTransport
|
|
28
28
|
#
|
29
29
|
def exchange_apdu(apdu)
|
30
30
|
send_message @socket, :type => 1, :node => 0, :data => apdu
|
31
|
-
|
31
|
+
loop do
|
32
|
+
message = recv_message @socket
|
33
|
+
return message[:data] if message[:type] == 1
|
34
|
+
end
|
32
35
|
end
|
33
36
|
|
34
37
|
# Makes a transport-level connection to the TEM.
|
data/lib/smartcard/pcsc.so
CHANGED
Binary file
|
data/smartcard.gemspec
CHANGED
@@ -48,7 +48,7 @@ class JcopRemoteTest < Test::Unit::TestCase
|
|
48
48
|
@server.stop
|
49
49
|
end
|
50
50
|
|
51
|
-
def
|
51
|
+
def _test_apdu_exchange
|
52
52
|
apdu_request = [0x31, 0x41, 0x59, 0x26, 0x53]
|
53
53
|
apdu_response = [0x27, 0x90, 0x00]
|
54
54
|
|
@@ -69,8 +69,25 @@ class JcopRemoteTest < Test::Unit::TestCase
|
|
69
69
|
Kernel.sleep 0.05 # Wait for the server to process the disconnect.
|
70
70
|
assert_equal [:start, apdu_request, :end], logic.received
|
71
71
|
end
|
72
|
+
|
73
|
+
def test_apdu_exchange
|
74
|
+
_test_apdu_exchange
|
75
|
+
end
|
76
|
+
|
77
|
+
def test_apud_exchange_with_broken_server
|
78
|
+
# Test broken server which re-sends the ATR before any good message.
|
79
|
+
class << @server
|
80
|
+
def send_message(socket, message)
|
81
|
+
if message[:type] == 1
|
82
|
+
super socket, :type => 0, :node => 0, :data => (61..68).to_a
|
83
|
+
end
|
84
|
+
super socket, message
|
85
|
+
end
|
86
|
+
end
|
87
|
+
_test_apdu_exchange
|
88
|
+
end
|
72
89
|
|
73
|
-
def
|
90
|
+
def test_iso_card_integration
|
74
91
|
apdu_request = [0x00, 0x31, 0x41, 0x59, 0x00]
|
75
92
|
apdu_response = [0x27, 0x90, 0x00]
|
76
93
|
|