Extract x509 Certificates from macOS .pkg files Extracts the package table of contents as an XML file xar --dump-toc={header.xml} -f {file.pkg} Clean up the TOC to just the RSA signature information /usr/bin/xmllint --xpath '//signature[@style="RSA"]' {header.xml} > {rsa.raw}