Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
96bea000
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
1 年多 前同步成功
通知
9
Star
18
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
96bea000
编写于
3月 18, 2016
作者:
M
Matt Caswell
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix no-des
Numerous fixes for no-des. Reviewed-by:
N
Rich Salz
<
rsalz@openssl.org
>
上级
40a8e9c2
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
29 addition
and
12 deletion
+29
-12
apps/pkcs12.c
apps/pkcs12.c
+3
-1
apps/speed.c
apps/speed.c
+2
-0
crypto/cms/cms_kari.c
crypto/cms/cms_kari.c
+4
-1
test/evp_test.c
test/evp_test.c
+8
-0
test/recipes/80-test_cms.t
test/recipes/80-test_cms.t
+12
-10
未找到文件。
apps/pkcs12.c
浏览文件 @
96bea000
...
...
@@ -57,7 +57,9 @@
*/
#include <openssl/opensslconf.h>
#if !defined(OPENSSL_NO_DES)
#if defined(OPENSSL_NO_DES)
NON_EMPTY_TRANSLATION_UNIT
#else
# include <stdio.h>
# include <stdlib.h>
...
...
apps/speed.c
浏览文件 @
96bea000
...
...
@@ -1386,7 +1386,9 @@ int speed_main(int argc, char **argv)
memset
(
results
,
0
,
sizeof
(
results
));
memset
(
c
,
0
,
sizeof
(
c
));
#ifndef OPENSSL_NO_DES
memset
(
DES_iv
,
0
,
sizeof
(
DES_iv
));
#endif
memset
(
iv
,
0
,
sizeof
(
iv
));
for
(
i
=
0
;
i
<
ALGOR_NUM
;
i
++
)
...
...
crypto/cms/cms_kari.c
浏览文件 @
96bea000
...
...
@@ -389,9 +389,12 @@ static int cms_wrap_init(CMS_KeyAgreeRecipientInfo *kari,
* Pick a cipher based on content encryption cipher. If it is DES3 use
* DES3 wrap otherwise use AES wrap similar to key size.
*/
#ifndef OPENSSL_NO_DES
if
(
EVP_CIPHER_type
(
cipher
)
==
NID_des_ede3_cbc
)
kekcipher
=
EVP_des_ede3_wrap
();
else
if
(
keylen
<=
16
)
else
#endif
if
(
keylen
<=
16
)
kekcipher
=
EVP_aes_128_wrap
();
else
if
(
keylen
<=
24
)
kekcipher
=
EVP_aes_192_wrap
();
...
...
test/evp_test.c
浏览文件 @
96bea000
...
...
@@ -1083,6 +1083,14 @@ static int mac_test_run(struct evp_test *t)
unsigned
char
*
mac
=
NULL
;
size_t
mac_len
;
#ifdef OPENSSL_NO_DES
if
(
strstr
(
mdata
->
alg
,
"DES"
)
!=
NULL
)
{
/* Skip DES */
err
=
NULL
;
goto
err
;
}
#endif
err
=
"MAC_PKEY_CTX_ERROR"
;
genctx
=
EVP_PKEY_CTX_new_id
(
mdata
->
type
,
NULL
);
if
(
!
genctx
)
...
...
test/recipes/80-test_cms.t
浏览文件 @
96bea000
...
...
@@ -13,8 +13,8 @@ setup("test_cms");
my
$smdir
=
srctop_dir
("
test
",
"
smime-certs
");
my
$smcont
=
srctop_file
("
test
",
"
smcont.txt
");
my
(
$no_dh
,
$no_ec
,
$no_ec2m
,
$no_rc2
,
$no_zlib
)
=
disabled
qw/dh ec ec2m rc2 zlib/
;
my
(
$no_d
es
,
$no_d
h
,
$no_ec
,
$no_ec2m
,
$no_rc2
,
$no_zlib
)
=
disabled
qw/d
es d
h ec ec2m rc2 zlib/
;
plan
tests
=>
4
;
...
...
@@ -119,7 +119,7 @@ my @smime_pkcs7_tests = (
"
-CAfile
",
catfile
(
$smdir
,
"
smroot.pem
"),
"
-out
",
"
smtst.txt
"
]
],
[
"
enveloped content test streaming S/MIME format, 3 recipients
",
[
"
enveloped content test streaming S/MIME format,
DES,
3 recipients
",
[
"
-encrypt
",
"
-in
",
$smcont
,
"
-stream
",
"
-out
",
"
test.cms
",
catfile
(
$smdir
,
"
smrsa1.pem
"),
...
...
@@ -129,7 +129,7 @@ my @smime_pkcs7_tests = (
"
-in
",
"
test.cms
",
"
-out
",
"
smtst.txt
"
]
],
[
"
enveloped content test streaming S/MIME format, 3 recipients, 3rd used
",
[
"
enveloped content test streaming S/MIME format,
DES,
3 recipients, 3rd used
",
[
"
-encrypt
",
"
-in
",
$smcont
,
"
-stream
",
"
-out
",
"
test.cms
",
catfile
(
$smdir
,
"
smrsa1.pem
"),
...
...
@@ -139,7 +139,7 @@ my @smime_pkcs7_tests = (
"
-in
",
"
test.cms
",
"
-out
",
"
smtst.txt
"
]
],
[
"
enveloped content test streaming S/MIME format, 3 recipients, key only used
",
[
"
enveloped content test streaming S/MIME format,
DES,
3 recipients, key only used
",
[
"
-encrypt
",
"
-in
",
$smcont
,
"
-stream
",
"
-out
",
"
test.cms
",
catfile
(
$smdir
,
"
smrsa1.pem
"),
...
...
@@ -201,7 +201,7 @@ my @smime_cms_tests = (
"
-CAfile
",
catfile
(
$smdir
,
"
smroot.pem
")
]
],
[
"
enveloped content test streaming S/MIME format, 3 recipients, keyid
",
[
"
enveloped content test streaming S/MIME format,
DES,
3 recipients, keyid
",
[
"
-encrypt
",
"
-in
",
$smcont
,
"
-stream
",
"
-out
",
"
test.cms
",
"
-keyid
",
catfile
(
$smdir
,
"
smrsa1.pem
"),
...
...
@@ -306,7 +306,7 @@ my @smime_cms_param_tests = (
"
-CAfile
",
catfile
(
$smdir
,
"
smroot.pem
"),
"
-out
",
"
smtst.txt
"
]
],
[
"
enveloped content test streaming S/MIME format, OAEP default parameters
",
[
"
enveloped content test streaming S/MIME format,
DES,
OAEP default parameters
",
[
"
-encrypt
",
"
-in
",
$smcont
,
"
-stream
",
"
-out
",
"
test.cms
",
"
-recip
",
catfile
(
$smdir
,
"
smrsa1.pem
"),
"
-keyopt
",
"
rsa_padding_mode:oaep
"
],
...
...
@@ -314,7 +314,7 @@ my @smime_cms_param_tests = (
"
-in
",
"
test.cms
",
"
-out
",
"
smtst.txt
"
]
],
[
"
enveloped content test streaming S/MIME format, OAEP SHA256
",
[
"
enveloped content test streaming S/MIME format,
DES,
OAEP SHA256
",
[
"
-encrypt
",
"
-in
",
$smcont
,
"
-stream
",
"
-out
",
"
test.cms
",
"
-recip
",
catfile
(
$smdir
,
"
smrsa1.pem
"),
"
-keyopt
",
"
rsa_padding_mode:oaep
",
...
...
@@ -323,7 +323,7 @@ my @smime_cms_param_tests = (
"
-in
",
"
test.cms
",
"
-out
",
"
smtst.txt
"
]
],
[
"
enveloped content test streaming S/MIME format, ECDH
",
[
"
enveloped content test streaming S/MIME format,
DES,
ECDH
",
[
"
-encrypt
",
"
-in
",
$smcont
,
"
-stream
",
"
-out
",
"
test.cms
",
"
-recip
",
catfile
(
$smdir
,
"
smec1.pem
")
],
...
...
@@ -331,7 +331,7 @@ my @smime_cms_param_tests = (
"
-in
",
"
test.cms
",
"
-out
",
"
smtst.txt
"
]
],
[
"
enveloped content test streaming S/MIME format, ECDH, key identifier
",
[
"
enveloped content test streaming S/MIME format, ECDH,
DES,
key identifier
",
[
"
-encrypt
",
"
-keyid
",
"
-in
",
$smcont
,
"
-stream
",
"
-out
",
"
test.cms
",
"
-recip
",
catfile
(
$smdir
,
"
smec1.pem
")
],
...
...
@@ -475,6 +475,8 @@ sub check_availability {
if
(
$no_dh
&&
$tnam
=~
/X9\.42/
);
return
"
$tnam
: skipped, RC2 disabled
\n
"
if
(
$no_rc2
&&
$tnam
=~
/RC2/
);
return
"
$tnam
: skipped, DES disabled
\n
"
if
(
$no_des
&&
$tnam
=~
/DES/
);
return
"";
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录