-
-
Notifications
You must be signed in to change notification settings - Fork 509
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
Adds option to supply root SSL certificate for client #892
Conversation
ayyyy, thanks for taking the time to put this together! 🎉 I should be able to review in the next day or two. Some initial thoughts though: it's nice to be able to add a root cert, but folks can already interact with targets with certs they don't know about with i think ultimately, the cli options should be
I'll start a review for what's currently here soon. Let me know if you want to work on the client cert as well, or if we should split of a cert branch that both PRs can merge into before a final merge to main. Thanks again! |
As far as I can tell, the code I have written does the |
@AkechiShiro, it'd be great if you could test out this branch against your mutual authentication local server, now that I've added the |
howdy! starting looking at this today. just trying to get a local server setup correctly to test things. I have something that works with curl, but doesnt with ferox. This PR may take a little more time than normal to get reviewed, as a heads up. On top of setting up a representative server, I have some life things going on over the next 2 weeks. I'll work on this as time permits though. Thanks again for putting this together! |
Sure thing! Take your time reviewing this since it is quite a large change anyway. We would need to think about refactoring |
an update on this: I was able to get this working on a local mutual auth test server, but required some changes (shown as diff below). I kept getting Another problem I ran into is that I'm including my Some other commands that may prove useful for debugging/testing are included as well. ----8<----
|
I made the changes suggested above. The code now uses the
|
After looking more closely at rustls-tls, it explicitly doesn't support renegotiation / downgrading and a bunch of other stuff. https://docs.rs/rustls/latest/rustls/index.html#non-features That's fine for projects with controlled usage, but there's tons of old stuff on the internet, so probably not a great library for ferox. |
Good morning! I started a review, but haven't given you the checklist below to help hitting all the places you'd need for adding a new command line option. I'm not done reviewing, so don't worry about making changes yet. Just wanted to keep you up to date
|
Hi, the idea for multiple server certificates looks awesome! I just changed it so that we don't use an |
haha, ty! I saw the changes, they look good! I finished up adding tests and things, should be merged today. Thanks for your work on this! |
Fixes #870.
This PR adds three flags:
--server-certs
--client-cert
--client-key
The
--server-certs
flag can be supplied multiple.pem
or.der
files which get added to the requesting client as a root certificate and can thus be used for endpoints with self-signed certificates.For mutual authentication, we use the last two flags. The
--client-key
flag needs to be supplied a.pem
file which has the PKCS #8 PEM encoded private key and the--client-cert
flag must be supplied a PEM encoded certificate for the client. An additional root CA certificate may need to be supplied through--server-certs
as a.pem
or.der
file.This means, your command should look like:
Progress
@epi052 has kindly provided this list which tracks the progress of this PR.