Skip to content

Commit a69cd82

Browse files
authored
Add CSR generation feature (#4)
2 parents 04a0991 + ff69863 commit a69cd82

17 files changed

+3865
-494
lines changed

README.md

+13-2
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,21 @@ To use the Zero SSL Client, you need to instantiate it with your ZeroSSL API tok
2727
import {ZeroSSL} from 'zerossl-client';
2828
const client = new ZeroSSL('your-api-token');
2929

30-
// Example usage: Creating a new SSL certificate
30+
// Generating a new CSR
31+
const csr = await client.generateCsr({
32+
common_name: "example.com",
33+
organization: "Example Inc",
34+
organizational_unit: "IT",
35+
locality: "San Francisco",
36+
state: "California",
37+
country: "US",
38+
39+
});
40+
41+
// Creating a new SSL certificate
3142
await client.createCertificate({
3243
certificate_domains: "example.com",
33-
certificate_csr: "<your-csr>",
44+
certificate_csr: csr,
3445
});
3546
```
3647

package.json

+13-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zerossl-client",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"description": "Unofficial Node client for Zero SSL",
55
"type": "module",
66
"main": "dist/index.js",
@@ -29,10 +29,19 @@
2929
},
3030
"homepage": "https://github.com/chrisllontop/zerossl#readme",
3131
"devDependencies": {
32-
"typescript": "^5.4.5"
32+
"@types/node-forge": "^1.3.11",
33+
"typescript": "^5.4.5",
34+
"xo": "^0.58.0"
3335
},
3436
"dependencies": {
35-
"axios": "^1.6.8"
37+
"axios": "^1.6.8",
38+
"node-forge": "^1.3.1"
3639
},
37-
"packageManager": "[email protected]"
40+
"packageManager": "[email protected]",
41+
"xo": {
42+
"rules": {
43+
"@typescript-eslint/naming-convention": "off",
44+
"import/extensions": "off"
45+
}
46+
}
3847
}

0 commit comments

Comments
 (0)