r7773: fixed the tls code for the non-GNUTLS case