aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/http.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/http.c')
-rw-r--r--src/libutil/http.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/libutil/http.c b/src/libutil/http.c
index 1a5bc7840..9e95462b4 100644
--- a/src/libutil/http.c
+++ b/src/libutil/http.c
@@ -1830,6 +1830,21 @@ rspamd_http_connection_set_key (struct rspamd_http_connection *conn,
priv->local_key = kp;
}
+gboolean
+rspamd_http_connection_is_encrypted (struct rspamd_http_connection *conn)
+{
+ struct rspamd_http_connection_private *priv = conn->priv;
+
+ if (priv->peer_key != NULL) {
+ return TRUE;
+ }
+ else if (priv->msg) {
+ return priv->msg->peer_key != NULL;
+ }
+
+ return FALSE;
+}
+
void
rspamd_http_connection_key_unref (gpointer key)
{