Skip to content

Commit

Permalink
Merge pull request #24 from cedarcode/sr--fix-tests-failing-with-open…
Browse files Browse the repository at this point in the history
…ssl-3

Fix tests failing with OpenSSL 3
  • Loading branch information
santiagorodriguez96 authored Aug 5, 2024
2 parents fe96e14 + a373e7f commit 50d2625
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,24 +57,12 @@ jobs:
- ruby: '3.2'
gemfile: openssl_2_1
os: macos-latest
- ruby: '3.2'
gemfile: openssl_3_0
os: macos-latest
- ruby: '3.2'
gemfile: openssl_3_1
os: macos-latest
- ruby: '3.2'
gemfile: openssl_2_2
os: windows-latest
- ruby: '3.2'
gemfile: openssl_2_1
os: windows-latest
- ruby: '3.2'
gemfile: openssl_3_0
os: windows-latest
- ruby: '3.2'
gemfile: openssl_3_1
os: windows-latest
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
steps:
Expand Down
7 changes: 4 additions & 3 deletions spec/tpm/aik_certificate_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
context "#conformant?" do
let(:certificate) do
certificate = OpenSSL::X509::Certificate.new
certificate.version = certificate_version
certificate.version = 2
certificate.subject = OpenSSL::X509::Name.parse(certificate_subject)
certificate.not_before = certificate_start_time
certificate.not_after = certificate_end_time
Expand All @@ -31,7 +31,6 @@

let(:key) { create_rsa_key }

let(:certificate_version) { 2 }
let(:certificate_subject) { "" }
let(:certificate_start_time) { Time.now - 1 }
let(:certificate_end_time) { certificate_start_time + 60 }
Expand Down Expand Up @@ -76,7 +75,9 @@
end

context "when version is incorrect" do
let(:certificate_version) { 3 }
before do
certificate.version = 3
end

it "returns false" do
expect(aik_certificate).not_to be_conformant
Expand Down

0 comments on commit 50d2625

Please sign in to comment.