aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/auth_gss/gss_krb5_crypto.c
diff options
context:
space:
mode:
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;