https plugins:curl: (60) Peer's certificate issuer has been marked as not trusted by the user.
Issue description
Operation steps:
- openssl genrsa -out private.pem 2048
- openssl req -new -x509 -key private.pem -out cacert.pem -days 1095
- cat /home/cert/cacert.pem >> /etc/pki/tls/certs/ca-bundle.crt
- curl http://127.0.0.1:9080/apisix/admin/ssl/1 -H 'X-API-KEY: XXX' -X PUT -d '{XXX}‘
error image:

Environment
- apisix version 1.5:
- OS:CentOS Linux release 7.4.1708 (Core)
@lilihongjava My environment is correct, but mine is the master branch, cc @spacewander
$ curl --resolve 'das.com:9443:127.0.0.1' https://das.com:9443 -v
* Added das.com:9443:127.0.0.1 to DNS cache
* Rebuilt URL to: https://das.com:9443/
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 7890 (#0)
* Establish HTTP proxy tunnel to das.com:9443
> CONNECT das.com:9443 HTTP/1.1
> Host: das.com:9443
> User-Agent: curl/7.54.0
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 200 Connection established
<
* Proxy replied OK to CONNECT request
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (OUT), TLS alert, Server hello (2):
* SSL certificate problem: self signed certificate
* stopped the pause stream!
* Closing connection 0
curl: (60) SSL certificate problem: self signed certificate
More details here: https://curl.haxx.se/docs/sslcerts.html
@lilihongjava
How you sign the test.com's certificate?
@lilihongjava How you sign the
test.com's certificate?

I think you confuse CA certificate and normal certificate. Please take a look at https://support.itrsgroup.com/hc/en-us/articles/360020251493-Create-a-self-signed-CA-client-certificate-with-OpenSSL about how to sign a normal certificate.
@lilihongjava My environment is correct, but mine is the master branch, cc @spacewander
$ curl --resolve 'das.com:9443:127.0.0.1' https://das.com:9443 -v * Added das.com:9443:127.0.0.1 to DNS cache * Rebuilt URL to: https://das.com:9443/ * Trying 127.0.0.1... * TCP_NODELAY set * Connected to 127.0.0.1 (127.0.0.1) port 7890 (#0) * Establish HTTP proxy tunnel to das.com:9443 > CONNECT das.com:9443 HTTP/1.1 > Host: das.com:9443 > User-Agent: curl/7.54.0 > Proxy-Connection: Keep-Alive > < HTTP/1.1 200 Connection established < * Proxy replied OK to CONNECT request * ALPN, offering h2 * ALPN, offering http/1.1 * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH * successfully set certificate verify locations: * CAfile: /etc/ssl/cert.pem CApath: none * TLSv1.2 (OUT), TLS handshake, Client hello (1): * TLSv1.2 (IN), TLS handshake, Server hello (2): * TLSv1.2 (IN), TLS handshake, Certificate (11): * TLSv1.2 (OUT), TLS alert, Server hello (2): * SSL certificate problem: self signed certificate * stopped the pause stream! * Closing connection 0 curl: (60) SSL certificate problem: self signed certificate More details here: https://curl.haxx.se/docs/sslcerts.html
Can you provide the whole operation steps and execution commands, I refer to it, thank you very much
@lilihongjava My environment is correct, but mine is the master branch, cc @spacewander
$ curl --resolve 'das.com:9443:127.0.0.1' https://das.com:9443 -v * Added das.com:9443:127.0.0.1 to DNS cache * Rebuilt URL to: https://das.com:9443/ * Trying 127.0.0.1... * TCP_NODELAY set * Connected to 127.0.0.1 (127.0.0.1) port 7890 (#0) * Establish HTTP proxy tunnel to das.com:9443 > CONNECT das.com:9443 HTTP/1.1 > Host: das.com:9443 > User-Agent: curl/7.54.0 > Proxy-Connection: Keep-Alive > < HTTP/1.1 200 Connection established < * Proxy replied OK to CONNECT request * ALPN, offering h2 * ALPN, offering http/1.1 * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH * successfully set certificate verify locations: * CAfile: /etc/ssl/cert.pem CApath: none * TLSv1.2 (OUT), TLS handshake, Client hello (1): * TLSv1.2 (IN), TLS handshake, Server hello (2): * TLSv1.2 (IN), TLS handshake, Certificate (11): * TLSv1.2 (OUT), TLS alert, Server hello (2): * SSL certificate problem: self signed certificate * stopped the pause stream! * Closing connection 0 curl: (60) SSL certificate problem: self signed certificate More details here: https://curl.haxx.se/docs/sslcerts.htmlCan you provide the whole operation steps and execution commands, I refer to it, thank you very much
Please refer to:
I think you confuse CA certificate and normal certificate. Please take a look at https://support.itrsgroup.com/hc/en-us/articles/360020251493-Create-a-self-signed-CA-client-certificate-with-OpenSSL about how to sign a normal certificate.