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

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Tue Oct 30 11:42:56 CET 2018

Tom commented on a discussion on lib/includes/gnutls/gnutls.h.in:

>  			        unsigned idx,
>  			        gnutls_datum_t * response);
> +/* RAW public key functions (RFC7250) */
> +#ifdef ENABLE_RAWPK
> +int gnutls_certificate_set_rawpk_keypair(gnutls_certificate_credentials_t cred,
> +				    const gnutls_pubkey_t subjectPublicKeyInfo,
> +				    const gnutls_privkey_t key);
> +
> +int gnutls_certificate_set_rawpk_keypair_raw(gnutls_certificate_credentials_t cred,

I mean how about following the naming convention from `pcert.c`. There you use the `_raw` suffix when plain `datum_t` types are being fed into the functions. E.g. `gnutls_pcert_import_x509_raw` and `gnutls_pcert_import_x509`. And then create an alias for the `...set_x509_key_mem` functions.

Also we can think about renaming these key set functions to using "keypair" in the name instead of "key" to make clear its about a key pair. Of course we need to stay API compatible and need to create aliases for the old ones.

Just a wild idea to improve code readability.

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

More information about the Gnutls-devel mailing list