Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
4eb77b26
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看板
“6c1e82a4b74ad0c8b45c833a4409f153199d9be4”上不存在“README.md”
提交
4eb77b26
编写于
25年前
作者:
B
Bodo Möller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
New function SSL_CTX_set_session_id_context.
Submitted by: Reviewed by: PR:
上级
81c8ee09
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
28 addition
and
0 deletion
+28
-0
CHANGES
CHANGES
+5
-0
ssl/ssl.h
ssl/ssl.h
+6
-0
ssl/ssl_err.c
ssl/ssl_err.c
+1
-0
ssl/ssl_lib.c
ssl/ssl_lib.c
+16
-0
未找到文件。
CHANGES
浏览文件 @
4eb77b26
...
...
@@ -5,6 +5,11 @@
Changes between 0.9.2b and 0.9.3
*) New function SSL_CTX_set_session_id_context that allows to set a default
value (so that you don't need SSL_set_session_id_context for each connection
using the SSL_CTX).
[Bodo Moeller]
*) OAEP decoding bug fix.
[Ulf Möller]
...
...
This diff is collapsed.
Click to expand it.
ssl/ssl.h
浏览文件 @
4eb77b26
...
...
@@ -394,6 +394,8 @@ struct ssl_ctx_st
/**/
struct
cert_st
/* CERT */
*
default_cert
;
/**/
int
read_ahead
;
/**/
int
verify_mode
;
/**/
unsigned
int
sid_ctx_length
;
/**/
unsigned
char
sid_ctx
[
SSL_MAX_SID_CTX_LENGTH
];
/**/
int
(
*
default_verify_callback
)(
int
ok
,
X509_STORE_CTX
*
ctx
);
/* Default password callback. */
...
...
@@ -929,6 +931,9 @@ void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx,int (*cb)());
int
SSL_CTX_check_private_key
(
SSL_CTX
*
ctx
);
int
SSL_check_private_key
(
SSL
*
ctx
);
int
SSL_CTX_set_session_id_context
(
SSL_CTX
*
ctx
,
const
unsigned
char
*
sid_ctx
,
unsigned
int
sid_ctx_len
);
SSL
*
SSL_new
(
SSL_CTX
*
ctx
);
int
SSL_set_session_id_context
(
SSL
*
ssl
,
const
unsigned
char
*
sid_ctx
,
unsigned
int
sid_ctx_len
);
...
...
@@ -1153,6 +1158,7 @@ int SSL_COMP_add_compression_method(int id,char *cm);
#define SSL_F_SSL_CREATE_CIPHER_LIST 166
#define SSL_F_SSL_CTX_CHECK_PRIVATE_KEY 168
#define SSL_F_SSL_CTX_NEW 169
#define SSL_F_SSL_CTX_SET_SESSION_ID_CONTEXT 219
#define SSL_F_SSL_CTX_SET_SSL_VERSION 170
#define SSL_F_SSL_CTX_USE_CERTIFICATE 171
#define SSL_F_SSL_CTX_USE_CERTIFICATE_ASN1 172
...
...
This diff is collapsed.
Click to expand it.
ssl/ssl_err.c
浏览文件 @
4eb77b26
...
...
@@ -138,6 +138,7 @@ static ERR_STRING_DATA SSL_str_functs[]=
{
ERR_PACK
(
0
,
SSL_F_SSL_CREATE_CIPHER_LIST
,
0
),
"SSL_CREATE_CIPHER_LIST"
},
{
ERR_PACK
(
0
,
SSL_F_SSL_CTX_CHECK_PRIVATE_KEY
,
0
),
"SSL_CTX_check_private_key"
},
{
ERR_PACK
(
0
,
SSL_F_SSL_CTX_NEW
,
0
),
"SSL_CTX_new"
},
{
ERR_PACK
(
0
,
SSL_F_SSL_CTX_SET_SESSION_ID_CONTEXT
,
0
),
"SSL_CTX_set_session_id_context"
},
{
ERR_PACK
(
0
,
SSL_F_SSL_CTX_SET_SSL_VERSION
,
0
),
"SSL_CTX_set_ssl_version"
},
{
ERR_PACK
(
0
,
SSL_F_SSL_CTX_USE_CERTIFICATE
,
0
),
"SSL_CTX_use_certificate"
},
{
ERR_PACK
(
0
,
SSL_F_SSL_CTX_USE_CERTIFICATE_ASN1
,
0
),
"SSL_CTX_use_certificate_ASN1"
},
...
...
This diff is collapsed.
Click to expand it.
ssl/ssl_lib.c
浏览文件 @
4eb77b26
...
...
@@ -186,6 +186,8 @@ SSL *SSL_new(SSL_CTX *ctx)
}
else
s
->
cert
=
NULL
;
s
->
sid_ctx_length
=
ctx
->
sid_ctx_length
;
memcpy
(
&
s
->
sid_ctx
,
&
ctx
->
sid_ctx
,
sizeof
(
s
->
sid_ctx
));
s
->
verify_mode
=
ctx
->
verify_mode
;
s
->
verify_callback
=
ctx
->
default_verify_callback
;
CRYPTO_add
(
&
ctx
->
references
,
1
,
CRYPTO_LOCK_SSL_CTX
);
...
...
@@ -216,6 +218,20 @@ err:
return
(
NULL
);
}
int
SSL_CTX_set_session_id_context
(
SSL_CTX
*
ctx
,
const
unsigned
char
*
sid_ctx
,
unsigned
int
sid_ctx_len
)
{
if
(
sid_ctx_len
>
SSL_MAX_SID_CTX_LENGTH
)
{
SSLerr
(
SSL_F_SSL_CTX_SET_SESSION_ID_CONTEXT
,
SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG
);
return
0
;
}
ctx
->
sid_ctx_length
=
sid_ctx_len
;
memcpy
(
ctx
->
sid_ctx
,
sid_ctx
,
sid_ctx_len
);
return
1
;
}
int
SSL_set_session_id_context
(
SSL
*
ssl
,
const
unsigned
char
*
sid_ctx
,
unsigned
int
sid_ctx_len
)
{
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部