]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
fix: style nits
authorRichard Levitte <levitte@openssl.org>
Thu, 11 Jul 2024 08:11:49 +0000 (10:11 +0200)
committerTodd Short <todd.short@me.com>
Sun, 21 Jul 2024 16:04:49 +0000 (12:04 -0400)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/24854)

include/crypto/evp.h
include/openssl/evp.h

index 36fee9f1c06851fa8e597dc64c837d363a27f5be..531535cb57e53500b043fb58d6ccd554ead93888 100644 (file)
@@ -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);
index af62cd30e83b71cdeb4e646aa5c3a27718d03a53..9fb55aa04dfc2d87555d75df7131882838aa4ee0 100644 (file)
@@ -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);