Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1633

I can't make localhost as certificate authority work

$
0
0

Please check for errors my sequence of Docker (the base image is rust:1.78) commands, that intents to make localhost the CA root and install certs for my (custom written) Web server serving https://localhost:443/<PATH> with keys at test/e2e/tmpl/:

RUN openssl genrsa -passout pass: -out CA.key -des3 2048RUN openssl req -passin pass: -x509 -sha256 -new -nodes -key CA.key -out CA.pem -subj '/CN=localhost/O=My Company Name LTD./C=US'RUN openssl genrsa -passout pass: -out localhost.key -des3 2048RUN openssl req -passin pass: -new -key localhost.key -out localhost.csr -subj '/CN=localhost/O=My Company Name LTD./C=US'RUN openssl x509 -passin pass: -req -in localhost.csr \                  -CA CA.pem -CAkey CA.key \                  -CAcreateserial -sha256 \                  -extfile localhost.ext -out localhost.crtRUN openssl rsa -passin pass: -in localhost.key -out localhost.decrypted.keyRUN mkdir -p test/e2e/tmpl/RUN cp localhost.crt localhost.decrypted.key test/e2e/tmpl/# TODO: CA.key or CA.pem?RUN cp CA.key CA.pem /usr/local/share/ca-certificatesRUN update-ca-certificates

If the above sequence of command is erroneous, please provide me a correct one.

Weirdly, curl https://localhost works as intended, but another Rust-hyper-based software produces: error sending request for url (https://localhost/) error.


Viewing all articles
Browse latest Browse all 1633

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>