Skip to content

How to get Ed25519 x509 certificates working with quiche? #1482

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

Closed
CMCDragonkai opened this issue Apr 17, 2023 · 3 comments
Closed

How to get Ed25519 x509 certificates working with quiche? #1482

CMCDragonkai opened this issue Apr 17, 2023 · 3 comments

Comments

@CMCDragonkai
Copy link

I posted this on the boring repo too cloudflare/boring#113, but wasn't sure if this should be solved on the quiche repository level too.

Basically I've tested RSA and ECDSA x509 certificates, and both work. However when I try with an ed25519 certificate, we get a TLS handshake failure with the CRYPTO_ERROR being 296.

image

We used step-cli to generate a ed25519 cert:

step certificate create localhost localhost.crt localhost.key --profile self-signed --subtle --no-password --insecure --force --san 127.0.0.1 --san ::1 --not-after 31536000s --kty OKP
@heinrich5991
Copy link

By default, boringssl doesn't allow ed25519 for signing certs.

I was able to do this by using a custom boringssl context:

let mut context = boring::ssl::SslContext::builder(boring::ssl::SslMethod::tls())?;
context.set_sigalgs_list("ed25519")?;
context.set_private_key(key)?;
context.set_certificate(cert)?;
let mut config = quiche::Config::with_boring_ssl_ctx(quiche::PROTOCOL_VERSION, context.build())?;

@CMCDragonkai
Copy link
Author

Awesome.

Do you know what the default sigalgs_list is? That way I can just copy that and append ed25519.

@CMCDragonkai
Copy link
Author

Thanks works.

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

No branches or pull requests

2 participants