Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
916e5620
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
1 年多 前同步成功
通知
10
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看板
提交
916e5620
编写于
10月 19, 2014
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove FIPS module code from crypto/evp
Reviewed-by:
N
Tim Hudson
<
tjh@openssl.org
>
上级
ebdf37e4
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
23 addition
and
47 deletion
+23
-47
crypto/evp/e_aes.c
crypto/evp/e_aes.c
+11
-25
crypto/evp/e_des3.c
crypto/evp/e_des3.c
+3
-3
crypto/evp/e_null.c
crypto/evp/e_null.c
+1
-2
crypto/evp/evp_cnf.c
crypto/evp/evp_cnf.c
+0
-4
crypto/evp/m_dss.c
crypto/evp/m_dss.c
+1
-1
crypto/evp/m_dss1.c
crypto/evp/m_dss1.c
+1
-1
crypto/evp/m_ecdsa.c
crypto/evp/m_ecdsa.c
+1
-1
crypto/evp/m_sha1.c
crypto/evp/m_sha1.c
+5
-10
未找到文件。
crypto/evp/e_aes.c
浏览文件 @
916e5620
...
...
@@ -1285,9 +1285,9 @@ static int aes_ctr_cipher (EVP_CIPHER_CTX *ctx, unsigned char *out,
return
1
;
}
BLOCK_CIPHER_generic_pack
(
NID_aes
,
128
,
EVP_CIPH_FLAG_FIPS
)
BLOCK_CIPHER_generic_pack
(
NID_aes
,
192
,
EVP_CIPH_FLAG_FIPS
)
BLOCK_CIPHER_generic_pack
(
NID_aes
,
256
,
EVP_CIPH_FLAG_FIPS
)
BLOCK_CIPHER_generic_pack
(
NID_aes
,
128
,
0
)
BLOCK_CIPHER_generic_pack
(
NID_aes
,
192
,
0
)
BLOCK_CIPHER_generic_pack
(
NID_aes
,
256
,
0
)
static
int
aes_gcm_cleanup
(
EVP_CIPHER_CTX
*
c
)
{
...
...
@@ -1330,11 +1330,6 @@ static int aes_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)
case
EVP_CTRL_GCM_SET_IVLEN
:
if
(
arg
<=
0
)
return
0
;
#ifdef OPENSSL_FIPS
if
(
FIPS_module_mode
()
&&
!
(
c
->
flags
&
EVP_CIPH_FLAG_NON_FIPS_ALLOW
)
&&
arg
<
12
)
return
0
;
#endif
/* Allocate memory for IV if needed */
if
((
arg
>
EVP_MAX_IV_LENGTH
)
&&
(
arg
>
gctx
->
ivlen
))
{
...
...
@@ -1838,11 +1833,11 @@ static int aes_gcm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
| EVP_CIPH_CUSTOM_COPY)
BLOCK_CIPHER_custom
(
NID_aes
,
128
,
1
,
12
,
gcm
,
GCM
,
EVP_CIPH_FLAG_
FIPS
|
EVP_CIPH_FLAG_
AEAD_CIPHER
|
CUSTOM_FLAGS
)
EVP_CIPH_FLAG_AEAD_CIPHER
|
CUSTOM_FLAGS
)
BLOCK_CIPHER_custom
(
NID_aes
,
192
,
1
,
12
,
gcm
,
GCM
,
EVP_CIPH_FLAG_
FIPS
|
EVP_CIPH_FLAG_
AEAD_CIPHER
|
CUSTOM_FLAGS
)
EVP_CIPH_FLAG_AEAD_CIPHER
|
CUSTOM_FLAGS
)
BLOCK_CIPHER_custom
(
NID_aes
,
256
,
1
,
12
,
gcm
,
GCM
,
EVP_CIPH_FLAG_
FIPS
|
EVP_CIPH_FLAG_
AEAD_CIPHER
|
CUSTOM_FLAGS
)
EVP_CIPH_FLAG_AEAD_CIPHER
|
CUSTOM_FLAGS
)
static
int
aes_xts_ctrl
(
EVP_CIPHER_CTX
*
c
,
int
type
,
int
arg
,
void
*
ptr
)
{
...
...
@@ -1976,15 +1971,6 @@ static int aes_xts_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
return
0
;
if
(
!
out
||
!
in
||
len
<
AES_BLOCK_SIZE
)
return
0
;
#ifdef OPENSSL_FIPS
/* Requirement of SP800-38E */
if
(
FIPS_module_mode
()
&&
!
(
ctx
->
flags
&
EVP_CIPH_FLAG_NON_FIPS_ALLOW
)
&&
(
len
>
(
1UL
<<
20
)
*
16
))
{
EVPerr
(
EVP_F_AES_XTS_CIPHER
,
EVP_R_TOO_LARGE
);
return
0
;
}
#endif
if
(
xctx
->
stream
)
(
*
xctx
->
stream
)(
in
,
out
,
len
,
xctx
->
xts
.
key1
,
xctx
->
xts
.
key2
,
ctx
->
iv
);
...
...
@@ -2000,8 +1986,8 @@ static int aes_xts_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
| EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CTRL_INIT \
| EVP_CIPH_CUSTOM_COPY)
BLOCK_CIPHER_custom
(
NID_aes
,
128
,
1
,
16
,
xts
,
XTS
,
EVP_CIPH_FLAG_FIPS
|
XTS_FLAGS
)
BLOCK_CIPHER_custom
(
NID_aes
,
256
,
1
,
16
,
xts
,
XTS
,
EVP_CIPH_FLAG_FIPS
|
XTS_FLAGS
)
BLOCK_CIPHER_custom
(
NID_aes
,
128
,
1
,
16
,
xts
,
XTS
,
XTS_FLAGS
)
BLOCK_CIPHER_custom
(
NID_aes
,
256
,
1
,
16
,
xts
,
XTS
,
XTS_FLAGS
)
static
int
aes_ccm_ctrl
(
EVP_CIPHER_CTX
*
c
,
int
type
,
int
arg
,
void
*
ptr
)
{
...
...
@@ -2183,9 +2169,9 @@ static int aes_ccm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
#define aes_ccm_cleanup NULL
BLOCK_CIPHER_custom
(
NID_aes
,
128
,
1
,
12
,
ccm
,
CCM
,
EVP_CIPH_FLAG_FIPS
|
CUSTOM_FLAGS
)
BLOCK_CIPHER_custom
(
NID_aes
,
192
,
1
,
12
,
ccm
,
CCM
,
EVP_CIPH_FLAG_FIPS
|
CUSTOM_FLAGS
)
BLOCK_CIPHER_custom
(
NID_aes
,
256
,
1
,
12
,
ccm
,
CCM
,
EVP_CIPH_FLAG_FIPS
|
CUSTOM_FLAGS
)
BLOCK_CIPHER_custom
(
NID_aes
,
128
,
1
,
12
,
ccm
,
CCM
,
CUSTOM_FLAGS
)
BLOCK_CIPHER_custom
(
NID_aes
,
192
,
1
,
12
,
ccm
,
CCM
,
CUSTOM_FLAGS
)
BLOCK_CIPHER_custom
(
NID_aes
,
256
,
1
,
12
,
ccm
,
CCM
,
CUSTOM_FLAGS
)
typedef
struct
{
...
...
crypto/evp/e_des3.c
浏览文件 @
916e5620
...
...
@@ -246,17 +246,17 @@ BLOCK_CIPHER_defs(des_ede, DES_EDE_KEY, NID_des_ede, 8, 16, 8, 64,
#define des_ede3_ecb_cipher des_ede_ecb_cipher
BLOCK_CIPHER_defs
(
des_ede3
,
DES_EDE_KEY
,
NID_des_ede3
,
8
,
24
,
8
,
64
,
EVP_CIPH_RAND_KEY
|
EVP_CIPH_FLAG_
FIPS
|
EVP_CIPH_FLAG_
DEFAULT_ASN1
,
EVP_CIPH_RAND_KEY
|
EVP_CIPH_FLAG_DEFAULT_ASN1
,
des_ede3_init_key
,
NULL
,
NULL
,
NULL
,
des3_ctrl
)
BLOCK_CIPHER_def_cfb
(
des_ede3
,
DES_EDE_KEY
,
NID_des_ede3
,
24
,
8
,
1
,
EVP_CIPH_RAND_KEY
|
EVP_CIPH_FLAG_
FIPS
|
EVP_CIPH_FLAG_
DEFAULT_ASN1
,
EVP_CIPH_RAND_KEY
|
EVP_CIPH_FLAG_DEFAULT_ASN1
,
des_ede3_init_key
,
NULL
,
NULL
,
NULL
,
des3_ctrl
)
BLOCK_CIPHER_def_cfb
(
des_ede3
,
DES_EDE_KEY
,
NID_des_ede3
,
24
,
8
,
8
,
EVP_CIPH_RAND_KEY
|
EVP_CIPH_FLAG_
FIPS
|
EVP_CIPH_FLAG_
DEFAULT_ASN1
,
EVP_CIPH_RAND_KEY
|
EVP_CIPH_FLAG_DEFAULT_ASN1
,
des_ede3_init_key
,
NULL
,
NULL
,
NULL
,
des3_ctrl
)
...
...
crypto/evp/e_null.c
浏览文件 @
916e5620
...
...
@@ -68,8 +68,7 @@ static int null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
static
const
EVP_CIPHER
n_cipher
=
{
NID_undef
,
1
,
0
,
0
,
EVP_CIPH_FLAG_FIPS
,
1
,
0
,
0
,
0
,
null_init_key
,
null_cipher
,
NULL
,
...
...
crypto/evp/evp_cnf.c
浏览文件 @
916e5620
...
...
@@ -64,10 +64,6 @@
#include <openssl/dso.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
#ifdef OPENSSL_FIPS
#include <openssl/fips.h>
#endif
/* Algorithm configuration module. */
...
...
crypto/evp/m_dss.c
浏览文件 @
916e5620
...
...
@@ -81,7 +81,7 @@ static const EVP_MD dsa_md=
NID_dsaWithSHA
,
NID_dsaWithSHA
,
SHA_DIGEST_LENGTH
,
EVP_MD_FLAG_PKEY_METHOD_SIGNATURE
|
EVP_MD_FLAG_PKEY_DIGEST
|
EVP_MD_FLAG_FIPS
,
EVP_MD_FLAG_PKEY_METHOD_SIGNATURE
|
EVP_MD_FLAG_PKEY_DIGEST
,
init
,
update
,
final
,
...
...
crypto/evp/m_dss1.c
浏览文件 @
916e5620
...
...
@@ -82,7 +82,7 @@ static const EVP_MD dss1_md=
NID_dsa
,
NID_dsaWithSHA1
,
SHA_DIGEST_LENGTH
,
EVP_MD_FLAG_PKEY_METHOD_SIGNATURE
|
EVP_MD_FLAG_PKEY_DIGEST
|
EVP_MD_FLAG_FIPS
,
EVP_MD_FLAG_PKEY_METHOD_SIGNATURE
|
EVP_MD_FLAG_PKEY_DIGEST
,
init
,
update
,
final
,
...
...
crypto/evp/m_ecdsa.c
浏览文件 @
916e5620
...
...
@@ -131,7 +131,7 @@ static const EVP_MD ecdsa_md=
NID_ecdsa_with_SHA1
,
NID_ecdsa_with_SHA1
,
SHA_DIGEST_LENGTH
,
EVP_MD_FLAG_PKEY_METHOD_SIGNATURE
|
EVP_MD_FLAG_PKEY_DIGEST
|
EVP_MD_FLAG_FIPS
,
EVP_MD_FLAG_PKEY_METHOD_SIGNATURE
|
EVP_MD_FLAG_PKEY_DIGEST
,
init
,
update
,
final
,
...
...
crypto/evp/m_sha1.c
浏览文件 @
916e5620
...
...
@@ -68,11 +68,6 @@
#include <openssl/rsa.h>
#endif
#ifdef OPENSSL_FIPS
#include <openssl/fips.h>
#endif
static
int
init
(
EVP_MD_CTX
*
ctx
)
{
return
SHA1_Init
(
ctx
->
md_data
);
}
...
...
@@ -87,7 +82,7 @@ static const EVP_MD sha1_md=
NID_sha1
,
NID_sha1WithRSAEncryption
,
SHA_DIGEST_LENGTH
,
EVP_MD_FLAG_PKEY_METHOD_SIGNATURE
|
EVP_MD_FLAG_DIGALGID_ABSENT
|
EVP_MD_FLAG_FIPS
,
EVP_MD_FLAG_PKEY_METHOD_SIGNATURE
|
EVP_MD_FLAG_DIGALGID_ABSENT
,
init
,
update
,
final
,
...
...
@@ -124,7 +119,7 @@ static const EVP_MD sha224_md=
NID_sha224
,
NID_sha224WithRSAEncryption
,
SHA224_DIGEST_LENGTH
,
EVP_MD_FLAG_PKEY_METHOD_SIGNATURE
|
EVP_MD_FLAG_DIGALGID_ABSENT
|
EVP_MD_FLAG_FIPS
,
EVP_MD_FLAG_PKEY_METHOD_SIGNATURE
|
EVP_MD_FLAG_DIGALGID_ABSENT
,
init224
,
update256
,
final256
,
...
...
@@ -143,7 +138,7 @@ static const EVP_MD sha256_md=
NID_sha256
,
NID_sha256WithRSAEncryption
,
SHA256_DIGEST_LENGTH
,
EVP_MD_FLAG_PKEY_METHOD_SIGNATURE
|
EVP_MD_FLAG_DIGALGID_ABSENT
|
EVP_MD_FLAG_FIPS
,
EVP_MD_FLAG_PKEY_METHOD_SIGNATURE
|
EVP_MD_FLAG_DIGALGID_ABSENT
,
init256
,
update256
,
final256
,
...
...
@@ -174,7 +169,7 @@ static const EVP_MD sha384_md=
NID_sha384
,
NID_sha384WithRSAEncryption
,
SHA384_DIGEST_LENGTH
,
EVP_MD_FLAG_PKEY_METHOD_SIGNATURE
|
EVP_MD_FLAG_DIGALGID_ABSENT
|
EVP_MD_FLAG_FIPS
,
EVP_MD_FLAG_PKEY_METHOD_SIGNATURE
|
EVP_MD_FLAG_DIGALGID_ABSENT
,
init384
,
update512
,
final512
,
...
...
@@ -193,7 +188,7 @@ static const EVP_MD sha512_md=
NID_sha512
,
NID_sha512WithRSAEncryption
,
SHA512_DIGEST_LENGTH
,
EVP_MD_FLAG_PKEY_METHOD_SIGNATURE
|
EVP_MD_FLAG_DIGALGID_ABSENT
|
EVP_MD_FLAG_FIPS
,
EVP_MD_FLAG_PKEY_METHOD_SIGNATURE
|
EVP_MD_FLAG_DIGALGID_ABSENT
,
init512
,
update512
,
final512
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录