pkcs11 0.3.2 → 0.3.3
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.appveyor.yml +5 -1
- data/.gitignore +12 -4
- data/Gemfile +1 -1
- data/History.txt +8 -1
- data/README.rdoc +3 -3
- data/Rakefile +6 -0
- data/ext/generate_constants.rb +2 -2
- data/ext/generate_structs.rb +2 -2
- data/ext/pk11.c +2 -2
- data/ext/pk11_const.c +9 -8
- data/ext/pk11_const_macros.h +2 -1
- data/ext/pk11_struct_macros.h +1 -0
- data/ext/pk11_version.h +1 -1
- metadata +23 -23
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fb60ecaa0300930499d7783396ff4f471174f6bca63a97082208baaa9d3521b
|
4
|
+
data.tar.gz: c3019089cd8d0a8c2aed6d11f8a3f3b55d688c199ea62fb85b385e195e98494c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3f00f7d6fa0b386477b06de8e1fe30257f0fb4e625c7661ca90bad46fee20449d3f2b17ce71c132f11c3f2d11ed2aa8e27cbfb8c6000cb33d23c4a10d6a2aee
|
7
|
+
data.tar.gz: af86c163e05b8d7e850563fa724901bad4a6ed395a712b2c7f6a0a5dfc1c65352bd729d0f722d00b52db33f19bd8e4884d3ac26cbf5eda8f3c6db0c2bdfb6d73
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/.appveyor.yml
CHANGED
@@ -18,10 +18,14 @@ install:
|
|
18
18
|
- ps: |
|
19
19
|
if ($env:ruby_version -like "*x64*") {
|
20
20
|
$(new-object net.webclient).DownloadFile('http://ftp.mozilla.org/pub/firefox/releases/68.3.0esr/win64/en-US/Firefox%20Setup%2068.3.0esr.exe', 'C:/firefox-setup.exe')
|
21
|
-
cmd /c "C:/firefox-setup.exe" -ms
|
22
21
|
$env:SOFTOKN_PATH = 'C:/Program Files/Mozilla Firefox/softokn3.dll'
|
23
22
|
$env:PATH = 'C:/Program Files/Mozilla Firefox;' + $env:PATH
|
23
|
+
} else {
|
24
|
+
$(new-object net.webclient).DownloadFile('http://ftp.mozilla.org/pub/firefox/releases/68.3.0esr/win32/en-US/Firefox%20Setup%2068.3.0esr.exe', 'C:/firefox-setup.exe')
|
25
|
+
$env:SOFTOKN_PATH = 'C:/Program Files (x86)/Mozilla Firefox/softokn3.dll'
|
26
|
+
$env:PATH = 'C:/Program Files (x86)/Mozilla Firefox;' + $env:PATH
|
24
27
|
}
|
28
|
+
cmd /c "C:/firefox-setup.exe" -ms
|
25
29
|
|
26
30
|
build: off
|
27
31
|
|
data/.gitignore
CHANGED
@@ -4,14 +4,22 @@ ext/pk11_struct_def.inc
|
|
4
4
|
ext/pk11_struct_impl.inc
|
5
5
|
ext/pk11_thread_funcs.c
|
6
6
|
ext/pk11_thread_funcs.h
|
7
|
+
pkcs11_luna/ext/generate_constants.rb
|
8
|
+
pkcs11_luna/ext/generate_structs.rb
|
9
|
+
pkcs11_luna/ext/pk11_const_macros.h
|
10
|
+
pkcs11_luna/ext/pk11_struct_macros.h
|
11
|
+
pkcs11_luna/ext/pk11_version.h
|
12
|
+
pkcs11_luna/ext/std_structs.rb
|
13
|
+
pkcs11_luna/pkg/
|
14
|
+
pkcs11_protect_server/ext/generate_constants.rb
|
15
|
+
pkcs11_protect_server/ext/generate_structs.rb
|
7
16
|
pkcs11_protect_server/ext/pk11_const_macros.h
|
8
17
|
pkcs11_protect_server/ext/pk11_struct_macros.h
|
9
18
|
pkcs11_protect_server/ext/pk11_version.h
|
10
|
-
pkcs11_protect_server/ext/
|
11
|
-
pkcs11_protect_server/
|
12
|
-
pkcs11_protect_server/ext/pk11s_struct_def.inc
|
13
|
-
pkcs11_protect_server/ext/pk11s_struct_impl.inc
|
19
|
+
pkcs11_protect_server/ext/std_structs.rb
|
20
|
+
pkcs11_protect_server/pkg/
|
14
21
|
*.so
|
15
22
|
Gemfile.lock
|
16
23
|
tmp
|
17
24
|
Manifest.txt
|
25
|
+
pkg/
|
data/Gemfile
CHANGED
@@ -11,6 +11,6 @@ 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", "<7", :group => [:development, :test]
|
14
|
-
gem "hoe", "~>3.
|
14
|
+
gem "hoe", "~>3.22", :group => [:development, :test]
|
15
15
|
|
16
16
|
# vim: syntax=ruby
|
data/History.txt
CHANGED
@@ -1,5 +1,12 @@
|
|
1
|
-
=== 0.3.
|
1
|
+
=== 0.3.3 / 2020-11-07
|
2
2
|
|
3
|
+
* Fix possible segfault on GC pressure at startup
|
4
|
+
* Move CI from http://travis-ci.org to https://travis-ci.com
|
5
|
+
|
6
|
+
=== 0.3.2 / 2020-01-12
|
7
|
+
|
8
|
+
* pkcs11_protect_server, pkcs11_luna: Move parsing of vendor header files to gem installation.
|
9
|
+
This fixes possible compile errors, if the version of vendor header files differ between gem build and gem install.
|
3
10
|
* pkcs11_luna: Workaround invalid UTF-8 encoding in cryptoki_v2.h of some Luna Client versions.
|
4
11
|
|
5
12
|
=== 0.3.1 / 2020-01-07
|
data/README.rdoc
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
{<img src="https://travis-ci.org/larskanis/pkcs11.svg?branch=master" alt="Build Status" />}[https://travis-ci.org/larskanis/pkcs11]
|
2
|
-
{<img src="https://ci.appveyor.com/api/projects/status/8m7ugl1ogijw1c8c?svg=true" alt="Build Status" />}[https://ci.appveyor.com/project/larskanis/pkcs11]
|
3
|
-
|
4
1
|
= PKCS #11/Ruby Interface
|
5
2
|
|
6
3
|
home :: http://github.com/larskanis/pkcs11
|
7
4
|
API documentation :: http://rubydoc.info/gems/pkcs11/frames
|
8
5
|
|
6
|
+
{<img src="https://travis-ci.com/larskanis/pkcs11.svg?branch=master" alt="Build Status" />}[https://travis-ci.com/larskanis/pkcs11]
|
7
|
+
{<img src="https://ci.appveyor.com/api/projects/status/8m7ugl1ogijw1c8c?svg=true" alt="Build Status" />}[https://ci.appveyor.com/project/larskanis/pkcs11]
|
8
|
+
|
9
9
|
This module allows Ruby programs to interface with "RSA Security Inc.
|
10
10
|
PKCS #11 Cryptographic Token Interface (Cryptoki)".
|
11
11
|
PKCS #11 is the de-facto standard to access cryptographic devices.
|
data/Rakefile
CHANGED
@@ -24,6 +24,12 @@ Hoe.plugin :bundler
|
|
24
24
|
# Build a Manifest file to satisfy hoe.
|
25
25
|
IO.write("Manifest.txt", `git ls-files`)
|
26
26
|
|
27
|
+
# Ensure pkg is rebuilt
|
28
|
+
task :remove_pkg do
|
29
|
+
rm_rf 'pkg'
|
30
|
+
end
|
31
|
+
task :gem => [:remove_pkg]
|
32
|
+
|
27
33
|
hoe = Hoe.spec 'pkcs11' do
|
28
34
|
developer('Ryosuke Kutsuna', 'ryosuke@deer-n-horse.jp')
|
29
35
|
developer('GOTOU Yuuzou', 'gotoyuzo@notwork.org')
|
data/ext/generate_constants.rb
CHANGED
@@ -12,7 +12,7 @@ class ConstantParser
|
|
12
12
|
def self.run(argv)
|
13
13
|
s = self.new
|
14
14
|
options = Struct.new(:verbose, :const, :files).new
|
15
|
-
OptionParser.new
|
15
|
+
OptionParser.new do |opts|
|
16
16
|
opts.banner = "Usage: #{$0} [options] <header-file.h>*"
|
17
17
|
|
18
18
|
opts.on("-v", "--[no-]verbose", "Run verbosely", &options.method(:verbose=))
|
@@ -21,7 +21,7 @@ class ConstantParser
|
|
21
21
|
puts opts
|
22
22
|
exit
|
23
23
|
end
|
24
|
-
end.parse!
|
24
|
+
end.parse!(argv)
|
25
25
|
options.files = argv
|
26
26
|
s.options = options
|
27
27
|
s.start!
|
data/ext/generate_structs.rb
CHANGED
@@ -15,7 +15,7 @@ class StructParser
|
|
15
15
|
def self.run(argv)
|
16
16
|
s = self.new
|
17
17
|
options = Struct.new(:verbose, :def, :impl, :doc, :files).new
|
18
|
-
OptionParser.new
|
18
|
+
OptionParser.new do |opts|
|
19
19
|
opts.banner = "Usage: #{$0} [options] <header-file.h>*"
|
20
20
|
|
21
21
|
opts.on("-v", "--[no-]verbose", "Run verbosely", &options.method(:verbose=))
|
@@ -26,7 +26,7 @@ class StructParser
|
|
26
26
|
puts opts
|
27
27
|
exit
|
28
28
|
end
|
29
|
-
end.parse!
|
29
|
+
end.parse!(argv)
|
30
30
|
options.files = argv
|
31
31
|
s.options = options
|
32
32
|
s.start!
|
data/ext/pk11.c
CHANGED
@@ -1501,11 +1501,11 @@ cCK_MECHANISM_initialize(int argc, VALUE *argv, VALUE self)
|
|
1501
1501
|
}
|
1502
1502
|
|
1503
1503
|
/* rb_define_method(cCK_MECHANISM, "mechanism", cCK_MECHANISM_get_mechanism, 0); */
|
1504
|
-
/* rb_define_method(cCK_MECHANISM, "mechanism=", cCK_MECHANISM_set_mechanism,
|
1504
|
+
/* rb_define_method(cCK_MECHANISM, "mechanism=", cCK_MECHANISM_set_mechanism, 1); */
|
1505
1505
|
PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_MECHANISM, mechanism);
|
1506
1506
|
|
1507
1507
|
/* rb_define_method(cCK_MECHANISM, "pParameter", cCK_MECHANISM_get_pParameter, 0); */
|
1508
|
-
/* rb_define_method(cCK_MECHANISM, "pParameter=", cCK_MECHANISM_set_pParameter,
|
1508
|
+
/* rb_define_method(cCK_MECHANISM, "pParameter=", cCK_MECHANISM_set_pParameter, 1); */
|
1509
1509
|
/* @see PKCS11::CK_MECHANISM#initialize */
|
1510
1510
|
static VALUE
|
1511
1511
|
cCK_MECHANISM_get_pParameter(VALUE self)
|
data/ext/pk11_const.c
CHANGED
@@ -170,14 +170,15 @@ Init_pkcs11_const(VALUE cPKCS11, VALUE ePKCS11Error)
|
|
170
170
|
PKCS11_DEFINE_CONST(CKZ_DATA_SPECIFIED);
|
171
171
|
PKCS11_DEFINE_CONST(CKZ_SALT_SPECIFIED);
|
172
172
|
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
173
|
+
#define DEFINE_GLOBAL_HASH(h) \
|
174
|
+
rb_global_variable(&v##h); \
|
175
|
+
v##h = rb_hash_new(); \
|
176
|
+
rb_define_const(cPKCS11, #h, v##h);
|
177
|
+
|
178
|
+
DEFINE_GLOBAL_HASH(OBJECT_CLASSES)
|
179
|
+
DEFINE_GLOBAL_HASH(ATTRIBUTES)
|
180
|
+
DEFINE_GLOBAL_HASH(MECHANISMS)
|
181
|
+
DEFINE_GLOBAL_HASH(RETURN_VALUES)
|
181
182
|
|
182
183
|
#include "pk11_const_def.inc"
|
183
184
|
|
data/ext/pk11_const_macros.h
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
/**************************************************/
|
7
7
|
|
8
8
|
#define PKCS11_DEFINE_CONST(constant) \
|
9
|
-
rb_define_const(MODULE_FOR_CONSTS, #constant,
|
9
|
+
rb_define_const(MODULE_FOR_CONSTS, #constant, LONG2NUM(constant))
|
10
10
|
|
11
11
|
#define PKCS11_DEFINE_CONST_GROUP(group, name, value) \
|
12
12
|
do { \
|
@@ -17,6 +17,7 @@
|
|
17
17
|
old = rb_hash_aref(group, rvalue); \
|
18
18
|
if (!NIL_P(old)) rb_warning("%s is equal to %s", RSTRING_PTR(old), name); \
|
19
19
|
rb_hash_aset(group, rvalue, str); \
|
20
|
+
RB_GC_GUARD(str); \
|
20
21
|
} while(0)
|
21
22
|
|
22
23
|
#define PKCS11_DEFINE_OBJECT_CLASS(constant) \
|
data/ext/pk11_struct_macros.h
CHANGED
@@ -416,6 +416,7 @@ static VALUE c##s##_set_##f(VALUE o, VALUE v){ \
|
|
416
416
|
#define PKCS11_DEFINE_STRUCT(s) \
|
417
417
|
do { \
|
418
418
|
c##s = rb_define_class_under(MODULE_FOR_STRUCTS, #s, BASECLASS_FOR_STRUCTS); \
|
419
|
+
rb_global_variable(&a##s##_members); \
|
419
420
|
a##s##_members = rb_ary_new(); \
|
420
421
|
rb_define_alloc_func(c##s, s##_s_alloc); \
|
421
422
|
rb_define_const(c##s, "SIZEOF_STRUCT", ULONG2NUM(sizeof(s))); \
|
data/ext/pk11_version.h
CHANGED
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.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryosuke Kutsuna
|
@@ -12,26 +12,26 @@ bindir: bin
|
|
12
12
|
cert_chain:
|
13
13
|
- |
|
14
14
|
-----BEGIN CERTIFICATE-----
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
15
|
+
MIIDPDCCAiSgAwIBAgIBATANBgkqhkiG9w0BAQsFADAkMSIwIAYDVQQDDBl0cmF2
|
16
|
+
aXMtY2kvREM9ZHVtbXkvREM9b3JnMB4XDTIwMDQwODExMDA0MFoXDTIxMDQwODEx
|
17
|
+
MDA0MFowJDEiMCAGA1UEAwwZdHJhdmlzLWNpL0RDPWR1bW15L0RDPW9yZzCCASIw
|
18
|
+
DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK+5uh+zqCXKho0zXIaLmJD6YDpa
|
19
|
+
l07nJ+PQFcMBYgsKA2ip01THj3DVYwP/va6hYgqPmxEJB3tsEthKnHVHm0dgqqg/
|
20
|
+
gfyDFU0ZfbSYKeNlZQRIdddKPc6dNbmtY2gBWFt6YOZnBccsgJmSUAbh0a9xhVbm
|
21
|
+
qAStn/q7eq9iW9+12AB9HM+QCWrsCAXEHGGNENDAK9HtHwBs4KsneiIQY5rd/Mzs
|
22
|
+
Ii25XXnDUa1NjC4u/mMuJXBpWLw2rEAQkzEFQBZR0W0ehm9Mi4TokhLy/QH8GRaH
|
23
|
+
0KADzpk1cxuOrEBIhy6ISQs7g/tI6YTePAmDMTsodov02FZCcMpoxOifpFkCAwEA
|
24
|
+
AaN5MHcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFOTn5ek+QtcI
|
25
|
+
g+ZglIvRPAPGoXvLMB4GA1UdEQQXMBWBE3RyYXZpcy1jaUBkdW1teS5vcmcwHgYD
|
26
|
+
VR0SBBcwFYETdHJhdmlzLWNpQGR1bW15Lm9yZzANBgkqhkiG9w0BAQsFAAOCAQEA
|
27
|
+
Xuaj6r4QXrQwDdrmT2sPgWiS5/CRRiSwyWsE1jfM0q5spzuKRIy+vSfmj6isScGf
|
28
|
+
vT7nwXus+3IcISSdfUddGqf/L54z6U9dVc+V5SH+QuptDRPgQ+fPJFKn8uFARJDU
|
29
|
+
9qNNSKpyoXXHksouuRV4dXVYRChfhLiavXaR0jNmi6qgTsSSvyKD2aObyVdVUzxr
|
30
|
+
Umpavc3v5BbquwF9DlKeHZwU/qP0ynCZg/Z9CFa18e5JfyBSFXHXDA0YXE6+b4Dh
|
31
|
+
+QvsIa+rEKMYbn0IActnL2SCNlGcttHDcH0AkctmwmAN2r6LTInUBCJoahaIeIXU
|
32
|
+
RE1H1QyCW3SV93CTTKaR2A==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2020-
|
34
|
+
date: 2020-11-07 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: yard
|
@@ -129,14 +129,14 @@ dependencies:
|
|
129
129
|
requirements:
|
130
130
|
- - "~>"
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: '3.
|
132
|
+
version: '3.22'
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
137
|
- - "~>"
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version: '3.
|
139
|
+
version: '3.22'
|
140
140
|
description: 'This module allows Ruby programs to interface with "RSA Security Inc.
|
141
141
|
PKCS #11 Cryptographic Token Interface (Cryptoki)".'
|
142
142
|
email:
|
@@ -233,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
233
233
|
- !ruby/object:Gem::Version
|
234
234
|
version: '0'
|
235
235
|
requirements: []
|
236
|
-
rubygems_version: 3.
|
236
|
+
rubygems_version: 3.1.4
|
237
237
|
signing_key:
|
238
238
|
specification_version: 4
|
239
239
|
summary: PKCS#11 binding for Ruby
|
metadata.gz.sig
CHANGED
Binary file
|