added cert handling to gnutls