Improve Perforce SSL fingerprint parsing and error reporting.

Review Request #11126 — Created Aug. 7, 2020 and submitted

chipx86
Review Board
release-3.0.x
reviewboard

The Perforce SSL error handling assumed some things about the placement
of the fingerprint in the error message. This wasn't always correct,
though. While this hasn't really been an issue in the past, practically
speaking, it is now that we have improved unverified SSL certificate
error.

We now look for the fingerprint using a regex. We don't care where it is
in the string, so long as it's there somewhere.

Both that and the P4PORT get passed into the Certificate used for the
error message, which will then be displayed to the user.

Triggered the error with two kinds of SSL cert failures (one triggered
by no existing stored fingerprints for a server, one triggered by a new
fingerprint when an existing one was stored). Verified the error output
was correct in both cases.

Unit tests pass.

Summary
Improve Perforce SSL fingerprint parsing and error reporting.
david
  1. Ship It!
  2. 
      
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (e254dc3)
Loading...