Re: How to check if a gnutls_x509_crt_t contains a private key

Nicolas Mora <[email protected]> Wed, 1 Jan 2020 23:02:53 -0500
Newsgroups gmane.network.gnutls.general
Message-ID <[email protected]>
> 
> I'd like to check if a gnutls_x509_crt_t created via
> gnutls_x509_crt_import contains a private key.
> 

I think I found the answer, the gnutls_x509_crt_t contains only a public
key.

If I want to import an unknown DER certificate, I need to try it first
in gnutls_x509_privkey_t format with gnutls_x509_privkey_import.
If the import fails, then try with gnutls_x509_crt_import.

Sorry for the noise