case 21:
output = "n,,n=frop,r=0980923401388";
break;
+ case 22:
+ output = "p";
+ break;
+ case 23:
+ output = "p=";
+ break;
+ case 24:
+ output = "p.a";
+ break;
default:
auth_scram_client_output(&bctx->asclient, output_r,
output_len_r);
"q=frop",
NULL);
break;
+ case 25:
+ output = t_strconcat(parts[0], ",", parts[1], ",",
+ "p", NULL);
+ break;
+ case 26:
+ output = t_strconcat(parts[0], ",", parts[1], ",",
+ "p=", NULL);
+ break;
+ case 27:
+ output = t_strconcat(parts[0], ",", parts[1], ",",
+ "p.a", NULL);
+ break;
default:
return;
}
&hash_method_sha1, AUTH_SCRAM_CBIND_SERVER_SUPPORT_REQUIRED,
AUTH_SCRAM_SERVER_ERROR_PROTOCOL_VIOLATION, 21);
test_end();
+
+ test_begin("auth server error sha1 - invalid client proof (missing '=' and payload)");
+ test_auth_server_error_one(
+ &hash_method_sha1, AUTH_SCRAM_CBIND_SERVER_SUPPORT_AVAILABLE,
+ AUTH_SCRAM_SERVER_ERROR_PROTOCOL_VIOLATION, 22);
+ test_end();
+
+ test_begin("auth server error sha1 - invalid client proof (missing payload)");
+ test_auth_server_error_one(
+ &hash_method_sha1, AUTH_SCRAM_CBIND_SERVER_SUPPORT_AVAILABLE,
+ AUTH_SCRAM_SERVER_ERROR_PROTOCOL_VIOLATION, 23);
+ test_end();
+
+ test_begin("auth server error sha1 - invalid client proof (missing '=')");
+ test_auth_server_error_one(
+ &hash_method_sha1, AUTH_SCRAM_CBIND_SERVER_SUPPORT_AVAILABLE,
+ AUTH_SCRAM_SERVER_ERROR_PROTOCOL_VIOLATION, 24);
+ test_end();
+
+ test_begin("auth server error sha1 - invalid client proof in final (missing '=' and payload)");
+ test_auth_server_error_one(
+ &hash_method_sha1, AUTH_SCRAM_CBIND_SERVER_SUPPORT_NONE,
+ AUTH_SCRAM_SERVER_ERROR_PROTOCOL_VIOLATION, 25);
+ test_end();
+
+ test_begin("auth server error sha1 - invalid client proof in final (missing payload)");
+ test_auth_server_error_one(
+ &hash_method_sha1, AUTH_SCRAM_CBIND_SERVER_SUPPORT_NONE,
+ AUTH_SCRAM_SERVER_ERROR_PROTOCOL_VIOLATION, 26);
+ test_end();
+
+ test_begin("auth server error sha1 - invalid client proof in final (missing '=')");
+ test_auth_server_error_one(
+ &hash_method_sha1, AUTH_SCRAM_CBIND_SERVER_SUPPORT_NONE,
+ AUTH_SCRAM_SERVER_ERROR_PROTOCOL_VIOLATION, 27);
+ test_end();
}
int main(void)