Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
f517ffbb
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f517ffbb
编写于
10月 22, 2015
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove ECDH_METHOD from ENGINE
Reviewed-by:
N
Richard Levitte
<
levitte@openssl.org
>
上级
53e3189d
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
2 addition
and
158 deletion
+2
-158
crypto/engine/Makefile
crypto/engine/Makefile
+2
-2
crypto/engine/eng_fat.c
crypto/engine/eng_fat.c
+0
-5
crypto/engine/eng_int.h
crypto/engine/eng_int.h
+0
-1
crypto/engine/eng_list.c
crypto/engine/eng_list.c
+0
-1
crypto/engine/eng_openssl.c
crypto/engine/eng_openssl.c
+0
-1
crypto/engine/tb_ecdh.c
crypto/engine/tb_ecdh.c
+0
-139
include/openssl/engine.h
include/openssl/engine.h
+0
-9
未找到文件。
crypto/engine/Makefile
浏览文件 @
f517ffbb
...
...
@@ -17,13 +17,13 @@ GENERAL=Makefile
LIB
=
$(TOP)
/libcrypto.a
LIBSRC
=
eng_err.c eng_lib.c eng_list.c eng_init.c eng_ctrl.c
\
eng_table.c eng_pkey.c eng_fat.c eng_all.c
\
tb_rsa.c tb_dsa.c tb_ecdsa.c tb_dh.c tb_
ecdh.c tb_
rand.c tb_store.c
\
tb_rsa.c tb_dsa.c tb_ecdsa.c tb_dh.c tb_rand.c tb_store.c
\
tb_cipher.c tb_digest.c tb_pkmeth.c tb_asnmth.c tb_eckey.c
\
eng_openssl.c eng_cnf.c eng_dyn.c eng_cryptodev.c
\
eng_rdrand.c
LIBOBJ
=
eng_err.o eng_lib.o eng_list.o eng_init.o eng_ctrl.o
\
eng_table.o eng_pkey.o eng_fat.o eng_all.o
\
tb_rsa.o tb_dsa.o tb_ecdsa.o tb_dh.o tb_
ecdh.o tb_
rand.o tb_store.o
\
tb_rsa.o tb_dsa.o tb_ecdsa.o tb_dh.o tb_rand.o tb_store.o
\
tb_cipher.o tb_digest.o tb_pkmeth.o tb_asnmth.o tb_eckey.o
\
eng_openssl.o eng_cnf.o eng_dyn.o eng_cryptodev.o
\
eng_rdrand.o
...
...
crypto/engine/eng_fat.c
浏览文件 @
f517ffbb
...
...
@@ -80,8 +80,6 @@ int ENGINE_set_default(ENGINE *e, unsigned int flags)
return
0
;
#endif
#ifndef OPENSSL_NO_EC
if
((
flags
&
ENGINE_METHOD_ECDH
)
&&
!
ENGINE_set_default_ECDH
(
e
))
return
0
;
if
((
flags
&
ENGINE_METHOD_ECDSA
)
&&
!
ENGINE_set_default_ECDSA
(
e
))
return
0
;
#endif
...
...
@@ -109,8 +107,6 @@ static int int_def_cb(const char *alg, int len, void *arg)
*
pflags
|=
ENGINE_METHOD_RSA
;
else
if
(
strncmp
(
alg
,
"DSA"
,
len
)
==
0
)
*
pflags
|=
ENGINE_METHOD_DSA
;
else
if
(
strncmp
(
alg
,
"ECDH"
,
len
)
==
0
)
*
pflags
|=
ENGINE_METHOD_ECDH
;
else
if
(
strncmp
(
alg
,
"ECDSA"
,
len
)
==
0
)
*
pflags
|=
ENGINE_METHOD_ECDSA
;
else
if
(
strncmp
(
alg
,
"DH"
,
len
)
==
0
)
...
...
@@ -158,7 +154,6 @@ int ENGINE_register_complete(ENGINE *e)
ENGINE_register_DH
(
e
);
#endif
#ifndef OPENSSL_NO_EC
ENGINE_register_ECDH
(
e
);
ENGINE_register_ECDSA
(
e
);
#endif
ENGINE_register_RAND
(
e
);
...
...
crypto/engine/eng_int.h
浏览文件 @
f517ffbb
...
...
@@ -179,7 +179,6 @@ struct engine_st {
const
RSA_METHOD
*
rsa_meth
;
const
DSA_METHOD
*
dsa_meth
;
const
DH_METHOD
*
dh_meth
;
const
ECDH_METHOD
*
ecdh_meth
;
const
ECDSA_METHOD
*
ecdsa_meth
;
const
EC_KEY_METHOD
*
ec_key_meth
;
const
RAND_METHOD
*
rand_meth
;
...
...
crypto/engine/eng_list.c
浏览文件 @
f517ffbb
...
...
@@ -302,7 +302,6 @@ static void engine_cpy(ENGINE *dest, const ENGINE *src)
dest
->
dh_meth
=
src
->
dh_meth
;
#endif
#ifndef OPENSSL_NO_EC
dest
->
ecdh_meth
=
src
->
ecdh_meth
;
dest
->
ecdsa_meth
=
src
->
ecdsa_meth
;
#endif
dest
->
rand_meth
=
src
->
rand_meth
;
...
...
crypto/engine/eng_openssl.c
浏览文件 @
f517ffbb
...
...
@@ -155,7 +155,6 @@ static int bind_helper(ENGINE *e)
||
!
ENGINE_set_DSA
(
e
,
DSA_get_default_method
())
# endif
# ifndef OPENSSL_NO_EC
||
!
ENGINE_set_ECDH
(
e
,
ECDH_OpenSSL
())
||
!
ENGINE_set_ECDSA
(
e
,
ECDSA_OpenSSL
())
# endif
# ifndef OPENSSL_NO_DH
...
...
crypto/engine/tb_ecdh.c
已删除
100644 → 0
浏览文件 @
53e3189d
/* crypto/engine/tb_ecdh.c */
/* ====================================================================
* Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
*
* The Elliptic Curve Public-Key Crypto Library (ECC Code) included
* herein is developed by SUN MICROSYSTEMS, INC., and is contributed
* to the OpenSSL project.
*
* The ECC Code is licensed pursuant to the OpenSSL open source
* license provided below.
*
* The ECDH engine software is originally written by Nils Gura and
* Douglas Stebila of Sun Microsystems Laboratories.
*
*/
/* ====================================================================
* Copyright (c) 2000-2002 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
*
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* licensing@OpenSSL.org.
*
* 5. Products derived from this software may not be called "OpenSSL"
* nor may "OpenSSL" appear in their names without prior written
* permission of the OpenSSL Project.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
*
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
* This product includes cryptographic software written by Eric Young
* (eay@cryptsoft.com). This product includes software written by Tim
* Hudson (tjh@cryptsoft.com).
*
*/
#include "eng_int.h"
/*
* If this symbol is defined then ENGINE_get_default_ECDH(), the function
* that is used by ECDH to hook in implementation code and cache defaults
* (etc), will display brief debugging summaries to stderr with the 'nid'.
*/
/* #define ENGINE_ECDH_DEBUG */
static
ENGINE_TABLE
*
ecdh_table
=
NULL
;
static
const
int
dummy_nid
=
1
;
void
ENGINE_unregister_ECDH
(
ENGINE
*
e
)
{
engine_table_unregister
(
&
ecdh_table
,
e
);
}
static
void
engine_unregister_all_ECDH
(
void
)
{
engine_table_cleanup
(
&
ecdh_table
);
}
int
ENGINE_register_ECDH
(
ENGINE
*
e
)
{
if
(
e
->
ecdh_meth
)
return
engine_table_register
(
&
ecdh_table
,
engine_unregister_all_ECDH
,
e
,
&
dummy_nid
,
1
,
0
);
return
1
;
}
void
ENGINE_register_all_ECDH
()
{
ENGINE
*
e
;
for
(
e
=
ENGINE_get_first
();
e
;
e
=
ENGINE_get_next
(
e
))
ENGINE_register_ECDH
(
e
);
}
int
ENGINE_set_default_ECDH
(
ENGINE
*
e
)
{
if
(
e
->
ecdh_meth
)
return
engine_table_register
(
&
ecdh_table
,
engine_unregister_all_ECDH
,
e
,
&
dummy_nid
,
1
,
1
);
return
1
;
}
/*
* Exposed API function to get a functional reference from the implementation
* table (ie. try to get a functional reference from the tabled structural
* references).
*/
ENGINE
*
ENGINE_get_default_ECDH
(
void
)
{
return
engine_table_select
(
&
ecdh_table
,
dummy_nid
);
}
/* Obtains an ECDH implementation from an ENGINE functional reference */
const
ECDH_METHOD
*
ENGINE_get_ECDH
(
const
ENGINE
*
e
)
{
return
e
->
ecdh_meth
;
}
/* Sets an ECDH implementation in an ENGINE structure */
int
ENGINE_set_ECDH
(
ENGINE
*
e
,
const
ECDH_METHOD
*
ecdh_meth
)
{
e
->
ecdh_meth
=
ecdh_meth
;
return
1
;
}
include/openssl/engine.h
浏览文件 @
f517ffbb
...
...
@@ -108,7 +108,6 @@ extern "C" {
# define ENGINE_METHOD_DSA (unsigned int)0x0002
# define ENGINE_METHOD_DH (unsigned int)0x0004
# define ENGINE_METHOD_RAND (unsigned int)0x0008
# define ENGINE_METHOD_ECDH (unsigned int)0x0010
# define ENGINE_METHOD_ECDSA (unsigned int)0x0020
# define ENGINE_METHOD_CIPHERS (unsigned int)0x0040
# define ENGINE_METHOD_DIGESTS (unsigned int)0x0080
...
...
@@ -440,10 +439,6 @@ int ENGINE_register_DSA(ENGINE *e);
void
ENGINE_unregister_DSA
(
ENGINE
*
e
);
void
ENGINE_register_all_DSA
(
void
);
int
ENGINE_register_ECDH
(
ENGINE
*
e
);
void
ENGINE_unregister_ECDH
(
ENGINE
*
e
);
void
ENGINE_register_all_ECDH
(
void
);
int
ENGINE_register_ECDSA
(
ENGINE
*
e
);
void
ENGINE_unregister_ECDSA
(
ENGINE
*
e
);
void
ENGINE_register_all_ECDSA
(
void
);
...
...
@@ -558,7 +553,6 @@ int ENGINE_set_id(ENGINE *e, const char *id);
int
ENGINE_set_name
(
ENGINE
*
e
,
const
char
*
name
);
int
ENGINE_set_RSA
(
ENGINE
*
e
,
const
RSA_METHOD
*
rsa_meth
);
int
ENGINE_set_DSA
(
ENGINE
*
e
,
const
DSA_METHOD
*
dsa_meth
);
int
ENGINE_set_ECDH
(
ENGINE
*
e
,
const
ECDH_METHOD
*
ecdh_meth
);
int
ENGINE_set_ECDSA
(
ENGINE
*
e
,
const
ECDSA_METHOD
*
ecdsa_meth
);
int
ENGINE_set_EC_KEY
(
ENGINE
*
e
,
const
EC_KEY_METHOD
*
ecdsa_meth
);
int
ENGINE_set_DH
(
ENGINE
*
e
,
const
DH_METHOD
*
dh_meth
);
...
...
@@ -604,7 +598,6 @@ const char *ENGINE_get_id(const ENGINE *e);
const
char
*
ENGINE_get_name
(
const
ENGINE
*
e
);
const
RSA_METHOD
*
ENGINE_get_RSA
(
const
ENGINE
*
e
);
const
DSA_METHOD
*
ENGINE_get_DSA
(
const
ENGINE
*
e
);
const
ECDH_METHOD
*
ENGINE_get_ECDH
(
const
ENGINE
*
e
);
const
ECDSA_METHOD
*
ENGINE_get_ECDSA
(
const
ENGINE
*
e
);
const
EC_KEY_METHOD
*
ENGINE_get_EC_KEY
(
const
ENGINE
*
e
);
const
DH_METHOD
*
ENGINE_get_DH
(
const
ENGINE
*
e
);
...
...
@@ -684,7 +677,6 @@ int ENGINE_load_ssl_client_cert(ENGINE *e, SSL *s,
ENGINE
*
ENGINE_get_default_RSA
(
void
);
/* Same for the other "methods" */
ENGINE
*
ENGINE_get_default_DSA
(
void
);
ENGINE
*
ENGINE_get_default_ECDH
(
void
);
ENGINE
*
ENGINE_get_default_ECDSA
(
void
);
ENGINE
*
ENGINE_get_default_EC_KEY
(
void
);
ENGINE
*
ENGINE_get_default_DH
(
void
);
...
...
@@ -708,7 +700,6 @@ int ENGINE_set_default_RSA(ENGINE *e);
int
ENGINE_set_default_string
(
ENGINE
*
e
,
const
char
*
def_list
);
/* Same for the other "methods" */
int
ENGINE_set_default_DSA
(
ENGINE
*
e
);
int
ENGINE_set_default_ECDH
(
ENGINE
*
e
);
int
ENGINE_set_default_ECDSA
(
ENGINE
*
e
);
int
ENGINE_set_default_EC_KEY
(
ENGINE
*
e
);
int
ENGINE_set_default_DH
(
ENGINE
*
e
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录