Fixed error from merge
This commit is contained in:
parent
916a4c75af
commit
f60e98c8cd
|
@ -133,11 +133,11 @@ TCPListenSocket::accept()
|
|||
}
|
||||
|
||||
void
|
||||
CTCPListenSocket::setListeningJob()
|
||||
TCPListenSocket::setListeningJob()
|
||||
{
|
||||
m_socketMultiplexer->addSocket(this,
|
||||
new TSocketMultiplexerMethodJob<CTCPListenSocket>(
|
||||
this, &CTCPListenSocket::serviceListening,
|
||||
new TSocketMultiplexerMethodJob<TCPListenSocket>(
|
||||
this, &TCPListenSocket::serviceListening,
|
||||
m_socket, true, false));
|
||||
}
|
||||
|
||||
|
|
|
@ -54,17 +54,13 @@ SecureListenSocket::accept()
|
|||
m_events,
|
||||
m_socketMultiplexer,
|
||||
ARCH->acceptSocket(m_socket, NULL));
|
||||
|
||||
<<<<<<< HEAD:src/lib/plugin/ns/SecureListenSocket.cpp
|
||||
socket->initSsl(true);
|
||||
m_secureSocketSet.insert(socket);
|
||||
|
||||
socket->initSsl(true);
|
||||
=======
|
||||
if (socket != NULL) {
|
||||
setListeningJob();
|
||||
}
|
||||
|
||||
>>>>>>> 79b9c52... Refactored no or wrong ssl certificate error handling #30:src/lib/net/SecureListenSocket.cpp
|
||||
// TODO: customized certificate path
|
||||
String certificateFilename = ARCH->getProfileDirectory();
|
||||
#if SYSAPI_WIN32
|
||||
|
@ -82,15 +78,6 @@ SecureListenSocket::accept()
|
|||
|
||||
socket->secureAccept();
|
||||
|
||||
<<<<<<< HEAD:src/lib/plugin/ns/SecureListenSocket.cpp
|
||||
if (socket != NULL) {
|
||||
m_socketMultiplexer->addSocket(this,
|
||||
new TSocketMultiplexerMethodJob<TCPListenSocket>(
|
||||
this, &TCPListenSocket::serviceListening,
|
||||
m_socket, true, false));
|
||||
}
|
||||
=======
|
||||
>>>>>>> 79b9c52... Refactored no or wrong ssl certificate error handling #30:src/lib/net/SecureListenSocket.cpp
|
||||
return dynamic_cast<IDataSocket*>(socket);
|
||||
}
|
||||
catch (XArchNetwork&) {
|
||||
|
|
|
@ -152,7 +152,7 @@ SecureSocket::initSsl(bool server)
|
|||
}
|
||||
|
||||
bool
|
||||
CSecureSocket::loadCertificates(CString& filename)
|
||||
SecureSocket::loadCertificates(String& filename)
|
||||
{
|
||||
if (filename.empty()) {
|
||||
showError("ssl certificate is not specified");
|
||||
|
@ -164,7 +164,7 @@ CSecureSocket::loadCertificates(CString& filename)
|
|||
file.close();
|
||||
|
||||
if (!exist) {
|
||||
CString errorMsg("ssl certificate doesn't exist: ");
|
||||
String errorMsg("ssl certificate doesn't exist: ");
|
||||
errorMsg.append(filename);
|
||||
showError(errorMsg.c_str());
|
||||
return false;
|
||||
|
@ -303,7 +303,7 @@ SecureSocket::secureConnect(int socket)
|
|||
}
|
||||
|
||||
bool
|
||||
CSecureSocket::showCertificate()
|
||||
SecureSocket::showCertificate()
|
||||
{
|
||||
X509* cert;
|
||||
char* line;
|
||||
|
@ -387,13 +387,13 @@ SecureSocket::checkResult(int n, bool& fatal, bool& retry)
|
|||
}
|
||||
|
||||
void
|
||||
CSecureSocket::showError(const char* reason)
|
||||
SecureSocket::showError(const char* reason)
|
||||
{
|
||||
if (reason != NULL) {
|
||||
LOG((CLOG_ERR "%s", reason));
|
||||
}
|
||||
|
||||
CString error = getError();
|
||||
String error = getError();
|
||||
if (!error.empty()) {
|
||||
LOG((CLOG_ERR "%s", error.c_str()));
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
UInt32 secureRead(void* buffer, UInt32 n);
|
||||
UInt32 secureWrite(const void* buffer, UInt32 n);
|
||||
void initSsl(bool server);
|
||||
bool loadCertificates(CString& CertFile);
|
||||
bool loadCertificates(String& CertFile);
|
||||
|
||||
private:
|
||||
// SSL
|
||||
|
|
Loading…
Reference in New Issue