Test transport for confidentiality.
authorcantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Wed, 14 Feb 2007 05:27:44 +0000 (05:27 +0000)
committercantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Wed, 14 Feb 2007 05:27:44 +0000 (05:27 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/trunk@257 de75baf8-a10c-0410-a50a-987c0e22f00f

xmltooling/soap/SOAPTransport.h
xmltooling/soap/impl/CURLSOAPTransport.cpp

index 39a8712..6cf547d 100644 (file)
@@ -50,6 +50,13 @@ namespace xmltooling {
         virtual ~SOAPTransport() {}
         
         /**
+         * Indicates whether transport provides confidentiality.
+         * 
+         * @return  true iff transport layer provides confidentiality
+         */
+        virtual bool isConfidential() const=0;
+        
+        /**
          * Sets the connection timeout.
          * 
          * @param timeout  time to wait for connection to server in seconds, or -1 for no timeout
index b2a4298..9741d4b 100644 (file)
@@ -90,6 +90,10 @@ namespace xmltooling {
             g_CURLPool->put(m_peer.getName(), m_endpoint.c_str(), m_handle);
         }
 
+        bool isConfidential() const {
+            return m_endpoint.find("https")==0;
+        }
+
         bool setConnectTimeout(long timeout) const {
             return (curl_easy_setopt(m_handle,CURLOPT_CONNECTTIMEOUT,timeout)==CURLE_OK);
         }