add support to use gnutls as backend