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

0.11.2 build error w/o pem feature. #161

Closed
2 of 3 tasks
cpu opened this issue Sep 27, 2023 · 0 comments · Fixed by #162
Closed
2 of 3 tasks

0.11.2 build error w/o pem feature. #161

cpu opened this issue Sep 27, 2023 · 0 comments · Fixed by #162
Assignees

Comments

@cpu
Copy link
Member

cpu commented Sep 27, 2023

Building 0.11.2 without the optional, but default, pem feature causes an import error from crl.rs and key_pair.rs unconditionally importing the ENCODE_CONFIG that is gated by that feature:

   Compiling rcgen v0.11.2
error[E0432]: unresolved import `crate::ENCODE_CONFIG`
 --> /home/daniel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rcgen-0.11.2/src/crl.rs:8:5
  |
8 | use crate::ENCODE_CONFIG;
  |     ^^^^^^^^^^^^^^^^^^^^ no `ENCODE_CONFIG` in the root

error[E0432]: unresolved import `crate::ENCODE_CONFIG`
  --> /home/daniel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rcgen-0.11.2/src/key_pair.rs:12:45
   |
12 | use crate::{RcgenError, SignatureAlgorithm, ENCODE_CONFIG};
   |                                             ^^^^^^^^^^^^^ no `ENCODE_CONFIG` in the root

rcgen/src/lib.rs

Lines 112 to 119 in 0c8cfc7

#[cfg(feature = "pem")]
const ENCODE_CONFIG: pem::EncodeConfig = {
let line_ending = match cfg!(target_family = "windows") {
true => pem::LineEnding::CRLF,
false => pem::LineEnding::LF,
};
pem::EncodeConfig::new().set_line_ending(line_ending)
};

We should:

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 a pull request may close this issue.

1 participant