[gnutls-devel] Guile-GnuTLS | Draft: Add the HMAC functions (!5)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Fri Dec 23 11:12:41 CET 2022




civodul started a new discussion on guile/src/core.c: https://gitlab.com/gnutls/guile/-/merge_requests/5#note_1219865011

> +
> +SCM_DEFINE (scm_gnutls_hmac_copy, "hmac-copy", 1, 0, 0,
> +	    (SCM hmac),
> +	    "Return a copy of the current @var{hmac} state, "
> +	    "or @code{#f} if this is not supported.")
> +#define FUNC_NAME s_scm_gnutls_hmac_copy
> +{
> +  scm_gnutls_hmac_and_algorithm_t c_hmac =
> +    scm_to_gnutls_hmac (hmac, 1, FUNC_NAME);
> +  gnutls_hmac_hd_t c_ret = NULL;
> +  c_ret = gnutls_hmac_copy (c_hmac->handle);
> +  if (c_ret == NULL)
> +    {
> +      return SCM_BOOL_F;
> +    }
> +  scm_gnutls_hmac_and_algorithm_t c_combined =

Should it just call `scm_gnutls_error` when it gets NULL?  That would make it more convenient to use (no need to check for `#f`).

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/guile/-/merge_requests/5#note_1219865011
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/20221223/c2e3c9ff/attachment.html>


More information about the Gnutls-devel mailing list