create_certificate
Create or import a certificate on pfSense by choosing import for existing PEM keys and certs or internal generation with key type, digest, and signing CA.
Instructions
Create or import a certificate on pfSense
Import and internal generation use different API endpoints with different
required fields, so this routes on method.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"method": "<method>",
"descr": "<descr>"
},
"name": "create_certificate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prv | No | PEM-encoded private key (required for import) | |
| cert | No | PEM-encoded certificate data (required for import) | |
| type | No | Certificate type — "server", "user", etc. | |
| caref | No | Reference ID of the signing CA (for internal generation) | |
| descr | Yes | Descriptive name for the certificate | |
| ecname | No | Elliptic curve name, e.g. "prime256v1" (required for ECDSA generation) | |
| keylen | No | Key length in bits, e.g. 2048, 4096 (required for RSA generation) | |
| method | Yes | Creation method — "import" to import existing, "internal" to generate internally | |
| dn_city | No | Distinguished name — City or Locality | |
| keytype | No | Key type — "RSA" or "ECDSA" (required for internal generation) | |
| dn_state | No | Distinguished name — State or Province | |
| lifetime | No | Certificate lifetime in days | |
| digest_alg | No | Digest algorithm — sha256, sha384, sha512 (required for generation) | |
| dn_country | No | Distinguished name — Country code (2 letter) | |
| dn_commonname | No | Distinguished name — Common Name (required for generation) | |
| dn_organization | No | Distinguished name — Organization |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||