Add a utility for creating CertificateFingerprints from a string.

Review Request #14888 — Created March 8, 2026 and updated — Latest diff uploaded

Information

Review Board
release-7.1.x

Reviewers

This introduces CertificateFingerprints.from_string(), which takes in
a string value, normalizes it, and attempts to determine if it
represents a SHA-1 or SHA-256 value. If it's either of these, an
instance of CertificateFingerprints will be created and returned with
the appropriate field filled out. Otherwise, None will be returned.

This is useful for cases where we're working with SCMs that provide a
single fingerprint that may be in either of these formats.

Unit tests pass.

Commits

Files