Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
openssl
提交
801294f8
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,发现更多精彩内容 >>
提交
801294f8
编写于
4月 29, 1999
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix a couple of cases where an attempt is made to lock an already locked
mutex.
上级
7185e2d6
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
5 deletion
+13
-5
ssl/s2_clnt.c
ssl/s2_clnt.c
+3
-1
ssl/ssl_sess.c
ssl/ssl_sess.c
+10
-4
未找到文件。
ssl/s2_clnt.c
浏览文件 @
801294f8
...
...
@@ -438,7 +438,9 @@ static int get_server_hello(SSL *s)
* cert, Free's it before we increment the reference count. */
CRYPTO_w_lock
(
CRYPTO_LOCK_X509
);
s
->
session
->
peer
=
s
->
session
->
cert
->
key
->
x509
;
CRYPTO_add
(
&
s
->
session
->
peer
->
references
,
1
,
CRYPTO_LOCK_X509
);
/* Shouldn't do this: already locked */
/*CRYPTO_add(&s->session->peer->references,1,CRYPTO_LOCK_X509);*/
s
->
session
->
peer
->
references
++
;
CRYPTO_w_unlock
(
CRYPTO_LOCK_X509
);
s
->
s2
->
conn_id_length
=
s
->
s2
->
tmp
.
conn_id_length
;
...
...
ssl/ssl_sess.c
浏览文件 @
801294f8
...
...
@@ -63,6 +63,7 @@
static
void
SSL_SESSION_list_remove
(
SSL_CTX
*
ctx
,
SSL_SESSION
*
s
);
static
void
SSL_SESSION_list_add
(
SSL_CTX
*
ctx
,
SSL_SESSION
*
s
);
static
int
remove_session_lock
(
SSL_CTX
*
ctx
,
SSL_SESSION
*
c
,
int
lck
);
static
int
ssl_session_num
=
0
;
static
STACK
*
ssl_session_meth
=
NULL
;
...
...
@@ -304,8 +305,8 @@ int SSL_CTX_add_session(SSL_CTX *ctx, SSL_SESSION *c)
while
(
SSL_CTX_sess_number
(
ctx
)
>
SSL_CTX_sess_get_cache_size
(
ctx
))
{
if
(
!
SSL_CTX_remove_session
(
ctx
,
ctx
->
session_cache_tail
))
if
(
!
remove_session_lock
(
ctx
,
ctx
->
session_cache_tail
,
0
))
break
;
else
ctx
->
stats
.
sess_cache_full
++
;
...
...
@@ -317,13 +318,18 @@ int SSL_CTX_add_session(SSL_CTX *ctx, SSL_SESSION *c)
}
int
SSL_CTX_remove_session
(
SSL_CTX
*
ctx
,
SSL_SESSION
*
c
)
{
return
remove_session_lock
(
ctx
,
c
,
1
);
}
int
remove_session_lock
(
SSL_CTX
*
ctx
,
SSL_SESSION
*
c
,
int
lck
)
{
SSL_SESSION
*
r
;
int
ret
=
0
;
if
((
c
!=
NULL
)
&&
(
c
->
session_id_length
!=
0
))
{
CRYPTO_w_lock
(
CRYPTO_LOCK_SSL_CTX
);
if
(
lck
)
CRYPTO_w_lock
(
CRYPTO_LOCK_SSL_CTX
);
r
=
(
SSL_SESSION
*
)
lh_delete
(
ctx
->
sessions
,(
char
*
)
c
);
if
(
r
!=
NULL
)
{
...
...
@@ -331,7 +337,7 @@ int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *c)
SSL_SESSION_list_remove
(
ctx
,
c
);
}
CRYPTO_w_unlock
(
CRYPTO_LOCK_SSL_CTX
);
if
(
lck
)
CRYPTO_w_unlock
(
CRYPTO_LOCK_SSL_CTX
);
if
(
ret
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录