curl -X GET --header 'Accept: application/json' --header 'Authorization: Bearer 2118b878-46a8-3b9d-a911-8ac18a0b13cf' 'https://172.17.0.1:8243/V1.0.2/stock/getParam?age=123'
curl: (60) server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
After I design an API on API MANAGER PLATFORM, I do the curl command and there is the above logs. How to resolve the cert?
You're probably having trouble with a self-signed certificate.
Get the certificate and use the argument
--cacert <certfile>
to authenticate with it.To test your function and if you are absolutely certain that the certificate is OK, try
-k
to accept the invalid certificate. However, you must never, ever do this in production and/or if you are unsure that it is the certificate that you intended as it takes away the value of using SSL.