Bug 4098 - Smoke test for broken context based SSL connection
Summary: Smoke test for broken context based SSL connection
Status: NEW
Alias: None
Product: ACE
Classification: Unclassified
Component: SSL Wrappers (show other bugs)
Version: 6.1.7
Hardware: x86 Linux
: P3 normal
Assignee: DOC Center Support List (internal)
URL:
Depends on:
Blocks:
 
Reported: 2013-02-17 13:51 CST by Evan Carew
Modified: 2013-02-17 13:51 CST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Evan Carew 2013-02-17 13:51:03 CST
On 02/02/2013 04:56 PM, Johnny Willemsen wrote:

 > Could you add this test extension to bugzilla for future integration. 
>      > Patching the GNUmakefile is not needed, that is generated as part 
>     of the 
>      > release procedure based on the MPC file. 
>      > 
>      > Best regards, 
>      > 
>      > Johnny 


diff -r -N ACE_wrappers.orig/protocols/tests/INet/HTTPS_Session/Main.cpp ACE_wrappers/protocols/tests/INet/HTTPS_Session/Main.cpp
0a1,40
> // $Id: Main.cpp  $
> 
> #include "ace/Get_Opt.h"
> #include "ace/INet/HTTPS_Session.h"
> #include "ace/INet/SSL_Proxy_Connector.h"
> 
> #include <iostream>
> 
> class HTTPS_Stream{
>   ACE_CString query, meth;
>   ACE::HTTPS::Session_T<ACE_NULL_SYNCH> ssl_session;
>   ACE::HTTP::Request request;
>   ACE::HTTPS::URL url_;
> public:
>   HTTPS_Stream(std::string &url):url_(url.c_str()),ssl_session(true){
>     ssl_session.set_host(url_.get_host(),443);
>   }
>   bool connected(){
>     return ssl_session.is_connected();
>   }
> };
> 
> int
> ACE_TMAIN (int, ACE_TCHAR *[])
> {
>   ACE_DEBUG ((LM_INFO, ACE_TEXT ("(%P|%t) starting HTTPS_Session smoke test\n")));
> 
>   std::string test_URL("https://docs.google.com");
>   //Try to make a session based connection to google using SSL
>   HTTPS_Stream u(test_URL);
>   if(!u.connected()){
>       ACE_ERROR ((LM_ERROR,
>                   ACE_TEXT ("%s results found; ")
>                   ACE_TEXT ("should be %s\n"),
>                   "No Connection to test site.",
>                   "docs.google.com"));
>   }
>   ACE_DEBUG ((LM_INFO, ACE_TEXT ("(%P|%t) HTTPS_Session Smoke Test finished\n")));
>   return 0;
> }