doapr_outch(char **sbuffer,
char **buffer, size_t *currlen, size_t *maxlen, int c)
{
- /* If we haven't at least one buffer, someone has doe a big booboo */
+ /* If we haven't at least one buffer, someone has done a big booboo */
if (!ossl_assert(*sbuffer != NULL || buffer != NULL))
return 0;
int length, tmplen;
unsigned char *start = pp != NULL ? *pp : NULL;
- if (!ossl_assert(pp == NULL || *pp != NULL))
- return -1;
-
/*
* This might perturb *pp on error, but fixing that belongs in i2d_X509()
* not here. It should be that if a == NULL length is zero, but we check
for (i = 0; i < sk_IPAddressFamily_num(addr); i++) {
f = sk_IPAddressFamily_value(addr, i);
- if (!ossl_assert(f->addressFamily->data != NULL))
- goto err;
if (f->addressFamily->length == keylen &&
!memcmp(f->addressFamily->data, key, keylen))
return f;
} else {
i = 0;
x = sk_X509_value(chain, i);
- if (!ossl_assert(x != NULL)) {
- if (ctx != NULL)
- ctx->error = X509_V_ERR_UNSPECIFIED;
- return 0;
- }
if ((ext = x->rfc3779_addr) == NULL)
goto done;
}
*/
for (i++; i < sk_X509_num(chain); i++) {
x = sk_X509_value(chain, i);
- if (!ossl_assert(x != NULL)) {
- if (ctx != NULL)
- ctx->error = X509_V_ERR_UNSPECIFIED;
- return 0;
- }
if (!X509v3_addr_is_canonical(x->rfc3779_addr))
validation_err(X509_V_ERR_INVALID_EXTENSION);
if (x->rfc3779_addr == NULL) {
/*
* Trust anchor can't inherit.
*/
- if (!ossl_assert(x != NULL)) {
- if (ctx != NULL)
- ctx->error = X509_V_ERR_UNSPECIFIED;
- return 0;
- }
if (x->rfc3779_addr != NULL) {
for (j = 0; j < sk_IPAddressFamily_num(x->rfc3779_addr); j++) {
IPAddressFamily *fp =
{
if (ctx->chain == NULL
|| sk_X509_num(ctx->chain) == 0
- || ctx->verify_cb == NULL)
+ || ctx->verify_cb == NULL) {
+ ctx->error = X509_V_ERR_UNSPECIFIED;
return 0;
+ }
return addr_validate_path_internal(ctx, ctx->chain, NULL);
}
} else {
i = 0;
x = sk_X509_value(chain, i);
- if (!ossl_assert(x != NULL)) {
- if (ctx != NULL)
- ctx->error = X509_V_ERR_UNSPECIFIED;
- return 0;
- }
if ((ext = x->rfc3779_asid) == NULL)
goto done;
}
{
if (ctx->chain == NULL
|| sk_X509_num(ctx->chain) == 0
- || ctx->verify_cb == NULL)
+ || ctx->verify_cb == NULL) {
+ ctx->error = X509_V_ERR_UNSPECIFIED;
return 0;
+ }
return asid_validate_path_internal(ctx, ctx->chain, NULL);
}