aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/auth_gss/gss_krb5_crypto.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@fieldses.org>2006-12-04 20:22:38 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-12-06 10:46:46 -0500
commitca54f896454852f0bc8d50e6e4c55d9defedbd0a (patch)
treef4d3c245f1b0e6edc38e4b9348d54f9f95028827 /net/sunrpc/auth_gss/gss_krb5_crypto.c
parent2818bf81a8c91fb29634df68bdc3cc5e003201d0 (diff)
rpcgss: simplify make_checksum
We're doing some pointless translation between krb5 constants and kernel crypto string names. Also clean up some related spkm3 code as necessary. 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.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/net/sunrpc/auth_gss/gss_krb5_crypto.c b/net/sunrpc/auth_gss/gss_krb5_crypto.c
index 10d05ea3721..d926cda8862 100644
--- a/net/sunrpc/auth_gss/gss_krb5_crypto.c
+++ b/net/sunrpc/auth_gss/gss_krb5_crypto.c
@@ -130,23 +130,13 @@ checksummer(struct scatterlist *sg, void *data)
130 130
131/* checksum the plaintext data and hdrlen bytes of the token header */ 131/* checksum the plaintext data and hdrlen bytes of the token header */
132s32 132s32
133make_checksum(s32 cksumtype, char *header, int hdrlen, struct xdr_buf *body, 133make_checksum(char *cksumname, char *header, int hdrlen, struct xdr_buf *body,
134 int body_offset, struct xdr_netobj *cksum) 134 int body_offset, struct xdr_netobj *cksum)
135{ 135{
136 char *cksumname;
137 struct hash_desc desc; /* XXX add to ctx? */ 136 struct hash_desc desc; /* XXX add to ctx? */
138 struct scatterlist sg[1]; 137 struct scatterlist sg[1];
139 int err; 138 int err;
140 139
141 switch (cksumtype) {
142 case CKSUMTYPE_RSA_MD5:
143 cksumname = "md5";
144 break;
145 default:
146 dprintk("RPC: krb5_make_checksum:"
147 " unsupported checksum %d", cksumtype);
148 return GSS_S_FAILURE;
149 }
150 desc.tfm = crypto_alloc_hash(cksumname, 0, CRYPTO_ALG_ASYNC); 140 desc.tfm = crypto_alloc_hash(cksumname, 0, CRYPTO_ALG_ASYNC);
151 if (IS_ERR(desc.tfm)) 141 if (IS_ERR(desc.tfm))
152 return GSS_S_FAILURE; 142 return GSS_S_FAILURE;