mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-20 20:24:33 +02:00
SSL bugfixes.
This commit is contained in:
parent
55e8619b76
commit
fa9449fc73
@ -116,14 +116,19 @@ int TLSClient::WritableEventHandler(const EventArgs& ea)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool TLSClient::WantsToRead(void) const
|
||||||
|
{
|
||||||
|
if (SSL_want_read(m_SSL.get()))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return TCPClient::WantsToWrite();
|
||||||
|
}
|
||||||
|
|
||||||
bool TLSClient::WantsToWrite(void) const
|
bool TLSClient::WantsToWrite(void) const
|
||||||
{
|
{
|
||||||
if (SSL_want_write(m_SSL.get()))
|
if (SSL_want_write(m_SSL.get()))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (SSL_state(m_SSL.get()) != SSL_ST_OK)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return TCPClient::WantsToWrite();
|
return TCPClient::WantsToWrite();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ public:
|
|||||||
|
|
||||||
virtual void Start(void);
|
virtual void Start(void);
|
||||||
|
|
||||||
|
virtual bool WantsToRead(void) const;
|
||||||
virtual bool WantsToWrite(void) const;
|
virtual bool WantsToWrite(void) const;
|
||||||
|
|
||||||
Event<VerifyCertificateEventArgs> OnVerifyCertificate;
|
Event<VerifyCertificateEventArgs> OnVerifyCertificate;
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
"configrpc": { "replicate": "0", "configSource": "1" },
|
"configrpc": { "replicate": "0", "configSource": "1" },
|
||||||
"demo": { "replicate": "0" }
|
"demo": { "replicate": "0" }
|
||||||
},
|
},
|
||||||
"rpclistener": {
|
"rpcconnection": {
|
||||||
"kekslistener": { "replicate": "0", "port": "7777" }
|
"kekslistener": { "replicate": "0", "hostname": "10.0.10.14", "port": "7777" }
|
||||||
},
|
},
|
||||||
"host": {
|
"host": {
|
||||||
"localhost": { "ipaddr": "127.0.0.1" }
|
"localhost": { "ipaddr": "127.0.0.1" }
|
||||||
|
@ -189,8 +189,12 @@ int JsonRpcEndpoint::ClientReconnectHandler(const TimerEventArgs& ea)
|
|||||||
|
|
||||||
int JsonRpcEndpoint::VerifyCertificateHandler(const VerifyCertificateEventArgs& ea)
|
int JsonRpcEndpoint::VerifyCertificateHandler(const VerifyCertificateEventArgs& ea)
|
||||||
{
|
{
|
||||||
if (ea.Certificate && ea.ValidCertificate)
|
if (ea.Certificate && ea.ValidCertificate) {
|
||||||
SetIdentity(Utility::GetCertificateCN(ea.Certificate));
|
string identity = Utility::GetCertificateCN(ea.Certificate);
|
||||||
|
|
||||||
|
if (GetIdentity().empty() && !identity.empty())
|
||||||
|
SetIdentity(identity);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user