Skip to content

Commit 9fb8fd2

Browse files
committed
📚 Document STARTTLS command options and semantics
1 parent bd692a3 commit 9fb8fd2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/net/imap.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,18 @@ def logout
545545
# §6.2.1]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.2.1]: to start a
546546
# TLS session.
547547
#
548+
# Any +options+ are forwarded to OpenSSL::SSL::SSLContext#set_params.
549+
#
550+
# This method returns after TLS negotiation and hostname verification are
551+
# both successful. Any error indicates that the connection has not been
552+
# secured.
553+
#
554+
# *Note:*
555+
# >>>
556+
# Any #response_handlers added before STARTTLS should be aware that the
557+
# TaggedResponse to STARTTLS is sent clear-text, _before_ TLS negotiation.
558+
# TLS negotiation starts immediately after that response.
559+
#
548560
# ===== Capability
549561
#
550562
# The server's capabilities must include +STARTTLS+.

0 commit comments

Comments
 (0)