I've forked the GnuTLS repo, cloned my copy and made some modifications to the source code (I'm trying to add a new cipher) but my modifications seems to be ignored.
At first I've done the preparation steps
./bootstrap
./configure
Make my changes, build and install:
make -j$(nproc)
make -j$(nproc) install
Included the necessary headers in my C program just to see if my modifications have effect:
#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>
But they don't. Just to make sure, I've "broken" the gnutls_cipher_init() function in lib/crypto-api.c by returning a custom error at the beginning:
int gnutls_cipher_init(gnutls_cipher_hd_t *handle,
gnutls_cipher_algorithm_t cipher,
const gnutls_datum_t *key, const gnutls_datum_t *iv)
{
return gnutls_assert_val(MY_CUSTOM_ERROR);
api_cipher_hd_st *h;
int ret;
const cipher_entry_st *e;
bool not_approved = false;
.
.
.
But it seems like none of my modifications are taking any effect, just like the file wouldn't even be compiled.
I've tried to re-./configure and rebuild and reinstall many times, just to make sure everything works without errors, but none of this worked.
Even if I've done something really stupid implementing my cipher, the return of the beginning of the function shouldn't be ignored.
Also, just to make sure the file is compiled, I've messed it up (ex. deleted a ;) just to provoke some errors, and the errors appeared, so I think the file is compiled.
What am I doing wrong?
PS: I've tried to uninstall it, rebuild and install again:
make -j$(nproc) uninstall
make -j$(nproc)
make -j$(nproc) install
But that's not the solution.