mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Update: Added test vectors for crypt types 3, 7, md5, sha1, y, and gy
This commit is contained in:
parent
4105bded13
commit
f2b3814b57
@ -2043,8 +2043,14 @@ static void command_version (client_t *client, source_t *source, adm
|
|||||||
global_unlock();
|
global_unlock();
|
||||||
|
|
||||||
reportxml_helper_add_value_flag(rflags, "crypt-1", util_crypt_is_supported("$1$"));
|
reportxml_helper_add_value_flag(rflags, "crypt-1", util_crypt_is_supported("$1$"));
|
||||||
|
reportxml_helper_add_value_flag(rflags, "crypt-3", util_crypt_is_supported("$3$"));
|
||||||
reportxml_helper_add_value_flag(rflags, "crypt-5", util_crypt_is_supported("$5$"));
|
reportxml_helper_add_value_flag(rflags, "crypt-5", util_crypt_is_supported("$5$"));
|
||||||
reportxml_helper_add_value_flag(rflags, "crypt-6", util_crypt_is_supported("$6$"));
|
reportxml_helper_add_value_flag(rflags, "crypt-6", util_crypt_is_supported("$6$"));
|
||||||
|
reportxml_helper_add_value_flag(rflags, "crypt-7", util_crypt_is_supported("$7$"));
|
||||||
|
reportxml_helper_add_value_flag(rflags, "crypt-md5", util_crypt_is_supported("$md5$"));
|
||||||
|
reportxml_helper_add_value_flag(rflags, "crypt-sha1", util_crypt_is_supported("$sha1$"));
|
||||||
|
reportxml_helper_add_value_flag(rflags, "crypt-y", util_crypt_is_supported("$y$"));
|
||||||
|
reportxml_helper_add_value_flag(rflags, "crypt-gy", util_crypt_is_supported("$gy$"));
|
||||||
|
|
||||||
refobject_unref(config);
|
refobject_unref(config);
|
||||||
refobject_unref(dependencies);
|
refobject_unref(dependencies);
|
||||||
|
@ -107,6 +107,10 @@ bool util_crypt_is_supported(const char *prefix)
|
|||||||
{"abX", "$1$xxxxxxxx$3GbMJKRcRFz50R9Q96xFb.", false},
|
{"abX", "$1$xxxxxxxx$3GbMJKRcRFz50R9Q96xFb.", false},
|
||||||
{"abc", "$1$xxxxxxxx$3GbMJKRcRFz50R9Q96xFbY", false},
|
{"abc", "$1$xxxxxxxx$3GbMJKRcRFz50R9Q96xFbY", false},
|
||||||
{"abX", "$1$xxxxxxxx$3GbMJKRcRFz50R9Q96xFbY", false},
|
{"abX", "$1$xxxxxxxx$3GbMJKRcRFz50R9Q96xFbY", false},
|
||||||
|
{"abc", "$3$$e0fba38268d0ec66ef1cb452d5885e53", true},
|
||||||
|
{"abX", "$3$$e0fba38268d0ec66ef1cb452d5885e53", false},
|
||||||
|
{"abc", "$3$$e0fba38268d0ec66ef1cb452d5885e5Y", false},
|
||||||
|
{"abX", "$3$$e0fba38268d0ec66ef1cb452d5885e5Y", false},
|
||||||
{"abc", "$5$xxxxxxxxxxxxxxxx$zNpAueQbvBleD3aSz0KwnySLaHSedk8ULXPvT1m7DUC", true},
|
{"abc", "$5$xxxxxxxxxxxxxxxx$zNpAueQbvBleD3aSz0KwnySLaHSedk8ULXPvT1m7DUC", true},
|
||||||
{"abX", "$5$xxxxxxxxxxxxxxxx$zNpAueQbvBleD3aSz0KwnySLaHSedk8ULXPvT1m7DUC", false},
|
{"abX", "$5$xxxxxxxxxxxxxxxx$zNpAueQbvBleD3aSz0KwnySLaHSedk8ULXPvT1m7DUC", false},
|
||||||
{"abc", "$5$xxxxxxxxxxxxxxxx$zNpAueQbvBleD3aSz0KwnySLaHSedk8ULXPvT1m7DUY", false},
|
{"abc", "$5$xxxxxxxxxxxxxxxx$zNpAueQbvBleD3aSz0KwnySLaHSedk8ULXPvT1m7DUY", false},
|
||||||
@ -114,7 +118,27 @@ bool util_crypt_is_supported(const char *prefix)
|
|||||||
{"abc", "$6$xxxxxxxxxxxxxxxx$yNfBmH1zabagyi9HZwRuCgebrSjfr1zXUE6pFhnTG1BcvINxhgU53sjSUJDnQ5s6FPq8NSIntrpmc5ox87wX5.", true},
|
{"abc", "$6$xxxxxxxxxxxxxxxx$yNfBmH1zabagyi9HZwRuCgebrSjfr1zXUE6pFhnTG1BcvINxhgU53sjSUJDnQ5s6FPq8NSIntrpmc5ox87wX5.", true},
|
||||||
{"abX", "$6$xxxxxxxxxxxxxxxx$yNfBmH1zabagyi9HZwRuCgebrSjfr1zXUE6pFhnTG1BcvINxhgU53sjSUJDnQ5s6FPq8NSIntrpmc5ox87wX5.", false},
|
{"abX", "$6$xxxxxxxxxxxxxxxx$yNfBmH1zabagyi9HZwRuCgebrSjfr1zXUE6pFhnTG1BcvINxhgU53sjSUJDnQ5s6FPq8NSIntrpmc5ox87wX5.", false},
|
||||||
{"abc", "$6$xxxxxxxxxxxxxxxx$yNfBmH1zabagyi9HZwRuCgebrSjfr1zXUE6pFhnTG1BcvINxhgU53sjSUJDnQ5s6FPq8NSIntrpmc5ox87wX5Y", false},
|
{"abc", "$6$xxxxxxxxxxxxxxxx$yNfBmH1zabagyi9HZwRuCgebrSjfr1zXUE6pFhnTG1BcvINxhgU53sjSUJDnQ5s6FPq8NSIntrpmc5ox87wX5Y", false},
|
||||||
{"abX", "$6$xxxxxxxxxxxxxxxx$yNfBmH1zabagyi9HZwRuCgebrSjfr1zXUE6pFhnTG1BcvINxhgU53sjSUJDnQ5s6FPq8NSIntrpmc5ox87wX5Y", false}
|
{"abX", "$6$xxxxxxxxxxxxxxxx$yNfBmH1zabagyi9HZwRuCgebrSjfr1zXUE6pFhnTG1BcvINxhgU53sjSUJDnQ5s6FPq8NSIntrpmc5ox87wX5Y", false},
|
||||||
|
{"abc", "$7$DU..../....2Q9obwLhin8qvQl6sisAO/$n4xOT1fpjmazI6Ekeq3slWypZS0PKKV/QVpUE1X0MH6", true},
|
||||||
|
{"abX", "$7$DU..../....2Q9obwLhin8qvQl6sisAO/$n4xOT1fpjmazI6Ekeq3slWypZS0PKKV/QVpUE1X0MH6", false},
|
||||||
|
{"abc", "$7$DU..../....2Q9obwLhin8qvQl6sisAO/$n4xOT1fpjmazI6Ekeq3slWypZS0PKKV/QVpUE1X0MHY", false},
|
||||||
|
{"abX", "$7$DU..../....2Q9obwLhin8qvQl6sisAO/$n4xOT1fpjmazI6Ekeq3slWypZS0PKKV/QVpUE1X0MHY", false},
|
||||||
|
{"abc", "$md5$GUBv0xjJ$$59nlXSorBz79sJsp1gfwk1", true},
|
||||||
|
{"abX", "$md5$GUBv0xjJ$$59nlXSorBz79sJsp1gfwk1", false},
|
||||||
|
{"abc", "$md5$GUBv0xjJ$$59nlXSorBz79sJsp1gfwkY", false},
|
||||||
|
{"abX", "$md5$GUBv0xjJ$$59nlXSorBz79sJsp1gfwkY", false},
|
||||||
|
{"abc", "$sha1$40000$jtNX3nZ2$Cw.7bEep2dEG6qIx3.0HkiF/YoLW", true},
|
||||||
|
{"abX", "$sha1$40000$jtNX3nZ2$Cw.7bEep2dEG6qIx3.0HkiF/YoLW", false},
|
||||||
|
{"abc", "$sha1$40000$jtNX3nZ2$Cw.7bEep2dEG6qIx3.0HkiF/YoLY", false},
|
||||||
|
{"abX", "$sha1$40000$jtNX3nZ2$Cw.7bEep2dEG6qIx3.0HkiF/YoLY", false},
|
||||||
|
{"abc", "$y$j9T$F5Jx5fExrKuPp53xLKQ..1$aC5fZPrKSlHTuOtuJjdRm7BCdVfOnO9UIkyfXQcyB83", true},
|
||||||
|
{"abX", "$y$j9T$F5Jx5fExrKuPp53xLKQ..1$aC5fZPrKSlHTuOtuJjdRm7BCdVfOnO9UIkyfXQcyB83", false},
|
||||||
|
{"abc", "$y$j9T$F5Jx5fExrKuPp53xLKQ..1$aC5fZPrKSlHTuOtuJjdRm7BCdVfOnO9UIkyfXQcyB8Y", false},
|
||||||
|
{"abX", "$y$j9T$F5Jx5fExrKuPp53xLKQ..1$aC5fZPrKSlHTuOtuJjdRm7BCdVfOnO9UIkyfXQcyB8Y", false},
|
||||||
|
{"abc", "$gy$jCT$HM87v.7RwpQLba8fDjNSk1$3jEy/aqqTrXmZVCK3RqOQJJS8ve8hM5pSUTTkaTO.l5", true},
|
||||||
|
{"abX", "$gy$jCT$HM87v.7RwpQLba8fDjNSk1$3jEy/aqqTrXmZVCK3RqOQJJS8ve8hM5pSUTTkaTO.l5", false},
|
||||||
|
{"abc", "$gy$jCT$HM87v.7RwpQLba8fDjNSk1$3jEy/aqqTrXmZVCK3RqOQJJS8ve8hM5pSUTTkaTO.lY", false},
|
||||||
|
{"abX", "$gy$jCT$HM87v.7RwpQLba8fDjNSk1$3jEy/aqqTrXmZVCK3RqOQJJS8ve8hM5pSUTTkaTO.lY", false}
|
||||||
};
|
};
|
||||||
size_t prefixlen = strlen(prefix);
|
size_t prefixlen = strlen(prefix);
|
||||||
bool supported = false;
|
bool supported = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user