Skip to content

Instantly share code, notes, and snippets.

@zenitraM
Created March 26, 2012 11:13
Show Gist options
  • Save zenitraM/2204472 to your computer and use it in GitHub Desktop.
Save zenitraM/2204472 to your computer and use it in GitHub Desktop.
Recompiling wpa_supplicant with GNU-TLS instead of OpenSSL

To recompile and reinstall wpasupplicant using GNU-TLS instead of OpenSSL on Ubuntu (and derivated distros):

sudo su
cd /usr/src
apt-get install devscripts
apt-get build-dep wpasupplicant
apt-get install libgnutls-dev
apt-get source wpasupplicant

We then open the file /usr/src/wpasupplicant-x.x.x/debian/config/linux and replace

CONFIG_TLS=openssl

with

CONFIG_TLS=gnutls
CONFIG_GNUTLS_EXTRA=y

Then write a changelog so the package doesn't get overwritten by the one on the repositories, by running:

dch -i

and, still as root, recompile and install:

cd /usr/src/wpasupplicant*/
dpkg-buildpackage -rfakeroot -uc -b
cd ..
dpkg -i wpasupplicant*.deb

and reset network-manager for changes to take effect:

service network-manager stop
killall -9 wpa_supplicant
service network-manager start

To hold the package so it doesn't get updated, just in case, run:

aptitude hold wpasupplicant
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment