tpm-key_attestation 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +21 -8
- data/Appraisals +4 -0
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +8 -8
- data/README.md +2 -1
- data/gemfiles/openssl_2_0.gemfile +2 -2
- data/gemfiles/openssl_2_1.gemfile +2 -2
- data/gemfiles/openssl_2_2.gemfile +12 -0
- data/gemfiles/openssl_default.gemfile +2 -2
- data/gemfiles/openssl_head.gemfile +2 -2
- data/install-openssl.sh +3 -0
- data/install-ruby.sh +10 -0
- data/lib/tpm/key_attestation.rb +1 -1
- data/lib/tpm/key_attestation/version.rb +1 -1
- data/lib/tpm/t_public.rb +2 -1
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f495569765faf3eaf8bcd9ff004405e278d720d12253ec01f98175f9dce3e4c
|
4
|
+
data.tar.gz: 26105eb6528b31ddec9a800cdeddea4eee311e25fdfc1c99cee2345b43e58bd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3501ffabdfea8bc28803a2036f0e83d2e16eb7cdcd21a937f9112ffd7ecfdb91ff37290fd97b5d8de50eab22f3ddf109899b7f715c90b4ef667a0aed04156c4b
|
7
|
+
data.tar.gz: 26698f67fad4bcb5788d5f01ab536057b3fa3c0bd2db5338aa495dda45435bf528e101ae91e4afddd3f94b8389456544677a9964871df9f7997b79274ca41f38
|
data/.travis.yml
CHANGED
@@ -1,17 +1,27 @@
|
|
1
1
|
---
|
2
2
|
dist: bionic
|
3
3
|
language: ruby
|
4
|
-
cache: bundler
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
5
|
+
cache:
|
6
|
+
bundler: true
|
7
|
+
directories:
|
8
|
+
- /home/travis/.rvm/
|
9
|
+
|
10
|
+
env:
|
11
|
+
- RB=2.7.1 LIBSSL=1.0
|
12
|
+
- RB=2.7.1 LIBSSL=1.1
|
13
|
+
- RB=2.6.6 LIBSSL=1.0
|
14
|
+
- RB=2.6.6 LIBSSL=1.1
|
15
|
+
- RB=2.5.8 LIBSSL=1.0
|
16
|
+
- RB=2.5.8 LIBSSL=1.1
|
17
|
+
- RB=2.4.10 LIBSSL=1.0
|
18
|
+
- RB=2.4.10 LIBSSL=1.1
|
19
|
+
- RB=ruby-head LIBSSL=1.0
|
20
|
+
- RB=ruby-head LIBSSL=1.1
|
12
21
|
|
13
22
|
gemfile:
|
14
23
|
- gemfiles/openssl_head.gemfile
|
24
|
+
- gemfiles/openssl_2_2.gemfile
|
15
25
|
- gemfiles/openssl_2_1.gemfile
|
16
26
|
- gemfiles/openssl_2_0.gemfile
|
17
27
|
- gemfiles/openssl_default.gemfile
|
@@ -19,9 +29,12 @@ gemfile:
|
|
19
29
|
matrix:
|
20
30
|
fast_finish: true
|
21
31
|
allow_failures:
|
22
|
-
-
|
32
|
+
- env: RB=ruby-head LIBSSL=1.0
|
33
|
+
- env: RB=ruby-head LIBSSL=1.1
|
23
34
|
- gemfile: gemfiles/openssl_head.gemfile
|
24
35
|
|
25
36
|
before_install:
|
37
|
+
- ./install-openssl.sh
|
38
|
+
- ./install-ruby.sh
|
26
39
|
- gem install bundler -v "~> 2.0"
|
27
40
|
- rm Gemfile.lock
|
data/Appraisals
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v0.9.0] - 2020-05-31
|
4
|
+
|
5
|
+
### Fixed
|
6
|
+
|
7
|
+
- Fixed compatibility with OpenSSL-C (libssl) v1.0.2 ([@santiagorodriguez96])
|
8
|
+
|
3
9
|
## [v0.8.0] - 2020-03-29
|
4
10
|
|
5
11
|
### Changed
|
@@ -55,6 +61,7 @@ replacement of `JOSE` format `algorithm` string
|
|
55
61
|
- `TPM::EKCertificate` wrapper
|
56
62
|
- `TPM::SAttest` wrapper
|
57
63
|
|
64
|
+
[v0.9.0]: https://github.com/cedarcode/tpm-key_attestation/compare/v0.8.0...v0.9.0/
|
58
65
|
[v0.8.0]: https://github.com/cedarcode/tpm-key_attestation/compare/v0.7.0...v0.8.0/
|
59
66
|
[v0.7.0]: https://github.com/cedarcode/tpm-key_attestation/compare/v0.6.0...v0.7.0/
|
60
67
|
[v0.6.0]: https://github.com/cedarcode/tpm-key_attestation/compare/v0.5.0...v0.6.0/
|
@@ -63,3 +70,5 @@ replacement of `JOSE` format `algorithm` string
|
|
63
70
|
[v0.3.0]: https://github.com/cedarcode/tpm-key_attestation/compare/v0.2.0...v0.3.0/
|
64
71
|
[v0.2.0]: https://github.com/cedarcode/tpm-key_attestation/compare/v0.1.0...v0.2.0/
|
65
72
|
[v0.1.0]: https://github.com/cedarcode/tpm-key_attestation/compare/57c926ef7e83830cee8d111fdc5ccaf99ab2e861...v0.1.0/
|
73
|
+
|
74
|
+
[@santiagorodriguez96]: https://github.com/santiagorodriguez96
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
tpm-key_attestation (0.
|
4
|
+
tpm-key_attestation (0.9.0)
|
5
5
|
bindata (~> 2.4)
|
6
6
|
openssl-signature_algorithm (~> 0.4.0)
|
7
7
|
|
@@ -13,13 +13,13 @@ GEM
|
|
13
13
|
rake
|
14
14
|
thor (>= 0.14.0)
|
15
15
|
ast (2.4.0)
|
16
|
-
bindata (2.4.
|
17
|
-
byebug (11.1.
|
16
|
+
bindata (2.4.7)
|
17
|
+
byebug (11.1.3)
|
18
18
|
diff-lcs (1.3)
|
19
19
|
jaro_winkler (1.5.4)
|
20
20
|
openssl-signature_algorithm (0.4.0)
|
21
21
|
parallel (1.19.1)
|
22
|
-
parser (2.7.
|
22
|
+
parser (2.7.1.3)
|
23
23
|
ast (~> 2.4.0)
|
24
24
|
rainbow (3.0.0)
|
25
25
|
rake (13.0.1)
|
@@ -28,15 +28,15 @@ GEM
|
|
28
28
|
rspec-core (~> 3.9.0)
|
29
29
|
rspec-expectations (~> 3.9.0)
|
30
30
|
rspec-mocks (~> 3.9.0)
|
31
|
-
rspec-core (3.9.
|
32
|
-
rspec-support (~> 3.9.
|
33
|
-
rspec-expectations (3.9.
|
31
|
+
rspec-core (3.9.2)
|
32
|
+
rspec-support (~> 3.9.3)
|
33
|
+
rspec-expectations (3.9.2)
|
34
34
|
diff-lcs (>= 1.2.0, < 2.0)
|
35
35
|
rspec-support (~> 3.9.0)
|
36
36
|
rspec-mocks (3.9.1)
|
37
37
|
diff-lcs (>= 1.2.0, < 2.0)
|
38
38
|
rspec-support (~> 3.9.0)
|
39
|
-
rspec-support (3.9.
|
39
|
+
rspec-support (3.9.3)
|
40
40
|
rubocop (0.80.1)
|
41
41
|
jaro_winkler (~> 1.5.1)
|
42
42
|
parallel (~> 1.10)
|
data/README.md
CHANGED
@@ -3,7 +3,8 @@
|
|
3
3
|
TPM Key Attestation utitlies
|
4
4
|
|
5
5
|
[![Gem](https://img.shields.io/gem/v/tpm-key_attestation.svg?style=flat-square&color=informational)](https://rubygems.org/gems/tpm-key_attestation)
|
6
|
-
[![Travis](https://img.shields.io/travis/cedarcode/tpm-key_attestation.svg?style=flat-square)](https://travis-ci.org/cedarcode/tpm-key_attestation)
|
6
|
+
[![Travis](https://img.shields.io/travis/cedarcode/tpm-key_attestation/master.svg?style=flat-square)](https://travis-ci.org/cedarcode/tpm-key_attestation)
|
7
|
+
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-informational.svg?style=flat-square)](https://conventionalcommits.org)
|
7
8
|
|
8
9
|
## Installation
|
9
10
|
|
@@ -4,9 +4,9 @@ source "https://rubygems.org"
|
|
4
4
|
|
5
5
|
gem "appraisal", "~> 2.2.0"
|
6
6
|
gem "byebug", "~> 11.0"
|
7
|
-
gem "rake", "~>
|
7
|
+
gem "rake", "~> 13.0"
|
8
8
|
gem "rspec", "~> 3.0"
|
9
|
-
gem "rubocop", "~> 0.
|
9
|
+
gem "rubocop", "~> 0.80.1"
|
10
10
|
gem "openssl", "~> 2.0.0"
|
11
11
|
|
12
12
|
gemspec path: "../"
|
@@ -4,9 +4,9 @@ source "https://rubygems.org"
|
|
4
4
|
|
5
5
|
gem "appraisal", "~> 2.2.0"
|
6
6
|
gem "byebug", "~> 11.0"
|
7
|
-
gem "rake", "~>
|
7
|
+
gem "rake", "~> 13.0"
|
8
8
|
gem "rspec", "~> 3.0"
|
9
|
-
gem "rubocop", "~> 0.
|
9
|
+
gem "rubocop", "~> 0.80.1"
|
10
10
|
gem "openssl", "~> 2.1.0"
|
11
11
|
|
12
12
|
gemspec path: "../"
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "appraisal", "~> 2.2.0"
|
6
|
+
gem "byebug", "~> 11.0"
|
7
|
+
gem "rake", "~> 13.0"
|
8
|
+
gem "rspec", "~> 3.0"
|
9
|
+
gem "rubocop", "~> 0.80.1"
|
10
|
+
gem "openssl", "~> 2.2.0"
|
11
|
+
|
12
|
+
gemspec path: "../"
|
@@ -4,9 +4,9 @@ source "https://rubygems.org"
|
|
4
4
|
|
5
5
|
gem "appraisal", "~> 2.2.0"
|
6
6
|
gem "byebug", "~> 11.0"
|
7
|
-
gem "rake", "~>
|
7
|
+
gem "rake", "~> 13.0"
|
8
8
|
gem "rspec", "~> 3.0"
|
9
|
-
gem "rubocop", "~> 0.
|
9
|
+
gem "rubocop", "~> 0.80.1"
|
10
10
|
gem "openssl", git: "https://github.com/ruby/openssl"
|
11
11
|
|
12
12
|
gemspec path: "../"
|
data/install-openssl.sh
ADDED
data/install-ruby.sh
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
source ~/.rvm/scripts/rvm
|
2
|
+
|
3
|
+
if [[ "${LIBSSL}" == "1.0" ]]; then
|
4
|
+
rvm install $RB --autolibs=read-only -C --with-openssl-dir=usr/include/openssl
|
5
|
+
elif [[ "${LIBSSL}" == "1.1" ]]; then
|
6
|
+
rvm install $RB --binary --fuzzy
|
7
|
+
fi
|
8
|
+
|
9
|
+
rvm use $RB
|
10
|
+
ruby -ropenssl -e 'puts OpenSSL::OPENSSL_VERSION'
|
data/lib/tpm/key_attestation.rb
CHANGED
@@ -86,7 +86,7 @@ module TPM
|
|
86
86
|
def trust_store
|
87
87
|
@trust_store ||=
|
88
88
|
OpenSSL::X509::Store.new.tap do |trust_store|
|
89
|
-
root_certificates.each { |root_certificate| trust_store.add_cert(root_certificate) }
|
89
|
+
root_certificates.uniq(&:serial).each { |root_certificate| trust_store.add_cert(root_certificate) }
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
data/lib/tpm/t_public.rb
CHANGED
@@ -11,6 +11,7 @@ module TPM
|
|
11
11
|
class TPublic < BinData::Record
|
12
12
|
BYTE_LENGTH = 8
|
13
13
|
CURVE_TPM_TO_OPENSSL = { TPM::ECC_NIST_P256 => "prime256v1" }.freeze
|
14
|
+
RSA_KEY_DEFAULT_PUBLIC_EXPONENT = 2**16 + 1
|
14
15
|
|
15
16
|
class << self
|
16
17
|
alias_method :deserialize, :read
|
@@ -74,7 +75,7 @@ module TPM
|
|
74
75
|
|
75
76
|
if parameters.key_bits / BYTE_LENGTH == n.size
|
76
77
|
key = OpenSSL::PKey::RSA.new(parameters.key_bits.value)
|
77
|
-
key.set_key(bn(n),
|
78
|
+
key.set_key(bn(n), bn(RSA_KEY_DEFAULT_PUBLIC_EXPONENT), nil)
|
78
79
|
|
79
80
|
key.public_key
|
80
81
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tpm-key_attestation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gonzalo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bindata
|
@@ -60,8 +60,11 @@ files:
|
|
60
60
|
- bin/setup
|
61
61
|
- gemfiles/openssl_2_0.gemfile
|
62
62
|
- gemfiles/openssl_2_1.gemfile
|
63
|
+
- gemfiles/openssl_2_2.gemfile
|
63
64
|
- gemfiles/openssl_default.gemfile
|
64
65
|
- gemfiles/openssl_head.gemfile
|
66
|
+
- install-openssl.sh
|
67
|
+
- install-ruby.sh
|
65
68
|
- lib/tpm/aik_certificate.rb
|
66
69
|
- lib/tpm/certificates/AMD/RootCA/AMD-fTPM-ECC-RootCA.crt
|
67
70
|
- lib/tpm/certificates/AMD/RootCA/AMD-fTPM-RSA-RootCA.crt
|
@@ -127,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
130
|
- !ruby/object:Gem::Version
|
128
131
|
version: '0'
|
129
132
|
requirements: []
|
130
|
-
rubygems_version: 3.1.
|
133
|
+
rubygems_version: 3.1.3
|
131
134
|
signing_key:
|
132
135
|
specification_version: 4
|
133
136
|
summary: TPM Key Attestation verifier
|