• 
      

    Add a utility for creating CertificateFingerprints from a string.

    Review Request #14888 — Created March 8, 2026 and submitted

    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.

    Summary ID
    Add a utility for creating CertificateFingerprints from a string.
    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.
    98717d5a0fcf861bceddf9a37142c7335e3a23f7
    Description From Last Updated

    Do we want to validate that the string itself is in the correct format as well as the length? These …

    daviddavid
    david
    1. 
        
    2. reviewboard/certs/cert.py (Diff revision 1)
       
       
       
       
       
      Show all issues

      Do we want to validate that the string itself is in the correct format as well as the length? These are pretty easy to validate via regex.

      1. That's in my queue but for later. Validation needs to happen more generally.

    3. 
        
    maubin
    1. Ship It!
    2. 
        
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-7.1.x (3cef0ba)