RFC 5280, draft-nourse-scep-22
Certificate manager is used to collect all certificates inside router, to manage and create serlf-signed certificates and to control and set SCEP related configuration.
Starting from v6rc10, CRL will be automatically renewed every hour for certificates which have "trusted=yes" using http protocol (ldap and ftp is currently unsupported). Segmented CRL is also currently unsupported.
|decrypted-private-key (yes | no)||Whether private key is decrypted|
|dsa (yes | no)|
|invalid-after (date)||The date after which certificate wil be invalid.|
|invalid-before (date)||The date before which certificate is invalid.|
|name (string)||Name of the certificate. Name can be edited.|
|private-key (yes | no)|
|rsa (yes | no)|
|trusted (yes | no)||If set to yes certificate is included "in trusted certificate chain"|
|create-certificate-request ()||Creates certificate request file and key.|
|decrypt ()||Decrypt private key.|
|import (file-name)||File name of certificate or key to be imported.|
|reset-certificate-cache ()||Resets certificate cache after this private keys must be decrypted.|
Self-Signed CA Management
Starting from RouterOS version 6 it is possible to manage and create self-signed CAs. It is not possible to import self signed CAs here. Implementation was made based on RFC 5280 and all certificates are X.509 v3.
All certificate fingerprints are SHA1. All private keys and CA export passphrase are stored encrypted with hardware ID. CRL renewal happens at every certificate revocation and after 24hours.
|expired (yes | no)||Whether CA is expired.|
|invalid-after (date)||The date after which CA wil be invalid.|
|invalid-before (date)||The date before which CA is invalid.|
|name (string)||Name of the certificate. Name can be edited.|
|self-signed (yes | no)||Whether CA is self signed|
|create-self-signed-ca ()||Creates self signed CA and generates key. Required extensions are export passphrase (which is used to protect private key when user tries to export it), validity period and IP address.|
|export (name or number of cert)||Exports certificate and private key which is encrypted with provided passphrase.|
|remove (name or number of cert)||Remove specified CA and all linked certificates.|
/certificate ca certificate
|ca (string)||Name of the CA certificate stored in Self-Signed CAs menu|
|expired (yes | no)||Whether certificate is expired|
|invalid-after (date)||Date after which certificate will be invalid|
|invalid-before (date)||Date before which certificate is invalid|
|revoked (date)||Date and time when certificate was revoked|
|create-certificate ()||Generate certificate and key assigned from specified CA. User manually provides standard certificate parameters.|
|sign-certificate-request (ca, days-valid, file-name, key-bits)||Generates certificate and key, except that standard parameters are taken from certificate request. Command takes four parameters:
|revoke (name or number of cert)||Certificate can't be deleted. You can only revoke it. After revoke is executed certificate is added to CRL and CRL is renewed.|
|export (name or number of cert)||Export certificate and private key. Difference from CA export is that private key is protected with passphrase specified during the export process. Everyone ho has rights to export can access private keys.|
Simple Certificate Enrollment protocol (SCEP) was developed based on draft-nourse-scep-22.
The protocol is designed so that any user can request certificate as simple as possible. The protocol allows to issue and revoke certificates.
How SCEP works
Topology: CL ---- RA ---- CA
- CL - client
- RA - registration authority (proxy)
- CA - certification authority (server)
SCEP is using HTTP protocol and base64 encoded GET requests. Most of requests are without authentication and cipher, however important ones can be protected if necessary (ciphered or signed using received public key).
SCEP client in RouterOS will:
- get CA certificate from CA server or RA (if used);
- user should compare fingerprint of the CA certificate or if it comes from the right server;
- generate self-signed certificate with temporary key;
- sends certificate request to the server;
- if server respond with status x, then client keeps requesting until server sends an error or approval.
SCEP server supports issue of one certificate only. RouterOS supports also renew and next-ca options:
- renew - possibility to renew old certificate automatically with the same CA.
- next-ca - possibility to change current CA certificate to the new one. Client polls the server for any changes, if server advertise that next-ca is available, then client may request next CA or wait until CA almost expires and then request next-ca.
RouterOS Server also supports POST' operation, 3DES cipher and SHA1 hashing. If client does not support these features then http GET, DES cipher and MD5 hashing is used.
RouterOS client by default will try to use POST, 3DES and SHA1 if server advertises that.
/certificate scep client
|ca-identity (string; Default: DummyCAIdentity)|
|challenge-password (string; Default: "")||OTP password on the server used to grant certificate automatically after request.|
|common-name (string; Default: )|
|country (string; Default: )|
|disabled (yes | no; Default: no)|
|email (string; Default: )|
|fingerprint-algorithm (md5 | sha1; Default: sha1)|
|key-bits (1024 | 2048 | 4096; Default: 1024)|
|locality (string; Default: )|
|name (string; Default: )||Short descriptive name of an item|
|organziation (string; Default: )|
|path (string; Default: )||Path of certificate located on the server. If server is RouterOS then you should add "scep/"+path since certificates on server are stored in "scep" dir.|
|serial-number (string; Default: )|
|server (IP | IPv6; Default: )||IP or IPv6 address of the SCEP server|
|state (string; Default: )|
|store-name (string; Default: )||Name of the certificate which will be used after importing into certificate store.|
|unit (string; Default: )|
|status (string)||Shows the current status of the client. Idle, pending, requesting etc.|
|renew (ca_client_name)||Renew Ca certificate of specified CA client Name.|
/certificate scep server
/certificate scep server otp
/certificate scep server transactions