{"id":17286362,"url":"https://github.com/jornane/csrgen","last_synced_at":"2025-07-14T15:07:42.429Z","repository":{"id":142715006,"uuid":"12663870","full_name":"jornane/csrgen","owner":"jornane","description":"Bash script to batch generate certificate signing requests (CSRs) with provided common and alternative names","archived":false,"fork":false,"pushed_at":"2014-12-15T09:58:39.000Z","size":200,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-25T21:40:39.683Z","etag":null,"topics":["certificate","csr","letsencrypt","letsencrypt-utils","shell","x509"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jornane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-07T11:27:16.000Z","updated_at":"2024-01-15T07:19:19.000Z","dependencies_parsed_at":"2023-05-06T12:32:00.930Z","dependency_job_id":null,"html_url":"https://github.com/jornane/csrgen","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jornane/csrgen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jornane%2Fcsrgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jornane%2Fcsrgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jornane%2Fcsrgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jornane%2Fcsrgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jornane","download_url":"https://codeload.github.com/jornane/csrgen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jornane%2Fcsrgen/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265311871,"owners_count":23745161,"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":["certificate","csr","letsencrypt","letsencrypt-utils","shell","x509"],"created_at":"2024-10-15T09:59:03.372Z","updated_at":"2025-07-14T15:07:42.391Z","avatar_url":"https://github.com/jornane.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Batch CSR generator\nGenerate certificate signing requests in batch.\nRequires input with hostnames with one hostname per line.\nEmpty line means new signing request.\nRead `EXAMPLE.csrgen` for more information.\nInput can be provided as stdin or by providing the filename as argument.\n\nComes with a basic openssl.conf included for your convenience.\n\n## Useful commands\nIn the following commands, you must replace the variables with the filename.\nAll files end with .pem and start with the same string as the variable, but in lowercase.\n\nSo, for example, `${CSR_FILE}` will become `csr-example.com.pem`.\n\n### Verify CSR\n```bash\nopenssl req -noout -text -verify -in \"${CSR_FILE}\"\n```\n\nTakes a csr file and gives readable detailed output.\nSearch for *Subject:* and *X509v3 Subject Alternative Name:*\n\n### Generate .tgz with all requests\n```bash\ntar zc */csr-*.pem \u003e csrs.tgz\n```\n\nWhen run from the same directory where you ran csrgen from,\nthis will generate a csrs.tgz in the current directory.\nThe resulting file will contain all csr files.\n\n### Generate self-signed certificate (to use while you wait for the officially signed ones to arrive)\n```bash\nopenssl x509 -req -days 30 -in \"${CSR_FILE}\" -signkey \"${KEY_FILE}\" -out \"${CERT_FILE}\"\n```\n\nThis will give you a certificate file which is valid for one month.\nThat should be plenty of time to wait for the real deal.\nIf you think you will need more time, you can change the `-days 30` parameter to something bigger.\n\nAlternatively, you can make a self-signed certificate without a CSR.\n```bash\nopenssl req -x509 -new -key \"${KEY_FILE}\" -out \"${CERT_FILE}\"\n```\n\n### Verify signed certificate (for when you get them back)\n```bash\nopenssl x509 -text -noout -in \"${CERT_FILE}\"\n```\n\nTakes a signed certificate and shows detailed readable contents.\n\n### Convert to p12\n```bash\nopenssl pkcs12 -export -out \"${OUT_FILE}\" -inkey \"${KEY_FILE}\" -in \"${CERT_FILE}\" -certfile \"${CHAIN_FILE}\"`\n```\n\nTakes private key, certificate and chain and generates a .p12 file which will contain them all.\nThis is useful for using the certificate in systems which require .p12, such as Windows Server.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjornane%2Fcsrgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjornane%2Fcsrgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjornane%2Fcsrgen/lists"}