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

Replace gen_certs.sh with rust #1111

Merged
merged 1 commit into from Apr 3, 2023
Merged

Conversation

rukai
Copy link
Member

@rukai rukai commented Mar 31, 2023

supercedes #1110

Completely replaces cassandra gen_certs.sh with the same logic used for generating redis certs + extra 1 openssl command to generate the p12 file.

I've renamed all the generated certs from redis -> localhost so we dont have cassandra certs named redis :P

There was a stray generate_cassandra_test_certs(); that was causing issues because it was regenerating the certs mid test run so I removed it.

Motivation

The certificate generated by gen_certs.sh is not a valid x509 v3 cert (its probably v1 or v2), although I think the ca cert is v3.
This is causing issues with rustls which accepts only x509 v3 rejecting v1/v2.
Trying to figure out what magic flags and settings I need to give openssl to make the cert v3 proved impossible for me.
So instead I opted to just reuse what we already have for redis + keep the p12 generation command which is working fine.

I've verified that this change fixes the issue I was hitting with rustls.

@rukai rukai force-pushed the fix_cassandra_cert_gen branch 2 times, most recently from 08ea992 to 23deca9 Compare March 31, 2023 07:11
Copy link
Member

@conorbros conorbros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still get a peer cert not found on this branch with a fresh clone, only on the Datastax driver. Must be something specific to my machine since it's passing on the CI.

@rukai
Copy link
Member Author

rukai commented Apr 2, 2023

The datastax TLS tests have been failing on main for me so I've been unable to test them :/

@benbromhead
Copy link
Member

Welcome to the wild world of openssl compatibility

@rukai rukai merged commit 77fa9c0 into shotover:main Apr 3, 2023
9 checks passed
This was referenced Apr 3, 2023
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 this pull request may close these issues.

None yet

3 participants