if (!(flags & GNUTLS_VERIFY_DISABLE_CA_SIGN) &&
((flags & GNUTLS_VERIFY_DO_NOT_ALLOW_X509_V1_CA_CRT)
|| issuer_version != 1)) {
- if (check_if_ca(cert, issuer, max_path, flags) == 0) {
+ if (check_if_ca(cert, issuer, max_path, flags) != 1) {
gnutls_assert();
out =
GNUTLS_CERT_SIGNER_NOT_CA |
trusted_cas, tcas_size, flags,
&output, &issuer, now, &max_path,
nc, func);
- if (ret == 0) {
+ if (ret != 1) {
/* if the last certificate in the certificate
* list is invalid, then the certificate is not
* trusted.
verify_crt(certificate_list[i - 1],
&certificate_list[i], 1,
flags, &output, NULL, now,
- &max_path, nc, func)) == 0) {
+ &max_path, nc, func)) != 1) {
status |= output;
status |= GNUTLS_CERT_INVALID;
goto cleanup;