aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/fe/fetchmail-common-name/patches/0001-fix-socket.c-Correctly-check-the-common-name-even-if.patch
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-10-02 00:26:47 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-10-02 00:26:47 +0200
commit6feeb3631adf0a068e4e24f3812500799c3b31e6 (patch)
treed843c410f73806fa274ad0833ec1f0f21f768fbf /pkgs/by-name/fe/fetchmail-common-name/patches/0001-fix-socket.c-Correctly-check-the-common-name-even-if.patch
parentzones/*: Deduplicate `mkSerial` function (diff)
downloadnixos-server-6feeb3631adf0a068e4e24f3812500799c3b31e6.zip
pkgs/fetchmail-common-name: Update patch, so that it applies again
Diffstat (limited to 'pkgs/by-name/fe/fetchmail-common-name/patches/0001-fix-socket.c-Correctly-check-the-common-name-even-if.patch')
-rw-r--r--pkgs/by-name/fe/fetchmail-common-name/patches/0001-fix-socket.c-Correctly-check-the-common-name-even-if.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/by-name/fe/fetchmail-common-name/patches/0001-fix-socket.c-Correctly-check-the-common-name-even-if.patch b/pkgs/by-name/fe/fetchmail-common-name/patches/0001-fix-socket.c-Correctly-check-the-common-name-even-if.patch
new file mode 100644
index 0000000..3c2d59e
--- /dev/null
+++ b/pkgs/by-name/fe/fetchmail-common-name/patches/0001-fix-socket.c-Correctly-check-the-common-name-even-if.patch
@@ -0,0 +1,40 @@
+From 2fcc25966320748ab3cb9bbd709c4499a7e0bffc Mon Sep 17 00:00:00 2001
+From: Benedikt Peetz <benedikt.peetz@b-peetz.de>
+Date: Thu, 1 Oct 2026 22:24:51 +0200
+Subject: [PATCH] fix(socket.c): Correctly check the common name, even if not
+ set (only SAN)
+
+---
+ socket.c | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+diff --git a/socket.c b/socket.c
+index 3f6cc5b..d66ea72 100644
+--- a/socket.c
++++ b/socket.c
+@@ -824,7 +824,6 @@ static int SSL_verify_callback(int ok_return, X509_STORE_CTX *ctx, const int str
+ _depth0ck = 1;
+ }
+
+- if ((i = X509_NAME_get_text_by_NID(subj, NID_commonName, buf, sizeof(buf))) != -1) {
+ if (_ssl_server_cname != NULL) {
+ char *p1 = buf;
+ char *p2 = _ssl_server_cname;
+@@ -876,14 +875,6 @@ static int SSL_verify_callback(int ok_return, X509_STORE_CTX *ctx, const int str
+ report(stderr, GT_("Server name not set, could not verify certificate!\n"));
+ if (strict) return 0;
+ }
+- } else {
+- if (outlevel >= O_VERBOSE)
+- report(stdout, GT_("Unknown Server CommonName\n"));
+- if (ok_return && strict) {
+- report(stderr, GT_("Server name not specified in certificate!\n"));
+- return 0;
+- }
+- }
+ /* Print the finger print. Note that on errors, we might print it more than once
+ * normally; we kluge around that by using a global variable. */
+ if (_check_fp == 1) {
+--
+2.55.0
+