create_cert
Generate a public/private certificate key pair for AS2. Produces .pfx (private key) and .cer (public certificate) to secure message exchange.
Instructions
Create a public/private certificate key pair. IMPORTANT: All 4 required parameters (filename, commonName, serialnumber, password) must be provided. Use a unique serial number like a timestamp or random number.
This generates TWO files from a single filename (e.g., 'MyCert.pfx'):
MyCert.pfx — contains the private key. Use this for as2:signingkeypath and as2:privatekeypath in the AS2 profile.
MyCert.cer — contains the public certificate only. Use this for as2:publickeypath in the AS2 profile, and share it with trading partners so they can encrypt messages to you.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| No | Optional: Email address | ||
| state | No | Optional: The state/province | |
| country | No | Optional: The country code (e.g., 'US', 'GB') | |
| keySize | No | Optional: The key size (default: '2048') | |
| filename | Yes | REQUIRED: The certificate filename (e.g., 'mycert.pfx' or 'partner_cert.p12') | |
| locality | No | Optional: The locality/city | |
| password | Yes | REQUIRED: The password to protect the private key. Generate a secure password if not provided by user. | |
| commonName | Yes | REQUIRED: The common name for the certificate (e.g., the AS2 identifier or organization name) | |
| expiration | No | Optional: Expiration in years (default: '1') | |
| organization | No | Optional: The organization name | |
| serialnumber | Yes | REQUIRED: The serial number for the certificate. Must be a decimal number (e.g., '123456') or hexadecimal prefixed with '0x' (e.g., '0x1FE2A3B4'). Generate a random 6-8 digit decimal number (e.g., between 100000 and 99999999) or use hex format. | |
| publicKeyType | No | Optional: The public key type (default: 'X.509') | |
| organizationalUnit | No | Optional: The organizational unit | |
| signatureAlgorithm | No | Optional: The signature algorithm (default: 'SHA256') |