diff options
Diffstat (limited to 'crypto/evp/evp_utils.c')
| -rw-r--r-- | crypto/evp/evp_utils.c | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/crypto/evp/evp_utils.c b/crypto/evp/evp_utils.c index 3cc17921f8f4..68a04b65198a 100644 --- a/crypto/evp/evp_utils.c +++ b/crypto/evp/evp_utils.c @@ -12,9 +12,9 @@ #include <openssl/core.h> #include <openssl/evp.h> #include <openssl/err.h> -#include <openssl/asn1.h> /* evp_local.h needs it */ -#include <openssl/safestack.h> /* evp_local.h needs it */ -#include "crypto/evp.h" /* evp_local.h needs it */ +#include <openssl/asn1.h> /* evp_local.h needs it */ +#include <openssl/safestack.h> /* evp_local.h needs it */ +#include "crypto/evp.h" /* evp_local.h needs it */ #include "evp_local.h" /* @@ -24,36 +24,36 @@ * Since these functions are used to implement ctrl functionality, we * use the same value, and other callers will have to compensate. */ -#define PARAM_CHECK(obj, func, errfunc) \ - if (obj == NULL) \ - return 0; \ - if (obj->prov == NULL) \ - return EVP_CTRL_RET_UNSUPPORTED; \ - if (obj->func == NULL) { \ - errfunc(); \ - return 0; \ +#define PARAM_CHECK(obj, func, errfunc) \ + if (obj == NULL) \ + return 0; \ + if (obj->prov == NULL) \ + return EVP_CTRL_RET_UNSUPPORTED; \ + if (obj->func == NULL) { \ + errfunc(); \ + return 0; \ } -#define PARAM_FUNC(name, func, type, err) \ -int name (const type *obj, OSSL_PARAM params[]) \ -{ \ - PARAM_CHECK(obj, func, err) \ - return obj->func(params); \ -} +#define PARAM_FUNC(name, func, type, err) \ + int name(const type *obj, OSSL_PARAM params[]) \ + { \ + PARAM_CHECK(obj, func, err) \ + return obj->func(params); \ + } -#define PARAM_CTX_FUNC(name, func, type, err) \ -int name (const type *obj, void *algctx, OSSL_PARAM params[]) \ -{ \ - PARAM_CHECK(obj, func, err) \ - return obj->func(algctx, params); \ -} +#define PARAM_CTX_FUNC(name, func, type, err) \ + int name(const type *obj, void *algctx, OSSL_PARAM params[]) \ + { \ + PARAM_CHECK(obj, func, err) \ + return obj->func(algctx, params); \ + } -#define PARAM_FUNCTIONS(type, \ - getname, getfunc, \ - getctxname, getctxfunc, \ - setctxname, setctxfunc) \ - PARAM_FUNC(getname, getfunc, type, geterr) \ - PARAM_CTX_FUNC(getctxname, getctxfunc, type, geterr) \ +#define PARAM_FUNCTIONS(type, \ + getname, getfunc, \ + getctxname, getctxfunc, \ + setctxname, setctxfunc) \ + PARAM_FUNC(getname, getfunc, type, geterr) \ + PARAM_CTX_FUNC(getctxname, getctxfunc, type, geterr) \ PARAM_CTX_FUNC(setctxname, setctxfunc, type, seterr) /* @@ -71,11 +71,11 @@ static void seterr(void) } PARAM_FUNCTIONS(EVP_CIPHER, - evp_do_ciph_getparams, get_params, - evp_do_ciph_ctx_getparams, get_ctx_params, - evp_do_ciph_ctx_setparams, set_ctx_params) + evp_do_ciph_getparams, get_params, + evp_do_ciph_ctx_getparams, get_ctx_params, + evp_do_ciph_ctx_setparams, set_ctx_params) PARAM_FUNCTIONS(EVP_MD, - evp_do_md_getparams, get_params, - evp_do_md_ctx_getparams, get_ctx_params, - evp_do_md_ctx_setparams, set_ctx_params) + evp_do_md_getparams, get_params, + evp_do_md_ctx_getparams, get_ctx_params, + evp_do_md_ctx_setparams, set_ctx_params) |
