aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/auth_gss/gss_krb5_crypto.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2006-12-04 20:22:31 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-12-06 10:46:43 -0500
commit8fc7500bb8ea3b5c909869d00628635e964ae882 (patch)
tree3e1b175c0e155a81ace7e9460f4a574d8f5de3be /net/sunrpc/auth_gss/gss_krb5_crypto.c
parent2b577f1f14c8d83ba9400ec8accaf4a208f4f36a (diff)
rpc: gss: eliminate print_hexl()'s
Dumping all this data to the logs is wasteful (even when debugging is turned off), and creates too much output to be useful when it's turned on. Fix a minor style bug or two while we're at it. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/auth_gss/gss_krb5_crypto.c')
-rw-r--r--net/sunrpc/auth_gss/gss_krb5_crypto.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/net/sunrpc/auth_gss/gss_krb5_crypto.c b/net/sunrpc/auth_gss/gss_krb5_crypto.c
index e11a40b25cce..4c53896f1b08 100644
--- a/net/sunrpc/auth_gss/gss_krb5_crypto.c
+++ b/net/sunrpc/auth_gss/gss_krb5_crypto.c
@@ -61,9 +61,6 @@ krb5_encrypt(
61 u8 local_iv[16] = {0}; 61 u8 local_iv[16] = {0};
62 struct blkcipher_desc desc = { .tfm = tfm, .info = local_iv }; 62 struct blkcipher_desc desc = { .tfm = tfm, .info = local_iv };
63 63
64 dprintk("RPC: krb5_encrypt: input data:\n");
65 print_hexl((u32 *)in, length, 0);
66
67 if (length % crypto_blkcipher_blocksize(tfm) != 0) 64 if (length % crypto_blkcipher_blocksize(tfm) != 0)
68 goto out; 65 goto out;
69 66
@@ -80,12 +77,9 @@ krb5_encrypt(
80 sg_set_buf(sg, out, length); 77 sg_set_buf(sg, out, length);
81 78
82 ret = crypto_blkcipher_encrypt_iv(&desc, sg, sg, length); 79 ret = crypto_blkcipher_encrypt_iv(&desc, sg, sg, length);
83
84 dprintk("RPC: krb5_encrypt: output data:\n");
85 print_hexl((u32 *)out, length, 0);
86out: 80out:
87 dprintk("RPC: krb5_encrypt returns %d\n",ret); 81 dprintk("RPC: krb5_encrypt returns %d\n",ret);
88 return(ret); 82 return ret;
89} 83}
90 84
91EXPORT_SYMBOL(krb5_encrypt); 85EXPORT_SYMBOL(krb5_encrypt);
@@ -103,9 +97,6 @@ krb5_decrypt(
103 u8 local_iv[16] = {0}; 97 u8 local_iv[16] = {0};
104 struct blkcipher_desc desc = { .tfm = tfm, .info = local_iv }; 98 struct blkcipher_desc desc = { .tfm = tfm, .info = local_iv };
105 99
106 dprintk("RPC: krb5_decrypt: input data:\n");
107 print_hexl((u32 *)in, length, 0);
108
109 if (length % crypto_blkcipher_blocksize(tfm) != 0) 100 if (length % crypto_blkcipher_blocksize(tfm) != 0)
110 goto out; 101 goto out;
111 102
@@ -121,12 +112,9 @@ krb5_decrypt(
121 sg_set_buf(sg, out, length); 112 sg_set_buf(sg, out, length);
122 113
123 ret = crypto_blkcipher_decrypt_iv(&desc, sg, sg, length); 114 ret = crypto_blkcipher_decrypt_iv(&desc, sg, sg, length);
124
125 dprintk("RPC: krb5_decrypt: output_data:\n");
126 print_hexl((u32 *)out, length, 0);
127out: 115out:
128 dprintk("RPC: gss_k5decrypt returns %d\n",ret); 116 dprintk("RPC: gss_k5decrypt returns %d\n",ret);
129 return(ret); 117 return ret;
130} 118}
131 119
132EXPORT_SYMBOL(krb5_decrypt); 120EXPORT_SYMBOL(krb5_decrypt);