static inline gnutls_x509_crt_t find_crl_issuer(gnutls_x509_crl_t crl, const gnutls_x509_crt_t * trusted_cas, int tcas_size) { int i; /* this is serial search. */ for (i = 0; i < tcas_size; i++) { if (is_crl_issuer(crl, trusted_cas[i]) != 0) return trusted_cas[i]; } gnutls_assert(); return NULL; }
/** * gnutls_x509_crl_check_issuer: * @crl: is the CRL to be checked * @issuer: is the certificate of a possible issuer * * This function will check if the given CRL was issued by the given * issuer certificate. It will return true (1) if the given CRL was * issued by the given issuer, and false (0) if not. * * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int gnutls_x509_crl_check_issuer (gnutls_x509_crl_t crl, gnutls_x509_crt_t issuer) { return is_crl_issuer (crl, issuer); }