Fixed error reporting in case of PEM encoding error when decoding certificates.