We currently return certificates as ASCII PEM a lot in our APIs. This may or may not be a problem, since PEM is a multi-line format – a bad fit for JSON. We could consider using DER encoding instead, transferring certificates as octets. This could perhaps also reduce transfer size.