summaryrefslogtreecommitdiffstats
path: root/recipes-connectivity/openssl/openssl-qoriq/qoriq/0035-cryptodev-fix-warnings-on-excess-elements-in-struct-.patch
blob: e028f663855c1c43f719fa5b5ac64d1f2d4e212b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
From 6ed8710043b5dc947afab8fffa80ea97f4c84ad6 Mon Sep 17 00:00:00 2001
From: Cristian Stoica <cristian.stoica@nxp.com>
Date: Mon, 8 Feb 2016 16:21:46 +0200
Subject: [PATCH 35/48] cryptodev: fix warnings on excess elements in struct
 initializer

The initialization data for these structures had either missing or excess
values and did not match the structure definitions.

Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com>
---
 crypto/dh/dh.h                |  6 +++---
 crypto/dsa/dsa.h              | 11 ++++++-----
 crypto/engine/eng_cryptodev.c | 11 ++++++-----
 3 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/crypto/dh/dh.h b/crypto/dh/dh.h
index 31dd762..11c6c7d 100644
--- a/crypto/dh/dh.h
+++ b/crypto/dh/dh.h
@@ -123,9 +123,9 @@ struct dh_method {
     int (*bn_mod_exp) (const DH *dh, BIGNUM *r, const BIGNUM *a,
                        const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
                        BN_MONT_CTX *m_ctx);
-	int (*compute_key_async)(unsigned char *key,const BIGNUM *pub_key,DH *dh,
-				struct pkc_cookie_s *cookie);
-	int (*generate_key_async)(DH *dh, struct pkc_cookie_s *cookie);
+    int (*compute_key_async) (unsigned char *key, const BIGNUM *pub_key,
+                              DH *dh, struct pkc_cookie_s * cookie);
+    int (*generate_key_async) (DH *dh, struct pkc_cookie_s * cookie);
     int (*init) (DH *dh);
     int (*finish) (DH *dh);
     int flags;
diff --git a/crypto/dsa/dsa.h b/crypto/dsa/dsa.h
index 8584731..ab52add 100644
--- a/crypto/dsa/dsa.h
+++ b/crypto/dsa/dsa.h
@@ -139,10 +139,11 @@ struct dsa_method {
     /* Can be null */
     int (*bn_mod_exp) (DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
                        const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
-	int (*dsa_do_sign_async)(const unsigned char *dgst, int dlen, DSA *dsa,
-				DSA_SIG *sig, struct pkc_cookie_s *cookie);
-	int (*dsa_do_verify_async)(const unsigned char *dgst, int dgst_len,
-			     DSA_SIG *sig, DSA *dsa, struct pkc_cookie_s *cookie);
+    int (*dsa_do_sign_async) (const unsigned char *dgst, int dlen, DSA *dsa,
+                              DSA_SIG *sig, struct pkc_cookie_s * cookie);
+    int (*dsa_do_verify_async) (const unsigned char *dgst, int dgst_len,
+                                DSA_SIG *sig, DSA *dsa,
+                                struct pkc_cookie_s * cookie);
     int (*init) (DSA *dsa);
     int (*finish) (DSA *dsa);
     int flags;
@@ -154,7 +155,7 @@ struct dsa_method {
                          BN_GENCB *cb);
     /* If this is non-NULL, it is used to generate DSA keys */
     int (*dsa_keygen) (DSA *dsa);
-	int (*dsa_keygen_async)(DSA *dsa, struct pkc_cookie_s *cookie);
+    int (*dsa_keygen_async) (DSA *dsa, struct pkc_cookie_s * cookie);
 };
 
 struct dsa_st {
diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c
index 1c71bc7..20e1ec3 100644
--- a/crypto/engine/eng_cryptodev.c
+++ b/crypto/engine/eng_cryptodev.c
@@ -2905,11 +2905,13 @@ static DSA_METHOD cryptodev_dsa = {
     NULL,
     NULL,
     NULL,
-    NULL,
     NULL,                       /* init */
     NULL,                       /* finish */
     0,                          /* flags */
-    NULL                        /* app_data */
+    NULL,                       /* app_data */
+    NULL,
+    NULL,
+    NULL
 };
 
 static ECDSA_METHOD cryptodev_ecdsa = {
@@ -2919,7 +2921,6 @@ static ECDSA_METHOD cryptodev_ecdsa = {
     NULL,
     NULL,
     NULL,
-    NULL,
     0,                          /* flags */
     NULL                        /* app_data */
 };
@@ -4496,14 +4497,14 @@ static DH_METHOD cryptodev_dh = {
     NULL,
     NULL,
     0,                          /* flags */
-    NULL                        /* app_data */
+    NULL,                       /* app_data */
+    NULL,                       /* generate_params */
 };
 
 static ECDH_METHOD cryptodev_ecdh = {
     "cryptodev ECDH method",
     NULL,                       /* cryptodev_ecdh_compute_key */
     NULL,
-    NULL,
     0,                          /* flags */
     NULL                        /* app_data */
 };
-- 
2.7.3