瀏覽代碼

Run AEAD test cases at the end of a file.

aead_test reads test vectors from a file but used blank lines to
indicate the end of a test case. If the file ended without a blank line
to terminate the final test case, it would previously have been skipped.

Change-Id: Id8dd34e86f0b912596dfb33234a894f8d9aa0235
kris/onging/CECPQ3_patch15
Adam Langley 10 年之前
父節點
當前提交
d54dc249ea
共有 1 個檔案被更改,包括 12 行新增10 行删除
  1. +12
    -10
      crypto/cipher/aead_test.c

+ 12
- 10
crypto/cipher/aead_test.c 查看文件

@@ -171,7 +171,7 @@ int main(int argc, char **argv) {
unsigned int *buf_len = NULL;

if (!fgets(line, sizeof(line), f)) {
break;
line[0] = 0;
}

line_no++;
@@ -189,19 +189,21 @@ int main(int argc, char **argv) {
}
}

if (!any_values_set) {
continue;
}
if (any_values_set) {
if (!run_test_case(aead, bufs, lengths, line_no)) {
return 4;
}

if (!run_test_case(aead, bufs, lengths, line_no)) {
return 4;
}
for (j = 0; j < NUM_TYPES; j++) {
lengths[j] = 0;
}

for (j = 0; j < NUM_TYPES; j++) {
lengths[j] = 0;
num_tests++;
}

num_tests++;
if (line[0] == 0) {
break;
}
continue;
}



Loading…
取消
儲存