diff options
Diffstat (limited to 'fs/cifs/cifsencrypt.c')
-rw-r--r-- | fs/cifs/cifsencrypt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c index 2cfb695d1f89..5d9b9acc5fce 100644 --- a/fs/cifs/cifsencrypt.c +++ b/fs/cifs/cifsencrypt.c | |||
@@ -204,7 +204,7 @@ int cifs_verify_signature(struct kvec *iov, unsigned int nr_iov, | |||
204 | } | 204 | } |
205 | 205 | ||
206 | /* first calculate 24 bytes ntlm response and then 16 byte session key */ | 206 | /* first calculate 24 bytes ntlm response and then 16 byte session key */ |
207 | int setup_ntlm_response(struct cifs_ses *ses) | 207 | int setup_ntlm_response(struct cifs_ses *ses, const struct nls_table *nls_cp) |
208 | { | 208 | { |
209 | int rc = 0; | 209 | int rc = 0; |
210 | unsigned int temp_len = CIFS_SESS_KEY_SIZE + CIFS_AUTH_RESP_SIZE; | 210 | unsigned int temp_len = CIFS_SESS_KEY_SIZE + CIFS_AUTH_RESP_SIZE; |
@@ -221,14 +221,14 @@ int setup_ntlm_response(struct cifs_ses *ses) | |||
221 | ses->auth_key.len = temp_len; | 221 | ses->auth_key.len = temp_len; |
222 | 222 | ||
223 | rc = SMBNTencrypt(ses->password, ses->server->cryptkey, | 223 | rc = SMBNTencrypt(ses->password, ses->server->cryptkey, |
224 | ses->auth_key.response + CIFS_SESS_KEY_SIZE); | 224 | ses->auth_key.response + CIFS_SESS_KEY_SIZE, nls_cp); |
225 | if (rc) { | 225 | if (rc) { |
226 | cFYI(1, "%s Can't generate NTLM response, error: %d", | 226 | cFYI(1, "%s Can't generate NTLM response, error: %d", |
227 | __func__, rc); | 227 | __func__, rc); |
228 | return rc; | 228 | return rc; |
229 | } | 229 | } |
230 | 230 | ||
231 | rc = E_md4hash(ses->password, temp_key); | 231 | rc = E_md4hash(ses->password, temp_key, nls_cp); |
232 | if (rc) { | 232 | if (rc) { |
233 | cFYI(1, "%s Can't generate NT hash, error: %d", __func__, rc); | 233 | cFYI(1, "%s Can't generate NT hash, error: %d", __func__, rc); |
234 | return rc; | 234 | return rc; |
@@ -404,7 +404,7 @@ static int calc_ntlmv2_hash(struct cifs_ses *ses, char *ntlmv2_hash, | |||
404 | } | 404 | } |
405 | 405 | ||
406 | /* calculate md4 hash of password */ | 406 | /* calculate md4 hash of password */ |
407 | E_md4hash(ses->password, nt_hash); | 407 | E_md4hash(ses->password, nt_hash, nls_cp); |
408 | 408 | ||
409 | rc = crypto_shash_setkey(ses->server->secmech.hmacmd5, nt_hash, | 409 | rc = crypto_shash_setkey(ses->server->secmech.hmacmd5, nt_hash, |
410 | CIFS_NTHASH_SIZE); | 410 | CIFS_NTHASH_SIZE); |