# Certificates Storage
Group of methods to generate, upload and delete x509 certificates.
WARNING
This section is applied to "dotnet" provider only!
# Generate x509 certificate
Method to generate new certificate. Certificate contains both private and public keys. Public key of generated certificate stores in the database and the certificate returns in response body.
POST /v1/encryption/dotnet/key
1
Body data:
| Parameter | Type | Description | Required | Possible values |
|---|---|---|---|---|
| alg | string | Encryption provider type | yes | specifications |
| keysize | int | Size of generated key | yes | 256, 512, 1024, 2048, 4096 |
| subject | string | Subject string | yes | CN=...value... |
| password | string | Password for generated certificate | no |
Body data sample:
{
"alg": "SHA256WithRSA",
"keysize": 4096,
"subject": "CN=justastring",
"password": "tstpwd"
}
1
2
3
4
5
6
2
3
4
5
6
The method returns requested provider, key id and generated certificate.
The result sample:
{
"provider":"dotnet",
"key":"08EEE20AA94557942CC928A8DB3D2EAC10B64383",
"certificate_pkcs12":"<byte array>"
}
1
2
3
4
5
2
3
4
5
# Upload x509 certificate
Method to upload user's X.509 certificate:
- without private key
- with keysize from 256 to 4096 and be multiple of 128
- DER encoded
PUT /v1/encryption/dotnet/key
1
Body should contain byte array of uploaded certificate.
The method returns requested provider and key id.
The result sample:
{
"provider":"dotnet",
"key":"08EEE20AA94557942CC928A8DB3D2EAC10B64383"
}
1
2
3
4
2
3
4
# Delete x509 certificate
Method to delete certificate by key id
DELETE /v1/encryption/dotnet/key?key_id=<key id>
1