Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
5451e0d9
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,发现更多精彩内容 >>
提交
5451e0d9
编写于
3月 08, 2001
作者:
B
Bodo Möller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add ssl23_peek
上级
4ea38555
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
33 addition
and
15 deletion
+33
-15
ssl/s23_lib.c
ssl/s23_lib.c
+24
-14
ssl/ssl.h
ssl/ssl.h
+2
-1
ssl/ssl_err.c
ssl/ssl_err.c
+1
-0
ssl/ssl_lib.c
ssl/ssl_lib.c
+6
-0
未找到文件。
ssl/s23_lib.c
浏览文件 @
5451e0d9
...
...
@@ -63,6 +63,7 @@
static
int
ssl23_num_ciphers
(
void
);
static
SSL_CIPHER
*
ssl23_get_cipher
(
unsigned
int
u
);
static
int
ssl23_read
(
SSL
*
s
,
void
*
buf
,
int
len
);
static
int
ssl23_peek
(
SSL
*
s
,
void
*
buf
,
int
len
);
static
int
ssl23_write
(
SSL
*
s
,
const
void
*
buf
,
int
len
);
static
long
ssl23_default_timeout
(
void
);
static
int
ssl23_put_cipher_by_char
(
const
SSL_CIPHER
*
c
,
unsigned
char
*
p
);
...
...
@@ -77,7 +78,7 @@ static SSL_METHOD SSLv23_data= {
ssl_undefined_function
,
ssl_undefined_function
,
ssl23_read
,
(
int
(
*
)(
struct
ssl_st
*
,
char
*
,
int
))
ssl_undefined_function
,
ssl23_peek
,
ssl23_write
,
ssl_undefined_function
,
ssl_undefined_function
,
...
...
@@ -169,13 +170,6 @@ static int ssl23_read(SSL *s, void *buf, int len)
{
int
n
;
#if 0
if (s->shutdown & SSL_RECEIVED_SHUTDOWN)
{
s->rwstate=SSL_NOTHING;
return(0);
}
#endif
clear_sys_error
();
if
(
SSL_in_init
(
s
)
&&
(
!
s
->
in_handshake
))
{
...
...
@@ -195,17 +189,33 @@ static int ssl23_read(SSL *s, void *buf, int len)
}
}
static
int
ssl23_
write
(
SSL
*
s
,
const
void
*
buf
,
int
len
)
static
int
ssl23_
peek
(
SSL
*
s
,
void
*
buf
,
int
len
)
{
int
n
;
#if 0
if (s->shutdown & SSL_SENT_SHUTDOWN)
clear_sys_error
();
if
(
SSL_in_init
(
s
)
&&
(
!
s
->
in_handshake
))
{
n
=
s
->
handshake_func
(
s
);
if
(
n
<
0
)
return
(
n
);
if
(
n
==
0
)
{
SSLerr
(
SSL_F_SSL23_PEEK
,
SSL_R_SSL_HANDSHAKE_FAILURE
);
return
(
-
1
);
}
return
(
SSL_peek
(
s
,
buf
,
len
));
}
else
{
s
->rwstate=SSL_NOTHING
;
return(
0
);
s
sl_undefined_function
(
s
)
;
return
(
-
1
);
}
#endif
}
static
int
ssl23_write
(
SSL
*
s
,
const
void
*
buf
,
int
len
)
{
int
n
;
clear_sys_error
();
if
(
SSL_in_init
(
s
)
&&
(
!
s
->
in_handshake
))
{
...
...
ssl/ssl.h
浏览文件 @
5451e0d9
...
...
@@ -1250,6 +1250,7 @@ int SSL_COMP_add_compression_method(int id,char *cm);
/* The following lines are auto generated by the script mkerr.pl. Any changes
* made after this point may be overwritten when the script is next run.
*/
void
ERR_load_SSL_strings
(
void
);
/* Error codes for the SSL functions. */
...
...
@@ -1274,6 +1275,7 @@ int SSL_COMP_add_compression_method(int id,char *cm);
#define SSL_F_SSL23_CONNECT 117
#define SSL_F_SSL23_GET_CLIENT_HELLO 118
#define SSL_F_SSL23_GET_SERVER_HELLO 119
#define SSL_F_SSL23_PEEK 237
#define SSL_F_SSL23_READ 120
#define SSL_F_SSL23_WRITE 121
#define SSL_F_SSL2_ACCEPT 122
...
...
@@ -1612,4 +1614,3 @@ int SSL_COMP_add_compression_method(int id,char *cm);
}
#endif
#endif
ssl/ssl_err.c
浏览文件 @
5451e0d9
...
...
@@ -86,6 +86,7 @@ static ERR_STRING_DATA SSL_str_functs[]=
{
ERR_PACK
(
0
,
SSL_F_SSL23_CONNECT
,
0
),
"SSL23_CONNECT"
},
{
ERR_PACK
(
0
,
SSL_F_SSL23_GET_CLIENT_HELLO
,
0
),
"SSL23_GET_CLIENT_HELLO"
},
{
ERR_PACK
(
0
,
SSL_F_SSL23_GET_SERVER_HELLO
,
0
),
"SSL23_GET_SERVER_HELLO"
},
{
ERR_PACK
(
0
,
SSL_F_SSL23_PEEK
,
0
),
"SSL23_PEEK"
},
{
ERR_PACK
(
0
,
SSL_F_SSL23_READ
,
0
),
"SSL23_READ"
},
{
ERR_PACK
(
0
,
SSL_F_SSL23_WRITE
,
0
),
"SSL23_WRITE"
},
{
ERR_PACK
(
0
,
SSL_F_SSL2_ACCEPT
,
0
),
"SSL2_ACCEPT"
},
...
...
ssl/ssl_lib.c
浏览文件 @
5451e0d9
...
...
@@ -784,6 +784,12 @@ int SSL_read(SSL *s,char *buf,int num)
int
SSL_peek
(
SSL
*
s
,
char
*
buf
,
int
num
)
{
if
(
s
->
handshake_func
==
0
)
{
SSLerr
(
SSL_F_SSL_READ
,
SSL_R_UNINITIALIZED
);
return
-
1
;
}
if
(
s
->
shutdown
&
SSL_RECEIVED_SHUTDOWN
)
{
return
(
0
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录