Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
3bbb0212
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
8 个月 前同步成功
通知
8
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,体验更适合开发者的 AI 搜索 >>
提交
3bbb0212
编写于
5月 01, 2003
作者:
R
Richard Levitte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add STORE support in ENGINE.
上级
a5db6fa5
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
409 addition
and
181 deletion
+409
-181
CHANGES
CHANGES
+3
-0
crypto/crypto-lib.com
crypto/crypto-lib.com
+2
-1
crypto/engine/Makefile.ssl
crypto/engine/Makefile.ssl
+261
-174
crypto/engine/eng_int.h
crypto/engine/eng_int.h
+1
-0
crypto/engine/eng_lib.c
crypto/engine/eng_lib.c
+1
-0
crypto/engine/eng_list.c
crypto/engine/eng_list.c
+1
-0
crypto/engine/engine.h
crypto/engine/engine.h
+20
-6
crypto/engine/tb_store.c
crypto/engine/tb_store.c
+120
-0
未找到文件。
CHANGES
浏览文件 @
3bbb0212
...
...
@@ -4,6 +4,9 @@
Changes between 0.9.7a and 0.9.8 [xx XXX xxxx]
*) Add support for STORE in ENGINE.
[Richard Levitte]
*) Add the STORE type. The intention is to provide a common interface
to certificate and key stores, be they simple file-based stores, or
HSM-type store, or LDAP stores, or...
...
...
crypto/crypto-lib.com
浏览文件 @
3bbb0212
...
...
@@ -202,7 +202,8 @@ $ LIB_DSO = "dso_dl,dso_dlfcn,dso_err,dso_lib,dso_null,"+ -
"dso_openssl,dso_win32,dso_vms"
$ LIB_ENGINE = "eng_err,eng_lib,eng_list,eng_init,eng_ctrl,"+ -
"eng_table,eng_pkey,eng_fat,eng_all,"+ -
"tb_rsa,tb_dsa,tb_ecdsa,tb_dh,tb_rand,tb_cipher,tb_digest,tb_ecdh,"+ -
"tb_rsa,tb_dsa,tb_ecdsa,tb_dh,tb_ecdh,tb_rand,tb_store,"+ -
"tb_cipher,tb_digest,"+ -
"eng_openssl,eng_dyn,eng_cnf,eng_cryptodev"
$ LIB_AES = "aes_core,aes_misc,aes_ecb,aes_cbc,aes_cfb,aes_ofb,aes_ctr"
$ LIB_BUFFER = "buffer,buf_err"
...
...
crypto/engine/Makefile.ssl
浏览文件 @
3bbb0212
此差异已折叠。
点击以展开。
crypto/engine/eng_int.h
浏览文件 @
3bbb0212
...
...
@@ -154,6 +154,7 @@ struct engine_st
const
ECDH_METHOD
*
ecdh_meth
;
const
ECDSA_METHOD
*
ecdsa_meth
;
const
RAND_METHOD
*
rand_meth
;
const
STORE_METHOD
*
store_meth
;
/* Cipher handling is via this callback */
ENGINE_CIPHERS_PTR
ciphers
;
/* Digest handling is via this callback */
...
...
crypto/engine/eng_lib.c
浏览文件 @
3bbb0212
...
...
@@ -92,6 +92,7 @@ void engine_set_all_null(ENGINE *e)
e
->
dsa_meth
=
NULL
;
e
->
dh_meth
=
NULL
;
e
->
rand_meth
=
NULL
;
e
->
store_meth
=
NULL
;
e
->
ciphers
=
NULL
;
e
->
digests
=
NULL
;
e
->
destroy
=
NULL
;
...
...
crypto/engine/eng_list.c
浏览文件 @
3bbb0212
...
...
@@ -336,6 +336,7 @@ static void engine_cpy(ENGINE *dest, const ENGINE *src)
dest
->
ecdsa_meth
=
src
->
ecdsa_meth
;
#endif
dest
->
rand_meth
=
src
->
rand_meth
;
dest
->
store_meth
=
src
->
store_meth
;
dest
->
ciphers
=
src
->
ciphers
;
dest
->
digests
=
src
->
digests
;
dest
->
destroy
=
src
->
destroy
;
...
...
crypto/engine/engine.h
浏览文件 @
3bbb0212
...
...
@@ -88,6 +88,7 @@
#include <openssl/ecdsa.h>
#endif
#include <openssl/rand.h>
#include <openssl/store.h>
#include <openssl/ui.h>
#include <openssl/symhacks.h>
#include <openssl/err.h>
...
...
@@ -123,6 +124,7 @@ typedef void ECDSA_METHOD;
#define ENGINE_METHOD_ECDSA (unsigned int)0x0020
#define ENGINE_METHOD_CIPHERS (unsigned int)0x0040
#define ENGINE_METHOD_DIGESTS (unsigned int)0x0080
#define ENGINE_METHOD_STORE (unsigned int)0x0100
/* Obvious all-or-nothing cases. */
#define ENGINE_METHOD_ALL (unsigned int)0xFFFF
#define ENGINE_METHOD_NONE (unsigned int)0x0000
...
...
@@ -192,9 +194,15 @@ typedef void ECDSA_METHOD;
handles/connections etc. */
#define ENGINE_CTRL_SET_USER_INTERFACE 4
/* Alternative to callback */
#define ENGINE_CTRL_SET_CALLBACK_DATA 5
/* User-specific data, used
when calling the password
callback and the user
interface */
when calling the password
callback and the user
interface */
#define ENGINE_CTRL_LOAD_CONFIGURATION 6
/* Load a configuration, given
a string that represents a
file name or so */
#define ENGINE_CTRL_LOAD_SECTION 7
/* Load data from a given
section in the already loaded
configuration */
/* These control commands allow an application to deal with an arbitrary engine
* in a dynamic way. Warn: Negative return values indicate errors FOR THESE
...
...
@@ -241,7 +249,7 @@ typedef void ECDSA_METHOD;
/* ENGINE implementations should start the numbering of their own control
* commands from this value. (ie. ENGINE_CMD_BASE, ENGINE_CMD_BASE + 1, etc). */
#define ENGINE_CMD_BASE 200
#define ENGINE_CMD_BASE
200
/* NB: These 2 nCipher "chil" control commands are deprecated, and their
* functionality is now available through ENGINE-specific control commands
...
...
@@ -375,6 +383,10 @@ int ENGINE_register_RAND(ENGINE *e);
void
ENGINE_unregister_RAND
(
ENGINE
*
e
);
void
ENGINE_register_all_RAND
(
void
);
int
ENGINE_register_STORE
(
ENGINE
*
e
);
void
ENGINE_unregister_STORE
(
ENGINE
*
e
);
void
ENGINE_register_all_STORE
(
void
);
int
ENGINE_register_ciphers
(
ENGINE
*
e
);
void
ENGINE_unregister_ciphers
(
ENGINE
*
e
);
void
ENGINE_register_all_ciphers
(
void
);
...
...
@@ -451,6 +463,7 @@ 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_DH
(
ENGINE
*
e
,
const
DH_METHOD
*
dh_meth
);
int
ENGINE_set_RAND
(
ENGINE
*
e
,
const
RAND_METHOD
*
rand_meth
);
int
ENGINE_set_STORE
(
ENGINE
*
e
,
const
STORE_METHOD
*
store_meth
);
int
ENGINE_set_destroy_function
(
ENGINE
*
e
,
ENGINE_GEN_INT_FUNC_PTR
destroy_f
);
int
ENGINE_set_init_function
(
ENGINE
*
e
,
ENGINE_GEN_INT_FUNC_PTR
init_f
);
int
ENGINE_set_finish_function
(
ENGINE
*
e
,
ENGINE_GEN_INT_FUNC_PTR
finish_f
);
...
...
@@ -485,6 +498,7 @@ const ECDH_METHOD *ENGINE_get_ECDH(const ENGINE *e);
const
ECDSA_METHOD
*
ENGINE_get_ECDSA
(
const
ENGINE
*
e
);
const
DH_METHOD
*
ENGINE_get_DH
(
const
ENGINE
*
e
);
const
RAND_METHOD
*
ENGINE_get_RAND
(
const
ENGINE
*
e
);
const
STORE_METHOD
*
ENGINE_get_STORE
(
const
ENGINE
*
e
);
ENGINE_GEN_INT_FUNC_PTR
ENGINE_get_destroy_function
(
const
ENGINE
*
e
);
ENGINE_GEN_INT_FUNC_PTR
ENGINE_get_init_function
(
const
ENGINE
*
e
);
ENGINE_GEN_INT_FUNC_PTR
ENGINE_get_finish_function
(
const
ENGINE
*
e
);
...
...
@@ -576,10 +590,10 @@ void ENGINE_add_conf_module(void);
/**************************/
/* Binary/behaviour compatibility levels */
#define OSSL_DYNAMIC_VERSION (unsigned long)0x000
102
00
#define OSSL_DYNAMIC_VERSION (unsigned long)0x000
200
00
/* Binary versions older than this are too old for us (whether we're a loader or
* a loadee) */
#define OSSL_DYNAMIC_OLDEST (unsigned long)0x000
102
00
#define OSSL_DYNAMIC_OLDEST (unsigned long)0x000
200
00
/* When compiling an ENGINE entirely as an external shared library, loadable by
* the "dynamic" ENGINE, these types are needed. The 'dynamic_fns' structure
...
...
crypto/engine/tb_store.c
0 → 100644
浏览文件 @
3bbb0212
/* ====================================================================
* Copyright (c) 2000 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 <openssl/evp.h>
#include <openssl/engine.h>
#include "eng_int.h"
/* If this symbol is defined then ENGINE_get_default_STORE(), the function that is
* used by STORE to hook in implementation code and cache defaults (etc), will
* display brief debugging summaries to stderr with the 'nid'. */
/* #define ENGINE_STORE_DEBUG */
static
ENGINE_TABLE
*
store_table
=
NULL
;
static
const
int
dummy_nid
=
1
;
void
ENGINE_unregister_STORE
(
ENGINE
*
e
)
{
engine_table_unregister
(
&
store_table
,
e
);
}
static
void
engine_unregister_all_STORE
(
void
)
{
engine_table_cleanup
(
&
store_table
);
}
int
ENGINE_register_STORE
(
ENGINE
*
e
)
{
if
(
e
->
store_meth
)
return
engine_table_register
(
&
store_table
,
engine_unregister_all_STORE
,
e
,
&
dummy_nid
,
1
,
0
);
return
1
;
}
void
ENGINE_register_all_STORE
()
{
ENGINE
*
e
;
for
(
e
=
ENGINE_get_first
()
;
e
;
e
=
ENGINE_get_next
(
e
))
ENGINE_register_STORE
(
e
);
}
int
ENGINE_set_default_STORE
(
ENGINE
*
e
)
{
if
(
e
->
store_meth
)
return
engine_table_register
(
&
store_table
,
engine_unregister_all_STORE
,
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_STORE
(
void
)
{
return
engine_table_select
(
&
store_table
,
dummy_nid
);
}
/* Obtains an STORE implementation from an ENGINE functional reference */
const
STORE_METHOD
*
ENGINE_get_STORE
(
const
ENGINE
*
e
)
{
return
e
->
store_meth
;
}
/* Sets an STORE implementation in an ENGINE structure */
int
ENGINE_set_STORE
(
ENGINE
*
e
,
const
STORE_METHOD
*
store_meth
)
{
e
->
store_meth
=
store_meth
;
return
1
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录