diff --git a/security/gnupg/Makefile b/security/gnupg/Makefile
index 452308c269a0fdf58709756b261f68d11683c5bf..3d35189e46ba9b74ed50632d4c7341d2be695407 100644
--- a/security/gnupg/Makefile
+++ b/security/gnupg/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	gnupg
-PORTVERSION=	2.3.0
+PORTVERSION=	2.3.1
 CATEGORIES=	security
 MASTER_SITES=	GNUPG
 
@@ -57,6 +57,14 @@ SCDAEMON_CONFIGURE_ENABLE=	scdaemon
 
 WKS_SERVER_CONFIGURE_ENABLE=	wks-tools
 
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MGNUTLS} && ${PORT_OPTIONS:MLDAP}
+PLIST_SUB+=	DIRMNGRLDAP=""
+.else
+PLIST_SUB+=	DIRMNGRLDAP="@comment "
+.endif
+
 # Touch the texinfo files to force makeinfo to run.  This fixes Linuxisms in
 # the paths in the man pages.
 pre-build:
diff --git a/security/gnupg/distinfo b/security/gnupg/distinfo
index 61cff8e4eaa30f7eb9b840c713201f57ec7329b4..9957f765fff3f914cb5f56363b31db5f414bea48 100644
--- a/security/gnupg/distinfo
+++ b/security/gnupg/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1617905248
-SHA256 (gnupg-2.3.0.tar.bz2) = 84c1ef39e8621cfb70f31463a5d1d8edeab44332bc1e0e1af9b78b6f9ed05bb4
-SIZE (gnupg-2.3.0.tar.bz2) = 7557228
+TIMESTAMP = 1618925954
+SHA256 (gnupg-2.3.1.tar.bz2) = c498db346a9b9a4b399e514c8f56dfc0a888ce8f327f10376ff984452cd154ec
+SIZE (gnupg-2.3.1.tar.bz2) = 7570431
diff --git a/security/gnupg/files/pkg-message.in b/security/gnupg/files/pkg-message.in
index 26f67eb103cce8ac519e575604ab4ccbf8b96d1a..41ae1967a4611b6653a051b1dba849e46d742f2d 100644
--- a/security/gnupg/files/pkg-message.in
+++ b/security/gnupg/files/pkg-message.in
@@ -1,12 +1,12 @@
 [
 { type: install
   message: <<EOM
-GnuPG, when run on hosts without IPv6 connectivity, may fail to connect to
-dual-stack hkp servers [1].  As a workaround, add
+When run on hosts without IPv6 connectivity, GnuPG may fail to connect to
+dual-stack hkp servers [1]. As a workaround, add:
 
 disable-ipv6
 
-to
+to:
 
 %%PREFIX%%/etc/dirmngr.conf
 
diff --git a/security/gnupg/pkg-plist b/security/gnupg/pkg-plist
index 77c212e987bd75d4d2fcc9bd975b99ff9ec3e8a7..0b9ff4870b660997db33e42330c0af30ed9fb126 100644
--- a/security/gnupg/pkg-plist
+++ b/security/gnupg/pkg-plist
@@ -16,7 +16,7 @@ bin/gpgtar
 bin/gpgv2
 bin/kbxutil
 bin/watchgnupg
-%%LDAP%%libexec/dirmngr_ldap
+%%DIRMNGRLDAP%%libexec/dirmngr_ldap
 libexec/gpg-check-pattern
 libexec/gpg-pair-tool
 libexec/gpg-preset-passphrase
@@ -57,6 +57,7 @@ sbin/applygnupgdefaults
 %%PORTDOCS%%%%DOCSDIR%%/examples/Automatic.prf
 %%PORTDOCS%%%%DOCSDIR%%/examples/README
 %%PORTDOCS%%%%DOCSDIR%%/examples/VS-NfD.prf
+%%PORTDOCS%%%%DOCSDIR%%/examples/common.conf
 %%PORTDOCS%%%%DOCSDIR%%/examples/debug.prf
 %%PORTDOCS%%%%DOCSDIR%%/examples/gpgconf.conf
 %%PORTDOCS%%%%DOCSDIR%%/examples/pwpattern.list