1 From 82612e3c4161ed6e10379841b953a0f56e557be4 Mon Sep 17 00:00:00 2001
2 From: Cristian Stoica <cristian.stoica@nxp.com>
3 Date: Mon, 8 Feb 2016 16:21:46 +0200
4 Subject: [PATCH 35/48] cryptodev: fix warnings on excess elements in struct
7 The initialization data for these structures had either missing or excess
8 values and did not match the structure definitions.
10 Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com>
12 crypto/dh/dh.h | 6 +++---
13 crypto/dsa/dsa.h | 11 ++++++-----
14 crypto/engine/eng_cryptodev.c | 11 ++++++-----
15 3 files changed, 15 insertions(+), 13 deletions(-)
17 diff --git a/crypto/dh/dh.h b/crypto/dh/dh.h
18 index 31dd762..11c6c7d 100644
21 @@ -123,9 +123,9 @@ struct dh_method {
22 int (*bn_mod_exp) (const DH *dh, BIGNUM *r, const BIGNUM *a,
23 const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
25 - int (*compute_key_async)(unsigned char *key,const BIGNUM *pub_key,DH *dh,
26 - struct pkc_cookie_s *cookie);
27 - int (*generate_key_async)(DH *dh, struct pkc_cookie_s *cookie);
28 + int (*compute_key_async) (unsigned char *key, const BIGNUM *pub_key,
29 + DH *dh, struct pkc_cookie_s * cookie);
30 + int (*generate_key_async) (DH *dh, struct pkc_cookie_s * cookie);
32 int (*finish) (DH *dh);
34 diff --git a/crypto/dsa/dsa.h b/crypto/dsa/dsa.h
35 index 8584731..ab52add 100644
36 --- a/crypto/dsa/dsa.h
37 +++ b/crypto/dsa/dsa.h
38 @@ -139,10 +139,11 @@ struct dsa_method {
40 int (*bn_mod_exp) (DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
41 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
42 - int (*dsa_do_sign_async)(const unsigned char *dgst, int dlen, DSA *dsa,
43 - DSA_SIG *sig, struct pkc_cookie_s *cookie);
44 - int (*dsa_do_verify_async)(const unsigned char *dgst, int dgst_len,
45 - DSA_SIG *sig, DSA *dsa, struct pkc_cookie_s *cookie);
46 + int (*dsa_do_sign_async) (const unsigned char *dgst, int dlen, DSA *dsa,
47 + DSA_SIG *sig, struct pkc_cookie_s * cookie);
48 + int (*dsa_do_verify_async) (const unsigned char *dgst, int dgst_len,
49 + DSA_SIG *sig, DSA *dsa,
50 + struct pkc_cookie_s * cookie);
51 int (*init) (DSA *dsa);
52 int (*finish) (DSA *dsa);
54 @@ -154,7 +155,7 @@ struct dsa_method {
56 /* If this is non-NULL, it is used to generate DSA keys */
57 int (*dsa_keygen) (DSA *dsa);
58 - int (*dsa_keygen_async)(DSA *dsa, struct pkc_cookie_s *cookie);
59 + int (*dsa_keygen_async) (DSA *dsa, struct pkc_cookie_s * cookie);
63 diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c
64 index cec6938..407ea62 100644
65 --- a/crypto/engine/eng_cryptodev.c
66 +++ b/crypto/engine/eng_cryptodev.c
67 @@ -2892,11 +2892,13 @@ static DSA_METHOD cryptodev_dsa = {
76 + NULL, /* app_data */
82 static ECDSA_METHOD cryptodev_ecdsa = {
83 @@ -2906,7 +2908,6 @@ static ECDSA_METHOD cryptodev_ecdsa = {
91 @@ -4483,14 +4484,14 @@ static DH_METHOD cryptodev_dh = {
96 + NULL, /* app_data */
97 + NULL, /* generate_params */
100 static ECDH_METHOD cryptodev_ecdh = {
101 "cryptodev ECDH method",
102 NULL, /* cryptodev_ecdh_compute_key */