summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0946a19)
Instead of X509_LU_FAIL, X509_LU_RETRY use 0/1 for return values.
RT#4577
Reviewed-by: Rich Salz <rsalz@openssl.org>
X509_NAME *name, X509_OBJECT *ret)
{
if ((ctx->method == NULL) || (ctx->method->get_by_subject == NULL))
X509_NAME *name, X509_OBJECT *ret)
{
if ((ctx->method == NULL) || (ctx->method->get_by_subject == NULL))
if (ctx->skip)
return 0;
return ctx->method->get_by_subject(ctx, type, name, ret);
if (ctx->skip)
return 0;
return ctx->method->get_by_subject(ctx, type, name, ret);
X509_OBJECT *ret)
{
if ((ctx->method == NULL) || (ctx->method->get_by_issuer_serial == NULL))
X509_OBJECT *ret)
{
if ((ctx->method == NULL) || (ctx->method->get_by_issuer_serial == NULL))
return ctx->method->get_by_issuer_serial(ctx, type, name, serial, ret);
}
return ctx->method->get_by_issuer_serial(ctx, type, name, serial, ret);
}
X509_OBJECT *ret)
{
if ((ctx->method == NULL) || (ctx->method->get_by_fingerprint == NULL))
X509_OBJECT *ret)
{
if ((ctx->method == NULL) || (ctx->method->get_by_fingerprint == NULL))
return ctx->method->get_by_fingerprint(ctx, type, bytes, len, ret);
}
return ctx->method->get_by_fingerprint(ctx, type, bytes, len, ret);
}
char *str, int len, X509_OBJECT *ret)
{
if ((ctx->method == NULL) || (ctx->method->get_by_alias == NULL))
char *str, int len, X509_OBJECT *ret)
{
if ((ctx->method == NULL) || (ctx->method->get_by_alias == NULL))
return ctx->method->get_by_alias(ctx, type, str, len, ret);
}
return ctx->method->get_by_alias(ctx, type, str, len, ret);
}
X509err(X509_F_X509_OBJECT_NEW, ERR_R_MALLOC_FAILURE);
return NULL;
}
X509err(X509_F_X509_OBJECT_NEW, ERR_R_MALLOC_FAILURE);
return NULL;
}
- ret->type = X509_LU_FAIL;
+ ret->type = X509_LU_NONE;
*issuer = NULL;
xn = X509_get_issuer_name(x);
ok = X509_STORE_CTX_get_by_subject(ctx, X509_LU_X509, xn, obj);
*issuer = NULL;
xn = X509_get_issuer_name(x);
ok = X509_STORE_CTX_get_by_subject(ctx, X509_LU_X509, xn, obj);
- if (ok != X509_LU_X509) {
- if (ok == X509_LU_RETRY) {
- X509err(X509_F_X509_STORE_CTX_GET1_ISSUER, X509_R_SHOULD_RETRY);
- return -1;
- }
- if (ok != X509_LU_FAIL) {
- /* not good :-(, break anyway */
- return -1;
- }
return 0;
}
/* If certificate matches all OK */
return 0;
}
/* If certificate matches all OK */
X509_LU_X509, X509_LU_CRL
} X509_LOOKUP_TYPE;
X509_LU_X509, X509_LU_CRL
} X509_LOOKUP_TYPE;
+#if OPENSSL_API_COMPAT < 0x10100000L
#define X509_LU_RETRY -1
#define X509_LU_FAIL 0
#define X509_LU_RETRY -1
#define X509_LU_FAIL 0
DEFINE_STACK_OF(X509_LOOKUP)
DEFINE_STACK_OF(X509_OBJECT)
DEFINE_STACK_OF(X509_LOOKUP)
DEFINE_STACK_OF(X509_OBJECT)