-
Notifications
You must be signed in to change notification settings - Fork 3
Create TLS
cert arbitraries for testing
#8
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
Comments
Important things I've already explained. |
It is critical to test a ed25519 signed cert chain as this is what is being used in PK. |
Most of this is done now. I've lifted a bunch of functions from The The last step is to derive the public key from the private key. In |
I'm looking into using the So i may as well just import it. but attempting to import it results in an error. The |
This is done now. Deriving the public key is done using |
Great! Did you test cert chains too? |
Yeah, tested with random length cert chains with a min of 1 cert. The connections still timeout for me but I think that's a separate issue. I've confirmed that the config is generated without error. |
I've cleaned up a bunch of the debugging so the logs are clearer now. I've narrowed the timeout problem down to the generated certificates. Something about them is preventing the connection from being fully established. Likely rejected in some way but as for why is inscrutable. More digging to follow. But I know that If I load the cert files from memory then it works. So I know it's the generated certs. * Related #8 [ci skip]
Since there is a problem with the generated certs I'm going to re-open this issue. What I know so far is that
So the problem could be
To verify the problem we can take two approaches to start.
Beyond that I need to narrow down why the tests are timing out and try to extract more useful errors in this case. |
I did some more digging just to work out how to debug failures like this. I have two failure examples.
Looking over the docs I can't find a reference for these codes anywhere but looking at the open ssl defined codes I think they correspond to ...
I'm not sure that theses are the right codes. They don't really make sense in this context. |
I've verified that Ed25519 certs don't currently work. RSA and ECDSA certs work. You can confirm with:
Only the Ed25519 cert fails. In particular the I checked on wireshark why it's failing. Normally we send an initial packet, receive a retry packet, resend initial packet, then receive handshake. What's happneing instead is that we send initial packet, receive retry packet, resend initial packet, and now the server responds with a initial packet with The I suspect the boring library does not yet support Ed25519 certificates. We also updated to the latest boring and quiche libraries, and this is the case too. |
@tegefaulkes yes 296 is |
Upstream issue: cloudflare/boring#113. Cloudflare's boring library itself is just a binding around the Google's boringssl library: https://github.com/google/boringssl It's possible we may just need to enable or update the Rust's boring package somehow to include or enable ed25519 support in boringssl. |
There is a bug in the failure condition of TLS verification. The |
We need to have tests that test with This just means making use of the CA options in the config. We can generate local certificates with a certificate authority. The easiest way is to put the local certificate used by the remote peer as a certificate authority. So here are some possible tests:
Do both for client, server, and client & server. |
These tests can be done for ECDSA certs or RSA certs... for now let's just use |
@tegefaulkes do note I forgot to add |
Also I'm not entirely sure if it matters whether the server or the client produces the keylog. I tried on both they seem to have the same effect on wireshark. |
@tegefaulkes please set |
Tests could have to be correspondingly updated though depending on whether you are testing TLS or not. |
We have a response here cloudflare/quiche#1482 for the failing So we need to enable the The method takes a string of the algorithms delimited by This is what I found
Now we just need to select out of this list the ones we want to support. |
What is the default list if we didn't configure it at all? Let's just copy the default list, and then just add on top the |
Right now I'm taking what chrome supports and adding |
Updated to |
I'm considering this fixed now. Changes made
|
… ones I've also updated the tests to use a random selection of the example cert fixtures and the generated polykey cert. * Fixes #8 [ci skip]
I've cleaned up a bunch of the debugging so the logs are clearer now. I've narrowed the timeout problem down to the generated certificates. Something about them is preventing the connection from being fully established. Likely rejected in some way but as for why is inscrutable. More digging to follow. But I know that If I load the cert files from memory then it works. So I know it's the generated certs. * Related #8 [ci skip]
This includes arbitraries to go along with it. * Fixes #8 [ci skip]
I've cleaned up a bunch of the debugging so the logs are clearer now. I've narrowed the timeout problem down to the generated certificates. Something about them is preventing the connection from being fully established. Likely rejected in some way but as for why is inscrutable. More digging to follow. But I know that If I load the cert files from memory then it works. So I know it's the generated certs. * Related #8 [ci skip]
… ones I've also updated the tests to use a random selection of the example cert fixtures and the generated polykey cert. * Fixes #8 [ci skip]
Specification
We want the ability to generate the TLS cert chain and private key PEMs for testing. We should also create
fast-check
arbitraries for this.We need to replicate the
KeyPair
generation,x509
certificate creation and PEM format from thePolykey
methods. Since these will be used for testing, the types can be striped down to primitives and any extra information can be as placeholder as possible. Refer to thekeys
domain inPolykey
for how these are created.Additional context
Tasks
x509
certificatesThe text was updated successfully, but these errors were encountered: