pkcs11 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +4 -0
- data/.travis.yml +3 -2
- data/Gemfile +1 -1
- data/History.txt +7 -0
- data/README.rdoc +1 -1
- data/Rakefile +1 -1
- data/appveyor.yml +13 -9
- data/ext/pk11_version.h +1 -1
- data/lib/pkcs11/helper.rb +1 -3
- data/lib/pkcs11/library.rb +4 -0
- data/lib/pkcs11/object.rb +1 -1
- data/test/test_pkcs11_crypt.rb +8 -2
- data/test/test_pkcs11_slot.rb +7 -7
- metadata +27 -6
- metadata.gz.sig +1 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: dbbe79ed675ee3a36557da0c1daf8c57301fe4feefe884d2de01c6548bc5066b
|
4
|
+
data.tar.gz: 52d77be573adf0373a715448aefead6abcb988b53c614b2835ae7b5a0a5ce896
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fa068e4e856d6861eeb11b302d753e19be00b04f245bdada1e322b8067f7dc7704c506a7eab66a026af6ea08dbf6633ccf283a8cf6f82aaf1017e2685bd46f3
|
7
|
+
data.tar.gz: 55523644e465ac7f4eebf4c3b649189127828e9ea7924d026506261b8827c0be5400ada65e57214035f8cd1657d07fd0b21880004c0b1d819d17e7c8683ff79c
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data.tar.gz.sig
ADDED
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -7,7 +7,7 @@ source "https://rubygems.org/"
|
|
7
7
|
|
8
8
|
gem "yard", ">=0.6", :group => [:development, :test]
|
9
9
|
gem "rake-compiler", "~>1.0", :group => [:development, :test]
|
10
|
-
gem "rake-compiler-dock", "~>0.6.
|
10
|
+
gem "rake-compiler-dock", "~>0.6.2", :group => [:development, :test]
|
11
11
|
gem "minitest", "~>5.7", :group => [:development, :test]
|
12
12
|
gem "hoe-bundler", "~>1.0", :group => [:development, :test]
|
13
13
|
gem "rdoc", "~>4.0", :group => [:development, :test]
|
data/History.txt
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
=== 0.2.7 / 2018-01-05
|
2
|
+
|
3
|
+
* Add vendor extension for Safenet Luna called pkcs11_luna.
|
4
|
+
* Fix warnings to Fixnum/Bignum in Ruby-2.4+.
|
5
|
+
* Add binary Windows gems for Ruby-2.5.
|
6
|
+
* Add a note about RUBY_DLL_PATH on Windows.
|
7
|
+
|
1
8
|
=== 0.2.6 / 2017-06-07
|
2
9
|
|
3
10
|
* Update pkcs11 header files to PKCS11-v2.4.
|
data/README.rdoc
CHANGED
@@ -64,7 +64,7 @@ Browsable HTML can be found at http://www.cryptsoft.com/pkcs11doc.
|
|
64
64
|
=== Vendor extensions
|
65
65
|
Some vendors extend their libraries beyond the standard, in it's own way.
|
66
66
|
This can be used by vendor specific packages:
|
67
|
-
* Safenet ProtectServer: {
|
67
|
+
* Safenet ProtectServer: {http://www.rubydoc.info/gems/pkcs11_protect_server/}
|
68
68
|
* Safenet Luna: {file:pkcs11_luna/README_LUNA.rdoc}
|
69
69
|
|
70
70
|
=== Threading
|
data/Rakefile
CHANGED
@@ -30,7 +30,7 @@ hoe = Hoe.spec 'pkcs11' do
|
|
30
30
|
developer('Lars Kanis', 'kanis@comcard.de')
|
31
31
|
extra_dev_deps << ['yard', '>= 0.6']
|
32
32
|
extra_dev_deps << ['rake-compiler', '~> 1.0']
|
33
|
-
extra_dev_deps << ['rake-compiler-dock', '~> 0.6.
|
33
|
+
extra_dev_deps << ['rake-compiler-dock', '~> 0.6.2']
|
34
34
|
extra_dev_deps << ['minitest', '~> 5.7']
|
35
35
|
extra_dev_deps << ['hoe-bundler', '~> 1.0']
|
36
36
|
|
data/appveyor.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
install:
|
2
|
-
- SET PATH=C
|
3
|
-
- SET PATH=C
|
2
|
+
- SET PATH=C:/Ruby%ruby_version%/bin;%PATH%
|
3
|
+
- SET PATH=C:/MinGW/msys/1.0/bin;%PATH%
|
4
4
|
- SET RAKEOPT=-rdevkit
|
5
5
|
- ruby --version
|
6
6
|
- gem --version
|
@@ -15,10 +15,10 @@ install:
|
|
15
15
|
- ps: |
|
16
16
|
if ($env:isx64 -eq "1")
|
17
17
|
{
|
18
|
-
$(new-object net.webclient).DownloadFile('http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/40.0b4/win64/en-US/Firefox%20Setup%2040.0b4.exe', 'C
|
19
|
-
cmd /c C
|
20
|
-
$env:SOFTOKN_PATH = 'C
|
21
|
-
$env:PATH = 'C
|
18
|
+
$(new-object net.webclient).DownloadFile('http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/40.0b4/win64/en-US/Firefox%20Setup%2040.0b4.exe', 'C:/firefox-setup.exe')
|
19
|
+
cmd /c "C:/firefox-setup.exe" -ms
|
20
|
+
$env:SOFTOKN_PATH = 'C:/Program Files/Mozilla Firefox/softokn3.dll'
|
21
|
+
$env:PATH = 'C:/Program Files/Mozilla Firefox;' + $env:PATH
|
22
22
|
}
|
23
23
|
|
24
24
|
build: off
|
@@ -28,11 +28,15 @@ test_script:
|
|
28
28
|
|
29
29
|
environment:
|
30
30
|
matrix:
|
31
|
-
- ruby_version: "
|
32
|
-
|
31
|
+
- ruby_version: "24"
|
32
|
+
RUBY_DLL_PATH: "C:/Program Files (x86)/Mozilla Firefox"
|
33
|
+
- ruby_version: "24-x64"
|
34
|
+
RUBY_DLL_PATH: "C:/Program Files/Mozilla Firefox"
|
35
|
+
isx64: "1"
|
36
|
+
- ruby_version: "200"
|
33
37
|
#- ruby_version: "200-x64"
|
34
38
|
#- ruby_version: "21"
|
35
39
|
#- ruby_version: "21-x64"
|
36
40
|
- ruby_version: "22"
|
37
|
-
- ruby_version: "
|
41
|
+
- ruby_version: "23-x64"
|
38
42
|
isx64: "1"
|
data/ext/pk11_version.h
CHANGED
data/lib/pkcs11/helper.rb
CHANGED
data/lib/pkcs11/library.rb
CHANGED
@@ -34,6 +34,10 @@ module PKCS11
|
|
34
34
|
# pkcs11.load_library(so_path)
|
35
35
|
# pkcs11.C_GetFunctionList
|
36
36
|
# pkcs11.C_Initialize(args)
|
37
|
+
#
|
38
|
+
# Note: When using RubyInstaller-2.4+ on Windows it might be required to add the path of dependent DLLs to the DLL search path.
|
39
|
+
# This can be done by the +RUBY_DLL_PATH+ environment variable.
|
40
|
+
# See https://github.com/oneclick/rubyinstaller2/wiki/For-gem-developers#user-content-dll-loading
|
37
41
|
def initialize(so_path=nil, args={})
|
38
42
|
unwrapped_initialize(so_path, args)
|
39
43
|
end
|
data/lib/pkcs11/object.rb
CHANGED
data/test/test_pkcs11_crypt.rb
CHANGED
@@ -90,8 +90,14 @@ class TestPkcs11Crypt < Minitest::Test
|
|
90
90
|
|
91
91
|
def create_openssl_cipher(pk11_key)
|
92
92
|
rsa = OpenSSL::PKey::RSA.new
|
93
|
-
|
94
|
-
|
93
|
+
n = OpenSSL::BN.new pk11_key[:MODULUS], 2
|
94
|
+
e = OpenSSL::BN.new pk11_key[:PUBLIC_EXPONENT], 2
|
95
|
+
if rsa.respond_to?(:set_key)
|
96
|
+
rsa.set_key(n, e, nil)
|
97
|
+
else
|
98
|
+
rsa.n = n
|
99
|
+
rsa.e = e
|
100
|
+
end
|
95
101
|
rsa
|
96
102
|
end
|
97
103
|
|
data/test/test_pkcs11_slot.rb
CHANGED
@@ -26,13 +26,13 @@ class TestPkcs11Slot < Minitest::Test
|
|
26
26
|
|
27
27
|
assert sinfo.inspect =~ /manufacturerID=/, 'Slot info should tell about manufacturerID'
|
28
28
|
|
29
|
-
|
29
|
+
assert_kind_of Integer, sinfo.flags
|
30
30
|
assert sinfo.manufacturerID =~ /Mozilla/i, "It's the mozilla libaray we test against"
|
31
31
|
assert sinfo.slotDescription =~ /Private Key/i, "It's the slot with users private keys"
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
32
|
+
assert_kind_of Integer, sinfo.hardwareVersion.major, "Version should be a number"
|
33
|
+
assert_kind_of Integer, sinfo.hardwareVersion.minor, "Version should be a number"
|
34
|
+
assert_kind_of Integer, sinfo.firmwareVersion.major, "Version should be a number"
|
35
|
+
assert_kind_of Integer, sinfo.firmwareVersion.minor, "Version should be a number"
|
36
36
|
end
|
37
37
|
|
38
38
|
def test_token_info
|
@@ -44,14 +44,14 @@ class TestPkcs11Slot < Minitest::Test
|
|
44
44
|
assert_equal false, slot.mechanisms.empty?, 'There should be some mechanisms'
|
45
45
|
slot.mechanisms.each do |m|
|
46
46
|
info = slot.mechanism_info(m)
|
47
|
-
|
47
|
+
assert_kind_of CK_MECHANISM_INFO, info, 'Mechanism info should get a CK_MECHANISM_INFO'
|
48
48
|
assert info.inspect =~ /ulMaxKeySize=/, 'Mechanism info should tell about max key size'
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
52
|
def test_mechanism_info
|
53
53
|
info1 = slot.mechanism_info(:DES3_CBC)
|
54
|
-
|
54
|
+
assert_kind_of CK_MECHANISM_INFO, info1, 'Mechanism info should get a CK_MECHANISM_INFO'
|
55
55
|
assert info1.inspect =~ /ulMinKeySize=/, 'Mechanism info should tell about min key size'
|
56
56
|
|
57
57
|
info2 = slot.mechanism_info(CKM_DES3_CBC)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pkcs11
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryosuke Kutsuna
|
@@ -9,8 +9,29 @@ authors:
|
|
9
9
|
- Lars Kanis
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
|
-
cert_chain:
|
13
|
-
|
12
|
+
cert_chain:
|
13
|
+
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v1
|
29
|
+
sXAzEqLQqKx5V63eBDh1TPvPTEMfJwmjcdcbvMwFSt5EcUkT63W13ZJXX23JYp1K
|
30
|
+
KRW+N1WIYz8RSBNaQIP2v5Inb9vUA+jPUOcdyLHoi205lyZ28hE4lcnh9Zs02aHs
|
31
|
+
Ao8FZozVJz8xVEuYNJsL2k70w0FiwXwoWyvKyekgPBvYNUj4JGDMtBBayJTOpDs7
|
32
|
+
3EVmCm5IRuqZ1UcDFouQ9w==
|
33
|
+
-----END CERTIFICATE-----
|
34
|
+
date: 2018-01-05 00:00:00.000000000 Z
|
14
35
|
dependencies:
|
15
36
|
- !ruby/object:Gem::Dependency
|
16
37
|
name: yard
|
@@ -46,14 +67,14 @@ dependencies:
|
|
46
67
|
requirements:
|
47
68
|
- - "~>"
|
48
69
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.6.
|
70
|
+
version: 0.6.2
|
50
71
|
type: :development
|
51
72
|
prerelease: false
|
52
73
|
version_requirements: !ruby/object:Gem::Requirement
|
53
74
|
requirements:
|
54
75
|
- - "~>"
|
55
76
|
- !ruby/object:Gem::Version
|
56
|
-
version: 0.6.
|
77
|
+
version: 0.6.2
|
57
78
|
- !ruby/object:Gem::Dependency
|
58
79
|
name: minitest
|
59
80
|
requirement: !ruby/object:Gem::Requirement
|
@@ -205,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
226
|
version: '0'
|
206
227
|
requirements: []
|
207
228
|
rubyforge_project:
|
208
|
-
rubygems_version: 2.
|
229
|
+
rubygems_version: 2.7.3
|
209
230
|
signing_key:
|
210
231
|
specification_version: 4
|
211
232
|
summary: PKCS#11 binding for Ruby
|
metadata.gz.sig
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
nԕ���/��xȄ0����u-h�6��^3[�v��6�ar���7���c�F�q�/�u����
|