Incorrect results returned when converting pem file to der
Description of problem:
The results (exit status & output) are incorrect when converting pem file to der.
I tested GnuTLS with Libressl, openssl, and mbedtls.
Version of gnutls used: 3.6.13
Distributor of gnutls (e.g., Ubuntu, Fedora, RHEL)
- Description: Ubuntu 18.04.1 LTS
- Release: 18.04
How reproducible:
Steps to Reproduce:
- build GnuTLS 3.6.13
- run following command
certtool --outder -i --infile $PoC --outfile /tmp/tmp.der
Actual results:
program : Libressl
version : 3.1.0
exit status : 0
program : openssl
version : commit 031c9bd3f3e9a02fa126c7dbc47f3d934678a195
exit status : 0
program : mbedtls
version : 2.22.0
. Loading the PEM file ... ok
. Converting from PEM to DER ... ok
. Writing the DER file ... ok
exit status : 0
program : gnutls
version : 3.6.13
import error: Error in the certificate.
exit status : 1