Change condition to avoid spurious compiler complaints.
authorPauli <pauli@openssl.org>
Wed, 9 Feb 2022 00:17:57 +0000 (11:17 +1100)
committerPauli <pauli@openssl.org>
Fri, 11 Feb 2022 02:44:33 +0000 (13:44 +1100)
commitfc27d9f3af95aa33e5028c6cef8d56d1c7f17436
treeb9874fbf997c18425a90f1f6cd9d26491b07b6e8
parentb32b2167155cafc4ac133f49d9cd04a249e443c8
Change condition to avoid spurious compiler complaints.

X509_TRUST_get0() is checking < 0, the code here was checking == -1.  Both are
equivalent in this situation but gcc-12 has conniptions about a subsequent
possible NULL dereference (which isn't possible).

Fixes #17665

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17668)

(cherry picked from commit b84c6e86dd8ca88444207080808d1d598856041f)
crypto/x509/x509_trust.c