Skip to content

Commit

Permalink
fix: compatibility with libssl v1.0
Browse files Browse the repository at this point in the history
The build is failing when using libssl v1.0.2 and we haven't noticed
until now since we aren't testing against that version in Travis.

In order to fix compatibility these issues with OpenSSL 1.0 we have to
update the gem tpm-key_attestation which is the one that it was failing.
  • Loading branch information
santiagorodriguez96 committed Jun 4, 2020
1 parent 54bfc3f commit 6d2c708
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 12 deletions.
28 changes: 20 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
dist: bionic
language: ruby
cache: bundler

rvm:
- ruby-head
- 2.7.1
- 2.6.6
- 2.5.8
- 2.4.10
cache:
bundler: true
directories:
- /home/travis/.rvm/

env:
- LIBSSL=1.1 RB=2.7.1
- LIBSSL=1.1 RB=2.6.6
- LIBSSL=1.1 RB=2.5.8
- LIBSSL=1.1 RB=2.4.10
- LIBSSL=1.1 RB=ruby-head
- LIBSSL=1.0 RB=2.7.1
- LIBSSL=1.0 RB=2.6.6
- LIBSSL=1.0 RB=2.5.8
- LIBSSL=1.0 RB=2.4.10
- LIBSSL=1.0 RB=ruby-head

gemfile:
- gemfiles/cose_head.gemfile
Expand All @@ -19,9 +28,12 @@ gemfile:
matrix:
fast_finish: true
allow_failures:
- rvm: ruby-head
- env: LIBSSL=1.1 RB=ruby-head
- env: LIBSSL=1.0 RB=ruby-head
- gemfile: gemfiles/cose_head.gemfile
- gemfile: gemfiles/openssl_head.gemfile

before_install:
- ./script/ci/install-openssl
- ./script/ci/install-ruby
- gem install bundler -v "~> 2.0"
7 changes: 7 additions & 0 deletions script/ci/install-openssl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -e

if [[ "$LIBSSL" == "1.0" ]]; then
sudo apt-get install libssl1.0-dev
fi
13 changes: 13 additions & 0 deletions script/ci/install-ruby
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

set -e

source "$HOME/.rvm/scripts/rvm"

if [[ "$LIBSSL" == "1.0" ]]; then
rvm use --install $RB --autolibs=read-only --disable-binary
elif [[ "$LIBSSL" == "1.1" ]]; then
rvm use --install $RB --binary --fuzzy
fi

[[ "`ruby -ropenssl -e 'puts OpenSSL::OPENSSL_VERSION'`" =~ "OpenSSL $LIBSSL" ]] || { echo "Wrong libssl version"; exit 1; }
6 changes: 3 additions & 3 deletions spec/conformance/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PATH
openssl (~> 2.0)
safety_net_attestation (~> 0.4.0)
securecompare (~> 1.0)
tpm-key_attestation (~> 0.8.0)
tpm-key_attestation (~> 0.9.0)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -55,7 +55,7 @@ GEM
sinatra (= 2.0.8.1)
tilt (~> 2.0)
tilt (2.0.10)
tpm-key_attestation (0.8.0)
tpm-key_attestation (0.9.0)
bindata (~> 2.4)
openssl-signature_algorithm (~> 0.4.0)

Expand All @@ -75,4 +75,4 @@ RUBY VERSION
ruby 2.7.0p-1

BUNDLED WITH
2.1.2
2.1.4
2 changes: 1 addition & 1 deletion webauthn.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Gem::Specification.new do |spec|
spec.add_dependency "openssl", "~> 2.0"
spec.add_dependency "safety_net_attestation", "~> 0.4.0"
spec.add_dependency "securecompare", "~> 1.0"
spec.add_dependency "tpm-key_attestation", "~> 0.8.0"
spec.add_dependency "tpm-key_attestation", "~> 0.9.0"

spec.add_development_dependency "appraisal", "~> 2.2.0"
spec.add_development_dependency "bundler", ">= 1.17", "< 3.0"
Expand Down

0 comments on commit 6d2c708

Please sign in to comment.