Update check for TLS-proxy secret.

GitOrigin-RevId: 4ea3040f2db8da91baecd0a814933cd9cc4ccf2e
This commit is contained in:
levlam 2019-07-11 23:42:59 +03:00
parent db8539d9df
commit 19b6aeeb93

View File

@ -26,7 +26,7 @@ Result<ProxySecret> ProxySecret::from_link(Slice encoded_secret) {
Result<ProxySecret> ProxySecret::from_binary(Slice raw_unchecked_secret) {
if (raw_unchecked_secret.size() == 16 ||
(raw_unchecked_secret.size() == 17 && static_cast<unsigned char>(raw_unchecked_secret[0]) == 0xdd) ||
(raw_unchecked_secret.size() >= 17 && static_cast<unsigned char>(raw_unchecked_secret[0]) == 0xee)) {
(raw_unchecked_secret.size() >= 18 && static_cast<unsigned char>(raw_unchecked_secret[0]) == 0xee)) {
return from_raw(raw_unchecked_secret);
}
if (raw_unchecked_secret.size() < 16) {