When you need to try HTTP connection using CURL command you will return below error,
* Issuer certificate is invalid:
* NSS error -8156
* Closing connection
Here you need to specify the cert in curl command using --cacert. before that you need to get the cert for your server. You can try below command to get cert.
openssl s_client -connect <host>:<port>
Eg: openssl s_client -connect localhost:8243
Now you can see the ssl certificate. You can extract the text between "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----" including these two line and save as ssl.crt.
Now you can trigger HTTPS request according to below format
curl -X POST https://localhost:8243/xxxx/v1/test -d '{}' --cacert /path/to/ssl.crt
Hasitha's Blog is a blog that helps DevOps people do our regular tasks easily and perfectly.
Subscribe to:
Post Comments (Atom)
File Sharing using NFS in GKE Cluster
File Sharing using NFS in GKE Cluster There was a requirement to create common file sharing location which should be accessible by specific...
-
Once you generate SSH key pair to connect to a server using putty and you are going to import it into Xshell you will be noticed below notif...
-
You can use below shell script to simulate a pre-defined load on an API. #!/bin/bash ##########################################...
-
Here is a simple HTTP listener using Python BaseHTTPRequestHandler This Application will, listen to port 8000 on localhost respond to...
No comments:
Post a Comment