[gnutls-devel] GnuTLS | gnutlsxx: become header-only library (!1622)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Thu Oct 27 09:25:32 CEST 2022




Daiki Ueno commented on a discussion: https://gitlab.com/gnutls/gnutls/-/merge_requests/1622#note_1150649354

Perhaps we could simply remove `#ifdef FEATURE` in `gnutlsxx.h`, and modify the C library to provide a stub? For example, I see:
```c++
  void session::send_openpgp_cert (gnutls_openpgp_crt_status_t status)
  {
#ifdef ENABLE_OPENPGP
    gnutls_openpgp_send_cert (s, status);
#endif
  }
```
The `#ifdef ENABLE_OPENPGP` is actually unnecessary, because the C library always provides a stub `gnutls_openpgp_send_cert` definition for ABI compatibility reasons. However:
```c++
  const char *server_session::get_srp_username () const
  {
#ifdef ENABLE_SRP
    return gnutls_srp_server_get_username (s);
#else
    return NULL;
#endif
  }
```
This wouldn't compile if we remove `#ifdef ENABLE_SRP` and `--disable-srp-authentication` is passed to configure, because the whole `lib/srp.c` is guarded with `#ifdef ENABLE_SRP`. I would say this is an issue in the C library and we should provide a stub for `gnutls_srp_server_get_username`.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1622#note_1150649354
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/20221027/33f76c56/attachment-0001.html>


More information about the Gnutls-devel mailing list