Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
openssl
提交
2557eaea
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,发现更多精彩内容 >>
提交
2557eaea
编写于
1月 24, 2000
作者:
B
Bodo Möller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Avoid a race condition.
上级
a46faa2b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
25 addition
and
18 deletion
+25
-18
CHANGES
CHANGES
+5
-0
ssl/s2_clnt.c
ssl/s2_clnt.c
+20
-18
未找到文件。
CHANGES
浏览文件 @
2557eaea
...
...
@@ -4,6 +4,11 @@
Changes between 0.9.4 and 0.9.5 [xx XXX 1999]
*) Avoid a race condition in s2_clnt.c (function get_server_hello) that
made it impossible to use the same SSL_SESSION data structure in
SSL2 clients in multiple threads.
[Bodo Moeller]
*) The return value of RAND_load_file() no longer counts bytes obtained
by stat(). RAND_load_file(..., -1) is new and uses the complete file
to seed the PRNG (previously an explicit byte count was required).
...
...
ssl/s2_clnt.c
浏览文件 @
2557eaea
...
...
@@ -435,26 +435,28 @@ static int get_server_hello(SSL *s)
return
(
-
1
);
}
s
->
session
->
cipher
=
sk_SSL_CIPHER_value
(
cl
,
i
);
}
if
(
s
->
session
->
peer
!=
NULL
)
X509_free
(
s
->
session
->
peer
);
#if 0 /* What is all this meant to accomplish?? */
/* hmmm, can we have the problem of the other session with this
* cert, Free's it before we increment the reference count. */
CRYPTO_w_lock(CRYPTO_LOCK_X509);
s->session->peer=s->session->sess_cert->key->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);
#else
s
->
session
->
peer
=
s
->
session
->
sess_cert
->
peer_key
->
x509
;
/* peer_key->x509 has been set by ssl2_set_certificate. */
CRYPTO_add
(
&
s
->
session
->
peer
->
references
,
1
,
CRYPTO_LOCK_X509
);
#endif
if
(
s
->
session
->
peer
!=
NULL
)
/* can't happen*/
{
ssl2_return_error
(
s
,
SSL2_PE_UNDEFINED_ERROR
);
SSLerr
(
SSL_F_GET_SERVER_HELLO
,
SSL_R_INTERNAL_ERROR
);
return
(
-
1
);
}
s
->
session
->
peer
=
s
->
session
->
sess_cert
->
peer_key
->
x509
;
/* peer_key->x509 has been set by ssl2_set_certificate. */
CRYPTO_add
(
&
s
->
session
->
peer
->
references
,
1
,
CRYPTO_LOCK_X509
);
}
if
(
s
->
session
->
peer
!=
s
->
session
->
sess_cert
->
peer_key
->
x509
)
/* can't happen */
{
ssl2_return_error
(
s
,
SSL2_PE_UNDEFINED_ERROR
);
SSLerr
(
SSL_F_GET_SERVER_HELLO
,
SSL_R_INTERNAL_ERROR
);
return
(
-
1
);
}
s
->
s2
->
conn_id_length
=
s
->
s2
->
tmp
.
conn_id_length
;
memcpy
(
s
->
s2
->
conn_id
,
p
,
s
->
s2
->
tmp
.
conn_id_length
);
return
(
1
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录