Adapt PEM routines to the opaque EVP_ENCODE_CTX