Skip to content

WebAuthn::U2fMigrator returns the attestation certificate spec failing with OpenSSL v3.3+ #463

@santiagorodriguez96

Description

@santiagorodriguez96

Ruby 3.4 and OpenSSSL 3.4:

bundle exec rspec

Randomized with seed 62669
======================================================
OpenSSL library version is: OpenSSL 3.4.1 11 Feb 2025
======================================================

..F....................................................................................................................................................................................................................

Failures:

  1) WebAuthn::U2fMigrator returns the attestation certificate
     Failure/Error: @attestation_trust_path ||= [OpenSSL::X50[9](https://github.com/cedarcode/webauthn-ruby/actions/runs/14938618077/job/41971670972#step:6:10)::Certificate.new(Base64.strict_decode64(@certificate))]

     OpenSSL::X509::CertificateError:
       PEM_read_bio_X509: no start line (Expecting: CERTIFICATE)
     # ./lib/webauthn/u2f_migrator.rb:46:in 'OpenSSL::X509::Certificate#initialize'
     # ./lib/webauthn/u2f_migrator.rb:46:in 'Class#new'
     # ./lib/webauthn/u2f_migrator.rb:46:in 'WebAuthn::U2fMigrator#attestation_trust_path'
     # ./spec/webauthn/u2f_migrator_spec.rb:46:in 'block (2 levels) in <top (required)>'

Finished in 1.2 seconds (files took 0.26522 seconds to load)
359 examples, 1 failure

Failed examples:

rspec ./spec/webauthn/u2f_migrator_spec.rb:45 # WebAuthn::U2fMigrator returns the attestation certificate

Randomized with seed 62669

Ruby 3.3 and OpenSSL 3.3

bundle exec rspec

Randomized with seed 4621
======================================================
OpenSSL library version is: OpenSSL 3.3.3 11 Feb 2025
======================================================

....................................................................................................................................................................................................................................................................................................................................................................F..

Failures:

  1) WebAuthn::U2fMigrator returns the attestation certificate
     Failure/Error: @attestation_trust_path ||= [OpenSSL::X509::Certificate.new(Base64.strict_decode64(@certificate))]

     OpenSSL::X509::CertificateError:
       PEM_read_bio_X509: no start line (Expecting: CERTIFICATE)
     # ./lib/webauthn/u2f_migrator.rb:46:in 'OpenSSL::X509::Certificate#initialize'
     # ./lib/webauthn/u2f_migrator.rb:46:in 'Class#new'
     # ./lib/webauthn/u2f_migrator.rb:46:in 'WebAuthn::U2fMigrator#attestation_trust_path'
     # ./spec/webauthn/u2f_migrator_spec.rb:46:in 'block (2 levels) in <top (required)>'

Finished in 1.27 seconds (files took 0.27736 seconds to load)
359 examples, 1 failure

Failed examples:

rspec ./spec/webauthn/u2f_migrator_spec.rb:45 # WebAuthn::U2fMigrator returns the attestation certificate

Randomized with seed 4621

Ruby 3.4 and OpenSSL 3.2

bundle exec rspec

Randomized with seed 41045
======================================================
OpenSSL library version is: OpenSSL 3.2.4 11 Feb 2025
======================================================

.......................................................................................................................................................................................................................................................................................................................................................................

Finished in 1.22 seconds (files took 0.25562 seconds to load)
359 examples, 0 failures

Randomized with seed 41045

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions