提交 2629440d 编写于 作者: R Richard Levitte

Reformat M_check_autoarg to match our coding style

Reviewed-by: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2121)
上级 d7c8f142
......@@ -15,25 +15,22 @@
#include "internal/evp_int.h"
#define M_check_autoarg(ctx, arg, arglen, err) \
if (ctx->pmeth->flags & EVP_PKEY_FLAG_AUTOARGLEN) \
{ \
size_t pksize = (size_t)EVP_PKEY_size(ctx->pkey); \
if (pksize == 0) \
{ \
EVPerr(err, EVP_R_INVALID_KEY); /*ckerr_ignore*/\
return 0; \
} \
else if (!arg) \
{ \
*arglen = pksize; \
return 1; \
} \
else if (*arglen < pksize) \
{ \
EVPerr(err, EVP_R_BUFFER_TOO_SMALL); /*ckerr_ignore*/\
return 0; \
} \
}
if (ctx->pmeth->flags & EVP_PKEY_FLAG_AUTOARGLEN) { \
size_t pksize = (size_t)EVP_PKEY_size(ctx->pkey); \
\
if (pksize == 0) { \
EVPerr(err, EVP_R_INVALID_KEY); /*ckerr_ignore*/ \
return 0; \
} \
if (!arg) { \
*arglen = pksize; \
return 1; \
} \
if (*arglen < pksize) { \
EVPerr(err, EVP_R_BUFFER_TOO_SMALL); /*ckerr_ignore*/ \
return 0; \
} \
}
int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册