pkcs11 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -274,10 +274,10 @@ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_OTP_PARAM, pValue, ulValueLen);
274
274
  PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_OTP_PARAM, type);
275
275
 
276
276
  PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_OTP_PARAMS);
277
- PKCS11_IMPLEMENT_STRUCT_PTR_ARRAY_ACCESSOR(CK_OTP_PARAMS, CK_OTP_PARAM, pParams, ulCount);
277
+ PKCS11_IMPLEMENT_PKCS11_STRUCT_PTR_ARRAY_ACCESSOR(CK_OTP_PARAMS, CK_OTP_PARAM, pParams, ulCount);
278
278
 
279
279
  PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_OTP_SIGNATURE_INFO);
280
- PKCS11_IMPLEMENT_STRUCT_PTR_ARRAY_ACCESSOR(CK_OTP_SIGNATURE_INFO, CK_OTP_PARAM, pParams, ulCount);
280
+ PKCS11_IMPLEMENT_PKCS11_STRUCT_PTR_ARRAY_ACCESSOR(CK_OTP_SIGNATURE_INFO, CK_OTP_PARAM, pParams, ulCount);
281
281
 
282
282
  PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_KIP_PARAMS);
283
283
  PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_KIP_PARAMS, pSeed, ulSeedLen);
@@ -79,13 +79,14 @@ get_ulong_ptr(VALUE obj, off_t offset)
79
79
  static VALUE
80
80
  set_ulong_ptr(VALUE obj, VALUE value, const char *name, off_t offset)
81
81
  {
82
+ VALUE new_obj;
82
83
  CK_ULONG_PTR *ptr = (CK_ULONG_PTR *)((char*)DATA_PTR(obj) + offset);
83
84
  if (NIL_P(value)){
84
85
  rb_iv_set(obj, name, value);
85
86
  *ptr = NULL_PTR;
86
87
  return value;
87
88
  }
88
- VALUE new_obj = Data_Make_Struct(rb_cInteger, CK_ULONG, 0, free, *ptr);
89
+ new_obj = Data_Make_Struct(rb_cInteger, CK_ULONG, 0, free, *ptr);
89
90
  rb_iv_set(obj, name, new_obj);
90
91
  **ptr = NUM2ULONG(value);
91
92
  return value;
@@ -236,9 +237,10 @@ get_struct_ptr_array(VALUE obj, VALUE klass, off_t offset, off_t offset_len, int
236
237
  unsigned long l = *(unsigned long*)(ptr+offset_len);
237
238
  VALUE ary = rb_ary_new();
238
239
  for (i = 0; i < l; i++){
240
+ VALUE new_obj;
239
241
  void *mem = xmalloc(sizeofstruct);
240
242
  memcpy(mem, p + sizeofstruct * i, sizeofstruct);
241
- VALUE new_obj = Data_Wrap_Struct(klass, 0, -1, mem);
243
+ new_obj = Data_Wrap_Struct(klass, 0, -1, mem);
242
244
  rb_ary_push(ary, new_obj);
243
245
  }
244
246
  return ary;
@@ -396,6 +398,16 @@ static VALUE c##s##_set_##f(VALUE o, VALUE v){ \
396
398
  return set_struct_ptr_array(o, c##k, #k, v, #f, OFFSET_OF(s, f), OFFSET_OF(s, l), sizeof(k)); \
397
399
  }
398
400
 
401
+ #define PKCS11_IMPLEMENT_PKCS11_STRUCT_PTR_ARRAY_ACCESSOR(s, k, f, l) \
402
+ static VALUE c##s##_get_##f(VALUE o){ \
403
+ VALUE klass = rb_const_get(rb_const_get(rb_cObject, rb_intern("PKCS11")), rb_intern(#k)); \
404
+ return get_struct_ptr_array(o, klass, OFFSET_OF(s, f), OFFSET_OF(s, l), sizeof(k)); \
405
+ } \
406
+ static VALUE c##s##_set_##f(VALUE o, VALUE v){ \
407
+ VALUE klass = rb_const_get(rb_const_get(rb_cObject, rb_intern("PKCS11")), rb_intern(#k)); \
408
+ return set_struct_ptr_array(o, klass, #k, v, #f, OFFSET_OF(s, f), OFFSET_OF(s, l), sizeof(k)); \
409
+ }
410
+
399
411
 
400
412
  /**************************************************/
401
413
  /* struct/attribute definition */
@@ -0,0 +1,6 @@
1
+ #ifndef RUBY_PK11_VERSION_H
2
+ #define RUBY_PK11_VERSION_H
3
+
4
+ static const char *VERSION = "0.2.2";
5
+
6
+ #endif
@@ -89,13 +89,13 @@ module PKCS11
89
89
  def to_attributes(template)
90
90
  case template
91
91
  when Array
92
- template.map{|v| PKCS11::CK_ATTRIBUTE.new(string_to_handle('CKA_', v), nil) }
92
+ template.map{|v| @pk.vendor_class_CK_ATTRIBUTE.new(string_to_handle('CKA_', v), nil) }
93
93
  when Hash
94
- template.map{|k,v| PKCS11::CK_ATTRIBUTE.new(string_to_handle('CKA_', k), v) }
94
+ template.map{|k,v| @pk.vendor_class_CK_ATTRIBUTE.new(string_to_handle('CKA_', k), v) }
95
95
  when String, Symbol
96
- [PKCS11::CK_ATTRIBUTE.new(string_to_handle('CKA_', template), nil)]
96
+ [@pk.vendor_class_CK_ATTRIBUTE.new(string_to_handle('CKA_', template), nil)]
97
97
  when Integer
98
- [PKCS11::CK_ATTRIBUTE.new(template, nil)]
98
+ [@pk.vendor_class_CK_ATTRIBUTE.new(template, nil)]
99
99
  else
100
100
  template
101
101
  end
@@ -104,7 +104,7 @@ module PKCS11
104
104
  def string_to_handle(prefix, attribute) # :nodoc:
105
105
  case attribute
106
106
  when String, Symbol
107
- PKCS11.const_get("#{prefix}#{attribute}")
107
+ @pk.vendor_const_get("#{prefix}#{attribute}")
108
108
  else
109
109
  attribute
110
110
  end
@@ -121,8 +121,8 @@ module PKCS11
121
121
  param = mechanism.values.first
122
122
  case param
123
123
  when Hash
124
- param_class = MechanismParameters[mech]
125
- raise ArgumentError, "unknown mechanism - please use mechanism parameter as String" unless param_class
124
+ param_class = @pk.vendor_mechanism_parameter_struct(mech)
125
+ raise ArgumentError, "unknown mechanism - please use String/Int/Struct as mechanism parameter" unless param_class
126
126
 
127
127
  pa = param_class.new
128
128
  param.each do |k, v|
@@ -54,14 +54,14 @@ module PKCS11
54
54
  alias info C_GetInfo
55
55
 
56
56
  alias unwrapped_C_GetSlotList C_GetSlotList
57
-
57
+
58
58
  # Obtain an array of Slot objects in the system.
59
59
  #
60
60
  # @param [true, false] tokenPresent indicates whether the list
61
61
  # obtained includes only those slots with a token present (true), or
62
62
  # all slots (false);
63
63
  # @return [Array<Slot>]
64
- def C_GetSlotList(tokenPresent=true)
64
+ def C_GetSlotList(tokenPresent=false)
65
65
  slots = unwrapped_C_GetSlotList(tokenPresent)
66
66
  slots.map{|slot|
67
67
  Slot.new self, slot
@@ -74,7 +74,7 @@ module PKCS11
74
74
  def active_slots
75
75
  slots(true)
76
76
  end
77
-
77
+
78
78
  # Obtain an array of Slot objects in the system regardless if a token is present.
79
79
  # @return [Array<Slot>]
80
80
  def all_slots
@@ -86,7 +86,31 @@ module PKCS11
86
86
  self.C_Finalize
87
87
  self.unload_library
88
88
  end
89
-
89
+
90
+ # Return the value of a named constant. Used for CKA_* and CKM_* .
91
+ # This method could be overloaded for vendor specific extensions.
92
+ #
93
+ # @param [String] name Name of the constant
94
+ # @return [Integer] Value of the constant
95
+ def vendor_const_get(name)
96
+ PKCS11.const_get(name)
97
+ end
98
+
99
+ # Return an array of all known CKA_* attributes as String.
100
+ # This method could be overloaded for vendor specific extensions.
101
+ def vendor_all_attribute_names
102
+ return ATTRIBUTES.values
103
+ end
104
+
105
+ # Return the parameter struct of a given mechanism.
106
+ # This method could be overloaded for vendor specific extensions.
107
+ #
108
+ # @param [Integer] mech Mechanism
109
+ # @return [PKCS11::CStruct] appropriate class as parameter for the mechanism
110
+ def vendor_mechanism_parameter_struct(mech)
111
+ Helper::MechanismParameters[mech]
112
+ end
113
+
90
114
  private :unwrapped_initialize
91
115
  private :unwrapped_C_GetSlotList
92
116
  private :unwrapped_C_GetInfo
@@ -26,13 +26,15 @@ module PKCS11
26
26
  "#<#{self.class} #{@obj.inspect}>"
27
27
  end
28
28
 
29
- # Get the value of one attribute of the object.
29
+ # Get the value of one or several attributes of the object.
30
30
  #
31
- # @param [String, Symbol, Integer] attribute can be String or Symbol of the attribute constant
32
- # or the attribute number as Integer.
31
+ # @param [String, Symbol, Integer, Array] attribute can be String or Symbol
32
+ # of the attribute(s) constant or the attribute(s) number as Integer.
33
33
  #
34
- # @return [String, Integer, Boolean, nil] the attribute value as String, Integer or true/false
35
- # depending on the attribute type.
34
+ # @return [String, Integer, Boolean, Array, nil] the attribute value as String,
35
+ # Integer or true/false depending on the attribute type.
36
+ # If called with more than one parameter or with an Array, a Array
37
+ # of attribute values is returned.
36
38
  # Unknown attributes (out of PKCS#11 v2.2) are not converted to adequate
37
39
  # ruby objects but returned as String.
38
40
  # That is true/false will be returned as "\\001" respectively "\\000".
@@ -40,18 +42,23 @@ module PKCS11
40
42
  # @example
41
43
  # object[:VALUE] # => "\000\000\000\000\000\000\000\000"
42
44
  # object[:MODULUS_BITS] # => 768
45
+ # object[:MODULUS_BITS, :LABEL] # => [1024, "MyKey"]
43
46
  #
44
47
  # See PKCS#11 for attribute definitions.
45
- def [](attribute)
46
- attrs = C_GetAttributeValue( [attribute] )
47
- attrs.first.value unless attrs.empty?
48
+ def [](*attributes)
49
+ attrs = C_GetAttributeValue( attributes.flatten )
50
+ if attrs.length>1 || attributes.first.kind_of?(Array)
51
+ attrs.map(&:value)
52
+ else
53
+ attrs.first.value unless attrs.empty?
54
+ end
48
55
  end
49
56
 
50
- # Modifies the value of one attribute the object.
57
+ # Modifies the value of one or several attributes of the object.
51
58
  #
52
- # @param [String, Symbol, Integer] attribute can be String or Symbol of the attribute constant
59
+ # @param [String, Symbol, Integer] attribute can be String or Symbol of the attribute constant
53
60
  # or the attribute value as Integer.
54
- # @param [String, Integer, Boolean, nil] value value the attribute will be set to.
61
+ # @param [String, Integer, Boolean, Array, nil] value value(s) the attribute(s) will be set to.
55
62
  #
56
63
  # Following value conversations are done from Ruby to C:
57
64
  # true -> 0x01
@@ -62,12 +69,16 @@ module PKCS11
62
69
  # @example
63
70
  # object[:VALUE] = "\000\000\000\000\000\000\000\000"
64
71
  # object[:MODULUS_BITS] = 768
72
+ # object[:MODULUS_BITS, :LABEL] = 1024, 'MyKey'
65
73
  #
66
74
  # See PKCS#11 for attribute definitions.
67
75
  # @return value
68
- def []=(attribute, value)
69
- C_SetAttributeValue( attribute => value )
70
- value
76
+ def []=(*attributes)
77
+ values = attributes.pop
78
+ values = [values] unless values.kind_of?(Array)
79
+ raise ArgumentError, "different number of attributes to set (#{attributes.length}) and given values (#{values.length})" unless attributes.length == values.length
80
+ map = values.each.with_index.inject({}){|s, v| s[attributes[v[1]]] = v[0]; s }
81
+ C_SetAttributeValue( map )
71
82
  end
72
83
 
73
84
  # Modifies the value of one or more attributes of the object in a single call.
@@ -80,7 +91,7 @@ module PKCS11
80
91
  template
81
92
  end
82
93
  alias attributes= C_SetAttributeValue
83
-
94
+
84
95
  # Obtains the value of one or more attributes of the object in a single call.
85
96
  #
86
97
  # @param [Array<String, Symbol, Integer>, Hash, String, Integer] attribute attribute names
@@ -98,9 +109,9 @@ module PKCS11
98
109
  def C_GetAttributeValue(*template)
99
110
  case template.length
100
111
  when 0
101
- return PKCS11::ATTRIBUTES.values.map{|attr|
112
+ return @pk.vendor_all_attribute_names.map{|attr|
102
113
  begin
103
- attributes(PKCS11.const_get(attr))
114
+ attributes(@pk.vendor_const_get(attr))
104
115
  rescue PKCS11::Error
105
116
  end
106
117
  }.flatten.compact
@@ -148,7 +159,7 @@ module PKCS11
148
159
  self
149
160
  end
150
161
  alias destroy C_DestroyObject
151
-
162
+
152
163
  # Gets the size of an object in bytes.
153
164
  # @return [Integer]
154
165
  def C_GetObjectSize()
@@ -0,0 +1,14 @@
1
+ .gemtest
2
+ .yardopts
3
+ Manifest.txt
4
+ README_PROTECT_SERVER.rdoc
5
+ Rakefile
6
+ ext/extconf.rb
7
+ ext/generate_constants.rb
8
+ ext/generate_structs.rb
9
+ ext/pk11s.c
10
+ lib/pkcs11_protect_server.rb
11
+ lib/pkcs11_protect_server/extensions.rb
12
+ test/helper.rb
13
+ test/test_pkcs11_protect_server.rb
14
+ test/test_pkcs11_protect_server_crypt.rb
@@ -1,11 +1,11 @@
1
- require "openssl"
1
+ require "pkcs11"
2
2
 
3
3
  def find_softokn
4
4
  if RUBY_PLATFORM =~ /mswin|mingw/
5
5
  lLIBSOFTOKEN3_SO = "softokn3.dll"
6
6
 
7
7
  # Try to find the firefox path.
8
- unless ENV['SOFTOKN_PATH']
8
+ unless so_path = ENV['SOFTOKN_PATH']
9
9
  require 'win32/registry'
10
10
  begin
11
11
  firefox_path = Win32::Registry::HKEY_LOCAL_MACHINE.open('SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe'){|reg|
@@ -21,15 +21,22 @@ def find_softokn
21
21
  else
22
22
  lLIBSOFTOKEN3_SO = "libsoftokn3.so"
23
23
  lLIBNSS_PATHS = %w(
24
- /usr/lib64 /usr/lib/ /usr/lib64/nss /usr/lib/nss
24
+ /usr/lib64
25
+ /usr/lib
26
+ /usr/lib64/nss
27
+ /usr/lib/nss
28
+ /usr/lib/i386-linux-gnu/nss
29
+ /usr/lib/x86_64-linux-gnu/nss
25
30
  )
26
31
  unless so_path = ENV['SOFTOKN_PATH']
27
32
  paths = lLIBNSS_PATHS.collect{|path| File.join(path, lLIBSOFTOKEN3_SO) }
28
- so_path = paths.find{|path| File.exist?(path) }
33
+ so_path = paths.find do |path|
34
+ File.exist?(path) && open_softokn(path).close rescue false
35
+ end
29
36
  end
30
37
  end
31
38
 
32
- raise "#{lLIBSOFTOKEN3_SO} not found - please install firefox or set ENV['SOFTOKN_PATH']" unless so_path
39
+ raise "#{lLIBSOFTOKEN3_SO} not found - please install firefox or libnss3 or set ENV['SOFTOKN_PATH']" unless so_path
33
40
  so_path
34
41
  end
35
42
 
@@ -42,9 +49,10 @@ def softokn_params
42
49
  ]
43
50
  end
44
51
 
45
- def open_softokn
46
- so_path = find_softokn
47
- nNSS_INIT_ARGS = softokn_params
52
+ def softokn_params_string
53
+ softokn_params.join(" ")
54
+ end
48
55
 
49
- PKCS11.open(so_path, :flags=>0, :pReserved=>nNSS_INIT_ARGS.join(" "))
56
+ def open_softokn(so_path=nil)
57
+ PKCS11.open(so_path || find_softokn, :flags=>0, :pReserved=>softokn_params_string)
50
58
  end
@@ -16,7 +16,7 @@ class TestPkcs11 < Test::Unit::TestCase
16
16
  def pk
17
17
  @pk
18
18
  end
19
-
19
+
20
20
  def test_info
21
21
  info = pk.info
22
22
  assert info.inspect =~ /cryptokiVersion=/, 'There should be a version in the library info'
@@ -34,14 +34,14 @@ class TestPkcs11 < Test::Unit::TestCase
34
34
 
35
35
  @pk = PKCS11.open
36
36
  pk.load_library(find_softokn)
37
-
37
+
38
38
  pk.C_GetFunctionList
39
-
39
+
40
40
  pargs = PKCS11::CK_C_INITIALIZE_ARGS.new
41
41
  pargs.flags = 0
42
42
  pargs.pReserved = softokn_params.join(" ")
43
43
  pk.C_Initialize(pargs)
44
-
44
+
45
45
  pk.info
46
46
  end
47
47
  end
@@ -1,7 +1,6 @@
1
1
  require "test/unit"
2
2
  require "pkcs11"
3
3
  require "test/helper"
4
- require "openssl"
5
4
 
6
5
  class TestPkcs11Object < Test::Unit::TestCase
7
6
  include PKCS11
@@ -15,11 +14,11 @@ class TestPkcs11Object < Test::Unit::TestCase
15
14
  $pkcs11 ||= open_softokn
16
15
  @slots = pk.active_slots
17
16
  @slot = slots.last
18
-
17
+
19
18
  flags = CKF_SERIAL_SESSION #| CKF_RW_SESSION
20
19
  @session = slot.C_OpenSession(flags)
21
20
  # @session.login(:USER, "")
22
-
21
+
23
22
  # Create session object for tests.
24
23
  @object = session.create_object(
25
24
  :CLASS=>CKO_DATA,
@@ -55,11 +54,15 @@ class TestPkcs11Object < Test::Unit::TestCase
55
54
  end
56
55
 
57
56
  assert object.attributes.length>=4, 'There should be at least the 4 stored attributes readable'
57
+ assert_not_nil object.attributes.find{|a| a.type==CKA_CLASS}, 'CKA_CLASS should be returned for Object#attributes'
58
58
  end
59
59
 
60
60
  def test_accessor
61
61
  assert_equal 'value', object[:VALUE], "Value should be readable"
62
62
  assert_equal CKO_DATA, object[:CLASS], "Class should be readable"
63
+ assert_equal ['value', CKO_DATA], object[:VALUE, :CLASS], "multiple values should be readable"
64
+ assert_equal ['value', CKO_DATA], object[[:VALUE, :CLASS]], "multiple values should be readable"
65
+ assert_equal [], object[[]], "multiple values should be readable"
63
66
  end
64
67
 
65
68
  def test_attribute
@@ -71,19 +74,30 @@ class TestPkcs11Object < Test::Unit::TestCase
71
74
  def test_set_attribute
72
75
  object[:VALUE] = 'value2'
73
76
  assert_equal 'value2', object[:VALUE], "Value should have changed"
77
+
78
+ object[:VALUE] = ['value3']
79
+ assert_equal 'value3', object[:VALUE], "Value should have changed"
74
80
  end
75
81
 
76
82
  def test_set_attributes
77
- object.attributes = {:VALUE => 'value2', PKCS11::CKA_APPLICATION => 'app2'}
83
+ object.attributes = {:VALUE => 'value4', PKCS11::CKA_APPLICATION => 'app4'}
84
+ assert_equal 'value4', object[:VALUE], "Value should have changed"
85
+ assert_equal 'app4', object[:APPLICATION], "App should have changed"
86
+
87
+ object[:VALUE, PKCS11::CKA_APPLICATION] = 'value5', 'app5'
88
+ assert_equal 'value5', object[:VALUE], "Value should have changed"
89
+ assert_equal 'app5', object[:APPLICATION], "App should have changed"
90
+ assert_raise(ArgumentError) do
91
+ object[:VALUE, PKCS11::CKA_APPLICATION, :CLASS] = 'value5', 'app5'
92
+ end
78
93
 
79
- assert_equal 'value2', object[:VALUE], "Value should have changed"
80
- assert_equal 'app2', object[:APPLICATION], "App should have changed"
94
+ assert_nothing_raised{ object[] = [] }
81
95
  end
82
96
 
83
97
  def test_size
84
98
  assert object.size, 'There should be an object size'
85
99
  end
86
-
100
+
87
101
  def test_copy_without_params
88
102
  new_obj = object.copy
89
103
  new_obj[:APPLICATION] = 'Copied object'
@@ -97,7 +111,7 @@ class TestPkcs11Object < Test::Unit::TestCase
97
111
  assert_equal 'Copied object', new_obj[:APPLICATION], "Application should be changed"
98
112
  assert_equal 'My Application', object[:APPLICATION], "Original object should be unchanged"
99
113
  end
100
-
114
+
101
115
  def test_destroy
102
116
  object.destroy
103
117
 
@@ -1,7 +1,6 @@
1
1
  require "test/unit"
2
2
  require "pkcs11"
3
3
  require "test/helper"
4
- require "openssl"
5
4
 
6
5
  class TestPkcs11Thread < Test::Unit::TestCase
7
6
  include PKCS11
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pkcs11
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryosuke Kutsuna
@@ -17,11 +17,10 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-04-20 00:00:00 +02:00
21
- default_executable:
20
+ date: 2011-12-12 00:00:00 Z
22
21
  dependencies:
23
22
  - !ruby/object:Gem::Dependency
24
- name: rubyforge
23
+ name: yard
25
24
  prerelease: false
26
25
  requirement: &id001 !ruby/object:Gem::Requirement
27
26
  none: false
@@ -30,56 +29,54 @@ dependencies:
30
29
  - !ruby/object:Gem::Version
31
30
  hash: 7
32
31
  segments:
33
- - 2
34
32
  - 0
35
- - 4
36
- version: 2.0.4
33
+ - 6
34
+ version: "0.6"
37
35
  type: :development
38
36
  version_requirements: *id001
39
37
  - !ruby/object:Gem::Dependency
40
- name: yard
38
+ name: rake-compiler
41
39
  prerelease: false
42
40
  requirement: &id002 !ruby/object:Gem::Requirement
43
41
  none: false
44
42
  requirements:
45
43
  - - ">="
46
44
  - !ruby/object:Gem::Version
47
- hash: 7
45
+ hash: 5
48
46
  segments:
49
47
  - 0
50
- - 6
51
- version: "0.6"
48
+ - 7
49
+ version: "0.7"
52
50
  type: :development
53
51
  version_requirements: *id002
54
52
  - !ruby/object:Gem::Dependency
55
- name: rake-compiler
53
+ name: hoe
56
54
  prerelease: false
57
55
  requirement: &id003 !ruby/object:Gem::Requirement
58
56
  none: false
59
57
  requirements:
60
- - - ">="
58
+ - - ~>
61
59
  - !ruby/object:Gem::Version
62
- hash: 5
60
+ hash: 27
63
61
  segments:
64
- - 0
65
- - 7
66
- version: "0.7"
62
+ - 2
63
+ - 12
64
+ version: "2.12"
67
65
  type: :development
68
66
  version_requirements: *id003
69
67
  - !ruby/object:Gem::Dependency
70
- name: hoe
68
+ name: rdoc
71
69
  prerelease: false
72
70
  requirement: &id004 !ruby/object:Gem::Requirement
73
71
  none: false
74
72
  requirements:
75
- - - ">="
73
+ - - ~>
76
74
  - !ruby/object:Gem::Version
77
75
  hash: 19
78
76
  segments:
79
- - 2
80
- - 7
81
- - 0
82
- version: 2.7.0
77
+ - 3
78
+ - 10
79
+ version: "3.10"
83
80
  type: :development
84
81
  version_requirements: *id004
85
82
  description: "This module allows Ruby programs to interface with \"RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki)\"."
@@ -94,10 +91,12 @@ extensions:
94
91
  extra_rdoc_files:
95
92
  - History.txt
96
93
  - Manifest.txt
94
+ - pkcs11_protect_server/Manifest.txt
97
95
  - README.rdoc
98
96
  - ext/pk11.c
99
97
  files:
100
98
  - .autotest
99
+ - .gemtest
101
100
  - .yardopts
102
101
  - History.txt
103
102
  - MIT-LICENSE
@@ -120,6 +119,7 @@ files:
120
119
  - ext/pk11_const.c
121
120
  - ext/pk11_const_macros.h
122
121
  - ext/pk11_struct_macros.h
122
+ - ext/pk11_version.h
123
123
  - lib/pkcs11.rb
124
124
  - lib/pkcs11/extensions.rb
125
125
  - lib/pkcs11/helper.rb
@@ -127,8 +127,6 @@ files:
127
127
  - lib/pkcs11/object.rb
128
128
  - lib/pkcs11/session.rb
129
129
  - lib/pkcs11/slot.rb
130
- - sample/firefox_certs.rb
131
- - sample/nssckbi.rb
132
130
  - test/fixtures/softokn/cert8.db
133
131
  - test/fixtures/softokn/key3.db
134
132
  - test/fixtures/softokn/secmod.db
@@ -143,9 +141,10 @@ files:
143
141
  - ext/pk11_struct_impl.inc
144
142
  - ext/pk11_struct_def.inc
145
143
  - ext/pk11_const_def.inc
144
+ - ext/pk11_struct.doc
146
145
  - ext/pk11_thread_funcs.h
147
146
  - ext/pk11_thread_funcs.c
148
- has_rdoc: true
147
+ - pkcs11_protect_server/Manifest.txt
149
148
  homepage: http://github.com/larskanis/pkcs11
150
149
  licenses: []
151
150
 
@@ -176,15 +175,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
175
  requirements: []
177
176
 
178
177
  rubyforge_project: pkcs11
179
- rubygems_version: 1.6.2
178
+ rubygems_version: 1.8.11
180
179
  signing_key:
181
180
  specification_version: 3
182
181
  summary: PKCS#11 binding for Ruby
183
182
  test_files:
184
- - test/test_pkcs11_object.rb
185
- - test/test_pkcs11_structs.rb
186
183
  - test/test_pkcs11_thread.rb
184
+ - test/test_pkcs11_structs.rb
187
185
  - test/test_pkcs11_session.rb
188
186
  - test/test_pkcs11_slot.rb
189
- - test/test_pkcs11_crypt.rb
190
187
  - test/test_pkcs11.rb
188
+ - test/test_pkcs11_crypt.rb
189
+ - test/test_pkcs11_object.rb