return obj_trust(NID_anyExtendedKeyUsage, x,
flags | X509_TRUST_DO_SS_COMPAT);
idx = X509_TRUST_get_by_id(id);
- if (idx == -1)
+ if (idx < 0)
return default_trust(id, x, flags);
pt = X509_TRUST_get0(idx);
return pt->check_trust(pt, x, flags);
int X509_TRUST_set(int *t, int trust)
{
- if (X509_TRUST_get_by_id(trust) == -1) {
+ if (X509_TRUST_get_by_id(trust) < 0) {
ERR_raise(ERR_LIB_X509, X509_R_INVALID_TRUST);
return 0;
}
trtmp->arg2 = arg2;
/* If its a new entry manage the dynamic table */
- if (idx == -1) {
+ if (idx < 0) {
if (trtable == NULL
&& (trtable = sk_X509_TRUST_new(tr_cmp)) == NULL) {
ERR_raise(ERR_LIB_X509, ERR_R_MALLOC_FAILURE);
}
return 1;
err:
- if (idx == -1) {
+ if (idx < 0) {
OPENSSL_free(trtmp->name);
OPENSSL_free(trtmp);
}