pkcs11_protect_server 0.2.3 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: df303a2820d7a32bf426acc2bb4b945253fe0053
4
+ data.tar.gz: 970a00080218178f6aaac7c9bb3aff912fd82c8b
5
+ SHA512:
6
+ metadata.gz: d358bd6062fea26777f117eb4f1a871fa79c1267598220dfb7b2c92c90815fc54a7a4e6b1f28457ad261c9cfcd8d9cb2df8e966014c508129712042cbda3d48a
7
+ data.tar.gz: 4d4e2c66f48160a7ff17cbc154887a93d3b326b890535b5a53ecb6358cbf6cc736cff1de3f11ae3449312879683630fd1f8bb6eb8ef4985a37f2065e5f600d56
Binary file
Binary file
data/Rakefile CHANGED
@@ -71,13 +71,13 @@ copy_from_base_task 'pk11_version.h'
71
71
 
72
72
  file 'ext/extconf.rb' => ['ext/pk11s_struct_def.inc', 'ext/pk11s_const_def.inc', 'ext/pk11_struct_macros.h', 'ext/pk11_const_macros.h', 'ext/pk11_version.h']
73
73
  file 'ext/pk11s_struct_def.inc' => 'ext/generate_structs.rb' do
74
- sh "#{RbConfig::CONFIG['ruby_install_name']} ext/generate_structs.rb --def ext/pk11s_struct_def.inc --impl ext/pk11s_struct_impl.inc --doc ext/pk11s_struct.doc #{File.join(PROTECT_SERVER_SDK_DIR, 'include/ctvdef.h').inspect}"
74
+ sh "#{RbConfig::CONFIG['ruby_install_name']} -I../lib ext/generate_structs.rb --def ext/pk11s_struct_def.inc --impl ext/pk11s_struct_impl.inc --doc ext/pk11s_struct.doc #{File.join(PROTECT_SERVER_SDK_DIR, 'include/ctvdef.h').inspect}"
75
75
  end
76
76
  file 'ext/pk11s_struct_impl.inc' => 'ext/pk11s_struct_def.inc'
77
77
  file 'ext/pk11s_struct.doc' => 'ext/pk11s_struct_def.inc'
78
78
 
79
79
  file 'ext/pk11s_const_def.inc' => 'ext/generate_constants.rb' do
80
- sh "#{RbConfig::CONFIG['ruby_install_name']} ext/generate_constants.rb --const ext/pk11s_const_def.inc #{File.join(PROTECT_SERVER_SDK_DIR, 'include/ctvdef.h').inspect}"
80
+ sh "#{RbConfig::CONFIG['ruby_install_name']} -I../lib ext/generate_constants.rb --const ext/pk11s_const_def.inc #{File.join(PROTECT_SERVER_SDK_DIR, 'include/ctvdef.h').inspect}"
81
81
  end
82
82
  file 'ext/pk11s.c' => ['ext/pk11s_struct_def.inc', 'ext/pk11s_struct_impl.inc', 'ext/pk11s_const_def.inc']
83
83
 
@@ -1,6 +1,6 @@
1
1
  #ifndef RUBY_PK11_VERSION_H
2
2
  #define RUBY_PK11_VERSION_H
3
3
 
4
- static const char *VERSION = "0.2.3";
4
+ static const char *VERSION = "0.2.6";
5
5
 
6
6
  #endif
@@ -102,7 +102,6 @@ PKCS11_DEFINE_ATTRIBUTE(CKA_MAX_SESSIONS); /* (CKA_VENDOR_DEFINED + 0x0155) */
102
102
  PKCS11_DEFINE_ATTRIBUTE(CKA_MIN_PIN_LEN); /* (CKA_VENDOR_DEFINED + 0x0156) */
103
103
  PKCS11_DEFINE_ATTRIBUTE(CKA_MAX_PIN_FAIL); /* (CKA_VENDOR_DEFINED + 0x0158) */
104
104
  PKCS11_DEFINE_ATTRIBUTE(CKA_FLAGS); /* (CKA_VENDOR_DEFINED + 0x0159) */
105
- PKCS11_DEFINE_ATTRIBUTE(CKA_PINPAD_DESC); /* (CKA_VENDOR_DEFINED + 0x015A) */
106
105
  PKCS11_DEFINE_ATTRIBUTE(CKA_VERIFY_OS); /* (CKA_VENDOR_DEFINED + 0x0170) */
107
106
  PKCS11_DEFINE_ATTRIBUTE(CKA_VERSION); /* (CKA_VENDOR_DEFINED + 0x0181) */
108
107
  PKCS11_DEFINE_ATTRIBUTE(CKA_MANUFACTURER); /* (CKA_VENDOR_DEFINED + 0x0182) */
@@ -120,7 +119,6 @@ PKCS11_DEFINE_ATTRIBUTE(CKA_HIFACE_MASTER); /* (CKA_VENDOR_DEFINED + 0x250) */
120
119
  PKCS11_DEFINE_ATTRIBUTE(CKA_SEED); /* (CKA_VENDOR_DEFINED + 0x260) */
121
120
  PKCS11_DEFINE_ATTRIBUTE(CKA_COUNTER); /* (CKA_VENDOR_DEFINED + 0x261) */
122
121
  PKCS11_DEFINE_ATTRIBUTE(CKA_H_VALUE); /* (CKA_VENDOR_DEFINED + 0x262) */
123
- PKCS11_DEFINE_ATTRIBUTE(CKA_INTERNAL_1); /* (CKA_VENDOR_DEFINED + 0x270) */
124
122
  PKCS11_DEFINE_ATTRIBUTE(CKA_ENUM_ATTRIBUTE); /* ((CK_ATTRIBUTE_TYPE)0xFFFF) */
125
123
  PKCS11_DEFINE_OBJECT_CLASS(CKO_CERTIFICATE_REQUEST); /* (CKO_VENDOR_DEFINED + 0x0201) */
126
124
  PKCS11_DEFINE_OBJECT_CLASS(CKO_CRL); /* (CKO_VENDOR_DEFINED + 0x0202) */
@@ -1,8 +1,8 @@
1
- require "test/unit"
1
+ require "minitest/autorun"
2
2
  require "pkcs11_protect_server"
3
3
  require "test/helper"
4
4
 
5
- class TestPkcs11ProtectServer < Test::Unit::TestCase
5
+ class TestPkcs11ProtectServer < Minitest::Test
6
6
  include PKCS11
7
7
 
8
8
  def test_CStruct
@@ -23,7 +23,7 @@ class TestPkcs11ProtectServer < Test::Unit::TestCase
23
23
  s.certAttr = [s1, s2]
24
24
  assert_equal [s1.to_hash, s2.to_hash], s.certAttr.map{|e| e.to_hash }
25
25
  GC.start
26
- assert_raise(ArgumentError){ s.certAttr = [s1, s2, nil] }
26
+ assert_raises(ArgumentError){ s.certAttr = [s1, s2, nil] }
27
27
  assert_equal [s1.to_hash, s2.to_hash], s.certAttr.map{|e| e.to_hash }
28
28
 
29
29
  s.certAttr = []
@@ -1,8 +1,8 @@
1
- require "test/unit"
1
+ require "minitest/autorun"
2
2
  require "pkcs11_protect_server"
3
3
  require "test/helper"
4
4
 
5
- class TestPkcs11ProtectServerCrypt < Test::Unit::TestCase
5
+ class TestPkcs11ProtectServerCrypt < Minitest::Test
6
6
  include PKCS11
7
7
  attr_reader :slots
8
8
  attr_reader :slot
@@ -58,7 +58,7 @@ class TestPkcs11ProtectServerCrypt < Test::Unit::TestCase
58
58
  end
59
59
 
60
60
  def test_bad_parity
61
- assert_raise(ProtectServer::CKR_ET_NOT_ODD_PARITY) do
61
+ assert_raises(ProtectServer::CKR_ET_NOT_ODD_PARITY) do
62
62
  session.create_object(
63
63
  :CLASS=>CKO_SECRET_KEY,
64
64
  :KEY_TYPE=>CKK_DES2,
@@ -74,7 +74,7 @@ class TestPkcs11ProtectServerCrypt < Test::Unit::TestCase
74
74
 
75
75
  new_key1 = session.derive_key( {ProtectServer::CKM_DES3_DERIVE_CBC => pa}, secret_key,
76
76
  :CLASS=>CKO_SECRET_KEY, :KEY_TYPE=>CKK_DES2, :ENCRYPT=>true, :DECRYPT=>true, :SENSITIVE=>false )
77
- assert_not_equal secret_key[:VALUE], new_key1[:VALUE], 'Derived key shouldn\'t have equal key value'
77
+ refute_equal secret_key[:VALUE], new_key1[:VALUE], 'Derived key shouldn\'t have equal key value'
78
78
 
79
79
  new_key2 = session.derive_key( {:DES3_DERIVE_CBC => {:data=>"1"*16, :iv=>"2"*16}}, secret_key,
80
80
  :CLASS=>CKO_SECRET_KEY, :KEY_TYPE=>CKK_DES2, :ENCRYPT=>true, :DECRYPT=>true, :SENSITIVE=>false )
@@ -98,6 +98,6 @@ class TestPkcs11ProtectServerCrypt < Test::Unit::TestCase
98
98
  assert_equal 5, secret_key[:USAGE_COUNT], 'CKA_USAGE_COUNT should be usable'
99
99
 
100
100
  assert_equal false, secret_key[:IMPORT], 'CKA_IMPORT should default to false'
101
- assert_not_nil secret_key.attributes.find{|a| a.type==ProtectServer::CKA_EXPORT}, 'CKA_EXPORT should be returned for Object#attributes'
101
+ refute_nil secret_key.attributes.find{|a| a.type==ProtectServer::CKA_EXPORT}, 'CKA_EXPORT should be returned for Object#attributes'
102
102
  end
103
103
  end
metadata CHANGED
@@ -1,165 +1,163 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: pkcs11_protect_server
3
- version: !ruby/object:Gem::Version
4
- hash: 17
5
- prerelease:
6
- segments:
7
- - 0
8
- - 2
9
- - 3
10
- version: 0.2.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.6
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Lars Kanis
14
8
  autorequire:
15
9
  bindir: bin
16
- cert_chain: []
17
-
18
- date: 2012-01-25 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDLjCCAhagAwIBAgIBBTANBgkqhkiG9w0BAQUFADA9MQ4wDAYDVQQDDAVrYW5p
14
+ czEXMBUGCgmSJomT8ixkARkWB2NvbWNhcmQxEjAQBgoJkiaJk/IsZAEZFgJkZTAe
15
+ Fw0xNzAzMDMwNzExMTBaFw0xODAzMDMwNzExMTBaMD0xDjAMBgNVBAMMBWthbmlz
16
+ MRcwFQYKCZImiZPyLGQBGRYHY29tY2FyZDESMBAGCgmSJomT8ixkARkWAmRlMIIB
17
+ IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApop+rNmg35bzRugZ21VMGqI6
18
+ HGzPLO4VHYncWn/xmgPU/ZMcZdfj6MzIaZJ/czXyt4eHpBk1r8QOV3gBXnRXEjVW
19
+ 9xi+EdVOkTV2/AVFKThcbTAQGiF/bT1n2M+B1GTybRzMg6hyhOJeGPqIhLfJEpxn
20
+ lJi4+ENAVT4MpqHEAGB8yFoPC0GqiOHQsdHxQV3P3c2OZqG+yJey74QtwA2tLcLn
21
+ Q53c63+VLGsOjODl1yPn/2ejyq8qWu6ahfTxiIlSar2UbwtaQGBDFdb2CXgEufXT
22
+ L7oaPxlmj+Q2oLOfOnInd2Oxop59HoJCQPsg8f921J43NCQGA8VHK6paxIRDLQID
23
+ AQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUvgTdT7fe
24
+ x17ugO3IOsjEJwW7KP4wDQYJKoZIhvcNAQEFBQADggEBAIyEQLgrIQGDpWQq3EED
25
+ O3DWblkSBsSm9RCC+c87tvuKNORR1S+W+lyC9J1bGTX3VE5Npdme9939wF1e5ymZ
26
+ NUIDlBocQrdmyLqPY3rMOmyj4ilvS0I1PKH89MMsI9H5+vYMuy/0Gr3hR34XAfZh
27
+ ZCgMErfzDGDmekR9kbb5nIqBQy06rz+F08tXtjU0SHZ6QYXdlHTH32YgAGlAEB9L
28
+ zKtNnitTiTyGfazgcGv9wi4ZGH2G9cZRR9ut7SXYl21Z+2X+l/ZTd0auXnGrFNzR
29
+ KA+9Be6F9TL7/sd/cTKE79K/9/xLfIX7bsvTFNElKYAV903uKdaS6utXYrTAHzwI
30
+ yxU=
31
+ -----END CERTIFICATE-----
32
+ date: 2017-06-07 00:00:00.000000000 Z
33
+ dependencies:
34
+ - !ruby/object:Gem::Dependency
21
35
  name: pkcs11
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
26
- - - "="
27
- - !ruby/object:Gem::Version
28
- hash: 17
29
- segments:
30
- - 0
31
- - 2
32
- - 3
33
- version: 0.2.3
36
+ requirement: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 0.2.6
34
41
  type: :runtime
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: yard
38
42
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
40
- none: false
41
- requirements:
43
+ version_requirements: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '='
46
+ - !ruby/object:Gem::Version
47
+ version: 0.2.6
48
+ - !ruby/object:Gem::Dependency
49
+ name: yard
50
+ requirement: !ruby/object:Gem::Requirement
51
+ requirements:
42
52
  - - ">="
43
- - !ruby/object:Gem::Version
44
- hash: 7
45
- segments:
46
- - 0
47
- - 6
48
- version: "0.6"
53
+ - !ruby/object:Gem::Version
54
+ version: '0.6'
49
55
  type: :development
50
- version_requirements: *id002
51
- - !ruby/object:Gem::Dependency
52
- name: rake-compiler
53
56
  prerelease: false
54
- requirement: &id003 !ruby/object:Gem::Requirement
55
- none: false
56
- requirements:
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ requirements:
57
59
  - - ">="
58
- - !ruby/object:Gem::Version
59
- hash: 5
60
- segments:
61
- - 0
62
- - 7
63
- version: "0.7"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.6'
62
+ - !ruby/object:Gem::Dependency
63
+ name: rake-compiler
64
+ requirement: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0.7'
64
69
  type: :development
65
- version_requirements: *id003
66
- - !ruby/object:Gem::Dependency
67
- name: rdoc
68
70
  prerelease: false
69
- requirement: &id004 !ruby/object:Gem::Requirement
70
- none: false
71
- requirements:
72
- - - ~>
73
- - !ruby/object:Gem::Version
74
- hash: 19
75
- segments:
76
- - 3
77
- - 10
78
- version: "3.10"
71
+ version_requirements: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0.7'
76
+ - !ruby/object:Gem::Dependency
77
+ name: rdoc
78
+ requirement: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '4.0'
79
83
  type: :development
80
- version_requirements: *id004
81
- - !ruby/object:Gem::Dependency
82
- name: hoe
83
84
  prerelease: false
84
- requirement: &id005 !ruby/object:Gem::Requirement
85
- none: false
86
- requirements:
87
- - - ~>
88
- - !ruby/object:Gem::Version
89
- hash: 27
90
- segments:
91
- - 2
92
- - 12
93
- version: "2.12"
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '4.0'
90
+ - !ruby/object:Gem::Dependency
91
+ name: hoe
92
+ requirement: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '3.16'
94
97
  type: :development
95
- version_requirements: *id005
96
- description: This module allows Ruby programs to use vendor extensions for Safenet Protect Server.
97
- email:
98
+ prerelease: false
99
+ version_requirements: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '3.16'
104
+ description: This module allows Ruby programs to use vendor extensions for Safenet
105
+ Protect Server.
106
+ email:
98
107
  - kanis@comcard.de
99
108
  executables: []
100
-
101
- extensions:
109
+ extensions:
102
110
  - ext/extconf.rb
103
- extra_rdoc_files:
111
+ extra_rdoc_files:
104
112
  - Manifest.txt
105
113
  - README_PROTECT_SERVER.rdoc
106
114
  - ext/pk11s.c
107
- files:
108
- - .gemtest
109
- - .yardopts
115
+ files:
116
+ - ".gemtest"
117
+ - ".yardopts"
110
118
  - Manifest.txt
111
119
  - README_PROTECT_SERVER.rdoc
112
120
  - Rakefile
113
121
  - ext/extconf.rb
114
122
  - ext/generate_constants.rb
115
123
  - ext/generate_structs.rb
124
+ - ext/pk11_const_macros.h
125
+ - ext/pk11_struct_macros.h
126
+ - ext/pk11_version.h
116
127
  - ext/pk11s.c
128
+ - ext/pk11s_const_def.inc
129
+ - ext/pk11s_struct.doc
130
+ - ext/pk11s_struct_def.inc
131
+ - ext/pk11s_struct_impl.inc
117
132
  - lib/pkcs11_protect_server.rb
118
133
  - lib/pkcs11_protect_server/extensions.rb
119
134
  - test/helper.rb
120
135
  - test/test_pkcs11_protect_server.rb
121
136
  - test/test_pkcs11_protect_server_crypt.rb
122
- - ext/pk11s_struct_impl.inc
123
- - ext/pk11s_struct_def.inc
124
- - ext/pk11s_const_def.inc
125
- - ext/pk11s_struct.doc
126
- - ext/pk11_struct_macros.h
127
- - ext/pk11_const_macros.h
128
- - ext/pk11_version.h
129
137
  homepage: http://github.com/larskanis/pkcs11
130
- licenses: []
131
-
138
+ licenses:
139
+ - MIT
140
+ metadata: {}
132
141
  post_install_message:
133
- rdoc_options:
134
- - --main
142
+ rdoc_options:
143
+ - "--main"
135
144
  - README_PROTECT_SERVER.rdoc
136
- require_paths:
145
+ require_paths:
137
146
  - lib
138
- required_ruby_version: !ruby/object:Gem::Requirement
139
- none: false
140
- requirements:
147
+ required_ruby_version: !ruby/object:Gem::Requirement
148
+ requirements:
141
149
  - - ">="
142
- - !ruby/object:Gem::Version
143
- hash: 3
144
- segments:
145
- - 0
146
- version: "0"
147
- required_rubygems_version: !ruby/object:Gem::Requirement
148
- none: false
149
- requirements:
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ required_rubygems_version: !ruby/object:Gem::Requirement
153
+ requirements:
150
154
  - - ">="
151
- - !ruby/object:Gem::Version
152
- hash: 3
153
- segments:
154
- - 0
155
- version: "0"
155
+ - !ruby/object:Gem::Version
156
+ version: '0'
156
157
  requirements: []
157
-
158
- rubyforge_project: pkcs11_protect_server
159
- rubygems_version: 1.8.6
158
+ rubyforge_project:
159
+ rubygems_version: 2.6.11
160
160
  signing_key:
161
- specification_version: 3
161
+ specification_version: 4
162
162
  summary: Safenet-ProtectServer extensions for PKCS#11-Ruby
163
- test_files:
164
- - test/test_pkcs11_protect_server_crypt.rb
165
- - test/test_pkcs11_protect_server.rb
163
+ test_files: []
@@ -0,0 +1,2 @@
1
+ <|jX79S
2
+ M'��M��[�Y=��o:�v�t�5mUcG��&*��w5�|��Gd���> �����8�Ǵ�2ջ\2�]8אOy ���7�R�����>hHy[�j �t+��:<}v����w ��~�y��gks�.��m�Uo���Y�1�`�rO���한����kΚuKXu���2bi�� f������\���R�i]!!�D�������Ť.���S�k�Ln�e��%��%�$?ޟǑ��5z���