| Did you know ... | Search Documentation: |
| Predicate system_root_certificates/1 |
[det]system_root_certificates(-List)system(root_certificates). The list is obtained using an OS
specific process. The current implementation is as follows:
"ROOT"
certificates from the OS./etc/ssl/cert.pem
on macOS. For security reasons, the flag can only be set prior to using
the SSL library. For example:
:- use_module(library(ssl)).
:- set_prolog_flag(system_cacert_filename,
'/home/jan/ssl/ca-bundle.crt').
keychain, in which case
the trust anchors are obtained from the keychain using
SecTrustCopyAnchorCertificates(). This is also used as fallback if the
file above does not exist or holds no certificates. It is not the
default because this API talks to the securityd daemon over
Mach IPC, which can block indefinitely if the keychain is not
accessible, e.g., in an ssh session while the login keychain is locked.
Such a block cannot be interrupted using e.g.
call_with_time_limit/2.Note that a PEM file is a plain list of certificates. Unlike the keychain it cannot express trust settings made by the user or the administrator, e.g., root certificates that have been distrusted.
If no certificates can be obtained at all a warning is printed and
List is unified with [], which makes all
certificate verification fail.