TLS_CAFile
and
TLS_CAPath
, depends on the TLS library Radiator uses.
This is typically OpenSSL but can be LibreSSL or any other TLS library
that works with Net::SSLeay Perl module. For more information about
Net::SSLeay and OpenSSL, see Section 2.1.6. Net::SSLeay and OpenSSL.TLS_Protocols
forces SSL or TLS for the
configuration clause and specifies a comma-separated list of SSL and TLS
protocols that are permissible for SSL and TLS connections. Currently, the
supported SSL and TLS protocols are:TLS_Protocols
overrides
UseSSL
and UseTLS
. Otherwise
UseSSL
and UseTLS
control the
allowed protocols, if set. TLS_Protocols
is not set
by default.TLS_Protocols
:# Allow connections with these TLS versions only TLS_Protocols TLSv1.1, TLSv1.2
TLS_CAFile
then in
TLS_CAPath
, so there usually is no need to set
both.TLS_CAFile
then in TLS_CAPath
,
so there usually is no need to set the both. When Certificate Revocation
List (CRL) checks are enabled, this directory is also used by TLS library
to look for CRL files.rehash
that creates a symbolic link or a copy of file
with the special file name. OpenSSL also comes with an separate tool
called c_rehash
that does the similar job. LibreSSL has
a built-in command certhash
to create symbolic
links.cafile.pem
can not be
used.% ls -la drwxr-xr-x 5 mikem staff 160 Dec 20 13:09 . drwxr-xr-x 97 mikem staff 3104 Dec 20 12:59 .. -rw-r--r-- 1 mikem staff 9957 Dec 20 13:09 cas.pem -rw-r--r-- 1 mikem staff 2383 Dec 20 13:02 root-CA-crl.pem -rw-r--r-- 1 mikem staff 4992 Dec 20 12:59 root-CA-crt.pem % openssl version OpenSSL 3.0.5 5 Jul 2022 (Library: OpenSSL 3.0.5 5 Jul 2022) % openssl rehash -v . Doing . rehash: warning: skipping cas.pem,it does not contain exactly one certificate or CRL link root-CA-crt.pem -> 322a67d3.0 link root-CA-crl.pem -> 322a67d3.r0 % ls -la drwxr-xr-x 7 mikem staff 224 Dec 20 13:17 . drwxr-xr-x 97 mikem staff 3104 Dec 20 12:59 .. lrwxr-xr-x 1 mikem staff 15 Dec 20 13:17 322a67d3.0 -> root-CA-crt.pem lrwxr-xr-x 1 mikem staff 15 Dec 20 13:17 322a67d3.r0 -> root-CA-crl.pem -rw-r--r-- 1 mikem staff 9957 Dec 20 13:09 cas.pem -rw-r--r-- 1 mikem staff 2383 Dec 20 13:02 root-CA-crl.pem -rw-r--r-- 1 mikem staff 4992 Dec 20 12:59 root-CA-crt.pem
TLS_CertificateType
parameter. The certificate
file can also contain the certificate's private key if the
TLS_PrivateKeyFile
parameter specifies the same
file.TLS_CertificateFile
for explicitly
constructing the certificate chain, which is sent to the peer in addition
to the Radiator's own certificate.TLS_CertificateFile
. Permitted options
are:PEM
ASN1
ASN1
.TLS_CertificateFile
. It is sometimes in the same
file as the TLS_CertificateFile
. Usually the private
key is encrypted, use TLS_PrivateKeyPassword
is the
key to decrypt it. For more information, see Section 3.11.4. TLS_CertificateFile and Section 3.11.8. TLS_PrivateKeyPassword.TLS_PrivateKeyFile
. Special characters are
permitted.TLS_Ciphers
specifies which subset of
cipher suites is permissible for a connection when TLSv1.2 or earlier is
negotiated. The parameter format is the cipher list format documented in
OpenSSL manual for openssl ciphers
command. The
default value is DEFAULT:!EXPORT:!LOW
.# Exclude cipher suites using RC4 too TLS_Ciphers DEFAULT:!EXPORT:!LOW:!RC4
# System default level 2 is too strict for this module TLS_Ciphers DEFAULT:!EXPORT:!LOW@SECLEVEL=1
TLS_Ciphersuites
specifies which subset
of TLSv1.3 cipher suites is permissible for a connection. The parameter
format is documented in OpenSSL manual for
SSL_CTX_set_ciphersuites()
API function. For example:
TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256
.
Usually there is no need to set this parameter. There is no default and
the system default is used.# This cipher suite is mandatory for TLSv1.3 TLS_Ciphersuites TLS_AES_128_GCM_SHA256
TLS_SecurityLevel
is an integer parameter
that sets the SSL library security level for the enclosing clause.
Security levels were added in OpenSSL 1.1.0 and are detailed in OpenSSL
manual page SSL_CTX_set_security_level
. There is no
default and the system default is used. This parameter may be needed if
you see unexpected TLS errors with older TLS peers.TLS_SecurityLevel
is not needed. For more
information, see Section 3.11.9. TLS_Ciphers# The default pn this system, 2, is too strict for our peers, # lower it for this Radiator module TLS_SecurityLevel 1
TLS_CAFile
or TLS_CAPath
, and
other TLS configuration parameters, such as
TLS_ExpectedPeerName
and
TLS_SubjectAltNameURI
.TLS_RequireClientCert
is enabled by
default for ServerRADSEC.TLS_Verify
is an optional string
parameter which is available only for TLS clients. It specifies whether
the client clause requires the server to present a valid server
certificate during TLS handshake or not. The default is to require and
verify the server certificate. If the server certificate is not a valid
certificate, the TLS handshake fails and the TCP or SCTP connection is
disconnected. Certificate validity is determined by the root certificates
that are configured for the client clause with
TLS_CAFile
or TLS_CAPath
, and
other TLS configuration parameters, such as
TLS_ExpectedPeerName
and
TLS_SubjectAltNameURI
.TLS_Verify
is set to value none
, the
server certificate is not verified. This may be useful during testing but
it's not recommended for production configurations. Here is an example of
using TLS_Verify
:<AuthBy REST> # TLS and other parameters # While testing, skip certificate validation TLS_Verify none # More parameters </AuthBy>
# Curves often have multiple aliases. Need OpenSSL name here. # openssl ecparam -list_curves TLS_ECDH_Curve prime256v1
TLS_RequireClientCert
, this optional flag parameter
specifies that Certificate Revocation List (CRL) must be checked for
revoked certificates during validation of the peer
certificate.TLS_CRLFile
parameter, similar to base CRL
files.TLS_CRLCheckUseDeltas
is currently
experimental.TLS_CRLCheckUseDeltas
, note the following
requirements and restrictions:TLS_CRLCheck
must be enabled in Radiator
configurationTLS_CRLCheckUseDeltas
TLS_CRLFile
.TLS_CRLCheck
must be enabled for any certificate checks to happen.TLS_RequireClientCert
.TLS_CRLCheck
.TLS_CRLCheckAll
is enabled.TLS_CAPath
directory. Setting up this directory is
described in Section 3.11.3. TLS_CAPath. In this case
you do not need to configure TLS_CRLFile
.EAPTLS_CRLFile
parameters. The intended
way CRL reloading works is this: Each CRL file named with
TLS_CRLFile
will be automatically reloaded and reread
at the start of each new TLS session if the modification date of the named
CRL file has changed since the last time it was loaded. If the CRL for a
particular issuer changes, it is sufficient to replace the existing CRL
file with the newer version and Radiator will reload the new CRL when
required.TLS_CRLFile %D/crls/revocations-*.pem
Net::SSLeay
1.37 module or later. This
parameter may be used for additional certificate validity checks, for
example, with RadSec. # Require just one policy TLS_PolicyOID 1.3.6.1.4.1.9048.33.2
.+
which means to accept any
Subject.<AuthBy RADSEC>
,
for the details.TLS_ExpectedPeerName
:# Accept certificates with CN ending in .xyz.com TLS_ExpectedPeerName CN=.*\.xyz\.com
subjectAltName
of type URI in the peer
certificate.subjectAltName
checks are done.<AuthBy RADSEC>
, for the details. TLS_SubjectAltNameURI
:# Accept certificates that have a subjectAltName type URI that # ends in open.com.au: TLS_SubjectAltNameURI .*open.com.au
subjectAltNameDNS
of type DNS in that
certificate. Currently, this is not a regular expression but this is
subject to change.subjectAltName
extension of
type IPADDR or DNS that matches the Host name used to connect to the
server. When subjectAltNameDNS
is configured, type
DNS values are checked against the value configured with
subjectAltNameDNS
. This parameter has no default
value. TLS_SubjectAltNameDNS
:# Host is set to an IP address so we set the expected name here TLS_SubjectAltNameDNS test.server.open.com.au
TLS_CertificateFingerprint
. When a
TLS peer presents a certificate, this optional parameter specifies one or
more fingerprints, one of which must match the fingerprint of the peer
certificate. The format is algorithm:fingerprint
. No
fingerprint checks are done by default. Using this parameter requires
Net::SSLeay 1.37 or later.TLS_CertificateFingerprint
:TLS_CertificateFingerprint \ sha-1:8E:94:50:0E:2F:D6:DE:16:1D:84:76:FE:2F:14:33:2D:AC:57:04:FF TLS_CertificateFingerprint \ sha-1:E1:2D:53:2B:7C:6B:8A:29:A2:76:C8:64:36:0B:08:4B:7A:F1:9E:9D TLS_CertificateFingerprint \ sha-256:EC:14:77:FA:33:AD:2C:20:FF:D2:C8:1C:46:31:73:04:28:9E:ED:\ 12:D7:8E:79:A0:24:C0:DE:0B:88:A9:DB:3C TLS_CertificateFingerprint md5:2A:2D:F1:44:40:81:22:D4:60:6D:9A:B0:F4:BF:DD:24
ServerRADSEC
.$_[0]
: $hostname
, for
servers, such as ServerRADSEC
, the peer's IP
address$_[1]
: $x509_store_ctx
,
the OpenSSL store context (you can pass this to
Net::SSLeay::X509_STORE_CTX_get_current_cert)$_[2]
: $cert
, the
current certificate, result of
Net::SSLeay::X509_STORE_CTX_get_current_cert($x509_store_ctx)$_[3]
: $subject_name
,
the certificates subject name, result of
Net::SSLeay::X509_get_subject_name($cert)$_[4]
: $subject
, the
certificate subject, result of
Net::SSLeay::X509_NAME_oneline($subject_name)$_[5]
: $object
, the
Stream object created for this connection<ServerRADSEC> ... # Accept immediately all certificates with O='OSC Demo Certificates' TLS_CertificateVerifyHook sub { my $subject = $_[4]; \ my ($org) = $subject =~ /O=([^\/]*)/; \ return unless $org eq 'OSC Demo Certificates'; return 0; } </ServerRADSEC>
$cert
is not always present. An example
of such case is a policy OID mismatch .ServerRADSEC
.TLS_CertificateVerifyFailedHook
is passed the following arguments:$_[0]: $verify_error
$_[1]: $x509_store_ctx
$_[2]: $cert
$_[3]: $subject_name
$cert
is undefined.$_[4]: $subject
$cert
is
undefined.$_[5]: $object
TLS_CertificateVerifyFailedHook
must return
a single value. This value is used as an OpenSSL error code to set the
verify result code as follows:X509_V_ERR_APPLICATION_VERIFICATION
.TLS_CertificateVerifyFailedHook
.<ServerRADSEC> ... # Accept all certificates # TLS_CertificateVerifyFailedHook sub { return 0; } # Allow expired certificates: 10 is X509_V_ERR_CERT_HAS_EXPIRED TLS_CertificateVerifyFailedHook sub { \ if ($_[0] == 10) { return 0; } else { return $_[0]; } } </ServerRADSEC>
TLS_SRVName
is intended for use by
<AuthBy RADSEC>
and <AuthBy
DNSROAM>
to specify a DNS SRV Name that is matched against
possible SubjectAltName:SRV extensions in the peer certificate. If
TLS_SRVName
is specified and the peer certificate
contains SubjectAltName:SRV extensions, none of which match
TLS_SRVName
, the certificate is not
accepted._service._transport.name
(this
is the same format SRV names appear in DNS records). Only service and name
are matched.TLS_SRVName _radsec._tcp.example.com
certs/
in the
default OpenSSL directory. Use SSL_CERT_DIR environment
variable to override the default location. The default CA certificate file
is cert.pm
in the default OpenSSL directory. Use
SSL_CERT_FILE environment variable to override the
default file name.TLS_RequireClientCert
. LWP::UserAgent
and HTTP::Request
Perl modules.TLS_OCSPStapling
,
Net::SSLeay 1.82 or later is required.LWP::UserAgent
and
HTTP::Request
Perl modules.TLS_OCSPStapling
does not require that
TSL_OCSPCheck
is set, but the same requirements apply
when you use only TLS_OCSPStapling
. See the
requirements list in Section 3.11.32. TLS_OCSPCheck.TLS_OCSPStrict
is set, the
certificate check must be successful in all phases. Here are some examples
when the certificate check fails if TLS_OCSPStrict
is
set:TLS_OCSPURI
is not set and the certificate
does not have OCSP URI.1200
, that is 20 minutes.1000
.# Enable when debugging, remove when in production TLS_KeylogFilename %L/radsec-keylog
TLS_TraceState
is a flag parameter that
turns on TLS state tracing for TLS-based Stream modules, such as AuthBy
RADSEC, ServerRADSEC and HTTP Client. This may be useful for additional
debugging of TLS handshake processing. TLS_TraceState
is not set by default.Net::SSLeay
1.92 and later automatically enables TLS
handshake message logging when log level is set to DEBUG or higher with
Trace or
PacketTrace
parameter. When TLS message logging is enabled, TLS state tracing can also
be enabled by setting TLS_TraceState
. TLS state and
messaging logging contain similar information and in most cases it's not
useful have them both enabled.TLS_TraceState
:# Turn on TLS state tracing for this ServerRADSEC TLS_TraceState
TLS_*
parameters are available for use. For
compliance with RFC 6614, it is enabled by default for RadSec clauses and
<AuthBy DNSROAM>
.UseTLS
:UseTLS
TLS_*
parameters become available for
use.UseSSL
is obsolete and
use of SSLv3 is strongly discouraged. For more information about the
current preferred methods of setting up TLS versions and parameters, see
Section 3.11.1. TLS_Protocols and Section 3.11.9. TLS_Ciphers.UseSSL
:UseSSL