SUNRPC: Make spkm3 report unsupported encryption types
authorJ. Bruce Fields <bfields@fieldses.org>
Tue, 3 Jan 2006 08:56:01 +0000 (09:56 +0100)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 6 Jan 2006 19:58:59 +0000 (14:58 -0500)
 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>
net/sunrpc/auth_gss/gss_spkm3_mech.c

index 39b3edc146947a9c9918b3a6cbf8c0da9308dec8..58400807d4df7dde4f942a842a3936df8eb828b6 100644 (file)
@@ -111,14 +111,18 @@ get_key(const void *p, const void *end, struct crypto_tfm **res, int *resalg)
                        setkey = 0;
                        break;
                default:
-                       dprintk("RPC: SPKM3 get_key: unsupported algorithm %d", *resalg);
+                       dprintk("gss_spkm3_mech: unsupported algorithm %d\n", *resalg);
                        goto out_err_free_key;
        }
-       if (!(*res = crypto_alloc_tfm(alg_name, alg_mode)))
+       if (!(*res = crypto_alloc_tfm(alg_name, alg_mode))) {
+               printk("gss_spkm3_mech: unable to initialize crypto algorthm %s\n", alg_name);
                goto out_err_free_key;
+       }
        if (setkey) {
-               if (crypto_cipher_setkey(*res, key.data, key.len))
+               if (crypto_cipher_setkey(*res, key.data, key.len)) {
+                       printk("gss_spkm3_mech: error setting key for crypto algorthm %s\n", alg_name);
                        goto out_err_free_tfm;
+               }
        }
 
        if(key.len > 0)