Closed sotrh closed 10 months ago
This is a TLS certificate management issue and nothing specific to QUIC, much less Quinn. Is your certificate signed? Judging from the error, simply presenting a CA certificate directly isn't permitted. See the examples for how to use rcgen
to generate and trust a self-signed certificate that can be used for development purposes. openssl
is not the easiest to use in correct ways.
Ok I'll try rcgen
with above openssl, command, quinn not working generate key.pem, cert.pem like this
[req]
distinguished_name = req_distinguished_name
req_extensions = v3_req
prompt = no
[req_distinguished_name]
CN = localhost
[v3_req]
basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
subjectAltName = @alt_names
[alt_names]
DNS.1 = localhost
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes -config san.cnf -extensions v3_req
openssl x509 -in cert.pem -outform DER -out cert.der
openssl ec -in key.pem -outform DER -out key.der
with above openssl, command, quinn not working
Yes, that's why the issue was opened. You shouldn't use a command that's known not to work.
generate key.pem, cert.pem like this
I'm not an expert on the openssl command line. As already stated above, we recommend using rcgen
instead as it's less error prone. If you must use openssl to generate your certs, reach out to openssl-related support channels; we can't help you here.
I'm trying to adapt the client/server mock http example and I'm running into an error when I try to run the client. I've created an SSL certificate using the following script:
I'm loading the cert in the server as follows:
In the client I'm loading it like this:
There are no errors when the certs are loaded, nor when the server starts. The error occurs when the running the client. Here's the error: "the cryptographic handshake failed: error 46: invalid peer certificate: Other(CaUsedAsEndEntity)"
I've tried adding both
server.crt
andserver.crt.der
to/usr/local/share/ca-certificates
and runningsudo /usr/sbin/update-ca-certificates
, and that yielded the same results.Any help would be greatly appreciated