Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361711
b: refs/heads/master
c: 7ac9ad1
h: refs/heads/master
i:
  361709: 7aa0893
  361707: 55bf5fd
  361703: 62159df
  361695: 7ea2d4a
v: v3
  • Loading branch information
Andy Grover authored and Nicholas Bellinger committed Mar 18, 2013
1 parent 2d4d5f0 commit 340eb8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 882e3f8e6966109ad837cfe79e97cf3deb3ae19b
refs/heads/master: 7ac9ad11b2a5cf77a92b58ee6b672ad2fa155eb1
5 changes: 4 additions & 1 deletion trunk/drivers/target/iscsi/iscsi_target_auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ static int chap_server_compute_md5(
{
char *endptr;
unsigned long id;
unsigned char id_as_uchar;
unsigned char digest[MD5_SIGNATURE_SIZE];
unsigned char type, response[MD5_SIGNATURE_SIZE * 2 + 2];
unsigned char identifier[10], *challenge = NULL;
Expand Down Expand Up @@ -355,7 +356,9 @@ static int chap_server_compute_md5(
goto out;
}

sg_init_one(&sg, &id, 1);
/* To handle both endiannesses */
id_as_uchar = id;
sg_init_one(&sg, &id_as_uchar, 1);
ret = crypto_hash_update(&desc, &sg, 1);
if (ret < 0) {
pr_err("crypto_hash_update() failed for id\n");
Expand Down

0 comments on commit 340eb8f

Please sign in to comment.