]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_ssl: Expose serialNumber (2.5.4.5) as standard env var from certificate DN
authorJoe Orton <jorton@apache.org>
Thu, 7 May 2026 13:16:53 +0000 (13:16 +0000)
committerJoe Orton <jorton@apache.org>
Thu, 7 May 2026 13:16:53 +0000 (13:16 +0000)
serialNumber (2.5.4.5) is a standard LDAP attribute embedded in the subject's
and/or issuer's DN, extract it by standard means from the DN and expose
via StdEnvVars.

PR: 35154
Co-authored-by: Michael Osipov <michaelo@apache.org>
Submitted by: Benjamin Demarteau <benjamin.demarteau@liege.be>
Github: closes #644

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1933908 13f79535-47bb-0310-9956-ffa450edef68

changes-entries/ssl-serialnumber.txt [new file with mode: 0644]
modules/ssl/ssl_engine_vars.c

diff --git a/changes-entries/ssl-serialnumber.txt b/changes-entries/ssl-serialnumber.txt
new file mode 100644 (file)
index 0000000..af82ca4
--- /dev/null
@@ -0,0 +1,4 @@
+  *) mod_ssl: Add SerialNumber as a recognized attribute type for SSL
+     distinguished name variables.  [Michael Osipov <michaelo apache.org>,
+     Benjamin Demarteau <benjamin.demarteau liege.be>]
+
index 6c45b65d400b1492d2c45c13c1a1204c605ea9ae..83344bf8600ce12be97debb74201af0ed956bbf7 100644 (file)
@@ -720,6 +720,7 @@ static const struct {
     { "G",     NID_givenName,              1 },
     { "S",     NID_surname,                1 },
     { "D",     NID_description,            1 },
+    { "SerialNumber", NID_serialNumber,    1 },
 #ifdef NID_userId
     { "UID",   NID_userId,                 1 },
 #endif