Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
openssl
提交
1bfffe9b
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,发现更多精彩内容 >>
提交
1bfffe9b
编写于
10月 19, 2014
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove FIPS module code from crypto/dh
Reviewed-by:
N
Tim Hudson
<
tjh@openssl.org
>
上级
fce8311c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
0 addition
and
49 deletion
+0
-49
crypto/dh/dh.h
crypto/dh/dh.h
+0
-5
crypto/dh/dh_gen.c
crypto/dh/dh_gen.c
+0
-18
crypto/dh/dh_key.c
crypto/dh/dh_key.c
+0
-26
未找到文件。
crypto/dh/dh.h
浏览文件 @
1bfffe9b
...
@@ -188,11 +188,6 @@ DH *DHparams_dup(DH *);
...
@@ -188,11 +188,6 @@ DH *DHparams_dup(DH *);
const
DH_METHOD
*
DH_OpenSSL
(
void
);
const
DH_METHOD
*
DH_OpenSSL
(
void
);
#ifdef OPENSSL_FIPS
DH
*
FIPS_dh_new
(
void
);
void
FIPS_dh_free
(
DH
*
dh
);
#endif
void
DH_set_default_method
(
const
DH_METHOD
*
meth
);
void
DH_set_default_method
(
const
DH_METHOD
*
meth
);
const
DH_METHOD
*
DH_get_default_method
(
void
);
const
DH_METHOD
*
DH_get_default_method
(
void
);
int
DH_set_method
(
DH
*
dh
,
const
DH_METHOD
*
meth
);
int
DH_set_method
(
DH
*
dh
,
const
DH_METHOD
*
meth
);
...
...
crypto/dh/dh_gen.c
浏览文件 @
1bfffe9b
...
@@ -68,10 +68,6 @@
...
@@ -68,10 +68,6 @@
#include <openssl/bn.h>
#include <openssl/bn.h>
#include <openssl/dh.h>
#include <openssl/dh.h>
#ifdef OPENSSL_FIPS
#include <openssl/fips.h>
#endif
static
int
dh_builtin_genparams
(
DH
*
ret
,
int
prime_len
,
int
generator
,
BN_GENCB
*
cb
);
static
int
dh_builtin_genparams
(
DH
*
ret
,
int
prime_len
,
int
generator
,
BN_GENCB
*
cb
);
int
DH_generate_parameters_ex
(
DH
*
ret
,
int
prime_len
,
int
generator
,
BN_GENCB
*
cb
)
int
DH_generate_parameters_ex
(
DH
*
ret
,
int
prime_len
,
int
generator
,
BN_GENCB
*
cb
)
...
@@ -112,20 +108,6 @@ static int dh_builtin_genparams(DH *ret, int prime_len, int generator, BN_GENCB
...
@@ -112,20 +108,6 @@ static int dh_builtin_genparams(DH *ret, int prime_len, int generator, BN_GENCB
int
g
,
ok
=
-
1
;
int
g
,
ok
=
-
1
;
BN_CTX
*
ctx
=
NULL
;
BN_CTX
*
ctx
=
NULL
;
#ifdef OPENSSL_FIPS
if
(
FIPS_selftest_failed
())
{
FIPSerr
(
FIPS_F_DH_BUILTIN_GENPARAMS
,
FIPS_R_FIPS_SELFTEST_FAILED
);
return
0
;
}
if
(
FIPS_module_mode
()
&&
(
prime_len
<
OPENSSL_DH_FIPS_MIN_MODULUS_BITS
))
{
DHerr
(
DH_F_DH_BUILTIN_GENPARAMS
,
DH_R_KEY_SIZE_TOO_SMALL
);
goto
err
;
}
#endif
ctx
=
BN_CTX_new
();
ctx
=
BN_CTX_new
();
if
(
ctx
==
NULL
)
goto
err
;
if
(
ctx
==
NULL
)
goto
err
;
BN_CTX_start
(
ctx
);
BN_CTX_start
(
ctx
);
...
...
crypto/dh/dh_key.c
浏览文件 @
1bfffe9b
...
@@ -63,9 +63,6 @@
...
@@ -63,9 +63,6 @@
#include <openssl/bn.h>
#include <openssl/bn.h>
#include <openssl/rand.h>
#include <openssl/rand.h>
#include <openssl/dh.h>
#include <openssl/dh.h>
#ifdef OPENSSL_FIPS
#include <openssl/fips.h>
#endif
static
int
generate_key
(
DH
*
dh
);
static
int
generate_key
(
DH
*
dh
);
static
int
compute_key
(
unsigned
char
*
key
,
const
BIGNUM
*
pub_key
,
DH
*
dh
);
static
int
compute_key
(
unsigned
char
*
key
,
const
BIGNUM
*
pub_key
,
DH
*
dh
);
...
@@ -127,14 +124,6 @@ static int generate_key(DH *dh)
...
@@ -127,14 +124,6 @@ static int generate_key(DH *dh)
BN_MONT_CTX
*
mont
=
NULL
;
BN_MONT_CTX
*
mont
=
NULL
;
BIGNUM
*
pub_key
=
NULL
,
*
priv_key
=
NULL
;
BIGNUM
*
pub_key
=
NULL
,
*
priv_key
=
NULL
;
#ifdef OPENSSL_FIPS
if
(
FIPS_module_mode
()
&&
(
BN_num_bits
(
dh
->
p
)
<
OPENSSL_DH_FIPS_MIN_MODULUS_BITS
))
{
DHerr
(
DH_F_GENERATE_KEY
,
DH_R_KEY_SIZE_TOO_SMALL
);
return
0
;
}
#endif
ctx
=
BN_CTX_new
();
ctx
=
BN_CTX_new
();
if
(
ctx
==
NULL
)
goto
err
;
if
(
ctx
==
NULL
)
goto
err
;
...
@@ -226,14 +215,6 @@ static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh)
...
@@ -226,14 +215,6 @@ static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh)
goto
err
;
goto
err
;
}
}
#ifdef OPENSSL_FIPS
if
(
FIPS_module_mode
()
&&
(
BN_num_bits
(
dh
->
p
)
<
OPENSSL_DH_FIPS_MIN_MODULUS_BITS
))
{
DHerr
(
DH_F_COMPUTE_KEY
,
DH_R_KEY_SIZE_TOO_SMALL
);
goto
err
;
}
#endif
ctx
=
BN_CTX_new
();
ctx
=
BN_CTX_new
();
if
(
ctx
==
NULL
)
goto
err
;
if
(
ctx
==
NULL
)
goto
err
;
BN_CTX_start
(
ctx
);
BN_CTX_start
(
ctx
);
...
@@ -300,13 +281,6 @@ static int dh_bn_mod_exp(const DH *dh, BIGNUM *r,
...
@@ -300,13 +281,6 @@ static int dh_bn_mod_exp(const DH *dh, BIGNUM *r,
static
int
dh_init
(
DH
*
dh
)
static
int
dh_init
(
DH
*
dh
)
{
{
#ifdef OPENSSL_FIPS
if
(
FIPS_selftest_failed
())
{
FIPSerr
(
FIPS_F_DH_INIT
,
FIPS_R_FIPS_SELFTEST_FAILED
);
return
0
;
}
#endif
dh
->
flags
|=
DH_FLAG_CACHE_MONT_P
;
dh
->
flags
|=
DH_FLAG_CACHE_MONT_P
;
return
(
1
);
return
(
1
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录