Conversation
e9251c9 to
8ff7f21
Compare
|
It looks like the UNIX testing ran into rustls/webpki#205 where the behavior desired in #214 isn't supported. I'm not sure yet what to do about that. macOS and Windows are passing, as expected. |
|
As said in rustls/webpki#205 (comment), self-signed certificates differ in ca parameter. Both cases shall be tested.
|
|
I swear I had something close to that locally earlier today but macOS wasn't happy. I might have messed up my Go code though and made the generator output wrong so I'll try again. We agree both cases should be tested, I guess one just might need skipped on the generic UNIX backend? |
Not completely sure I understand what you mean. webpki in my understanding does not allow verifications where the trust root is self-signed, and is also the entity being verified. In my mind we probably should avoid (to the extent that we can) allowing this on other platforms, too? So I think we should test it but make sure it fails. |
|
@djc @complexspaces |
Yeah, it would be nice not to break any existing users with these kind of certificates.
We definitely don't have a shortage of platform-specific quirks today but part of me wants to try avoiding more. I guess there's no naming conflict at least between
@djc I agree on that path 👍. Sorry if my first message was confusing though, I was just trying to say that I tried a different root CA vs what is checked into this branch on macOS and received a "not valid" error back from the platform.
|
|
@complexspaces ca:true is passing on macOS too. |
This PR begins adding tests for the
Verifier::new_with_extra_rootsextension currently available on all platforms except Android.It adds two "simple" cases to cover the known-so-far/common cases we want and expect manually added, non-public roots to behave as trustworthy. I had to modify the
ca.gogeneration script to support producing selfsigned certificates that operate on their own without an actual chain.The second test currently doesn't run on Windows but can be enabled at the same time #215 lands. I validated this locally by manually cherry-picking over the commit: