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

include the identity.p12 and root-ca.der files into the test binary #92

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alexanderkjall
Copy link

The debian build system doesn't run their tests from the same directory as cargo test does, and this caused the test to not find the identity.p12 and root-ca.der files.

This patch includes those files in the test binary instead, so that the tests can be run from different directories with less trouble.

…so that the tests can be run from different directories with less trouble
Copy link
Contributor

@djc djc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@alexanderkjall
Copy link
Author

Sorry for the missed import thing, have pushed a new commit that fixes that.

@alexanderkjall
Copy link
Author

The test failure was "The certificate was not trusted." on macos, this doesn't happen on my linux box, and I don't own a mac so I can't try to reproduce this error :/

@djc
Copy link
Contributor

djc commented Jan 2, 2022

Maybe have a look at rustls/rustls-native-certs#39.

@rapiz1
Copy link

rapiz1 commented Jan 3, 2022

The CI failure doesn't make sense. The only change is how bytes are read and shouldn't interface with the cert store.

@alexanderkjall
Copy link
Author

I have managed to reproduce the test-failure on a friends mac, so it's not just a fluke error. But I'm still clueless on why this happens, will report back if I manage to get to the bottom of this.

@djc
Copy link
Contributor

djc commented Jan 6, 2022

The only change is how bytes are read and shouldn't interface with the cert store.

This is just not true: fs::read() used to read from CERT_DIR which on cfg!(unix) is not equal to tests, whereas include_bytes!() reads from tests unconditionally.

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

Successfully merging this pull request may close these issues.

3 participants