From e65c4221d384197fc1178649d739890d784f576d Mon Sep 17 00:00:00 2001
From: Daniel Gustafsson <daniel@yesql.se>
Date: Tue, 15 Jun 2021 09:28:11 +0200
Subject: [PATCH v1 1/3] docs: SSL/TLS related acronyms and glossary

This adds MITM and SNI as acronyms, as the documentation already had
them marked up with <acronym />. SSL/TLS and MITM are further added
to the glossary.

Also while in there, make sure to spell man-in-the-middle with dashes
consistently.
---
 doc/src/sgml/acronyms.sgml | 18 ++++++++++++++++++
 doc/src/sgml/glossary.sgml | 23 +++++++++++++++++++++++
 doc/src/sgml/libpq.sgml    |  2 +-
 3 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/doc/src/sgml/acronyms.sgml b/doc/src/sgml/acronyms.sgml
index 13bd819eb1..3b695298f3 100644
--- a/doc/src/sgml/acronyms.sgml
+++ b/doc/src/sgml/acronyms.sgml
@@ -410,6 +410,15 @@
     </listitem>
    </varlistentry>
 
+   <varlistentry>
+    <term><acronym>MITM</acronym></term>
+    <listitem>
+     <para>
+      <link linkend="glossary-mitm">Man-In-The-Middle</link> attack
+     </para>
+    </listitem>
+   </varlistentry>
+
    <varlistentry>
     <term><acronym>MSVC</acronym></term>
     <listitem>
@@ -590,6 +599,15 @@
     </listitem>
    </varlistentry>
 
+   <varlistentry>
+    <term><acronym>SNI</acronym></term>
+    <listitem>
+     <para>
+      <link linkend="libpq-connect-sslsni">Server Name Indication</link>
+     </para>
+    </listitem>
+   </varlistentry>
+
    <varlistentry>
     <term><acronym>SPI</acronym></term>
     <listitem>
diff --git a/doc/src/sgml/glossary.sgml b/doc/src/sgml/glossary.sgml
index c8d0440e80..26f06ccba9 100644
--- a/doc/src/sgml/glossary.sgml
+++ b/doc/src/sgml/glossary.sgml
@@ -891,6 +891,17 @@
     </glossdef>
   </glossentry>
 
+  <glossentry id="glossary-mitm">
+   <glossterm>Man-In-The-Middle (attack)</glossterm>
+   <glossdef>
+    <para>
+     A Man-In-The-Middle attack is when an attacker secretly relays, and
+     possibly alters, communication between two parties who think that they are
+     communicating directly with each other.
+    </para>
+   </glossdef>
+  </glossentry>
+
   <glossentry>
    <glossterm>Master (server)</glossterm>
    <glosssee otherterm="glossary-primary-server" />
@@ -1492,6 +1503,18 @@
    </glossdef>
   </glossentry>
 
+  <glossentry id="glossary-ssl-tls">
+   <glossterm>SSL/TLS</glossterm>
+   <glossdef>
+    <para>
+     A network connection using a <acronym>TLS</acronym> protocol to achieve
+     end-to-end encryption.  <acronym>SSL</acronym> refers to the now
+     unsupported <acronym>SSL</acronym> family of protocols, the term has
+     however become synonymous with secure connections.
+    </para>
+   </glossdef>
+  </glossentry>
+
   <glossentry>
    <glossterm>Standby (server)</glossterm>
    <glosssee otherterm="glossary-replica" />
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index 6b96f30dcc..6424a74242 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -8429,7 +8429,7 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*)
     </varlistentry>
 
     <varlistentry>
-     <term>Man in the middle (<acronym>MITM</acronym>)</term>
+     <term>Man-in-the-middle (<acronym>MITM</acronym>)</term>
      <listitem>
       <para>If a third party can modify the data while passing between the
        client and server, it can pretend to be the server and therefore see and
-- 
2.30.1 (Apple Git-130)

