smartcard 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v0.5.2. Added 'thread' require to fix crashes on new Rubygems versions.
2
+
1
3
  v0.5.1. Work around drivers that don't honor PROTOCOL_ANY.
2
4
 
3
5
  v0.5.0. Dropped C extension in favor of FFI. Hello, jruby and rbx!
data/README CHANGED
@@ -35,3 +35,7 @@ the {Trusted Computing group}[http://projects.csail.mit.edu/tc/].
35
35
  The work is funded by a grant from
36
36
  {Quanta Computer Inc}[http://www.quanta.com.tw], under the
37
37
  {T-Party Project}[http://projects.csail.mit.edu/tparty/].
38
+
39
+ Kevin Redon <kevredon@mail.tsaitgaist.info> provided information and a failing
40
+ test case for ATR-based protocol detection, which is necessary if the PC/SC
41
+ driver doesn't do it automatically.
@@ -5,6 +5,7 @@
5
5
  # License:: MIT
6
6
 
7
7
  require 'socket'
8
+ require 'thread'
8
9
 
9
10
  # :nodoc: namespace
10
11
  module Smartcard::Iso
@@ -29,8 +29,8 @@ module FFILib
29
29
  SCARD_E_DUPLICATE_READER = 0x8010001B
30
30
  SCARD_E_NO_SERVICE = 0x8010001D
31
31
  SCARD_E_SERVICE_STOPPED = 0x8010001E
32
- SCARD_W_CARD_NOT_AUTHENTICATED = 0x8010006F
33
32
  SCARD_E_UNSUPPORTED_FEATURE = 0x8010001F
33
+ SCARD_W_CARD_NOT_AUTHENTICATED = 0x8010006F
34
34
  SCARD_S_SUCCESS = 0x00000000
35
35
  SCARD_E_NO_KEY_CONTAINER = 0x80100030
36
36
  SCARD_W_CANCELLED_BY_USER = 0x8010006E
@@ -63,7 +63,6 @@ module FFILib
63
63
  SCARD_E_INVALID_CHV = 0x8010002A
64
64
  SCARD_W_UNSUPPORTED_CARD = 0x80100065
65
65
  SCARD_W_UNRESPONSIVE_CARD = 0x80100066
66
- SCARD_W_INSERTED_CARD = 0x8010006A
67
66
  SCARD_SCOPE_USER = 0x00000000
68
67
  SCARD_SCOPE_SYSTEM = 0x00000002
69
68
  SCARD_SCOPE_TERMINAL = 0x00000001
@@ -175,8 +174,8 @@ module FFILib
175
174
  :duplicate_reader, Consts::SCARD_E_DUPLICATE_READER,
176
175
  :no_service, Consts::SCARD_E_NO_SERVICE,
177
176
  :service_stopped, Consts::SCARD_E_SERVICE_STOPPED,
178
- :card_not_authenticated, Consts::SCARD_W_CARD_NOT_AUTHENTICATED,
179
177
  :unsupported_feature, Consts::SCARD_E_UNSUPPORTED_FEATURE,
178
+ :card_not_authenticated, Consts::SCARD_W_CARD_NOT_AUTHENTICATED,
180
179
  :success, Consts::SCARD_S_SUCCESS,
181
180
  :no_key_container, Consts::SCARD_E_NO_KEY_CONTAINER,
182
181
  :cancelled_by_user, Consts::SCARD_W_CANCELLED_BY_USER,
@@ -209,7 +208,6 @@ module FFILib
209
208
  :invalid_chv, Consts::SCARD_E_INVALID_CHV,
210
209
  :unsupported_card, Consts::SCARD_W_UNSUPPORTED_CARD,
211
210
  :unresponsive_card, Consts::SCARD_W_UNRESPONSIVE_CARD,
212
- :inserted_card, Consts::SCARD_W_INSERTED_CARD,
213
211
  ]
214
212
 
215
213
  # Values for the context's scope.
@@ -35,4 +35,4 @@ unless 0.respond_to?(:ord) or '0'.respond_to?(:ord)
35
35
  self
36
36
  end
37
37
  end
38
- end
38
+ end
@@ -2,7 +2,7 @@
2
2
  class Smartcard::PCSC::Exception < RuntimeError
3
3
  def initialize(error_status)
4
4
  @pcsc_status = error_status
5
- super error_status.to_s
5
+ super '0x%x' % (2**32 + error_status)
6
6
  end
7
7
 
8
8
  # The PC/SC error status that caused this error.
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{smartcard}
5
- s.version = "0.5.1"
5
+ s.version = "0.5.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Victor Costan"]
9
- s.date = %q{2010-11-27}
9
+ s.date = %q{2011-04-21}
10
10
  s.description = %q{Interface with ISO 7816 smart cards.}
11
11
  s.email = %q{victor@costan.us}
12
12
  s.extra_rdoc_files = ["BUILD", "CHANGELOG", "LICENSE", "README", "lib/smartcard.rb", "lib/smartcard/gp/asn1_ber.rb", "lib/smartcard/gp/cap_loader.rb", "lib/smartcard/gp/des.rb", "lib/smartcard/gp/gp_card_mixin.rb", "lib/smartcard/iso/apdu_error.rb", "lib/smartcard/iso/auto_configurator.rb", "lib/smartcard/iso/iso_card_mixin.rb", "lib/smartcard/iso/jcop_remote_protocol.rb", "lib/smartcard/iso/jcop_remote_server.rb", "lib/smartcard/iso/jcop_remote_transport.rb", "lib/smartcard/iso/pcsc_transport.rb", "lib/smartcard/iso/transport.rb", "lib/smartcard/pcsc/card.rb", "lib/smartcard/pcsc/context.rb", "lib/smartcard/pcsc/ffi_autogen.rb", "lib/smartcard/pcsc/ffi_functions.rb", "lib/smartcard/pcsc/ffi_lib.rb", "lib/smartcard/pcsc/ffi_structs.rb", "lib/smartcard/pcsc/pcsc_exception.rb", "lib/smartcard/pcsc/reader_state_queries.rb", "tasks/ffi_codegen.rb"]
@@ -15,12 +15,11 @@ Gem::Specification.new do |s|
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Smartcard", "--main", "README"]
16
16
  s.require_paths = ["lib"]
17
17
  s.rubyforge_project = %q{smartcard}
18
- s.rubygems_version = %q{1.3.7}
18
+ s.rubygems_version = %q{1.7.2}
19
19
  s.summary = %q{Interface with ISO 7816 smart cards.}
20
20
  s.test_files = ["test/gp/asn1_ber_test.rb", "test/gp/cap_loader_test.rb", "test/gp/des_test.rb", "test/gp/gp_card_mixin_compat_test.rb", "test/gp/gp_card_mixin_test.rb", "test/iso/auto_configurator_test.rb", "test/iso/iso_card_mixin_test.rb", "test/iso/iso_exception_test.rb", "test/iso/jcop_remote_test.rb", "test/pcsc/card_test.rb", "test/pcsc/context_test.rb", "test/pcsc/reader_state_queries_test.rb"]
21
21
 
22
22
  if s.respond_to? :specification_version then
23
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
24
23
  s.specification_version = 3
25
24
 
26
25
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
@@ -2,6 +2,7 @@
2
2
  # Copyright:: Copyright (C) 2008 Massachusetts Institute of Technology
3
3
  # License:: MIT
4
4
 
5
+ require 'rubygems'
5
6
  require 'smartcard'
6
7
 
7
8
  require 'test/unit'
@@ -2,6 +2,7 @@
2
2
  # Copyright:: Copyright (C) 2008 Massachusetts Institute of Technology
3
3
  # License:: MIT
4
4
 
5
+ require 'rubygems'
5
6
  require 'smartcard'
6
7
 
7
8
  require 'test/unit'
@@ -2,6 +2,7 @@
2
2
  # Copyright:: Copyright (C) 2008 Massachusetts Institute of Technology
3
3
  # License:: MIT
4
4
 
5
+ require 'rubygems'
5
6
  require 'smartcard'
6
7
 
7
8
  require 'test/unit'
@@ -2,6 +2,7 @@
2
2
  # Copyright:: Copyright (C) 2008 Massachusetts Institute of Technology
3
3
  # License:: MIT
4
4
 
5
+ require 'rubygems'
5
6
  require 'smartcard'
6
7
 
7
8
  require 'test/unit'
@@ -2,6 +2,7 @@
2
2
  # Copyright:: Copyright (C) 2008 Massachusetts Institute of Technology
3
3
  # License:: MIT
4
4
 
5
+ require 'rubygems'
5
6
  require 'smartcard'
6
7
 
7
8
  require 'test/unit'
@@ -2,6 +2,7 @@
2
2
  # Copyright:: Copyright (C) 2008 Massachusetts Institute of Technology
3
3
  # License:: MIT
4
4
 
5
+ require 'rubygems'
5
6
  require 'smartcard'
6
7
 
7
8
  require 'test/unit'
@@ -2,6 +2,7 @@
2
2
  # Copyright:: Copyright (C) 2008 Massachusetts Institute of Technology
3
3
  # License:: MIT
4
4
 
5
+ require 'rubygems'
5
6
  require 'smartcard'
6
7
 
7
8
  require 'test/unit'
@@ -2,6 +2,7 @@
2
2
  # Copyright:: Copyright (C) 2008 Massachusetts Institute of Technology
3
3
  # License:: MIT
4
4
 
5
+ require 'rubygems'
5
6
  require 'smartcard'
6
7
 
7
8
  require 'test/unit'
@@ -2,6 +2,7 @@
2
2
  # Copyright:: Copyright (C) 2008 Massachusetts Institute of Technology
3
3
  # License:: MIT
4
4
 
5
+ require 'rubygems'
5
6
  require 'smartcard'
6
7
 
7
8
  require 'test/unit'
@@ -2,6 +2,7 @@
2
2
  # Copyright:: Copyright (C) 2008 Massachusetts Institute of Technology
3
3
  # License:: MIT
4
4
 
5
+ require 'rubygems'
5
6
  require 'smartcard'
6
7
 
7
8
  require 'test/unit'
@@ -2,6 +2,7 @@
2
2
  # Copyright:: Copyright (C) 2008 Massachusetts Institute of Technology
3
3
  # License:: MIT
4
4
 
5
+ require 'rubygems'
5
6
  require 'smartcard'
6
7
 
7
8
  require 'test/unit'
@@ -2,6 +2,7 @@
2
2
  # Copyright:: Copyright (C) 2008 Massachusetts Institute of Technology
3
3
  # License:: MIT
4
4
 
5
+ require 'rubygems'
5
6
  require 'smartcard'
6
7
 
7
8
  require 'test/unit'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartcard
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
5
- prerelease: false
4
+ hash: 15
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 1
10
- version: 0.5.1
9
+ - 2
10
+ version: 0.5.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Victor Costan
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-27 00:00:00 -05:00
19
- default_executable:
18
+ date: 2011-04-21 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: ffi
@@ -174,7 +173,6 @@ files:
174
173
  - test/pcsc/context_test.rb
175
174
  - test/pcsc/reader_state_queries_test.rb
176
175
  - smartcard.gemspec
177
- has_rdoc: true
178
176
  homepage: http://www.costan.us/smartcard
179
177
  licenses: []
180
178
 
@@ -210,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
208
  requirements: []
211
209
 
212
210
  rubyforge_project: smartcard
213
- rubygems_version: 1.3.7
211
+ rubygems_version: 1.7.2
214
212
  signing_key:
215
213
  specification_version: 3
216
214
  summary: Interface with ISO 7816 smart cards.