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

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Tue Nov 27 16:05:26 CET 2018


Nikos Mavrogiannopoulos started a new 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 do not think there can be a compiler which will generate inefficient code, though I have seen such cases. The `uint64_t` is unnecessary, though I think using a define here would be more efficient. e.g.,
```
#define ALL_CERT_TYPES GNUTLS_ENABLE_RAWPK
```

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


More information about the Gnutls-devel mailing list