Improve Perforce SSL fingerprint parsing and error reporting.
Review Request #11126 — Created Aug. 7, 2020 and submitted
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
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
Certificateused 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.
Updated the fingerprint scanning (hah) to not crash if the fingerprint couldn't be found.
Revision 2 (+254 -8)