synced with main repository

This commit is contained in:
Guenter Obiltschnig
2008-01-28 17:37:36 +00:00
parent 2986d273a1
commit 15b371a7a8
77 changed files with 395 additions and 77 deletions

View File

@@ -1,7 +1,7 @@
//
// Driver.cpp
//
// $Id: //poco/Main/NetSSL_OpenSSL/testsuite/src/Driver.cpp#10 $
// $Id: //poco/svn/NetSSL_OpenSSL/testsuite/src/Driver.cpp#1 $
//
// Console-based test driver for Poco NetSSL.
//

View File

@@ -1,7 +1,7 @@
//
// HTTPSClientSessionTest.cpp
//
// $Id: //poco/Main/NetSSL_OpenSSL/testsuite/src/HTTPSClientSessionTest.cpp#8 $
// $Id: //poco/svn/NetSSL_OpenSSL/testsuite/src/HTTPSClientSessionTest.cpp#1 $
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
@@ -42,6 +42,7 @@
#include "Poco/Net/HTTPServerResponse.h"
#include "Poco/Net/HTTPServerRequest.h"
#include "Poco/Net/HTTPServerParams.h"
#include "Poco/Net/SecureStreamSocket.h"
#include "Poco/StreamCopier.h"
#include "Poco/Exception.h"
#include "HTTPSTestServer.h"
@@ -347,6 +348,22 @@ void HTTPSClientSessionTest::testProxy()
}
void HTTPSClientSessionTest::testConnectNB()
{
SecureStreamSocket sock;
sock.connectNB(SocketAddress("server.com", 443));
char buf[512];
std::string msg("GET / HTTP/1.0\r\n\r\n");
sock.sendBytes(msg.c_str(), (int)msg.length());
Socket::SocketList read;
Socket::SocketList write;
Socket::SocketList exec;
read.push_back(sock);
Socket::select(read, write, exec, Poco::Timespan(30, 0) );
int rc = sock.receiveBytes(buf, 512);
assert (rc > 0);
}
void HTTPSClientSessionTest::setUp()
{
}
@@ -373,6 +390,7 @@ CppUnit::Test* HTTPSClientSessionTest::suite()
CppUnit_addTest(pSuite, HTTPSClientSessionTest, testPostLargeClose);
CppUnit_addTest(pSuite, HTTPSClientSessionTest, testKeepAlive);
CppUnit_addTest(pSuite, HTTPSClientSessionTest, testProxy);
CppUnit_addTest(pSuite, HTTPSClientSessionTest, testConnectNB);
return pSuite;
}

View File

@@ -1,7 +1,7 @@
//
// HTTPSClientSessionTest.h
//
// $Id: //poco/Main/NetSSL_OpenSSL/testsuite/src/HTTPSClientSessionTest.h#8 $
// $Id: //poco/svn/NetSSL_OpenSSL/testsuite/src/HTTPSClientSessionTest.h#1 $
//
// Definition of the HTTPSClientSessionTest class.
//
@@ -58,6 +58,7 @@ public:
void testPostLargeClose();
void testKeepAlive();
void testProxy();
void testConnectNB();
void setUp();
void tearDown();

View File

@@ -1,7 +1,7 @@
//
// HTTPSClientTestSuite.cpp
//
// $Id: //poco/Main/NetSSL_OpenSSL/testsuite/src/HTTPSClientTestSuite.cpp#7 $
// $Id: //poco/svn/NetSSL_OpenSSL/testsuite/src/HTTPSClientTestSuite.cpp#1 $
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.

View File

@@ -1,7 +1,7 @@
//
// HTTPSClientTestSuite.h
//
// $Id: //poco/Main/NetSSL_OpenSSL/testsuite/src/HTTPSClientTestSuite.h#7 $
// $Id: //poco/svn/NetSSL_OpenSSL/testsuite/src/HTTPSClientTestSuite.h#1 $
//
// Definition of the HTTPSClientTestSuite class.
//

View File

@@ -1,7 +1,7 @@
//
// HTTPSServerTest.cpp
//
// $Id: //poco/Main/NetSSL_OpenSSL/testsuite/src/HTTPSServerTest.cpp#8 $
// $Id: //poco/svn/NetSSL_OpenSSL/testsuite/src/HTTPSServerTest.cpp#1 $
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.

View File

@@ -1,7 +1,7 @@
//
// HTTPSServerTest.h
//
// $Id: //poco/Main/NetSSL_OpenSSL/testsuite/src/HTTPSServerTest.h#7 $
// $Id: //poco/svn/NetSSL_OpenSSL/testsuite/src/HTTPSServerTest.h#1 $
//
// Definition of the HTTPSServerTest class.
//

View File

@@ -1,7 +1,7 @@
//
// HTTPSServerTestSuite.cpp
//
// $Id: //poco/Main/NetSSL_OpenSSL/testsuite/src/HTTPSServerTestSuite.cpp#7 $
// $Id: //poco/svn/NetSSL_OpenSSL/testsuite/src/HTTPSServerTestSuite.cpp#1 $
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.

View File

@@ -1,7 +1,7 @@
//
// HTTPSServerTestSuite.h
//
// $Id: //poco/Main/NetSSL_OpenSSL/testsuite/src/HTTPSServerTestSuite.h#7 $
// $Id: //poco/svn/NetSSL_OpenSSL/testsuite/src/HTTPSServerTestSuite.h#1 $
//
// Definition of the HTTPSServerTestSuite class.
//

View File

@@ -1,7 +1,7 @@
//
// HTTPSStreamFactoryTest.cpp
//
// $Id: //poco/Main/NetSSL_OpenSSL/testsuite/src/HTTPSStreamFactoryTest.cpp#7 $
// $Id: //poco/svn/NetSSL_OpenSSL/testsuite/src/HTTPSStreamFactoryTest.cpp#1 $
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.

View File

@@ -1,7 +1,7 @@
//
// HTTPSStreamFactoryTest.h
//
// $Id: //poco/Main/NetSSL_OpenSSL/testsuite/src/HTTPSStreamFactoryTest.h#7 $
// $Id: //poco/svn/NetSSL_OpenSSL/testsuite/src/HTTPSStreamFactoryTest.h#1 $
//
// Definition of the HTTPSStreamFactoryTest class.
//

View File

@@ -1,7 +1,7 @@
//
// HTTPSTestServer.cpp
//
// $Id: //poco/Main/NetSSL_OpenSSL/testsuite/src/HTTPSTestServer.cpp#9 $
// $Id: //poco/svn/NetSSL_OpenSSL/testsuite/src/HTTPSTestServer.cpp#1 $
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.

View File

@@ -1,7 +1,7 @@
//
// HTTPSTestServer.h
//
// $Id: //poco/Main/NetSSL_OpenSSL/testsuite/src/HTTPSTestServer.h#7 $
// $Id: //poco/svn/NetSSL_OpenSSL/testsuite/src/HTTPSTestServer.h#1 $
//
// Definition of the HTTPSTestServer class.
//

View File

@@ -1,7 +1,7 @@
//
// OpenSSLTestSuite.cpp
//
// $Id: //poco/Main/NetSSL_OpenSSL/testsuite/src/NetSSLTestSuite.cpp#7 $
// $Id: //poco/svn/NetSSL_OpenSSL/testsuite/src/NetSSLTestSuite.cpp#1 $
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.

View File

@@ -1,7 +1,7 @@
//
// NetSSLTestSuite.h
//
// $Id: //poco/Main/NetSSL_OpenSSL/testsuite/src/NetSSLTestSuite.h#7 $
// $Id: //poco/svn/NetSSL_OpenSSL/testsuite/src/NetSSLTestSuite.h#1 $
//
// Definition of the NetSSLTestSuite class.
//

View File

@@ -1,7 +1,7 @@
//
// TCPServerTest.cpp
//
// $Id: //poco/Main/NetSSL_OpenSSL/testsuite/src/TCPServerTest.cpp#7 $
// $Id: //poco/svn/NetSSL_OpenSSL/testsuite/src/TCPServerTest.cpp#1 $
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.

View File

@@ -1,7 +1,7 @@
//
// TCPServerTest.h
//
// $Id: //poco/Main/NetSSL_OpenSSL/testsuite/src/TCPServerTest.h#7 $
// $Id: //poco/svn/NetSSL_OpenSSL/testsuite/src/TCPServerTest.h#1 $
//
// Definition of the TCPServerTest class.
//

View File

@@ -1,7 +1,7 @@
//
// TCPServerTestSuite.cpp
//
// $Id: //poco/Main/NetSSL_OpenSSL/testsuite/src/TCPServerTestSuite.cpp#7 $
// $Id: //poco/svn/NetSSL_OpenSSL/testsuite/src/TCPServerTestSuite.cpp#1 $
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.

View File

@@ -1,7 +1,7 @@
//
// TCPServerTestSuite.h
//
// $Id: //poco/Main/NetSSL_OpenSSL/testsuite/src/TCPServerTestSuite.h#7 $
// $Id: //poco/svn/NetSSL_OpenSSL/testsuite/src/TCPServerTestSuite.h#1 $
//
// Definition of the TCPServerTestSuite class.
//

View File

@@ -1,7 +1,7 @@
//
// WinDriver.cpp
//
// $Id: //poco/Main/NetSSL_OpenSSL/testsuite/src/WinDriver.cpp#8 $
// $Id: //poco/svn/NetSSL_OpenSSL/testsuite/src/WinDriver.cpp#1 $
//
// Windows test driver for Poco OpenSSL.
//