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

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Wed Nov 28 23:39:20 CET 2018


Tom commented on a discussion on lib/ext/cert_types.h:

> +			return true;
> +		case GNUTLS_CRT_RAWPK:
> +			return session->internals.flags & GNUTLS_ENABLE_RAWPK;
> +		default:
> +			// When not explicitly supported here disable it
> +			return false;
> +	}
> +}
> +
> +/* Checks whether alternative cert types (i.e. other than X.509)
> + * are enabled in the application
> + */
> +static inline bool _gnutls_are_alternative_cert_types_allowed(gnutls_session_t session)
> +{
> +	// OR-ed list of defined cert type init flags
> +	uint64_t cert_types_flags = GNUTLS_ENABLE_RAWPK;

I used the `uint64_t` here because it's exactly as big as the `flags` field in `internals_st`. A define would occupy just as much space is needed but the disadvantage is that is ends up in global scope whereas this declaration is local to the function (the only place where is actually needs to live). I can change it into a define if you like but I'm curious what your main concern here is?

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/650#note_120904925
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/20181128/07675b44/attachment-0001.html>


More information about the Gnutls-devel mailing list