From: Richard Levitte Date: Thu, 11 Jul 2024 08:11:49 +0000 (+0200) Subject: fix: style nits X-Git-Tag: openssl-3.4.0-alpha1~305 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=787e1dd941b695c957df2e2d587730a6de3df9ab;p=thirdparty%2Fopenssl.git fix: style nits Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell Reviewed-by: Shane Lontis Reviewed-by: Todd Short (Merged from https://github.com/openssl/openssl/pull/24854) --- diff --git a/include/crypto/evp.h b/include/crypto/evp.h index 36fee9f1c06..531535cb57e 100644 --- a/include/crypto/evp.h +++ b/include/crypto/evp.h @@ -726,26 +726,26 @@ struct evp_pkey_st { int security_bits; int size; } cache; -} /* EVP_PKEY */ ; +}; /* EVP_PKEY */ /* The EVP_PKEY_OP_TYPE_ macros are found in include/openssl/evp.h */ -#define EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx) \ +# define EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx) \ (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0) -#define EVP_PKEY_CTX_IS_DERIVE_OP(ctx) \ +# define EVP_PKEY_CTX_IS_DERIVE_OP(ctx) \ (((ctx)->operation & EVP_PKEY_OP_TYPE_DERIVE) != 0) -#define EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx) \ +# define EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx) \ (((ctx)->operation & EVP_PKEY_OP_TYPE_CRYPT) != 0) -#define EVP_PKEY_CTX_IS_GEN_OP(ctx) \ +# define EVP_PKEY_CTX_IS_GEN_OP(ctx) \ (((ctx)->operation & EVP_PKEY_OP_TYPE_GEN) != 0) -#define EVP_PKEY_CTX_IS_FROMDATA_OP(ctx) \ +# define EVP_PKEY_CTX_IS_FROMDATA_OP(ctx) \ (((ctx)->operation & EVP_PKEY_OP_TYPE_DATA) != 0) -#define EVP_PKEY_CTX_IS_KEM_OP(ctx) \ +# define EVP_PKEY_CTX_IS_KEM_OP(ctx) \ (((ctx)->operation & EVP_PKEY_OP_TYPE_KEM) != 0) void openssl_add_all_ciphers_int(void); diff --git a/include/openssl/evp.h b/include/openssl/evp.h index af62cd30e83..9fb55aa04df 100644 --- a/include/openssl/evp.h +++ b/include/openssl/evp.h @@ -1690,44 +1690,43 @@ int EVP_PKEY_CTX_set_kem_op(EVP_PKEY_CTX *ctx, const char *op); const char *EVP_PKEY_get0_type_name(const EVP_PKEY *key); # define EVP_PKEY_OP_UNDEFINED 0 -# define EVP_PKEY_OP_PARAMGEN (1<<1) -# define EVP_PKEY_OP_KEYGEN (1<<2) -# define EVP_PKEY_OP_FROMDATA (1<<3) -# define EVP_PKEY_OP_SIGN (1<<4) -# define EVP_PKEY_OP_VERIFY (1<<5) -# define EVP_PKEY_OP_VERIFYRECOVER (1<<6) -# define EVP_PKEY_OP_SIGNCTX (1<<7) -# define EVP_PKEY_OP_VERIFYCTX (1<<8) -# define EVP_PKEY_OP_ENCRYPT (1<<9) -# define EVP_PKEY_OP_DECRYPT (1<<10) -# define EVP_PKEY_OP_DERIVE (1<<11) -# define EVP_PKEY_OP_ENCAPSULATE (1<<12) -# define EVP_PKEY_OP_DECAPSULATE (1<<13) +# define EVP_PKEY_OP_PARAMGEN (1 << 1) +# define EVP_PKEY_OP_KEYGEN (1 << 2) +# define EVP_PKEY_OP_FROMDATA (1 << 3) +# define EVP_PKEY_OP_SIGN (1 << 4) +# define EVP_PKEY_OP_VERIFY (1 << 5) +# define EVP_PKEY_OP_VERIFYRECOVER (1 << 6) +# define EVP_PKEY_OP_SIGNCTX (1 << 7) +# define EVP_PKEY_OP_VERIFYCTX (1 << 8) +# define EVP_PKEY_OP_ENCRYPT (1 << 9) +# define EVP_PKEY_OP_DECRYPT (1 << 10) +# define EVP_PKEY_OP_DERIVE (1 << 11) +# define EVP_PKEY_OP_ENCAPSULATE (1 << 12) +# define EVP_PKEY_OP_DECAPSULATE (1 << 13) /* Update the following when adding new EVP_PKEY_OPs */ -# define EVP_PKEY_OP_ALL ((1<<14) - 1) +# define EVP_PKEY_OP_ALL ((1 << 14) - 1) -# define EVP_PKEY_OP_TYPE_SIG \ - (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYRECOVER \ - | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX) +# define EVP_PKEY_OP_TYPE_SIG \ + (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYRECOVER \ + | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX) -# define EVP_PKEY_OP_TYPE_CRYPT \ - (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT) +# define EVP_PKEY_OP_TYPE_CRYPT \ + (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT) -# define EVP_PKEY_OP_TYPE_DERIVE \ - (EVP_PKEY_OP_DERIVE) +# define EVP_PKEY_OP_TYPE_DERIVE \ + (EVP_PKEY_OP_DERIVE) -# define EVP_PKEY_OP_TYPE_DATA \ - (EVP_PKEY_OP_FROMDATA) +# define EVP_PKEY_OP_TYPE_DATA \ + (EVP_PKEY_OP_FROMDATA) -# define EVP_PKEY_OP_TYPE_KEM \ - (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE) +# define EVP_PKEY_OP_TYPE_KEM \ + (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE) +# define EVP_PKEY_OP_TYPE_GEN \ + (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN) -# define EVP_PKEY_OP_TYPE_GEN \ - (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN) - -# define EVP_PKEY_OP_TYPE_NOGEN \ - (EVP_PKEY_OP_ALL & ~EVP_PKEY_OP_TYPE_GEN) +# define EVP_PKEY_OP_TYPE_NOGEN \ + (EVP_PKEY_OP_ALL & ~EVP_PKEY_OP_TYPE_GEN) int EVP_PKEY_CTX_set_mac_key(EVP_PKEY_CTX *ctx, const unsigned char *key, int keylen);