diff --git a/cli/commands.c b/cli/commands.c index eabc9d3..cdd8f58 100644 --- a/cli/commands.c +++ b/cli/commands.c @@ -359,7 +359,7 @@ int login(int argc, char **argv) { fprintf(stderr, "handshake size is invalid in path %s\n", path); goto out; } - if ((handshake[0] & 0x80) != 0) { + if ((handshake[0] & 0x80) == 0) { fprintf(stderr, "only \"service-key-indicator\" prefix type is supported\n"); goto out; diff --git a/cli/test.sh b/cli/test.sh index a0152f9..9e03dad 100755 --- a/cli/test.sh +++ b/cli/test.sh @@ -69,7 +69,7 @@ for n in 1 2; do done key="$t/vector-2/a" -path="v2/R4cvQ1u4uJ0OOtYqouURB07hleHDnvaogAFBi-ZW48N2/myhost/exec=%2Fbin%2Fsh/" +path="v2/x4cvQ1u4uJ0OOtYqouURB07hleHDnvaogAFBi-ZW48N2/myhost/exec=%2Fbin%2Fsh/" expected_tag="ZmxczN4x3g4goXu-A2AuuEEVftgS6xM-6gYj-dRrlis=" tag=$("$binary" login --key "$key" "$path") if [ "$tag" != "$expected_tag" ]; then