Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
openssl
提交
d6fbb194
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,发现更多精彩内容 >>
提交
d6fbb194
编写于
1月 30, 2015
作者:
R
Rich Salz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Dead code removal #if 0 engines
Reviewed-by:
N
Richard Levitte
<
levitte@openssl.org
>
上级
6f1a93ad
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
0 addition
and
124 deletion
+0
-124
engines/ccgost/gost2814789test.c
engines/ccgost/gost2814789test.c
+0
-85
engines/e_cswift.c
engines/e_cswift.c
+0
-8
engines/e_gmp.c
engines/e_gmp.c
+0
-10
engines/e_sureware.c
engines/e_sureware.c
+0
-21
未找到文件。
engines/ccgost/gost2814789test.c
浏览文件 @
d6fbb194
...
...
@@ -1250,91 +1250,6 @@ int main(int argc, char *argv[])
}
}
/*
* Internal function test on GostR3411_94_TestParamSet
*/
# if 0 && defined(OPENSSL_NO_DYNAMIC_ENGINE)
{
gost_ctx
ctx
;
for
(
t
=
0
;
t
<
sizeof
(
tcs
)
/
sizeof
(
tcs
[
0
]);
t
++
)
{
const
gost_subst_block
*
pSubst
=
NULL
;
if
(
1024
<
tcs
[
t
].
ullLen
)
{
/* Key meshing check by engine tests */
continue
;
}
memset
(
bTest
,
0xc3
,
sizeof
(
bTest
));
if
(
0
==
strcmp
(
tcs
[
t
].
szParamSet
,
"id-GostR3410-94-TestParamSet"
))
{
pSubst
=
&
GostR3411_94_TestParamSet
;
}
else
if
(
0
==
strcmp
(
tcs
[
t
].
szParamSet
,
"id-Gost28147-89-CryptoPro-A-ParamSet"
))
{
pSubst
=
&
Gost28147_CryptoProParamSetA
;
}
else
if
(
0
==
strcmp
(
tcs
[
t
].
szParamSet
,
"id-Gost28147-89-CryptoPro-B-ParamSet"
))
{
pSubst
=
&
Gost28147_CryptoProParamSetB
;
}
else
if
(
0
==
strcmp
(
tcs
[
t
].
szParamSet
,
"id-Gost28147-89-CryptoPro-C-ParamSet"
))
{
pSubst
=
&
Gost28147_CryptoProParamSetC
;
}
else
if
(
0
==
strcmp
(
tcs
[
t
].
szParamSet
,
"id-Gost28147-89-CryptoPro-D-ParamSet"
))
{
pSubst
=
&
Gost28147_CryptoProParamSetD
;
}
gost_init
(
&
ctx
,
pSubst
);
gost_key
(
&
ctx
,
tcs
[
t
].
bRawKey
);
switch
(
tcs
[
t
].
gMode
)
{
case
G89_ECB
:
gost_enc
(
&
ctx
,
tcs
[
t
].
bIn
,
bTest
,
(
int
)((
tcs
[
t
].
ullLen
+
G89_BLOCK_LEN
-
1
)
/
G89_BLOCK_LEN
));
l
=
(
size_t
)
tcs
[
t
].
ullLen
;
break
;
case
G89_CFB
:
gost_enc_cfb
(
&
ctx
,
tcs
[
t
].
bIV
,
tcs
[
t
].
bIn
,
bTest
,
(
int
)((
tcs
[
t
].
ullLen
+
G89_BLOCK_LEN
-
1
)
/
G89_BLOCK_LEN
));
l
=
(
size_t
)
tcs
[
t
].
ullLen
;
break
;
case
G89_CNT
:
/*
* GOST 28147-89 cipher CNT mode check by engine tests
*/
continue
;
case
G89_IMIT
:
gost_mac
(
&
ctx
,
32
,
tcs
[
t
].
bIn
,
(
unsigned
int
)
tcs
[
t
].
ullLen
,
bTest
);
gost_mac_iv
(
&
ctx
,
32
,
tcs
[
t
].
bIV
,
tcs
[
t
].
bIn
,
(
unsigned
int
)
tcs
[
t
].
ullLen
,
bTest1
);
if
(
0
!=
memcmp
(
bTest
,
bTest1
,
4
))
{
fflush
(
NULL
);
fprintf
(
stderr
,
"
\n
Internal test t=%d len="
FMT64
" failed (gost_mac_iv).
\n
"
,
t
,
tcs
[
t
].
ullLen
);
if
(
!
ignore
)
{
return
2
;
}
}
l
=
4
;
break
;
}
gost_destroy
(
&
ctx
);
if
(
0
!=
memcmp
(
tcs
[
t
].
bOut
,
bTest
,
l
))
{
fflush
(
NULL
);
fprintf
(
stderr
,
"
\n
Internal test t=%d len="
FMT64
" failed.
\n
"
,
t
,
tcs
[
t
].
ullLen
);
if
(
!
ignore
)
{
return
3
;
}
}
else
{
printf
(
","
);
fflush
(
NULL
);
}
}
}
# endif
/*
* ccgost engine test on GostR3411_94_CryptoProParamSet
*/
...
...
engines/e_cswift.c
浏览文件 @
d6fbb194
...
...
@@ -748,11 +748,7 @@ static int cswift_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa,
# ifdef RSA_NULL
def_rsa_method
=
RSA_null_method
();
# else
# if 0
def_rsa_method
=
RSA_PKCS1_RSAref
();
# else
def_rsa_method
=
RSA_PKCS1_SSLeay
();
# endif
# endif
if
(
def_rsa_method
)
return
def_rsa_method
->
rsa_mod_exp
(
r0
,
I
,
rsa
,
ctx
);
...
...
@@ -777,11 +773,7 @@ static int cswift_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
# ifdef RSA_NULL
def_rsa_method
=
RSA_null_method
();
# else
# if 0
def_rsa_method
=
RSA_PKCS1_RSAref
();
# else
def_rsa_method
=
RSA_PKCS1_SSLeay
();
# endif
# endif
if
(
def_rsa_method
)
return
def_rsa_method
->
bn_mod_exp
(
r
,
a
,
p
,
m
,
ctx
,
m_ctx
);
...
...
engines/e_gmp.c
浏览文件 @
d6fbb194
...
...
@@ -117,12 +117,6 @@ static int e_gmp_rsa_finish(RSA *r);
/* The definitions for control commands specific to this engine */
/* #define E_GMP_CMD_SO_PATH ENGINE_CMD_BASE */
static
const
ENGINE_CMD_DEFN
e_gmp_cmd_defns
[]
=
{
# if 0
{
E_GMP_CMD_SO_PATH
,
"SO_PATH"
,
"Specifies the path to the 'e_gmp' shared library"
,
ENGINE_CMD_FLAG_STRING
},
# endif
{
0
,
NULL
,
NULL
,
0
}
};
...
...
@@ -247,10 +241,6 @@ static int e_gmp_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f) (void))
int
to_return
=
1
;
switch
(
cmd
)
{
# if 0
case
E_GMP_CMD_SO_PATH
:
/* ... */
# endif
/* The command isn't understood by this engine */
default:
GMPerr
(
GMP_F_E_GMP_CTRL
,
GMP_R_CTRL_COMMAND_NOT_IMPLEMENTED
);
...
...
engines/e_sureware.c
浏览文件 @
d6fbb194
...
...
@@ -111,10 +111,6 @@ static EVP_PKEY *surewarehk_load_pubkey(ENGINE *e, const char *key_id,
void
*
callback_data
);
static
void
surewarehk_ex_free
(
void
*
obj
,
void
*
item
,
CRYPTO_EX_DATA
*
ad
,
int
idx
,
long
argl
,
void
*
argp
);
# if 0
static
void
surewarehk_dh_ex_free
(
void
*
obj
,
void
*
item
,
CRYPTO_EX_DATA
*
ad
,
int
idx
,
long
argl
,
void
*
argp
);
# endif
# ifndef OPENSSL_NO_RSA
/* This function is aliased to mod_exp (with the mont stuff dropped). */
...
...
@@ -881,23 +877,6 @@ static void surewarehk_ex_free(void *obj, void *item, CRYPTO_EX_DATA *ad,
p_surewarehk_Free
((
char
*
)
item
,
0
);
}
# if 0
/* not currently used (bug?) */
/*
* This cleans up an DH KM key (destroys the key into hardware), called when
* ex_data is freed
*/
static
void
surewarehk_dh_ex_free
(
void
*
obj
,
void
*
item
,
CRYPTO_EX_DATA
*
ad
,
int
idx
,
long
argl
,
void
*
argp
)
{
if
(
!
p_surewarehk_Free
)
{
SUREWAREerr
(
SUREWARE_F_SUREWAREHK_DH_EX_FREE
,
ENGINE_R_NOT_INITIALISED
);
}
else
p_surewarehk_Free
((
char
*
)
item
,
1
);
}
# endif
/*
* return number of decrypted bytes
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录