How to Download the SSL Certificate from a Weburl on Linux
Many times we come across SSL websites that had certificates. We might need to deploy certificates in our wallets, Keystore, etc.
We can directly download those certificates from the URL on Linux server.
Let's says we want to download amazon.in cert use below command
$ true | openssl s_client -connect amazon.in:443 2>/dev/null | openssl x509
[himanshu@oel7server tmp]$ true | openssl s_client -connect amazon.in:443 2>/dev/null | openssl x509
-----BEGIN CERTIFICATE-----
MIIGlzCCBX+gAwIBAgIQCAQS8j7FlS+HLCsnKEkPGzANBgkqhkiG9w0BAQsFADBG
MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRUwEwYDVQQLEwxTZXJ2ZXIg
Q0EgMUIxDzANBgNVBAMTBkFtYXpvbjAeFw0yMTA3MTkwMDAwMDBaFw0yMjA3MTMy
MzU5NTlaMBsxGTAXBgNVBAMMECouY3kucGVnLmEyei5jb20wggEiMA0GCSqGSIb3
DQEBAQUAA4IBDwAwggEKAoIBAQDKrYzNvrrL8Ik7C7mi6lfEtfSnIqzvuMUrGajD
QG/pUVkvF0EdZAMW+uwt9Sy19HalO2UWYZu8Y/uYtWa4TCV2+kSFZ1PVjMnojSf3
ugWmMLV71nc8ZJ1YHZopLMeFeVcTOHn386wXDKNcevrfAEtAx1c2+9Xhl+snrIP/
eHaY6O0c5Ox9eya1HlbcTHwJHsKPQHfxHTi36vXe3qTkq007cFnq4B1eiAuveDk1
bfcZfeDg2qOR7O2X8WuCjLA8rAIovfB+cjVOI4YO/2cxeONuOrEWM3qdhr1f27gd
wqIwWXoQq+1lTIfNTjii0EzQeWwwQmYETfsO77Obce41o+IJAgMBAAGjggOqMIID
pjAfBgNVHSMEGDAWgBRZpGYGUqB7lZI8o5QHJ5Z0W/k90DAdBgNVHQ4EFgQUdzPg
HZ76kaAbSTY3fm+pvnVlZlAwgdwGA1UdEQSB1DCB0YIQKi5jeS5wZWcuYTJ6LmNv
bYIQd3d3LmFtYXpvbi5jby5pboINd3d3LmFtYXpvbi5pboIMYW1hem9uLmNvLmlu
ggl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QELBQADggEBADo4qXb/
iz+6Y5HZat/zPtj0RB9PPMl/MyrxWigXnqucv4Z33hx6QNH5CtbCPOPZAvQKYHpD
NGxVdO8pwaXVifbCG0N+EfvnCXCKhQMuSC6Py19ys2ozWvAVnX4vFTweWBqFQAWE
v/NNh/w6t26EKPjvYLFls9MpC+8SO/T6knmD2dlqTWcTY0WEovXtU5K1FbdUfejr
s3KedtpP+DOD4m3v8avUJwW00+1nl1BSddnVWtNwZZ6e6I6BE3OvduSwarhHJQNL
JTwRaTSfqAL3sGkuM7hUI5uyMVbMsq0LadzU2frVlHlfEychpovI7YHcxlhEkWxj
0VueTt8ji0A7JfM=
-----END CERTIFICATE-----
Now copy the Begin to End in a notepad and save it as amazon.crt
Check the certificate now
Post a Comment
Post a Comment