ich habe ein gültiges Lets Enrcypt Zertifikat und sogar ein gültiges Wildcard-Zertifikat und einen kleinen python Webserver, in dem ich dieses Zertifikat eingebunden habe. Wenn man im Browser auf example.org:8000 geht, sagen die Browser alles OK, das Zertifikat passt. Aber wenn ich es mit cURL probiere, kommt:
Code: Alles auswählen
root@server ~ # curl -v -X GET -I https://example.org:8000/test/erfjkejfjkehk
* Trying 111.222.333.124:8000...
* Connected to example.org (111.222.333.124) port 8000 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (OUT), TLS alert, unknown CA (560):
* SSL certificate problem: unable to get local issuer certificate
* Closing connection 0
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
root@server ~ #
Hier mit -k wenn es funktioniert:
Code: Alles auswählen
root@server ~ # curl -k -v -X GET -I https://example.org:8000/test/erfjkejfjkehk
* Trying 111.222.333.124:8000...
* Connected to example.org (111.222.333.124) port 8000 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: CN=*.example.org
* start date: May 3 00:00:00 2022 GMT
* expire date: May 31 23:59:59 2023 GMT
* issuer: C=US; O=DigiCert Inc; CN=RapidSSL TLS DV RSA Mixed SHA256 2020 CA-1
* SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
> GET /test/erfjkejfjkehk HTTP/1.1
> Host: example.org:8000
> User-Agent: curl/7.74.0
> Accept: */*
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< date: Fri, 16 Sep 2022 09:38:24 GMT
date: Fri, 16 Sep 2022 09:38:24 GMT
< server: uvicorn
server: uvicorn
< content-length: 22
content-length: 22
< content-type: application/json
content-type: application/json
<
* Connection #0 to host example.org left intact
root@server ~ #
https://stackoverflow.com/questions/294 ... ificate-20
Aber welche jetzt wohin muss..?
Ziel ist, dass das Zertifikat möglichst von allen Geräten (auch nicht-Browser) akzeptiert wird.