Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
openssl
提交
84c7a8f7
O
openssl
项目概览
btwise
/
openssl
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
84c7a8f7
编写于
4月 20, 2011
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Warn if lines are truncated in algorithm test utilities.
Support for new test files: DRBG and CCM.
上级
daaf5088
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
52 addition
and
5 deletion
+52
-5
fips/aes/fips_gcmtest.c
fips/aes/fips_gcmtest.c
+3
-2
fips/fips_utl.h
fips/fips_utl.h
+3
-0
fips/fipsalgtest.pl
fips/fipsalgtest.pl
+46
-3
未找到文件。
fips/aes/fips_gcmtest.c
浏览文件 @
84c7a8f7
...
...
@@ -339,8 +339,8 @@ static void xtstest(FILE *in, FILE *out)
static
void
ccmtest
(
FILE
*
in
,
FILE
*
out
)
{
char
buf
[
2048
];
char
lbuf
[
2048
];
char
buf
[
20
00
48
];
char
lbuf
[
20
00
48
];
char
*
keyword
,
*
value
;
long
l
;
unsigned
char
*
Key
=
NULL
,
*
Nonce
=
NULL
;
...
...
@@ -376,6 +376,7 @@ static void ccmtest(FILE *in, FILE *out)
{
*
p
=
0
;
strcpy
(
buf
,
p
+
1
);
strcat
(
buf
,
"
\n
"
);
decr
=
1
;
}
if
(
!
strcmp
(
keyword
,
"Plen"
))
...
...
fips/fips_utl.h
浏览文件 @
84c7a8f7
...
...
@@ -280,6 +280,9 @@ int parse_line(char **pkw, char **pval, char *linebuf, char *olinebuf)
/* Remove trailing space from value */
p
=
value
+
strlen
(
value
)
-
1
;
if
(
*
p
!=
'\n'
)
fprintf
(
stderr
,
"Warning: missing EOL
\n
"
);
while
(
*
p
==
'\n'
||
isspace
((
unsigned
char
)
*
p
))
*
p
--
=
0
;
...
...
fips/fipsalgtest.pl
浏览文件 @
84c7a8f7
...
...
@@ -266,6 +266,30 @@ my @fips_aes_cfb1_test_list = (
);
my
@fips_aes_ccm_test_list
=
(
# AES CCM tests
"
AES CCM
",
[
"
DVPT128
",
"
fips_gcmtest -ccm
"
],
[
"
DVPT192
",
"
fips_gcmtest -ccm
"
],
[
"
DVPT256
",
"
fips_gcmtest -ccm
"
],
[
"
VADT128
",
"
fips_gcmtest -ccm
"
],
[
"
VADT192
",
"
fips_gcmtest -ccm
"
],
[
"
VADT256
",
"
fips_gcmtest -ccm
"
],
[
"
VNT128
",
"
fips_gcmtest -ccm
"
],
[
"
VNT192
",
"
fips_gcmtest -ccm
"
],
[
"
VNT256
",
"
fips_gcmtest -ccm
"
],
[
"
VPT128
",
"
fips_gcmtest -ccm
"
],
[
"
VPT192
",
"
fips_gcmtest -ccm
"
],
[
"
VPT256
",
"
fips_gcmtest -ccm
"
],
[
"
VTT128
",
"
fips_gcmtest -ccm
"
],
[
"
VTT192
",
"
fips_gcmtest -ccm
"
],
[
"
VTT256
",
"
fips_gcmtest -ccm
"
]
);
# Triple DES tests
my
@fips_des3_test_list
=
(
...
...
@@ -348,6 +372,16 @@ my @fips_des3_cfb1_test_list = (
);
my
@fips_drbg_test_list
=
(
# SP800-90 DRBG tests
"
SP800-90 DRBG
",
[
"
CTR_DRBG
",
"
fips_drbgvs
"
],
[
"
Hash_DRBG
",
"
fips_drbgvs
"
],
);
# Verification special cases.
# In most cases the output of a test is deterministic and
# it can be compared to a known good result. A few involve
...
...
@@ -384,6 +418,7 @@ my $bufout = '';
my
$list_tests
=
0
;
my
$minimal_script
=
0
;
my
$outfile
=
'';
my
$no_warn_missing
=
0
;
my
%fips_enabled
=
(
dsa
=>
1
,
...
...
@@ -399,7 +434,9 @@ my %fips_enabled = (
aes
=>
1
,
"
aes-cfb1
"
=>
0
,
des3
=>
1
,
"
des3-cfb1
"
=>
0
"
des3-cfb1
"
=>
0
,
drbg
=>
0
,
ccm
=>
0
,
);
foreach
(
@ARGV
)
{
...
...
@@ -412,6 +449,10 @@ foreach (@ARGV) {
elsif
(
$_
eq
"
--debug
"
)
{
$debug
=
1
;
}
elsif
(
$_
eq
"
--quiet-missing
"
)
{
$ignore_missing
=
1
;
$no_warn_missing
=
1
;
}
elsif
(
$_
eq
"
--ignore-missing
"
)
{
$ignore_missing
=
1
;
}
...
...
@@ -481,6 +522,8 @@ push @fips_test_list, @fips_aes_test_list if $fips_enabled{"aes"};
push
@fips_test_list
,
@fips_aes_cfb1_test_list
if
$fips_enabled
{"
aes-cfb1
"};
push
@fips_test_list
,
@fips_des3_test_list
if
$fips_enabled
{"
des3
"};
push
@fips_test_list
,
@fips_des3_cfb1_test_list
if
$fips_enabled
{"
des3-cfb1
"};
push
@fips_test_list
,
@fips_drbg_test_list
if
$fips_enabled
{"
drbg
"};
push
@fips_test_list
,
@fips_aes_ccm_test_list
if
$fips_enabled
{"
aes-ccm
"};
if
(
$list_tests
)
{
my
(
$test
,
$en
);
...
...
@@ -716,7 +759,7 @@ sub sanity_check_files {
#print STDERR "FILES $tst, $cmd, $req, $resp\n";
if
(
$req
eq
""
)
{
print
STDERR
"
WARNING: missing request file for
$tst
\n
";
print
STDERR
"
WARNING: missing request file for
$tst
\n
"
unless
$no_warn_missing
;
$bad
=
1
;
next
;
}
...
...
@@ -793,7 +836,7 @@ END
}
if
(
$req
eq
""
)
{
print
STDERR
"
WARNING: Request file for
$tname
missing: test skipped
\n
";
"
WARNING: Request file for
$tname
missing: test skipped
\n
"
unless
$no_warn_missing
;
$skipcnt
++
;
next
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录