{"id":22446797,"url":"https://github.com/firsttimeez/csr","last_synced_at":"2026-01-31T08:03:41.132Z","repository":{"id":264408488,"uuid":"893290504","full_name":"FirstTimeEZ/csr","owner":"FirstTimeEZ","description":"Generates a Certificate Signing Request (CSR) in DER format, encoded as base64url string, following the PKCS#10 specification.","archived":false,"fork":false,"pushed_at":"2024-12-15T02:23:16.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-17T06:09:26.924Z","etag":null,"topics":["acme","asn1","base64url","certificate-signing-request","csr","der","ecdsa","encoded","es256","es6","es6-modules","letsencrypt","pkcs10","pki","rfc2986"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/simple-csr-generator","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FirstTimeEZ.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-24T03:14:34.000Z","updated_at":"2024-12-13T16:35:17.000Z","dependencies_parsed_at":"2024-12-13T07:17:28.285Z","dependency_job_id":"822f507f-c520-4b92-8fc9-0d8d4222d494","html_url":"https://github.com/FirstTimeEZ/csr","commit_stats":null,"previous_names":["firsttimeez/csr"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/FirstTimeEZ/csr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FirstTimeEZ%2Fcsr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FirstTimeEZ%2Fcsr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FirstTimeEZ%2Fcsr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FirstTimeEZ%2Fcsr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FirstTimeEZ","download_url":"https://codeload.github.com/FirstTimeEZ/csr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FirstTimeEZ%2Fcsr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28934638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T07:49:44.436Z","status":"ssl_error","status_checked_at":"2026-01-31T07:49:34.274Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["acme","asn1","base64url","certificate-signing-request","csr","der","ecdsa","encoded","es256","es6","es6-modules","letsencrypt","pkcs10","pki","rfc2986"],"created_at":"2024-12-06T04:11:52.824Z","updated_at":"2026-01-31T08:03:41.116Z","avatar_url":"https://github.com/FirstTimeEZ.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Certificate Signing Request Generator (CSR)\n\nA robust and secure JavaScript library for generating Certificate Signing Requests (CSRs)\n\nThis library follows the `PKCS#10` specification and implements CSR generation with `SHA-256` signing.\n\n## Features\n\n- `PKCS#10` compliant implementation\n- `DNS` Subject Alternative Names (`SAN`)\n- `DER` encoding with `base64url` output format\n\n## Usage\n\n```javascript\nimport { generateCSRWithExistingKeys } from 'simple-csr-generator';\n\nasync function generateCSR(publicKeyES256, privateKeyES256) {\n    try {\n        const commonName = 'www.ssl.boats';\n        const dnsNames = [\"www.ssl.boats\", \"ssl.boats\"];\n\n        const csr = await generateCSRWithExistingKeys(commonName, publicKeyES256, privateKeyES256, dnsNames);\n                \n        console.log('Generated CSR:', csr);\n    } catch (error) {\n        console.error('Failed to generate CSR:', error);\n    }\n}\n```\n\n-----------------------\n\n## API Reference\n\n### generateCSRWithExistingKeys(commonName, publicKey, privateKey, dnsNames)\n\nGenerates a `SHA-256` Certificate Signing Request (CSR) in `DER` format, encoded as `base64url` string, following the `PKCS#10` specification.\n\n#### Parameters\n\n- `commonName` (string): The common name (`CN`) to be included in the `CSR` subject field.\n- `publicKey` (KeyObject): The public key to be included in the `CSR`.\n- `privateKey` (KeyObject): The private key that corresponds to the provided public key.\n- `dnsNames` (array): Array of DNS names to use for Subject Alternative Names (`SAN`)\n\n#### Returns\n\n- `Promise\u003cstring\u003e`: Base64URL-encoded `DER` format `CSR`\n\n-----------------------\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\nFor major changes, please open an issue first to discuss what you would like to change.\n\n## Acknowledgments\n\n- [`RFC 2986`](https://tools.ietf.org/html/rfc2986) - `PKCS #10`: Certification Request Syntax Specification\n\n---\n\nMade with ❤️ by `FirstTimeEZ`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirsttimeez%2Fcsr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirsttimeez%2Fcsr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirsttimeez%2Fcsr/lists"}