diff --git a/appfw/tests/standalone/partialsigs b/appfw/tests/standalone/partialsigs index 66cc86dea9855bdb53680b73659104220d86958d..182a9db35780f934c6011616da9687358d0d061d 100644 --- a/appfw/tests/standalone/partialsigs +++ b/appfw/tests/standalone/partialsigs @@ -17,7 +17,7 @@ ECT * FRO T * F ROM T * FROM -T * FROM +T * FRO S E L @@ -32,3 +32,4 @@ OM FROM user s FR*M +t * from diff --git a/appfw/tests/standalone/testfastdetect.c b/appfw/tests/standalone/testfastdetect.c index 53040b68b9e364e5698978cafbbc6975e591c14e..ea8e417ecafc40b3415a8df174258307c969b218 100644 --- a/appfw/tests/standalone/testfastdetect.c +++ b/appfw/tests/standalone/testfastdetect.c @@ -43,12 +43,16 @@ int main(int argc, char **argv) int attack_detected = 0; for (i = 0; i < atoi(argv[1]); ++i) { - if (sqlfw_verify_fast(file_contents)) + if (!sqlfw_verify_fast(file_contents)) { attack_detected = 1; } } + if (attack_detected) + fprintf(stderr,"attack detected\n"); + else + fprintf(stderr,"no attack detected\n"); free(query_structure); return attack_detected; } diff --git a/appfw/tests/standalone/testslowdetect.c b/appfw/tests/standalone/testslowdetect.c index ebb365afef2e8dbf225e8695c6b3250a067fea13..b2c037fee679a5a41408f8c9cd60ca74302ae35e 100644 --- a/appfw/tests/standalone/testslowdetect.c +++ b/appfw/tests/standalone/testslowdetect.c @@ -44,12 +44,17 @@ int main(int argc, char **argv) int attack_detected = 0; for (i = 0; i < atoi(argv[1]); ++i) { - if (sqlfw_verify(file_contents, &errorMessage)) + if (!sqlfw_verify(file_contents, &errorMessage)) { attack_detected = 1; } } + if (attack_detected) + fprintf(stderr,"attack detected\n"); + else + fprintf(stderr,"no attack detected\n"); + free(query_structure); return attack_detected; }