From 4264cdf5a3a46f5f7068f46cb12202ebf612620d Mon Sep 17 00:00:00 2001 From: Thorsten Kahler Date: Fri, 2 Oct 2020 19:22:11 +0200 Subject: [PATCH] Accepts SHA1 and SHA256 fingerprint digests The hash algorithm was changed from SHA1 to SHA256 with Icinga2 release 2.12.0. The type definition must accept both variants. --- types/fingerprint.pp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/types/fingerprint.pp b/types/fingerprint.pp index caf52d2e6..40690ced0 100644 --- a/types/fingerprint.pp +++ b/types/fingerprint.pp @@ -1,2 +1,4 @@ # Type for certificate fingerprints -type Icinga2::Fingerprint = Pattern[/^([0-9a-fA-F]{2}\:){19}[0-9,a-f,A-F]{2}$/] +# SHA1: 160 bit (20 byte) digest +# SHA256: 256 bit (32 byte) digest +type Icinga2::Fingerprint = Pattern[/^([0-9a-fA-F]{2}\:){19}(([0-9a-fA-F]{2}\:){12})?[0-9,a-f,A-F]{2}$/]