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 failing "android-safetynet attestation" test #105

Closed
grzuy opened this issue Dec 27, 2018 · 2 comments
Closed

Fix failing "android-safetynet attestation" test #105

grzuy opened this issue Dec 27, 2018 · 2 comments

Comments

@grzuy
Copy link
Contributor

grzuy commented Dec 27, 2018

Started failing because of the certificate used in the test expired in December, causing validation to fail.

@bdewater
Copy link
Collaborator

Timecop doesn't work as the check happens inside OpenSSL/C. I've tried to get around that by using libfaketime, but I'm getting delayed results when dynamically changing the faked time via the environment variable 🤔

DYLD_INSERT_LIBRARIES=/usr/local/Cellar/libfaketime/0.9.7_1/lib/faketime/libfaketime.1.dylib DYLD_FORCE_FLAT_NAMESPACE=1 DONT_FAKE_MONOTONIC=1 FAKETIME="@2018-12-31 00:00:00" ruby -e "ENV['FAKETIME'] = '-1'; 15.times { puts Time.now; sleep 1 }"
2018-12-31 00:00:00 -0500
2018-12-31 00:00:01 -0500
2018-12-31 00:00:02 -0500
2018-12-31 00:00:03 -0500
2018-12-31 00:00:04 -0500
2018-12-31 00:00:05 -0500
2018-12-31 00:00:06 -0500
2018-12-31 00:00:07 -0500
2018-12-31 00:00:08 -0500
2018-12-31 00:00:09 -0500
2018-12-31 00:00:10 -0500
2019-01-13 14:04:38 -0500
2019-01-13 14:04:39 -0500
2019-01-13 14:04:40 -0500
2019-01-13 14:04:41 -0500

@grzuy
Copy link
Contributor Author

grzuy commented Jan 14, 2019

Thank your for looking into this!

Timecop doesn't work as the check happens inside OpenSSL/C

Bummer. Getting timecop working for this would have been ideal.

Workaround could be having a new attestation in the test seeds.rb with a certificate expiring very very far in the future, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants