Just to note that on Fedora I needed to specify
cat cert.p12 | base64 --wrap=0
The formatting of the output was causing the cert to be invalid when this flag was not set