mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
iscsi-scst: Fix SHA-1 algorithm number
According to https://www.iana.org/assignments/ppp-numbers/ppp-numbers.xml#ppp-numbers-9 the value of the SHA-1 algorithm is 6 and not 7, as it is now in iscsi-scst/usr/chap.c. If on a client side node.session.auth.chap_algs is SHA1, login fails. Signed-off-by: Lev Vainblat <lev@zadarastorage.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9171 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
#define BASE64_FORMAT 0x02
|
||||
|
||||
#define CHAP_DIGEST_ALG_MD5 5
|
||||
#define CHAP_DIGEST_ALG_SHA1 7
|
||||
#define CHAP_DIGEST_ALG_SHA1 6
|
||||
|
||||
#define CHAP_MD5_DIGEST_LEN 16
|
||||
#define CHAP_SHA1_DIGEST_LEN 20
|
||||
@@ -370,7 +370,7 @@ static int chap_initiator_auth_create_challenge(struct connection *conn)
|
||||
conn->auth.chap.digest_alg = CHAP_DIGEST_ALG_MD5;
|
||||
conn->auth_state = CHAP_AUTH_STATE_CHALLENGE;
|
||||
break;
|
||||
} else if (!strcmp(p, "7")) {
|
||||
} else if (!strcmp(p, "6")) {
|
||||
conn->auth.chap.digest_alg = CHAP_DIGEST_ALG_SHA1;
|
||||
conn->auth_state = CHAP_AUTH_STATE_CHALLENGE;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user