Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests failing with OpenSSL v3 #424

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions spec/webauthn/attestation_statement/packed_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
let(:algorithm) { -7 }
let(:attestation_key) { create_ec_key }
let(:signature) { attestation_key.sign("SHA256", to_be_signed) }
let(:attestation_certificate_version) { 2 }
let(:attestation_certificate_subject) { "/C=UY/O=ACME/OU=Authenticator Attestation/CN=CN" }
let(:attestation_certificate_basic_constraints) { "CA:FALSE" }
let(:attestation_certificate_start_time) { Time.now - 1 }
Expand All @@ -103,7 +102,7 @@
root_certificate,
root_key,
attestation_key,
version: attestation_certificate_version,
version: 2,
name: attestation_certificate_subject,
not_before: attestation_certificate_start_time,
not_after: attestation_certificate_end_time,
Expand Down Expand Up @@ -187,7 +186,9 @@

context "when the attestation certificate doesn't meet requirements" do
context "because version is invalid" do
let(:attestation_certificate_version) { 1 }
before do
attestation_certificate.version = 1
end

it "fails" do
expect(statement.valid?(authenticator_data, client_data_hash)).to be_falsy
Expand Down
7 changes: 4 additions & 3 deletions spec/webauthn/attestation_statement/tpm_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
root_certificate,
root_key,
aik,
version: aik_certificate_version,
version: 2,
name: aik_certificate_subject,
not_before: aik_certificate_start_time,
not_after: aik_certificate_end_time,
Expand All @@ -49,7 +49,6 @@
end

let(:aik) { create_rsa_key }
let(:aik_certificate_version) { 2 }
let(:aik_certificate_subject) { "" }
let(:aik_certificate_basic_constraints) { "CA:FALSE" }
let(:aik_certificate_extended_key_usage) { ::TPM::AIKCertificate::OID_TCG_KP_AIK_CERTIFICATE }
Expand Down Expand Up @@ -361,7 +360,9 @@

context "when the AIK certificate doesn't meet requirements" do
context "because version is invalid" do
let(:aik_certificate_version) { 1 }
before do
aik_certificate.version = 1
end

it "returns false" do
expect(statement.valid?(authenticator_data, client_data_hash)).to be_falsy
Expand Down