From 4d6649092c3b7800ac1fbeb87053025abf95272d Mon Sep 17 00:00:00 2001
From: Daniel Gustafsson <daniel@yesql.se>
Date: Tue, 15 Jun 2021 09:28:11 +0200
Subject: [PATCH v2 1/2] 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 | 35 +++++++++++++++++++++++++++++++++++
 doc/src/sgml/libpq.sgml    |  2 +-
 3 files changed, 54 insertions(+), 1 deletion(-)

diff --git a/doc/src/sgml/acronyms.sgml b/doc/src/sgml/acronyms.sgml
index 13bd819eb1..f01f2b9332 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="glossary-sni">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..e45a117a0d 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" />
@@ -1403,6 +1414,18 @@
    </glossdef>
   </glossentry>
 
+  <glossentry id="glossary-sni">
+   <glossterm>Server Name Indication</glossterm>
+   <glossdef>
+    <para>
+     An extension to the <acronym>TLS</acronym> protocol where the client
+     specifies which hostname it tries to connect to at the start of the
+     handshake. This allows a server to present multiple certificates by the
+     same IP address.
+    </para>
+   </glossdef>
+  </glossentry>
+
   <glossentry id="glossary-session">
    <glossterm>Session</glossterm>
    <glossdef>
@@ -1492,6 +1515,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 daf2233124..6728df7e00 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -8430,7 +8430,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)

