diff options
author | Clombrong <cromblong@egregore.fun> | 2025-06-29 08:27:36 +0200 |
---|---|---|
committer | Clombrong <cromblong@egregore.fun> | 2025-06-29 08:27:36 +0200 |
commit | 13ab7a0170fb18738d8f0a491c95416c8f2c0c4d (patch) | |
tree | 48471eff88bdc6819c22260619cc02ce3063dd56 /portal/tcp | |
parent | 7366648aeb205a6a47217bbf190ec45f8ce0c79f (diff) |
feat(portal): add _encrypted function
Diffstat (limited to 'portal/tcp')
-rw-r--r-- | portal/tcp/portal.ml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/portal/tcp/portal.ml b/portal/tcp/portal.ml index 0105a06..d36563a 100644 --- a/portal/tcp/portal.ml +++ b/portal/tcp/portal.ml @@ -174,6 +174,10 @@ let starttls (portal : t) : unit Lwt.t = | Tls _ -> Lwt.fail_with "TLS is already enabled on this socket!" in portal._socket <- Tls tls_sock +let _encrypted = function + | Plain _ -> false + | Tls _ -> true + let header ?from domain (portal : t) = let stanza = let attributes = |