[gnutls-devel] GnuTLS | RFC7250 Raw public keys (!650)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Tue Nov 27 13:17:39 CET 2018


Nikos Mavrogiannopoulos started a new discussion on lib/pcert.c:

> +
> +	/* A pcert struct holds a raw copy of the certificate data.
> +	 * Therefore we convert our gnutls_pubkey_t to its raw DER
> +	 * representation and copy it into our pcert. It is this raw data
> +	 * that will be transfered to the peer via a Certificate msg.
> +	 * According to the spec (RFC7250) a DER representation must be used.
> +	 */
> +	ret = gnutls_pubkey_export2(pubkey, GNUTLS_X509_FMT_DER, &pcert->cert);
> +	if (ret < 0) {
> +		return gnutls_assert_val(ret);
> +	}
> +
> +	// Set the pubkey to the one passed to this function
> +	pcert->pubkey = pubkey;
> +
> +	// Set the certificate type to Raw Public Key

unnecessary comment

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/650#note_120388735
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20181127/7a21778a/attachment.html>


More information about the Gnutls-devel mailing list