+typedef struct exim_gnutls_state {
+ gnutls_session_t session;
+ gnutls_certificate_credentials_t x509_cred;
+ gnutls_priority_t priority_cache;
+ enum peer_verify_requirement verify_requirement;
+ int fd_in;
+ int fd_out;
+ BOOL peer_cert_verified;
+ BOOL trigger_sni_changes;
+ const struct host_item *host;
+ uschar *peerdn;
+ uschar *received_sni;
+
+ const uschar *tls_certificate;
+ const uschar *tls_privatekey;
+ const uschar *tls_sni; /* client send only, not received */
+ const uschar *tls_verify_certificates;
+ const uschar *tls_crl;
+ const uschar *tls_require_ciphers;
+ uschar *exp_tls_certificate;
+ uschar *exp_tls_privatekey;
+ uschar *exp_tls_sni;
+ uschar *exp_tls_verify_certificates;
+ uschar *exp_tls_crl;
+ uschar *exp_tls_require_ciphers;
+
+ uschar *xfer_buffer;
+ int xfer_buffer_lwm;
+ int xfer_buffer_hwm;
+ int xfer_eof;
+ int xfer_error;
+
+ uschar cipherbuf[256];
+} exim_gnutls_state_st;
+
+static const exim_gnutls_state_st exim_gnutls_state_init = {
+ NULL, NULL, NULL, VERIFY_NONE, -1, -1, FALSE, FALSE,
+ NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, 0, 0, 0, 0,
+ ""
+};