{"id":21184675,"url":"https://github.com/integration-it/ssl-cheat-sheet","last_synced_at":"2026-03-19T19:13:10.031Z","repository":{"id":41113599,"uuid":"268300810","full_name":"Integration-IT/ssl-cheat-sheet","owner":"Integration-IT","description":"A cheat sheet that contains the most OpenSSL commands used by Dev, SysAdmin in real life.","archived":false,"fork":false,"pushed_at":"2020-05-31T20:25:10.000Z","size":2,"stargazers_count":58,"open_issues_count":0,"forks_count":24,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-21T12:46:44.533Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Integration-IT.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-31T14:48:45.000Z","updated_at":"2024-10-25T05:37:26.000Z","dependencies_parsed_at":"2022-09-09T05:23:43.729Z","dependency_job_id":null,"html_url":"https://github.com/Integration-IT/ssl-cheat-sheet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Integration-IT%2Fssl-cheat-sheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Integration-IT%2Fssl-cheat-sheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Integration-IT%2Fssl-cheat-sheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Integration-IT%2Fssl-cheat-sheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Integration-IT","download_url":"https://codeload.github.com/Integration-IT/ssl-cheat-sheet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243639409,"owners_count":20323505,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T18:10:30.333Z","updated_at":"2026-01-02T21:04:51.706Z","avatar_url":"https://github.com/Integration-IT.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"## USEFULL OPENSLL COMMANDS\n\n\n- SSL - Secure Socket Layer\n- CSR - Certificate Signing Request\n- TLS - Transport Layer Security\n- PEM - Privacy Enhanced Mail\n- DER - Distinguished Encoding Rules\n- SHA - Secure Hash Algorithm\n- PKCS - Public-Key Cryptography Standards\n\n---\n#### Create new Private Key and Certificate Signing Request\n```bash\nopenssl req -out domain.csr -newkey rsa:2048 -nodes -keyout domain.key\n```\n#### Create a Self-Signed Certificate\n```bash\nopenssl req -x509 -sha256 -nodes -newkey rsa:2048 -keyout selfsigned.key -out cert.pem\nopenssl req -x509 -sha256 -nodes -days 360 -newkey rsa:2048 -keyout selfsigned.key -out cert.pem\n```\n\n#### Verify CSR file\n```bash\nopenssl req -noout -text -in domain.csr\n```\n\n#### Create RSA Private Key\n```bash\nopenssl genrsa -out private.key 2048\n```\n\n#### Remove Passphrase from Key\n```bash\nopenssl rsa -in certkey.key -out nopassphrase.key\n```\n\n#### Verify Private Key\n```bash\nopenssl rsa -in certkey.key -check\n```\n\n#### Verify Certificate File\n```bash\nopenssl x509 -in certfile.pem -text -noout\n```\n\n#### Verify the Certificate Signer Authority\n```bash\nopenssl x509 -in certfile.pem -noout -issuer -issuer_hash\n```\n\n#### Check Hash Value of A Certificate\n```bash\nopenssl x509 -noout -hash -in domain.pem\n```\n\n#### Convert DER to PEM format\n```bash\nopenssl x509 -inform der -in sslcert.der -out sslcert.pem\n```\n\n#### Convert PEM to DER format\n```bash\nopenssl x509 -outform der -in sslcert.pem -out sslcert.der\n```\n\n#### Convert Certificate and Private Key to PKCS#12 format\n```bash\nopenssl pkcs12 -export -out sslcert.pfx -inkey key.pem -in sslcert.pem\n```\n\n#### Convert Certificate and Private Key to PKCS#12 format with chain\n```bash\nopenssl pkcs12 -export -out sslcert.pfx -inkey key.pem -in sslcert.pem -chain cacert.pem\n```\n\n#### Create CSR using an existing private key\n```bash\nopenssl req -out certificate.csr -key existing.key -new\n```\n\n#### Check contents of PKCS12 format cert\n```bash\nopenssl pkcs12 -info -nodes -in cert.p12\n```\n\n#### Convert PKCS12 format to PEM certificate\n```bash\nopenssl pkcs12 -in cert.p12 -out cert.pem\n```\n\n#### Test SSL certificate of particular URL\n```bash\nopenssl s_client -connect yoururl.com:443 -showcerts\n```\n\n#### Find out OpenSSL version\n```bash\nopenssl version\n```\n\n#### Check PEM File Certificate Expiration Date\n```bash\nopenssl x509 -noout -in certificate.pem -dates\n```\n\n#### Check Certificate Expiration Date of SSL URL\n```bash\nopenssl s_client -connect targeturl.com:443 2\u003e/dev/null | openssl x509 -noout -enddate\n```\n\n#### Check if SSL V2 or V3 is accepted on URL\n```bash\nopenssl s_client -connect targeturl.com:443 -ssl2\nopenssl s_client -connect targeturl.com:443 -ssl3\nopenssl s_client -connect targeturl.com:443 -tls1\nopenssl s_client -connect targeturl.com:443 -tls1_1\nopenssl s_client -connect targeturl.com:443 -tls1_2\n```\n\n#### Verify if the particular cipher is accepted on URL\n```bash\nopenssl s_client -cipher 'ECDHE-ECDSA-AES256-SHA' -connect targeturl:443\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintegration-it%2Fssl-cheat-sheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintegration-it%2Fssl-cheat-sheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintegration-it%2Fssl-cheat-sheet/lists"}