]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: ssl: Be sure to use unique serial for regenerated certificates
authorChristopher Faulet <cfaulet@qualys.com>
Thu, 12 Nov 2015 10:35:51 +0000 (11:35 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 9 Feb 2016 08:04:53 +0000 (09:04 +0100)
commit635c0adec2a5e45ef6abbd0a60a7e32d8f187ab2
tree1c3257db0b291c558b0e7bc610f68042e3d3234b
parent53f9685b7288e78c80dea4741a6952809ba90c0f
BUG/MINOR: ssl: Be sure to use unique serial for regenerated certificates

The serial number for a generated certificate was computed using the requested
servername, without any variable/random part. It is not a problem from the
moment it is not regenerated.

But if the cache is disabled or when the certificate is evicted from the cache,
we may need to regenerate it. It is important to not reuse the same serial
number for the new certificate. Else clients (especially browsers) trigger a
warning because 2 certificates issued by the same CA have the same serial
number.

So now, the serial is a static variable initialized with now_ms (internal date
in milliseconds) and incremented at each new certificate generation.

(Ref MPS-2031)
include/proto/ssl_sock.h
src/ssl_sock.c