Skip to content

Commit

Permalink
Accepts SHA1 and SHA256 fingerprint digests
Browse files Browse the repository at this point in the history
The hash algorithm was changed from SHA1 to SHA256 with Icinga2 release
2.12.0. The type definition must accept both variants.
  • Loading branch information
thorstenk committed Oct 2, 2020
1 parent 3e3f8a7 commit ccbcf39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion types/fingerprint.pp
Original file line number Diff line number Diff line change
@@ -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}$/]

0 comments on commit ccbcf39

Please sign in to comment.