mirror of https://github.com/rwf2/Rocket.git
Update cert in 'tls' example for new 'rustls'.
The latest version of `rustls` acts on the SNI extension to TLS without the apparent ability to disable the behavior. `rustls` requires that the server's certificate match the client's requested server. The matching is done by looking at DNS names in the `subjectAltName` extension and checking if the requested server name is present. Since the certificate in the `tls` example did not have the `subjectAltName` extension, this check always failed, and the TLS connection was aborted. This commit adds the extension to the certificate with a DNS name of `localhost`, ensuring that TLS succeeds on `localhost`.
This commit is contained in:
parent
2b3aa01463
commit
237370533c
|
@ -1,7 +1,5 @@
|
|||
# The certificate/private key pair used here was generated via openssl:
|
||||
#
|
||||
# openssl req -x509 -newkey rsa:4096 -nodes -sha256 -days 3650 \
|
||||
# -keyout key.pem -out cert.pem
|
||||
# The certificate/private key pair used here was generated via openssl using the
|
||||
# `gen_cert.sh` script located in the `private/` subdirectory.
|
||||
#
|
||||
# The certificate is self-signed. As such, you will need to trust it directly
|
||||
# for your browser to refer to the connection as secure. You should NEVER use
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIFuzCCA6OgAwIBAgIJAKGZ7Q2UtrXSMA0GCSqGSIb3DQEBBQUAMEcxCzAJBgNV
|
||||
BAYTAlVTMQswCQYDVQQIEwJDQTESMBAGA1UEChMJUm9ja2V0IENBMRcwFQYDVQQD
|
||||
Ew5Sb2NrZXQgUm9vdCBDQTAeFw0xNzA5MDExMDAyMjRaFw0yNzA4MzAxMDAyMjRa
|
||||
MEcxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTESMBAGA1UEChMJUm9ja2V0IENB
|
||||
MRcwFQYDVQQDEw5Sb2NrZXQgUm9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIP
|
||||
ADCCAgoCggIBANpHgKt28+RYw3z+RyvsBqQXCLfJfv7a8ZXnuIScNapjxisTih4u
|
||||
HqiuC2DsUg6jF1zYzEBwCUKKjAXhPBKl2sRPxvTOK4kOy3a9kde/a/vLFkdt3CSJ
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||||
|
||||
# TODO: `rustls` (really, `webpki`) doesn't currently use the CN in the subject
|
||||
# to check if a certificate is valid for a server name sent via SNI. It's not
|
||||
# clear if this is intended, since certificates _should_ have a `subjectAltName`
|
||||
# with a DNS name, or if it simply hasn't been implemented yet. See
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=552346 for a bit more info.
|
||||
|
||||
CA_SUBJECT="/C=US/ST=CA/O=Rocket CA/CN=Rocket Root CA"
|
||||
SUBJECT="/C=US/ST=CA/O=Rocket/CN=localhost"
|
||||
ALT="DNS:localhost"
|
||||
|
||||
openssl genrsa -out ca_key.pem 4096
|
||||
openssl req -new -x509 -days 3650 -key ca_key.pem -subj "${CA_SUBJECT}" -out ca_cert.pem
|
||||
|
||||
openssl req -newkey rsa:4096 -nodes -sha256 -keyout key.pem -subj "${SUBJECT}" -out server.csr
|
||||
openssl x509 -req -sha256 -extfile <(printf "subjectAltName=${ALT}") -days 3650 \
|
||||
-CA ca_cert.pem -CAkey ca_key.pem -CAcreateserial \
|
||||
-in server.csr -out cert.pem
|
||||
|
||||
rm ca_cert.srl server.csr
|
|
@ -1,51 +1,51 @@
|
|||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIJKQIBAAKCAgEAs3ZtGcSzT+E5SQSNiKXlU+EuoWXgZHpv2o+DWZoRwNOh11an
|
||||
FMN1tN2EJJYTuxN9OblPwU0c+atASGtgwj8mQ1ApME4zmQLhYomc3AGc/84btkcC
|
||||
1nmLbZb4ynsKyHtJPc6z2j16XXBXtMatpnFKJ9H8kc7S9R/BGBEnG/0yajNS5Fih
|
||||
kiRDjA3hGDFZyZ/8fchYHwvNrv+BgXN6t0otrkSwjJEy7IOkwtuxBZAlbjiEn9fg
|
||||
rwCoJNsdvUhpv52KE3vo+mC5tdoeNUuiZRjvcyZzkZcG+DM+Yfu9qTQWlREe9pDc
|
||||
cLJEzYNiFrq+zTNl4v5wH2e/mDqKYMKLEbmZfDcOgnKVg5BnS5zu1x9fFsvwVzmp
|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7wr6Um+L/LoRVeJhoKxv8LsQ=
|
||||
-----END RSA PRIVATE KEY-----
|
||||
|
|
|
@ -33,7 +33,7 @@ pear_codegen = "0.0.11"
|
|||
rustls = { version = "0.11.0", optional = true }
|
||||
cookie = { version = "0.10.0", features = ["percent-encode", "secure"] }
|
||||
hyper = { version = "0.10.13", default-features = false }
|
||||
hyper-sync-rustls = { version = "0.2", features = ["server"], optional = true }
|
||||
hyper-sync-rustls = { version = "0.2.1", features = ["server"], optional = true }
|
||||
ordermap = "0.2"
|
||||
isatty = "0.1"
|
||||
|
||||
|
|
Loading…
Reference in New Issue