2. Certificate Signing Request
Create key
POST: /v1/key
Description: Create sub-key request.
- Swagger
- CURL
{
"label": "sub_certificate_key",
"password": null,
"algorithm": "RSA",
"keySize": 4096,
"attributes": {
"decrypt": false,
"sign": true,
"unwrap": false,
"extractable": false,
"modifiable": true,
"destroyable": true,
},
"policy": null
}
curl -X POST -H "X-API-KEY: tsb-x-token_68..." -H "Content-Type: application/json" \
https://integration-test.cloudshsm.com/v1/key -d '{
"label": "sub_certificate_key",
"password": null,
"algorithm": "RSA",
"keySize": 4096,
"attributes": {
"decrypt": false,
"sign": true,
"unwrap": false,
"extractable": false,
"modifiable": true,
"destroyable": true
},
"policy": null
}'
Create a CSR
POST: /v1/certificate/synchronous/request
Description: Creates a certificate signing request (CSR) to be signed by a Root or intermediate-CA.
- Swagger
- CURL
{
"signKeyName": "sub_certificate_key",
"keyPassword": null,
"signatureAlgorithm": "SHA256_WITH_RSA",
"validity": 365,
"standardCertificateAttributes": {
"commonName": "SUB-Securosys-001",
"country": "CH",
"stateOrProvinceName": "Zurich",
"locality": "Zurich",
"organizationName": "Securosys SA",
"organizationUnitName": "Operations",
"email": null,
"title": null,
"surname": null,
"givenName": null,
"initials": null,
"pseudonym": null,
"generationQualifier": null
},
"keyUsage": [
"DIGITAL_SIGNATURE"
],
"extendedKeyUsage": [
"ANY_EXTENDED_KEY_USAGE"
]
}
curl -X POST -H "X-API-KEY: tsb-x-token_03..." -H "Content-Type: application/json" \
https://integration-test.cloudshsm.com/v1/certificate/synchronous/request -d '{
"signKeyName": "sub_certificate_key",
"keyPassword": null,
"signatureAlgorithm": "SHA256_WITH_RSA",
"validity": 365,
"standardCertificateAttributes": {
"commonName": "SUB-Securosys-001",
"country": "CH",
"stateOrProvinceName": "Zurich",
"locality": "Zurich",
"organizationName": "Securosys SA",
"organizationIdentifier": "CHE-464.234.583 MWST",
"organizationUnitName": "Operations",
},
"keyUsage": [
"DIGITAL_SIGNATURE"
],
"extendedKeyUsage": [
"ANY_EXTENDED_KEY_USAGE"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