-
Notifications
You must be signed in to change notification settings - Fork 113
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
new simple
example for rcgen
#188
Conversation
This is basically rustls#185 minus rustls#188 and rustls#189. The structure also differs as sub modules have been inlined in `main.rs` and `cert.rs`. `anyhow` has also been added as a dependency to replace the `Result` alias. Closes rustls#175
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This takes what was formerly rcgen/src/main.rs and moves it to the examples folder as simple.rs
This code is now duplicated instead of moved right (and I think from a different location than described)? It's in rustls-cert-gen/src/main.rs
and also rcgen/examples/simple.rs
.
Would it make more sense for this to be a git mv rustls-cert-gen/src/main.rs rcgen/examples/simple.rs
and then putting an ~empty main.rs
in its place?
rcgen/examples/simple.rs
Outdated
@@ -0,0 +1,38 @@ | |||
#![allow(clippy::complexity, clippy::style, clippy::pedantic)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could be removed. I only see a handful of clippy findings in this code and they look easy to fix.
This was the previous
I think the |
split off from rustls#185 and make some minor changes. * remove inconsistent use of `sys::fs` * remove `&` when on file writes * remove clippy declaration at top of example
0d95cb4
to
1f3fd1e
Compare
I think you can have a rename in the same commit as introducing a new file in the place of the old one? IMO it would be very helpful to make sure this is recorded as a git commit, so that |
That's what I had in mind, sorry - I could have been more explicit. |
I agree with the intent, unfortunately git wants to outsmart us here. I've tried this and double checked and it does not work. We can achieve what you want with two commits, but I feel there is a good chance those will get squashed/rebased away at some point. If not, just say so and I'll do the two commits. Here is the best description I could find on git's behavior in this case: |
Ah that's a bummer :-( In that case I think what you have here is fine unless someone else has a stronger preference. Thanks for trying! |
This is basically rustls#185 minus rustls#188 and rustls#189. The structure also differs as sub modules have been inlined in `main.rs` and `cert.rs`. `anyhow` has also been added as a dependency to replace the `Result` alias. Closes rustls#175 includes review fixes such as: * remove top-level rsa dependency * inline parse_san * Check for presence of EKU before pushing. * Replace `struct Signature` struct w/ `enum KeypairAlgorithm` * update some doc strings
This is basically rustls#185 minus rustls#188 and rustls#189. The structure also differs as sub modules have been inlined in `main.rs` and `cert.rs`. `anyhow` has also been added as a dependency to replace the `Result` alias. Closes rustls#175 includes review fixes such as: * remove top-level rsa dependency * inline parse_san * Check for presence of EKU before pushing. * Replace `struct Signature` struct w/ `enum KeypairAlgorithm` * update some doc strings * make EndEntity and Ca public so they appear in the docs
This is basically rustls#185 minus rustls#188 and rustls#189. The structure also differs as sub modules have been inlined in `main.rs` and `cert.rs`. `anyhow` has also been added as a dependency to replace the `Result` alias. Closes rustls#175 includes review fixes such as: * remove top-level rsa dependency * inline parse_san * Check for presence of EKU before pushing. * Replace `struct Signature` struct w/ `enum KeypairAlgorithm` * update some doc strings * make EndEntity and Ca public so they appear in the docs
While reviewing #188 I wanted to confirm that example code was being built in CI. It turns out that it wasn't. Similarly we haven't been running `clippy` against test code, and so there was a number of findings to address. This branch updates CI to: * Remove `--all`. This is a deprecated alias for `--workspace`, and `--workspace` is the default for a directory containing a workspace so it can be omitted. * Use `--all-targets` whenever we run `cargo check`, `cargo test` or `cargo clippy`. This ensures coverage for both examples and unit tests. In order for the `cargo clippy ... --all-targets` to succeed this branch addresses each of the findings that were present. I've done this with a separate commit per class of finding to make it easier to review. In one case (7bfe0ef) I allowed the finding instead of fixing it since it seemed like the choice of digit groupings was done intentionally.
This is basically rustls#185 minus rustls#188 and rustls#189. The structure also differs as sub modules have been inlined in `main.rs` and `cert.rs`. `anyhow` has also been added as a dependency to replace the `Result` alias. Closes rustls#175 includes review fixes such as: * remove top-level rsa dependency * inline parse_san * Check for presence of EKU before pushing. * Replace `struct Signature` struct w/ `enum KeypairAlgorithm` * update some doc strings * make EndEntity and Ca public so they appear in the docs
This is basically rustls#185 minus rustls#188 and rustls#189. The structure also differs as sub modules have been inlined in `main.rs` and `cert.rs`. `anyhow` has also been added as a dependency to replace the `Result` alias. Closes rustls#175 includes review fixes such as: * remove top-level rsa dependency * inline parse_san * Check for presence of EKU before pushing. * Replace `struct Signature` struct w/ `enum KeypairAlgorithm` * update some doc strings * make EndEntity and Ca public so they appear in the docs
This is basically rustls#185 minus rustls#188 and rustls#189. The structure also differs as sub modules have been inlined in `main.rs` and `cert.rs`. `anyhow` has also been added as a dependency to replace the `Result` alias. Closes rustls#175 includes review fixes such as: * remove top-level rsa dependency * inline parse_san * Check for presence of EKU before pushing. * Replace `struct Signature` struct w/ `enum KeypairAlgorithm` * update some doc strings * make EndEntity and Ca public so they appear in the docs * additional test cases
This is basically rustls#185 minus rustls#188 and rustls#189. The structure also differs as sub modules have been inlined in `main.rs` and `cert.rs`. `anyhow` has also been added as a dependency to replace the `Result` alias. Closes rustls#175 includes review fixes such as: * remove top-level rsa dependency * inline parse_san * Check for presence of EKU before pushing. * Replace `struct Signature` struct w/ `enum KeypairAlgorithm` * update some doc strings * make EndEntity and Ca public so they appear in the docs * additional test cases
This is basically #185 minus #188 and #189. The structure also differs as sub modules have been inlined in `main.rs` and `cert.rs`. `anyhow` has also been added as a dependency to replace the `Result` alias. Closes #175 --------- Co-authored-by: tbro <[email protected]>
This takes what was formerly
rcgen/src/main.rs
and moves it to the examples folder assimple.rs
. It was split off from #185