2fd8d4df94
```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.-][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
60 lines
1.7 KiB
Diff
60 lines
1.7 KiB
Diff
--- a/usr/auth.c
|
|
+++ b/usr/auth.c
|
|
@@ -182,9 +182,11 @@
|
|
case AUTH_CHAP_ALG_SHA256:
|
|
digest = EVP_sha256();
|
|
break;
|
|
+#if 0
|
|
case AUTH_CHAP_ALG_SHA3_256:
|
|
digest = EVP_sha3_256();
|
|
break;
|
|
+#endif
|
|
}
|
|
|
|
if (*context == NULL)
|
|
@@ -335,7 +337,7 @@
|
|
acl_chk_chap_alg_optn(int chap_algorithm)
|
|
{
|
|
if (chap_algorithm == AUTH_OPTION_NONE ||
|
|
- chap_algorithm == AUTH_CHAP_ALG_SHA3_256 ||
|
|
+// chap_algorithm == AUTH_CHAP_ALG_SHA3_256 ||
|
|
chap_algorithm == AUTH_CHAP_ALG_SHA256 ||
|
|
chap_algorithm == AUTH_CHAP_ALG_SHA1 ||
|
|
chap_algorithm == AUTH_CHAP_ALG_MD5)
|
|
@@ -748,9 +750,11 @@
|
|
case AUTH_CHAP_ALG_SHA256:
|
|
client->chap_challenge_len = AUTH_CHAP_SHA256_RSP_LEN;
|
|
break;
|
|
+#if 0
|
|
case AUTH_CHAP_ALG_SHA3_256:
|
|
client->chap_challenge_len = AUTH_CHAP_SHA3_256_RSP_LEN;
|
|
break;
|
|
+#endif
|
|
}
|
|
return;
|
|
}
|
|
@@ -899,7 +903,7 @@
|
|
client->local_state = AUTH_LOCAL_STATE_ERROR;
|
|
client->dbg_status = AUTH_DBG_STATUS_CHAP_ALG_REJECT;
|
|
break;
|
|
- } else if ((client->negotiated_chap_alg != AUTH_CHAP_ALG_SHA3_256) &&
|
|
+ } else if (// (client->negotiated_chap_alg != AUTH_CHAP_ALG_SHA3_256) &&
|
|
(client->negotiated_chap_alg != AUTH_CHAP_ALG_SHA256) &&
|
|
(client->negotiated_chap_alg != AUTH_CHAP_ALG_SHA1) &&
|
|
(client->negotiated_chap_alg != AUTH_CHAP_ALG_MD5)) {
|
|
@@ -1849,6 +1853,7 @@
|
|
"SHA256 due to crypto lib configuration");
|
|
}
|
|
break;
|
|
+#if 0
|
|
case AUTH_CHAP_ALG_SHA3_256:
|
|
if (EVP_DigestInit_ex(context, EVP_sha3_256(), NULL)) {
|
|
value_list[i++] = AUTH_CHAP_ALG_SHA3_256;
|
|
@@ -1857,6 +1862,7 @@
|
|
"SHA3-256 due to crypto lib configuration");
|
|
}
|
|
break;
|
|
+#endif
|
|
case ~0:
|
|
/* unset value in array, just ignore */
|
|
break;
|