Commit 42181d4bafe9047d0cd7f92fc11d79496bd95034

Authored by J. Bruce Fields
Committed by Trond Myklebust
1 parent 9eed129bbd

SUNRPC: Make spkm3 report unsupported encryption types

Print messages when an unsupported encrytion algorthm is requested or
 there is an error locating a supported algorthm.

 Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
 Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

Showing 1 changed file with 7 additions and 3 deletions Side-by-side Diff

net/sunrpc/auth_gss/gss_spkm3_mech.c
... ... @@ -111,14 +111,18 @@
111 111 setkey = 0;
112 112 break;
113 113 default:
114   - dprintk("RPC: SPKM3 get_key: unsupported algorithm %d", *resalg);
  114 + dprintk("gss_spkm3_mech: unsupported algorithm %d\n", *resalg);
115 115 goto out_err_free_key;
116 116 }
117   - if (!(*res = crypto_alloc_tfm(alg_name, alg_mode)))
  117 + if (!(*res = crypto_alloc_tfm(alg_name, alg_mode))) {
  118 + printk("gss_spkm3_mech: unable to initialize crypto algorthm %s\n", alg_name);
118 119 goto out_err_free_key;
  120 + }
119 121 if (setkey) {
120   - if (crypto_cipher_setkey(*res, key.data, key.len))
  122 + if (crypto_cipher_setkey(*res, key.data, key.len)) {
  123 + printk("gss_spkm3_mech: error setting key for crypto algorthm %s\n", alg_name);
121 124 goto out_err_free_tfm;
  125 + }
122 126 }
123 127  
124 128 if(key.len > 0)