]> git.kaiwu.me - nginx.git/commit
OCSP: removed padding of serial in cache keys
authorAleksei Bavshin <a.bavshin@nginx.com>
Thu, 17 Sep 2026 20:22:33 +0000 (13:22 -0700)
committerSergey Kandaurov <pluknet@nginx.com>
Thu, 5 Nov 2026 14:27:12 +0000 (18:27 +0400)
commitd56c3fb5dc9903cd3d6b9eee5617a0f14700df7a
treed4c3ec71f78e0c8b4c62079e2c97bc3f110e6510
parent45ae79aa6aa1f2b322235f12e3c79111b5a7041f
OCSP: removed padding of serial in cache keys

Right-padding the serials makes it impossible to distinguish between n,
n * 256 and so on.  This has no practical impact, as small, predictable
serial numbers have been discouraged for the last two decades.

While the change has a potential of introducing memory fragmentation,
current allocations stay within a single slab bucket on all supported
architectures.

Reported by Gyejin Lee, QED Audit.
src/event/ngx_event_openssl_stapling.c