13173e
#!/bin/sh
13173e
13173e
#set -vx
13173e
13173e
# At this time, while this script is trivial, we ignore any parameters given.
13173e
# However, for backwards compatibility reasons, future versions of this script must 
13173e
# support the syntax "update-ca-trust extract" trigger the generation of output 
13173e
# files in $DEST.
13173e
13173e
DEST=/etc/pki/ca-trust/extracted
13173e
13173e
# Prevent p11-kit from reading user configuration files.
13173e
export P11_KIT_NO_USER_CONFIG=1
13173e
13173e
# OpenSSL PEM bundle that includes trust flags
13173e
# (BEGIN TRUSTED CERTIFICATE)
13173e
/usr/bin/p11-kit extract --format=openssl-bundle --filter=certificates --overwrite --comment $DEST/openssl/ca-bundle.trust.crt
13173e
/usr/bin/p11-kit extract --format=pem-bundle --filter=ca-anchors --overwrite --comment --purpose server-auth $DEST/pem/tls-ca-bundle.pem
13173e
/usr/bin/p11-kit extract --format=pem-bundle --filter=ca-anchors --overwrite --comment --purpose email $DEST/pem/email-ca-bundle.pem
13173e
/usr/bin/p11-kit extract --format=pem-bundle --filter=ca-anchors --overwrite --comment --purpose code-signing $DEST/pem/objsign-ca-bundle.pem
13173e
/usr/bin/p11-kit extract --format=java-cacerts --filter=ca-anchors --overwrite --purpose server-auth $DEST/java/cacerts
13173e
/usr/bin/p11-kit extract --format=edk2-cacerts --filter=ca-anchors --overwrite --purpose=server-auth $DEST/edk2/cacerts.bin