summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-01-09 20:54:05 +0000
committerSadie Powell <sadie@witchery.services>2024-01-09 21:25:44 +0000
commit5772b924cc11df5981d81afa82809eaf14f8ef91 (patch)
tree282ce77428269c2788ec3d4116726579b1e4b3d8 /modules
parentfce5f4cc0f7518536040c0d66c7efb438c985e33 (diff)
Drop support for ancient versions of GnuTLS.
Diffstat (limited to 'modules')
-rw-r--r--modules/extra/m_ssl_gnutls.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/modules/extra/m_ssl_gnutls.cpp b/modules/extra/m_ssl_gnutls.cpp
index e9b690940..87b182285 100644
--- a/modules/extra/m_ssl_gnutls.cpp
+++ b/modules/extra/m_ssl_gnutls.cpp
@@ -234,11 +234,7 @@ namespace GnuTLS
return ret;
}
- #if (GNUTLS_VERSION_MAJOR < 2 || (GNUTLS_VERSION_MAJOR == 2 && GNUTLS_VERSION_MINOR < 12))
- static int cert_callback(gnutls_session_t sess, const gnutls_datum_t* req_ca_rdn, int nreqs, const gnutls_pk_algorithm_t* sign_algos, int sign_algos_length, gnutls_retr_st* st);
- #else
static int cert_callback(gnutls_session_t sess, const gnutls_datum_t* req_ca_rdn, int nreqs, const gnutls_pk_algorithm_t* sign_algos, int sign_algos_length, gnutls_retr2_st* st);
- #endif
public:
X509CertList certs;
@@ -257,11 +253,7 @@ namespace GnuTLS
throw ConfigException("Unable to set cert/key pair");
}
- #if (GNUTLS_VERSION_MAJOR < 2 || (GNUTLS_VERSION_MAJOR == 2 && GNUTLS_VERSION_MINOR < 12))
- gnutls_certificate_client_set_retrieve_function(cred, cert_callback);
- #else
gnutls_certificate_set_retrieve_function(cred, cert_callback);
- #endif
}
~X509CertCredentials()
@@ -633,16 +625,10 @@ SSLSocketIO::SSLSocketIO() : mycreds(me->cred)
mycreds->incrref();
}
-#if (GNUTLS_VERSION_MAJOR < 2 || (GNUTLS_VERSION_MAJOR == 2 && GNUTLS_VERSION_MINOR < 12))
-int GnuTLS::X509CertCredentials::cert_callback(gnutls_session_t sess, const gnutls_datum_t* req_ca_rdn, int nreqs, const gnutls_pk_algorithm_t* sign_algos, int sign_algos_length, gnutls_retr_st* st)
-{
- st->type = GNUTLS_CRT_X509;
-#else
int GnuTLS::X509CertCredentials::cert_callback(gnutls_session_t sess, const gnutls_datum_t* req_ca_rdn, int nreqs, const gnutls_pk_algorithm_t* sign_algos, int sign_algos_length, gnutls_retr2_st* st)
{
st->cert_type = GNUTLS_CRT_X509;
st->key_type = GNUTLS_PRIVKEY_X509;
-#endif
st->ncerts = me->cred->certs.size();
st->cert.x509 = me->cred->certs.raw();
st->key.x509 = me->cred->key.get();