Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
pulsar
提交
fdef79eb
pulsar
项目概览
apache
/
pulsar
通知
129
Star
40
Fork
3
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Wiki
1
Wiki
分析
仓库
DevOps
项目成员
Pages
pulsar
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Pages
分析
分析
仓库分析
DevOps
Wiki
1
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
提交
体验新版 GitCode,发现更多精彩内容 >>
提交
fdef79eb
编写于
2月 16, 2017
作者:
J
jai1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Using TLSv1 since boost1_41 supports TLS v1.0
上级
88e75fe5
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
11 addition
and
13 deletion
+11
-13
pulsar-client-cpp/include/pulsar/Auth.h
pulsar-client-cpp/include/pulsar/Auth.h
+2
-2
pulsar-client-cpp/lib/Auth.cc
pulsar-client-cpp/lib/Auth.cc
+3
-3
pulsar-client-cpp/lib/ClientConnection.cc
pulsar-client-cpp/lib/ClientConnection.cc
+5
-6
pulsar-client-cpp/lib/ExecutorService.h
pulsar-client-cpp/lib/ExecutorService.h
+1
-2
未找到文件。
pulsar-client-cpp/include/pulsar/Auth.h
浏览文件 @
fdef79eb
...
...
@@ -19,7 +19,7 @@
#include <vector>
#include <string>
#include <
unordered_
map>
#include <map>
#include <boost/shared_ptr.hpp>
#include <pulsar/Result.h>
...
...
@@ -27,7 +27,7 @@
namespace
pulsar
{
typedef
std
::
unordered_
map
<
std
::
string
,
std
::
string
>
ParamMap
;
typedef
std
::
map
<
std
::
string
,
std
::
string
>
ParamMap
;
class
AuthenticationDataProvider
{
public:
...
...
pulsar-client-cpp/lib/Auth.cc
浏览文件 @
fdef79eb
...
...
@@ -137,9 +137,9 @@ namespace pulsar {
if
(
!
authParamsString
.
empty
())
{
std
::
vector
<
std
::
string
>
params
;
boost
::
algorithm
::
split
(
params
,
authParamsString
,
boost
::
is_any_of
(
","
));
for
(
auto
&
p
:
params
)
{
for
(
int
i
=
0
;
i
<
params
.
size
();
i
++
)
{
std
::
vector
<
std
::
string
>
kv
;
boost
::
algorithm
::
split
(
kv
,
p
,
boost
::
is_any_of
(
":"
));
boost
::
algorithm
::
split
(
kv
,
p
arams
[
i
]
,
boost
::
is_any_of
(
":"
));
if
(
kv
.
size
()
==
2
)
{
paramMap
[
kv
[
0
]]
=
kv
[
1
];
}
...
...
pulsar-client-cpp/lib/ClientConnection.cc
浏览文件 @
fdef79eb
...
...
@@ -114,13 +114,13 @@ isTlsAllowInsecureConnection_(false) {
if
(
clientConfiguration
.
isUseTls
())
{
using
namespace
boost
::
filesystem
;
boost
::
asio
::
ssl
::
context
ctx
(
boost
::
asio
::
ssl
::
context
::
tlsv12
_client
);
boost
::
asio
::
ssl
::
context
ctx
(
executor_
->
io_service_
,
boost
::
asio
::
ssl
::
context
::
tlsv1
_client
);
if
(
clientConfiguration
.
isTlsAllowInsecureConnection
())
{
ctx
.
set_verify_mode
(
boost
::
asio
::
ssl
::
verify_none
);
ctx
.
set_verify_mode
(
boost
::
asio
::
ssl
::
context
::
verify_none
);
isTlsAllowInsecureConnection_
=
true
;
}
else
{
ctx
.
set_verify_mode
(
boost
::
asio
::
ssl
::
verify_peer
);
ctx
.
set_verify_mode
(
boost
::
asio
::
ssl
::
context
::
verify_peer
);
std
::
string
trustCertFilePath
=
clientConfiguration
.
getTlsTrustCertsFilePath
();
if
(
exists
(
path
(
trustCertFilePath
)))
{
ctx
.
load_verify_file
(
trustCertFilePath
);
...
...
@@ -234,7 +234,6 @@ void ClientConnection::handleTcpConnected(const boost::system::error_code& err,
close
();
return
;
}
tlsSocket_
->
set_verify_callback
(
boost
::
asio
::
ssl
::
rfc2818_verification
(
service_url
.
host
()));
}
tlsSocket_
->
async_handshake
(
boost
::
asio
::
ssl
::
stream
<
tcp
::
socket
>::
client
,
boost
::
bind
(
&
ClientConnection
::
handleHandshake
,
shared_from_this
(),
boost
::
asio
::
placeholders
::
error
));
}
else
{
...
...
pulsar-client-cpp/lib/ExecutorService.h
浏览文件 @
fdef79eb
...
...
@@ -32,7 +32,7 @@ typedef boost::shared_ptr<boost::asio::ssl::stream<boost::asio::ip::tcp::socket&
typedef
boost
::
shared_ptr
<
boost
::
asio
::
ip
::
tcp
::
resolver
>
TcpResolverPtr
;
typedef
boost
::
shared_ptr
<
boost
::
asio
::
deadline_timer
>
DeadlineTimerPtr
;
class
ExecutorService
:
private
boost
::
noncopyable
{
friend
class
ClientConnection
;
public:
ExecutorService
();
~
ExecutorService
();
...
...
@@ -43,7 +43,6 @@ class ExecutorService : private boost::noncopyable {
DeadlineTimerPtr
createDeadlineTimer
();
void
postWork
(
boost
::
function
<
void
(
void
)
>
task
);
void
close
();
private:
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录