When getting a TDC/DanID certificate it is wrapped inside a html document. This can be a problem for non Windows users.

The following command will extract the certificate from the file signatur.html and put it into signatur.pkcs12:

awk -F \" '/^pkcs12=/ {print $2}' signatur.html | fold -b -w 64 | openssl enc -d -a > signatur.pkcs12