Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
05935c47
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看板
提交
05935c47
编写于
6月 01, 2008
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add support for ENGINE supplied SSL client auth.
上级
d8bd55a3
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
56 addition
and
0 deletion
+56
-0
crypto/engine/eng_int.h
crypto/engine/eng_int.h
+2
-0
crypto/engine/eng_pkey.c
crypto/engine/eng_pkey.c
+43
-0
crypto/engine/engine.h
crypto/engine/engine.h
+9
-0
crypto/ossl_typ.h
crypto/ossl_typ.h
+2
-0
未找到文件。
crypto/engine/eng_int.h
浏览文件 @
05935c47
...
...
@@ -180,6 +180,8 @@ struct engine_st
ENGINE_LOAD_KEY_PTR
load_privkey
;
ENGINE_LOAD_KEY_PTR
load_pubkey
;
ENGINE_SSL_CLIENT_CERT_PTR
load_ssl_client_cert
;
const
ENGINE_CMD_DEFN
*
cmd_defns
;
int
flags
;
/* reference count on the structure itself */
...
...
crypto/engine/eng_pkey.c
浏览文件 @
05935c47
...
...
@@ -69,6 +69,13 @@ int ENGINE_set_load_pubkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpub_f)
return
1
;
}
int
ENGINE_set_load_ssl_client_cert_function
(
ENGINE
*
e
,
ENGINE_SSL_CLIENT_CERT_PTR
loadssl_f
)
{
e
->
load_ssl_client_cert
=
loadssl_f
;
return
1
;
}
ENGINE_LOAD_KEY_PTR
ENGINE_get_load_privkey_function
(
const
ENGINE
*
e
)
{
return
e
->
load_privkey
;
...
...
@@ -79,6 +86,11 @@ ENGINE_LOAD_KEY_PTR ENGINE_get_load_pubkey_function(const ENGINE *e)
return
e
->
load_pubkey
;
}
ENGINE_SSL_CLIENT_CERT_PTR
ENGINE_get_ssl_client_cert_function
(
const
ENGINE
*
e
)
{
return
e
->
load_ssl_client_cert
;
}
/* API functions to load public/private keys */
EVP_PKEY
*
ENGINE_load_private_key
(
ENGINE
*
e
,
const
char
*
key_id
,
...
...
@@ -152,3 +164,34 @@ EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id,
}
return
pkey
;
}
int
ENGINE_load_ssl_client_cert
(
ENGINE
*
e
,
SSL
*
s
,
STACK_OF
(
X509_NAME
)
*
ca_dn
,
X509
**
pcert
,
EVP_PKEY
**
ppkey
,
UI_METHOD
*
ui_method
,
void
*
callback_data
)
{
int
ret
;
if
(
e
==
NULL
)
{
ENGINEerr
(
ENGINE_F_ENGINE_LOAD_SSL_CLIENT_CERT
,
ERR_R_PASSED_NULL_PARAMETER
);
return
0
;
}
CRYPTO_w_lock
(
CRYPTO_LOCK_ENGINE
);
if
(
e
->
funct_ref
==
0
)
{
CRYPTO_w_unlock
(
CRYPTO_LOCK_ENGINE
);
ENGINEerr
(
ENGINE_F_ENGINE_LOAD_SSL_CLIENT_CERT
,
ENGINE_R_NOT_INITIALISED
);
return
0
;
}
CRYPTO_w_unlock
(
CRYPTO_LOCK_ENGINE
);
if
(
!
e
->
load_ssl_client_cert
)
{
ENGINEerr
(
ENGINE_F_ENGINE_LOAD_SSL_CLIENT_CERT
,
ENGINE_R_NO_LOAD_FUNCTION
);
return
0
;
}
return
e
->
load_ssl_client_cert
(
e
,
s
,
ca_dn
,
pcert
,
ppkey
,
ui_method
,
callback_data
);
}
crypto/engine/engine.h
浏览文件 @
05935c47
...
...
@@ -280,6 +280,9 @@ typedef int (*ENGINE_CTRL_FUNC_PTR)(ENGINE *, int, long, void *, void (*f)(void)
/* Generic load_key function pointer */
typedef
EVP_PKEY
*
(
*
ENGINE_LOAD_KEY_PTR
)(
ENGINE
*
,
const
char
*
,
UI_METHOD
*
ui_method
,
void
*
callback_data
);
typedef
int
(
*
ENGINE_SSL_CLIENT_CERT_PTR
)(
ENGINE
*
,
SSL
*
ssl
,
STACK_OF
(
X509_NAME
)
*
ca_dn
,
X509
**
pcert
,
EVP_PKEY
**
pkey
,
UI_METHOD
*
ui_method
,
void
*
callback_data
);
/* These callback types are for an ENGINE's handler for cipher and digest logic.
* These handlers have these prototypes;
* int foo(ENGINE *e, const EVP_CIPHER **cipher, const int **nids, int nid);
...
...
@@ -476,6 +479,8 @@ int ENGINE_set_finish_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR finish_f);
int
ENGINE_set_ctrl_function
(
ENGINE
*
e
,
ENGINE_CTRL_FUNC_PTR
ctrl_f
);
int
ENGINE_set_load_privkey_function
(
ENGINE
*
e
,
ENGINE_LOAD_KEY_PTR
loadpriv_f
);
int
ENGINE_set_load_pubkey_function
(
ENGINE
*
e
,
ENGINE_LOAD_KEY_PTR
loadpub_f
);
int
ENGINE_set_load_ssl_client_cert_function
(
ENGINE
*
e
,
ENGINE_SSL_CLIENT_CERT_PTR
loadssl_f
);
int
ENGINE_set_ciphers
(
ENGINE
*
e
,
ENGINE_CIPHERS_PTR
f
);
int
ENGINE_set_digests
(
ENGINE
*
e
,
ENGINE_DIGESTS_PTR
f
);
int
ENGINE_set_pkey_meths
(
ENGINE
*
e
,
ENGINE_PKEY_METHS_PTR
f
);
...
...
@@ -513,6 +518,7 @@ ENGINE_GEN_INT_FUNC_PTR ENGINE_get_finish_function(const ENGINE *e);
ENGINE_CTRL_FUNC_PTR
ENGINE_get_ctrl_function
(
const
ENGINE
*
e
);
ENGINE_LOAD_KEY_PTR
ENGINE_get_load_privkey_function
(
const
ENGINE
*
e
);
ENGINE_LOAD_KEY_PTR
ENGINE_get_load_pubkey_function
(
const
ENGINE
*
e
);
ENGINE_SSL_CLIENT_CERT_PTR
ENGINE_get_ssl_client_cert_function
(
const
ENGINE
*
e
);
ENGINE_CIPHERS_PTR
ENGINE_get_ciphers
(
const
ENGINE
*
e
);
ENGINE_DIGESTS_PTR
ENGINE_get_digests
(
const
ENGINE
*
e
);
ENGINE_PKEY_METHS_PTR
ENGINE_get_pkey_meths
(
const
ENGINE
*
e
);
...
...
@@ -556,6 +562,9 @@ EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,
UI_METHOD
*
ui_method
,
void
*
callback_data
);
EVP_PKEY
*
ENGINE_load_public_key
(
ENGINE
*
e
,
const
char
*
key_id
,
UI_METHOD
*
ui_method
,
void
*
callback_data
);
int
ENGINE_load_ssl_client_cert
(
ENGINE
*
e
,
SSL
*
s
,
STACK_OF
(
X509_NAME
)
*
ca_dn
,
X509
**
pcert
,
EVP_PKEY
**
ppkey
,
UI_METHOD
*
ui_method
,
void
*
callback_data
);
/* This returns a pointer for the current ENGINE structure that
* is (by default) performing any RSA operations. The value returned
...
...
crypto/ossl_typ.h
浏览文件 @
05935c47
...
...
@@ -165,6 +165,8 @@ typedef struct ui_method_st UI_METHOD;
typedef
struct
st_ERR_FNS
ERR_FNS
;
typedef
struct
engine_st
ENGINE
;
typedef
struct
ssl_st
SSL
;
typedef
struct
ssl_ctx_st
SSL_CTX
;
typedef
struct
X509_POLICY_NODE_st
X509_POLICY_NODE
;
typedef
struct
X509_POLICY_LEVEL_st
X509_POLICY_LEVEL
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录