ssl — format of ssl component configuration
General syntax rules of Kernun Firewall configuration files are described in configuration(7). This man page describes types, sections and items specific for the ssl component configuration.
Repeatable sections/items are marked by
the '*' before section/item name.
Configuration directives have attributes of several value-types. For the basic types description, see configuration(7).
Enumeration is a list of words (names) representing integer values. Some enumerations accept both names and direct integer values; in this case, enumeration description contains values for every name (in parenthesis next to name). For other enumerations, using of names is obligatory.
The following enumerations are used in ssl configuration directives:
enabling (see common(5))yes-no (see common(5))ssl-ver (name-usage obligatory)SSL/TLS protocol versions.
SSLv3SSL version 3
TLSv1TLS version 1
TLSv1-1TLS version 1.1
TLSv1-2TLS version 1.2
extension-op (name-usage obligatory)Certificate Extensions Operations.
keep, remove
veri-fail-action (name-usage obligatory)Certificate verification failure actions.
ignoreVerification status is absolutely ignored. UNRECOMMENDED OPTION.
passVerification status is ignored, the certificate used on the client side is signed by a special, untrusted CA, however. Thus, the final decision is passed to the client.
errorThe client side connection is established with fully trusted certificate and then the proxy sends a user readable error message.
failThe connection establishing fails.
auth-cert-type (name-usage obligatory)Authorized certificate store type.
kernun-distCertificate list from Kernun distribution
fileOwn certificate list in PEM file
dirOwn directory with PEM certificate files
distrusted-cert-type (name-usage obligatory)Distrusted (blacklist) certificate store type.
kernun-distCertificate list from Kernun distribution
fileOwn certificate list in PEM file
noneNo distrusted certificates are used
Configuration of ssl library component consists of following prototypes:
ssl-session-cache { ... }
* fake-cert name { ... }
* ssl-params name { ... }
* ssl-cert-match ... ;
ssl-session-cache {
capacity ... ;
dir ... ;
lock ... ;
}
Cache of active SSL/TLS sessions usable for session resumption.
Item DIR (session cache directory) must be set.
capacity [server [client]];Maximum number of sessions in the cache.
server (type: uint16, optional, default: 0)sessions in which proxy on server side
client (type: uint16, optional, default: 0)sessions in which proxy on client side
dir val;Directory used to store files with session information.
val (type: str)lock [path];Lock for exclusive access to the cache.
path (type: str, optional, default: <NULL>)If set to directory, file in that directory is created with name PREFIX.PID.XXXXXX, where PREFIX is a string defined by the proxy, PID is the proxy parent process ID and X is a random suffix. If not set, directory /tmp is assumed. Automatic generation of lock file name is strongly recommended, because each lock must have a unique name.
[End of section ssl-session-cache description.]
fake-cert name {
key ... ;
auth-ca ... ;
fail-ca ... ;
* extension ... ;
purge ... ;
}
Server certificate faking parameters.
This section defines parameters of certificates generated by proxies when SSL inspection is turned on. The new certificate contains a copy of important attributes from the original server certificate, it is signed by a trusted Kernun CA and stored into a certificate cache (file with name /data/fake-cert/<SECTION>/<VER><FINGERPRINT>.<NUM> where:
- <SECTION> is the FAKE-CERT section name
- <FINGERPRINT> is the certificate fingerprint
- <VER> is certificate verification status
- <NUM> is certificate distinguishing number.
The verification status reflects result of the original certificate verification - for trusted ones, the 'C' is used, while otherwise the 'F' is used.
Private key used in faked certificates (KEY) must be set.
Trusted certification authority (AUTH-CA) must be set.
key private-key;Private key used in faked certificates.
private-key (type: name of shared-file, see common(5))auth-ca private-key certificate;Private key and certificate of trusted CA.
This certificate and key are used as issuer identity for new certificates made from properly verified server ones.
fail-ca private-key certificate;Private key and certificate of untrusted CA.
This certificate and key are used as issuer identity for new certificates made from untrusted server ones.
If this item is not used, faking attempts for untrusted certificates leads to the fatal error.
extension op [names];Faked certificate Extensions handling.
The new certificate contains all attributes of the original certificate, by default. Copying of some X.509 Extensions could cause problem, so handling of them can be managed by this item. Namely, following Extensions are removed by default, if not stated otherwise in the configuration:
- X509v3 Authority Key Identifier
- Authority Information Access.
op (type: extension-op)names (type: str-set, optional, default: *)purge [days];days (type: uint16, optional, default: 7)Day limit - certificates unaccessed for this time are purged.
[End of section fake-cert description.]
ssl-params name {
versions ... ;
ciphers ... ;
tcp-eof ... ;
id ... ;
* auth-cert ... ;
distrusted-certs ... ;
dont-check-crl ... ;
* crl ... ;
verify-peer ... ;
cache-timeout ... ;
use-ticket ... ;
enable-renegotiation ... ;
fake-cert ... ;
prefer_server_ciphers ... ;
enable-ecdh ... ;
}
SSL parameters.
ID and FAKE-CERT are mutually exclusive.
versions ver;SSL/TLS protocol versions supported.
If omitted, only TLSv1.2 protocol is supported.
ver (type: ssl-ver-set)ciphers [val];List of permitted ciphers, see ciphers(1).
val (type: str, optional, default: "ALL:!MEDIUM:!LOW:!RC4:!DES:!3DES:!SEED:!IDEA:!NULL:!eNULL:!aNULL:!ADH")tcp-eof [val];Treat closing TCP connection without previous close notify as correct session termination and not a protocol violation.
val (type: yes-no, optional, default: yes)id private-key certificate;Private key and certificate.
The certificate should also contain certificates of intermediate certification authorities, if there are any. It should not contain the certificate of the root certification authority however.
auth-cert kernun-dist;auth-cert file file;auth-cert dir dir;Certificates of trusted certification authorities.
This item should usually contain only certificates of root certification authorities.
distrusted-certs kernun-dist;distrusted-certs file file;distrusted-certs none;Distrusted certificates. Certificates listed in this item are considered as a "blacklist" when verifying the certificate. If any of the certificates that build up the certificate chain is listed in DISTRUSTED-CERTIFICATES, the verification is evaluated false.
distrusted-cert-type)Certificate source type.
file (type: name of shared-file, see common(5))file with distrusted certificates
dont-check-crl;Do not check CRL validity when verifying certificates.
crl [missing] file;Certification revocation list (loaded once during proxy startup).
missing (type: key, optional)CRL may be missing
file (type: name of shared-file, see common(5))verify-peer disable;verify-peer [enable] [allow-no-cert];Peer verification request.
SSL/TLS handshake fails if peer does not send a certificate or it sends a certificate that cannot be verified. Client does not send a certificate until it is requested by VERIFY-PEER. Omitting this item has the same meaning as using with the DISABLE keyword.
enabling, optional, default: enable)allow-no-cert (type: key, optional)Allow clients which do not present a certificate.
cache-timeout [sec];Maximum time since a session creation when the session can be resumed. After this time, no new connections may be established in the same session, although the existing connection can continue. Setting this to zero disables session resumption.
sec (type: uint32, optional, default: 0)use-ticket [val];Normally clients and servers will, where possible, transparently make use of RFC4507bis tickets for stateless session resumption. If this option is set to 0, this functionality is disabled and tickets will not be used by client or server.
val (type: yes-no, optional, default: yes)enable-renegotiation;Permits session renegotiation. Do not enable this unless you understand all related negative security consequences!
fake-cert faking action;Server certificate faking parameters.
If this section is used, the proxy generates a faked certificate of each server for the client connection, instead of using a fixed one.
faking (type: name of fake-cert, see above)Faking parameters
action (type: veri-fail-action)Reaction when server certificate verification fails.
prefer_server_ciphers [val];Set on servers to choose the cipher according to the server's preferences
val (type: yes-no, optional, default: yes)enable-ecdh [val];Enable or disable ephemeral ECDH
val (type: yes-no, optional, default: yes)[End of section ssl-params description.]
ssl-cert-match [subject subject] [issuer issuer];Matching values from SSL certificate. If not used, peer need not present a cerficate or the client certificate need not be verified correctly. If used, peer must send a valid certificate and its content must match.
subject subject (type: str-set, optional, default: *)acceptable certificate subjects
issuer issuer (type: str-set, optional, default: *)acceptable certificate issuers