Stop logging full PEM objects (#2090)
Stop logging full PEM objects (#2090)

Previously, the CA would log the full PEM encoded certificate signing request and the signed certificate. This PR, removes that, and logs a base64 encoded version of the request and the certificate.

Due to the fact that cfssl returns the certificate in PEM format regardless, we decode the certificate into DER and log the base64 version. If there is any failure in the decoding from PEM to DER, the CA will log the PEM encoded version of the certificate (this is the only case).

Furthermore, the Signing Success message was moved after the certificate is checked for 0 length and decoded into DER, which seems to make logical sense to me.

Fixes #1968
bmw/boulder,jfrazelle/boulder,letsencrypt/boulder,sophie-h/boulder,benileo/boulder,sophie-h/boulder,jsha/boulder,benileo/boulder,ZCloud-Firstserver/boulder,ibukanov/boulder,ZCloud-Firstserver/boulder,benileo/boulder,bmw/boulder,jcjones/boulder,jfrazelle/boulder,letsencrypt/boulder,ibukanov/boulder,jcjones/boulder,lucasallan/boulder,letsencrypt/boulder,ibukanov/boulder,bmw/boulder,jsha/boulder,lucasallan/boulder,ZCloud-Firstserver/boulder,ZCloud-Firstserver/boulder,jfrazelle/boulder,jcjones/boulder,jsha/boulder,jcjones/boulder,jfrazelle/boulder,benileo/boulder,lucasallan/boulder,sophie-h/boulder