提交 42181d4b 编写于 作者: J J. Bruce Fields 提交者: Trond Myklebust

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: NKevin Coffman <kwc@citi.umich.edu>
Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 9eed129b
...@@ -111,14 +111,18 @@ get_key(const void *p, const void *end, struct crypto_tfm **res, int *resalg) ...@@ -111,14 +111,18 @@ get_key(const void *p, const void *end, struct crypto_tfm **res, int *resalg)
setkey = 0; setkey = 0;
break; break;
default: default:
dprintk("RPC: SPKM3 get_key: unsupported algorithm %d", *resalg); dprintk("gss_spkm3_mech: unsupported algorithm %d\n", *resalg);
goto out_err_free_key; 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; goto out_err_free_key;
}
if (setkey) { 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; goto out_err_free_tfm;
}
} }
if(key.len > 0) if(key.len > 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册