]> www.wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
cppcheck: function defenition doen't match function declaration
authorNikolay Morozov <nmorozoff77@yandex.ru>
Mon, 17 Feb 2020 14:01:49 +0000 (17:01 +0300)
committerDmitry Belyavskiy <beldmit@users.noreply.github.com>
Mon, 17 Feb 2020 17:39:30 +0000 (20:39 +0300)
gost89.h
gost_eng.c
gost_lcl.h

index 1dfae9be3c9ecee35b07aeff6d5865fe25c80495..9f36905e43903243f42b7a867118fa9470c4e568 100644 (file)
--- a/gost89.h
+++ b/gost89.h
@@ -44,9 +44,9 @@ typedef struct {
  * Other modes may be added easily enough.
  */
 /* Encrypt several full blocks in ECB mode */
-void gost_enc(gost_ctx * ctx, const byte * clear, byte * cipher, int blocks);
+void gost_enc(gost_ctx * c, const byte * clear, byte * cipher, int blocks);
 /* Decrypt several full blocks in ECB mode */
-void gost_dec(gost_ctx * ctx, const byte * cipher, byte * clear, int blocks);
+void gost_dec(gost_ctx * c, const byte * cipher, byte * clear, int blocks);
 /* Encrypts several full blocks in CFB mode using 8byte IV */
 void gost_enc_cfb(gost_ctx * ctx, const byte * iv, const byte * clear,
                   byte * cipher, int blocks);
@@ -59,28 +59,28 @@ void gostcrypt(gost_ctx * c, const byte * in, byte * out);
 /* Decrypt one  block */
 void gostdecrypt(gost_ctx * c, const byte * in, byte * out);
 /* Set key into context */
-void gost_key(gost_ctx * ctx, const byte * key);
+void gost_key(gost_ctx * c, const byte * k);
 /* Set key into context */
-void magma_key(gost_ctx * ctx, const byte * key);
+void magma_key(gost_ctx * c, const byte * k);
 /* Get key from context */
-void gost_get_key(gost_ctx * ctx, byte * key);
+void gost_get_key(gost_ctx * c, byte * k);
 /* Set S-blocks into context */
-void gost_init(gost_ctx * ctx, const gost_subst_block * subst_block);
+void gost_init(gost_ctx * c, const gost_subst_block * b);
 /* Clean up context */
-void gost_destroy(gost_ctx * ctx);
+void gost_destroy(gost_ctx * c);
 /* Intermediate function used for calculate hash */
 void gost_enc_with_key(gost_ctx *, byte * key, byte * inblock,
                        byte * outblock);
 /* Compute MAC of given length in bits from data */
-int gost_mac(gost_ctx * ctx, int hmac_len, const unsigned char *data,
-             unsigned int data_len, unsigned char *hmac);
+int gost_mac(gost_ctx * ctx, int mac_len, const unsigned char *data,
+             unsigned int data_len, unsigned char *mac);
 /*
  * Compute MAC of given length in bits from data, using non-zero 8-byte IV
  * (non-standard, for use in CryptoPro key transport only
  */
-int gost_mac_iv(gost_ctx * ctx, int hmac_len, const unsigned char *iv,
+int gost_mac_iv(gost_ctx * c, int mac_len, const unsigned char *iv,
                 const unsigned char *data, unsigned int data_len,
-                unsigned char *hmac);
+                unsigned char *mac);
 /* Perform one step of MAC calculation like gostcrypt */
 void mac_block(gost_ctx * c, byte * buffer, const byte * block);
 /* Extracts MAC value from mac state buffer */
index 69f99757c2ae704a324930297ee71eef0502963e..ad6d62b6b6d8280c29e3fc0525c5713d21566656 100644 (file)
@@ -29,7 +29,7 @@ static int gost_ciphers(ENGINE* e, const EVP_CIPHER** cipher,
                         const int** nids, int nid);
 
 static int gost_digests(ENGINE* e, const EVP_MD** digest,
-                        const int** nids, int ind);
+                        const int** nids, int nid);
 
 static int gost_pkey_meths(ENGINE* e, EVP_PKEY_METHOD** pmeth,
                            const int** nids, int nid);
index bb25ce360c3a47612c776dc507cb752bcbd56158..b590bf541bec29eb00e19bc78f602761383db5a5 100644 (file)
@@ -247,12 +247,12 @@ void inc_counter(unsigned char *buffer, size_t buf_len);
 # define EVP_MD_CTRL_SET_KEY (EVP_MD_CTRL_ALG_CTRL+4)
 /* EVP_PKEY_METHOD key encryption callbacks */
 /* From gost_ec_keyx.c */
-int pkey_gost_encrypt(EVP_PKEY_CTX *ctx, unsigned char *out,
-                           size_t *outlen, const unsigned char *key,
+int pkey_gost_encrypt(EVP_PKEY_CTX *pctx, unsigned char *out,
+                           size_t *out_len, const unsigned char *key,
                            size_t key_len);
 
-int pkey_gost_decrypt(EVP_PKEY_CTX *ctx, unsigned char *out,
-                           size_t *outlen, const unsigned char *in,
+int pkey_gost_decrypt(EVP_PKEY_CTX *pctx, unsigned char *key,
+                           size_t *key_len, const unsigned char *in,
                            size_t in_len);
 /* derive functions */
 /* From gost_ec_keyx.c */