[gnutls-devel] GnuTLS | FIPS140: mark HKDF and AES-GCM as approved when used in TLS (#1311)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Fri Apr 1 18:01:07 CEST 2022




Daiki Ueno commented:


Thanks Pedro for proposing the patch, and thanks Zoltan for picking it up :-)
While I suggested the approach that is to push a temporary context, after a second thought I am feeling that it might be simpler to add a couple of helper functions that don't touch the context at all, something like:
```c
int
_gnutls_hkdf_expand(...)
{
  /* this is a helper function, which does not change the context */
}

int
gnutls_hkdf_expand(...)
{
  /* this is a public API function */
  ret = _gnutls_hkdf_expand(...);
  /* switch the context to "not approved" or "error" */
  return ret;
}

int
_tls13_expand_secret2(...)
{
  /* this is the TLS usage */
  ret = _gnutls_hkdf_expand(...);
  /* switch the context to "approved" or "error" */
  return ret;
}
```
That way, we don't need a temporary context and avoid polluting the log messages.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/issues/1311#note_897860133
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/20220401/b28e3fc7/attachment-0001.html>


More information about the Gnutls-devel mailing list