summaryrefslogtreecommitdiffstats
path: root/recipes-connectivity/openssl/openssl-qoriq/qoriq/0028-cryptodev-fix-debug-print-messages.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-connectivity/openssl/openssl-qoriq/qoriq/0028-cryptodev-fix-debug-print-messages.patch')
-rw-r--r--recipes-connectivity/openssl/openssl-qoriq/qoriq/0028-cryptodev-fix-debug-print-messages.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/recipes-connectivity/openssl/openssl-qoriq/qoriq/0028-cryptodev-fix-debug-print-messages.patch b/recipes-connectivity/openssl/openssl-qoriq/qoriq/0028-cryptodev-fix-debug-print-messages.patch
new file mode 100644
index 0000000..03d1b96
--- /dev/null
+++ b/recipes-connectivity/openssl/openssl-qoriq/qoriq/0028-cryptodev-fix-debug-print-messages.patch
@@ -0,0 +1,90 @@
1From 3dd41691dc8162ec26d188269934689ad834894c Mon Sep 17 00:00:00 2001
2From: Cristian Stoica <cristian.stoica@nxp.com>
3Date: Tue, 15 Dec 2015 12:51:36 +0200
4Subject: [PATCH 28/48] cryptodev: fix debug print messages
5
6Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com>
7---
8 crypto/engine/eng_cryptodev.c | 18 +++++++++---------
9 1 file changed, 9 insertions(+), 9 deletions(-)
10
11diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c
12index 76faa35..1585009 100644
13--- a/crypto/engine/eng_cryptodev.c
14+++ b/crypto/engine/eng_cryptodev.c
15@@ -1563,13 +1563,13 @@ static int cryptodev_digest_init(EVP_MD_CTX *ctx)
16
17 digest = digest_nid_to_cryptodev(ctx->digest->type);
18 if (digest == NID_undef) {
19- printf("cryptodev_digest_init: Can't get digest \n");
20+ printf("%s: Can't get digest\n", __func__);
21 return (0);
22 }
23
24 state->d_fd = get_dev_crypto();
25 if (state->d_fd < 0) {
26- printf("cryptodev_digest_init: Can't get Dev \n");
27+ printf("%s: Can't get Dev\n", __func__);
28 return (0);
29 }
30
31@@ -1586,7 +1586,7 @@ static int cryptodev_digest_update(EVP_MD_CTX *ctx, const void *data,
32 struct dev_crypto_state *state = ctx->md_data;
33
34 if (!data || !count) {
35- printf("cryptodev_digest_update: illegal inputs \n");
36+ printf("%s: illegal inputs\n", __func__);
37 return 0;
38 }
39
40@@ -1603,7 +1603,7 @@ static int cryptodev_digest_update(EVP_MD_CTX *ctx, const void *data,
41 state->mac_data =
42 OPENSSL_realloc(state->mac_data, state->mac_len + count);
43 if (!state->mac_data) {
44- printf("cryptodev_digest_update: realloc failed\n");
45+ printf("%s: realloc failed\n", __func__);
46 return (0);
47 }
48
49@@ -1622,12 +1622,12 @@ static int cryptodev_digest_final(EVP_MD_CTX *ctx, unsigned char *md)
50 struct session_op *sess = &state->d_sess;
51
52 if (!md || state->d_fd < 0) {
53- printf("cryptodev_digest_final: illegal input\n");
54+ printf("%s: illegal input\n", __func__);
55 return (0);
56 }
57
58 if (ioctl(state->d_fd, CIOCGSESSION, sess) < 0) {
59- printf("cryptodev_digest_init: Open session failed\n");
60+ printf("%s: Open session failed\n", __func__);
61 return (0);
62 }
63
64@@ -1640,12 +1640,12 @@ static int cryptodev_digest_final(EVP_MD_CTX *ctx, unsigned char *md)
65 cryp.mac = md;
66
67 if (ioctl(state->d_fd, CIOCCRYPT, &cryp) < 0) {
68- printf("cryptodev_digest_final: digest failed\n");
69+ printf("%s: digest failed\n", __func__);
70 ret = 0;
71 }
72
73 if (ioctl(state->d_fd, CIOCFSESSION, &sess->ses) < 0) {
74- printf("cryptodev_digest_cleanup: failed to close session\n");
75+ printf("%s: failed to close session\n", __func__);
76 }
77
78 return ret;
79@@ -1700,7 +1700,7 @@ static int cryptodev_digest_copy(EVP_MD_CTX *to, const EVP_MD_CTX *from)
80 if (ioctl(dstate->d_fd, CIOCGSESSION, sess) < 0) {
81 put_dev_crypto(dstate->d_fd);
82 dstate->d_fd = -1;
83- printf("cryptodev_digest_init: Open session failed\n");
84+ printf("%s: Open session failed\n", __func__);
85 return (0);
86 }
87
88--
892.7.0
90