I have the file with X.509 certificates and the following preamble:
# This is a bundle of X.509 certificates of public Certificate
# Authorities. It was generated from the Mozilla root CA list.
# These certificates are in the OpenSSL "TRUSTED CERTIFICATE"
# format and have trust bits set accordingly.
# An exception are auxiliary certificates, without positive or negative
# trust, but are used to assist in finding a preferred trust path.
# Those neutral certificates use the plain BEGIN CERTIFICATE format.
I tried to import it from command line but it fails:
$ sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain /Users/dzieciou/projects/mg/etc/pki/tls/certs/megabundle.crt
readFile: short read
***Error reading file /Users/dzieciou/projects/mg/etc/pki/tls/certs/
Error reading file /Users/dzieciou/projects/mg/etc/pki/tls/certs/megabundle.crt
I was able to import those certificates into Firefox on MacOS but Firefox does not use the system keychain.