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

Runtime failure on 32-bit platforms on musl 1.2.0+ #59

Closed
ptrcnull opened this issue May 6, 2022 · 4 comments
Closed

Runtime failure on 32-bit platforms on musl 1.2.0+ #59

ptrcnull opened this issue May 6, 2022 · 4 comments

Comments

@ptrcnull
Copy link

ptrcnull commented May 6, 2022

Looks like fix introduced in 220f580 now emits a warning, due to rust-lang/libc#1848 and the test added along with the fix fails on Alpine Linux edge:

---- tests::certificate::cert_expiration_date_past stdout ----
thread 'tests::certificate::cert_expiration_date_past' panicked at 'called `Result::unwrap()` on an `Err` value: Error { message: "error:0D0D90AD:asn1 encoding routines:ASN1_TIME_adj:error getting time:crypto/asn1/a_time.c:330:" }', acme_common/src/tests/certificate.rs:179:37
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@nekopsykose
Copy link

imo this is really a rust-libc issue, since they still define libc::time_t as c_long irrespective of what the platform is saying (so on musl, this is wrong for 32-bit, as the issue says). as such, it doesn't make too much sense to fix here, and they should just merge the actual fixes already...

breard-r added a commit that referenced this issue May 7, 2022
This type was used for the calculation of the certificate's expiration
delay, which causes troubles on some 32 bits systems.
Rel #59
@breard-r
Copy link
Owner

breard-r commented May 7, 2022

Thank you for this report!

The real issue here may not be the libc one, but the fact that I used it only to create an openssl::asn1::Asn1Time struct with the current time. After reading the OpenSSL documentation with more attention than before, I managed to do it with days_from_now(0) instead.

With the libc::time_t gone, this issue should be fixed. However, because I haven't tested it on a 32-bit platform with musl, I'm not closing it without additional feedback.

@ptrcnull
Copy link
Author

ptrcnull commented May 8, 2022

It seems to compile and pass all tests on 32-bit architectures, thanks :)

Would you mind making a new tagged release with this and the other improvements?

@breard-r
Copy link
Owner

breard-r commented May 8, 2022

Than you for the feedback! 🙂
Since this issue is resolved, I'm closing it and I'll make a new release in the next minutes.

@breard-r breard-r closed this as completed May 8, 2022
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

No branches or pull requests

3 participants