Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
openssl
提交
54f10e6a
O
openssl
项目概览
btwise
/
openssl
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
54f10e6a
编写于
9月 12, 2000
作者:
B
Bodo Möller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
New SSL API mode 'SSL_MODE_AUTO_RETRY', which disables the default
behaviour that SSL_read may result in SSL_ERROR_WANT_READ.
上级
fb1cba06
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
40 addition
and
24 deletion
+40
-24
CHANGES
CHANGES
+9
-0
ssl/s3_pkt.c
ssl/s3_pkt.c
+28
-24
ssl/ssl.h
ssl/ssl.h
+3
-0
未找到文件。
CHANGES
浏览文件 @
54f10e6a
...
@@ -4,6 +4,15 @@
...
@@ -4,6 +4,15 @@
Changes between 0.9.5a and 0.9.6 [xx XXX 2000]
Changes between 0.9.5a and 0.9.6 [xx XXX 2000]
*) New SSL API mode 'SSL_MODE_AUTO_RETRY'. This disables the default
behaviour that SSL_read may result in SSL_ERROR_WANT_READ (even if
the underlying transport is blocking) if a handshake took place.
(The default behaviour is needed by applications such as s_client
and s_server that use select() to determine when to use SSL_read;
but for applications that know in advance when to expect data, it
just makes things more complicated.)
[Bodo Moeller]
*) Add RAND_egd_bytes(), which gives control over the number of bytes read
*) Add RAND_egd_bytes(), which gives control over the number of bytes read
from EGD.
from EGD.
[Ben Laurie]
[Ben Laurie]
...
...
ssl/s3_pkt.c
浏览文件 @
54f10e6a
...
@@ -899,19 +899,21 @@ start:
...
@@ -899,19 +899,21 @@ start:
return
(
-
1
);
return
(
-
1
);
}
}
if
(
s
->
s3
->
rbuf
.
left
==
0
)
/* no read-ahead left? */
if
(
!
(
s
->
mode
&
SSL_MODE_AUTO_RETRY
))
{
{
BIO
*
bio
;
if
(
s
->
s3
->
rbuf
.
left
==
0
)
/* no read-ahead left? */
/* In the case where we try to read application data
{
* the first time, but we trigger an SSL handshake, we
BIO
*
bio
;
* return -1 with the retry option set. I do this
/* In the case where we try to read application data,
* otherwise renegotiation can cause nasty problems
* but we trigger an SSL handshake, we return -1 with
* in the blocking world */
/* ? */
* the retry option set. Otherwise renegotiation may
s
->
rwstate
=
SSL_READING
;
* cause nasty problems in the blocking world */
bio
=
SSL_get_rbio
(
s
);
s
->
rwstate
=
SSL_READING
;
BIO_clear_retry_flags
(
bio
);
bio
=
SSL_get_rbio
(
s
);
BIO_set_retry_read
(
bio
);
BIO_clear_retry_flags
(
bio
);
return
(
-
1
);
BIO_set_retry_read
(
bio
);
return
(
-
1
);
}
}
}
}
}
}
}
...
@@ -1022,19 +1024,21 @@ start:
...
@@ -1022,19 +1024,21 @@ start:
return
(
-
1
);
return
(
-
1
);
}
}
if
(
s
->
s3
->
rbuf
.
left
==
0
)
/* no read-ahead left? */
if
(
!
(
s
->
mode
&
SSL_MODE_AUTO_RETRY
))
{
{
BIO
*
bio
;
if
(
s
->
s3
->
rbuf
.
left
==
0
)
/* no read-ahead left? */
/* In the case where we try to read application data
{
* the first time, but we trigger an SSL handshake, we
BIO
*
bio
;
* return -1 with the retry option set. I do this
/* In the case where we try to read application data,
* otherwise renegotiation can cause nasty problems
* but we trigger an SSL handshake, we return -1 with
* in the blocking world */
/* ? */
* the retry option set. Otherwise renegotiation may
s
->
rwstate
=
SSL_READING
;
* cause nasty problems in the blocking world */
bio
=
SSL_get_rbio
(
s
);
s
->
rwstate
=
SSL_READING
;
BIO_clear_retry_flags
(
bio
);
bio
=
SSL_get_rbio
(
s
);
BIO_set_retry_read
(
bio
);
BIO_clear_retry_flags
(
bio
);
return
(
-
1
);
BIO_set_retry_read
(
bio
);
return
(
-
1
);
}
}
}
goto
start
;
goto
start
;
}
}
...
...
ssl/ssl.h
浏览文件 @
54f10e6a
...
@@ -335,6 +335,9 @@ typedef struct ssl_session_st
...
@@ -335,6 +335,9 @@ typedef struct ssl_session_st
* the misconception that non-blocking SSL_write() behaves like
* the misconception that non-blocking SSL_write() behaves like
* non-blocking write(): */
* non-blocking write(): */
#define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER 0x00000002L
#define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER 0x00000002L
/* Never bother the application with retries if the transport
* is blocking: */
#define SSL_MODE_AUTO_RETRY 0x00000004L
/* Note: SSL[_CTX]_set_{options,mode} use |= op on the previous value,
/* Note: SSL[_CTX]_set_{options,mode} use |= op on the previous value,
* they cannot be used to clear bits. */
* they cannot be used to clear bits. */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录