Skip to content

Instantly share code, notes, and snippets.

@rac021
Last active June 25, 2017 15:43
Show Gist options
  • Save rac021/437ebd77f6d03f83994387e4e6db420d to your computer and use it in GitHub Desktop.
Save rac021/437ebd77f6d03f83994387e4e6db420d to your computer and use it in GitHub Desktop.
openssl + curl for Self-Signed Certificate
Download the Cerfiticate from the peer :
* openssl s_client -showcerts -connect 127.0.0.1:8545 </dev/null 2>/dev/null|openssl x509 -outform PEM > ~/my_certfile.pem
Tells curl to use the specified certificate file to verify the peer ( Using --cacert ) :
* curl -v --cacert ~/my_certfile.pem
-s -X POST https://127.0.0.1:8545/auth/realms/serenity/protocol/openid-connect/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'username=rac021' \
-d 'password=rac021' \
-d 'grant_type=password' \
-d 'client_id=app-plane' \
-d 'client_secret=6b64f7fa-a6ec-4f53-b941-2bdc74ef2640'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment