}
(void)sk_IPAddressFamily_set_cmp_func(addr, IPAddressFamily_cmp);
sk_IPAddressFamily_sort(addr);
- if (!OPENSSL_assert(X509v3_addr_is_canonical(addr)))
- return 0;
+ OPENSSL_assert(X509v3_addr_is_canonical(addr));
return 1;
}
int i, j, ret = 1;
X509 *x;
- if (!OPENSSL_assert(chain != NULL && sk_X509_num(chain) > 0)
- || !OPENSSL_assert(ctx != NULL || ext != NULL)
- || !OPENSSL_assert(ctx == NULL || ctx->verify_cb != NULL)) {
- if (ctx != NULL)
- ctx->error = X509_V_ERR_UNSPECIFIED;
- return 0;
- }
+ OPENSSL_assert(chain != NULL && sk_X509_num(chain) > 0);
+ OPENSSL_assert(ctx != NULL || ext != NULL);
+ OPENSSL_assert(ctx == NULL || ctx->verify_cb != NULL);
/*
* Figure out where to start. If we don't have an extension to
const ASIdOrRange *a = *a_, *b = *b_;
/* XXX: these asserts need to be replaced */
- assert((a->type == ASIdOrRange_id && a->u.id != NULL) ||
+ OPENSSL_assert((a->type == ASIdOrRange_id && a->u.id != NULL) ||
(a->type == ASIdOrRange_range && a->u.range != NULL &&
a->u.range->min != NULL && a->u.range->max != NULL));
- assert((b->type == ASIdOrRange_id && b->u.id != NULL) ||
+ OPENSSL_assert((b->type == ASIdOrRange_id && b->u.id != NULL) ||
(b->type == ASIdOrRange_range && b->u.range != NULL &&
b->u.range->min != NULL && b->u.range->max != NULL));
static int extract_min_max(ASIdOrRange *aor,
ASN1_INTEGER **min, ASN1_INTEGER **max)
{
- if (!OPENSSL_assert(aor != NULL))
- return 0;
+ OPENSSL_assert(aor != NULL);
+
switch (aor->type) {
case ASIdOrRange_id:
*min = aor->u.id;
/*
* Make sure we're properly sorted (paranoia).
*/
- if (!OPENSSL_assert(ASN1_INTEGER_cmp(a_min, b_min) <= 0))
- goto done;
+ OPENSSL_assert(ASN1_INTEGER_cmp(a_min, b_min) <= 0);
/*
* Punt inverted ranges.
}
/* Paranoia */
- if (!OPENSSL_assert(ASIdentifierChoice_is_canonical(choice)))
- goto done;
+ OPENSSL_assert(ASIdentifierChoice_is_canonical(choice));
ret = 1;
int i, ret = 1, inherit_as = 0, inherit_rdi = 0;
X509 *x;
- if (!OPENSSL_assert(chain != NULL && sk_X509_num(chain) > 0)
- || !OPENSSL_assert(ctx != NULL || ext != NULL)
- || !OPENSSL_assert(ctx == NULL || ctx->verify_cb != NULL)) {
- if (ctx != NULL)
- ctx->error = X509_V_ERR_UNSPECIFIED;
- return 0;
- }
-
+ OPENSSL_assert(chain != NULL && sk_X509_num(chain) > 0);
+ OPENSSL_assert(ctx != NULL || ext != NULL);
+ OPENSSL_assert(ctx == NULL || ctx->verify_cb != NULL);
/*
* Figure out where to start. If we don't have an extension to
*/
for (i++; i < sk_X509_num(chain); i++) {
x = sk_X509_value(chain, i);
- if (!OPENSSL_assert(x != NULL)) {
- if (ctx != NULL)
- ctx->error = X509_V_ERR_UNSPECIFIED;
- return 0;
- }
+ OPENSSL_assert(x != NULL);
+
if (x->rfc3779_asid == NULL) {
if (child_as != NULL || child_rdi != NULL)
validation_err(X509_V_ERR_UNNESTED_RESOURCE);
/*
* Trust anchor can't inherit.
*/
- if (!OPENSSL_assert(x != NULL)) {
- if (ctx != NULL)
- ctx->error = X509_V_ERR_UNSPECIFIED;
- return 0;
- }
+ OPENSSL_assert(x != NULL);
+
if (x->rfc3779_asid != NULL) {
if (x->rfc3779_asid->asnum != NULL &&
x->rfc3779_asid->asnum->type == ASIdentifierChoice_inherit)