Skip to content

Commit

Permalink
SUNRPC: Make krb5 report unsupported encryption types
Browse files Browse the repository at this point in the history
 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>
  • Loading branch information
J. Bruce Fields authored and Trond Myklebust committed Jan 6, 2006
1 parent 42181d4 commit 9e56904
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions net/sunrpc/auth_gss/gss_krb5_mech.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,17 @@ get_key(const void *p, const void *end, struct crypto_tfm **res)
alg_mode = CRYPTO_TFM_MODE_CBC;
break;
default:
dprintk("RPC: get_key: unsupported algorithm %d\n", alg);
printk("gss_kerberos_mech: unsupported algorithm %d\n", alg);
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_kerberos_mech: unable to initialize crypto algorithm %s\n", alg_name);
goto out_err_free_key;
if (crypto_cipher_setkey(*res, key.data, key.len))
}
if (crypto_cipher_setkey(*res, key.data, key.len)) {
printk("gss_kerberos_mech: error setting key for crypto algorithm %s\n", alg_name);
goto out_err_free_tfm;
}

kfree(key.data);
return p;
Expand Down

0 comments on commit 9e56904

Please sign in to comment.