[gnutls-help] GNUTLS_E_PARSING_ERROR when reading PEM, yet is a PKCS11 error?

Nikos Mavrogiannopoulos nmav at gnutls.org
Wed Aug 12 09:32:48 CEST 2015


On Wed, Aug 12, 2015 at 7:35 AM, Max Bruce <max.bruce12 at gmail.com> wrote:
> Calling code:
> int e1 = gnutls_certificate_set_x509_key_file(oc->cert, certj, keyj,
> GNUTLS_X509_FMT_PEM);
> All looks good from my side, and both certj/keyj are absolute paths to a
> certificate & private key in PEM format. It returns -302, which translates
> to GNUTLS_E_PARSING_ERROR, of which is under the category of errors "PKCS11
> related"
> I'll attach a copy of the public key to this, and I can send the private key
> to anyone that asks to see it(it's PEM directly from StartCom).

Hello,
 Don't send your private key to anybody unless it is a test key. Just
copy/paste the header (the BEGIN --- part), and whether certtool -k
succeeds in parsing it.

regards,
Nikos



More information about the Gnutls-help mailing list