Fix the CertificateToDane return value: add error

This is more inline with the rest of the functions which
do return an actual error. It is however a small api change.