Author: kgiusti
Date: Tue Sep 18 13:08:39 2012
New Revision: 1387129

URL: http://svn.apache.org/viewvc?rev=1387129&view=rev
Log:
PROTON-2: checkpoint current work - ssl stub compiles

Modified:
    qpid/proton/branches/driver_abstraction/proton-c/include/proton/ssl.h
    qpid/proton/branches/driver_abstraction/proton-c/src/driver-internal.h
    qpid/proton/branches/driver_abstraction/proton-c/src/driver.c
    qpid/proton/branches/driver_abstraction/proton-c/src/ssl/ssl-internal.h
    qpid/proton/branches/driver_abstraction/proton-c/src/ssl/ssl_stub.c

Modified: qpid/proton/branches/driver_abstraction/proton-c/include/proton/ssl.h
URL: 
http://svn.apache.org/viewvc/qpid/proton/branches/driver_abstraction/proton-c/include/proton/ssl.h?rev=1387129&r1=1387128&r2=1387129&view=diff
==============================================================================
--- qpid/proton/branches/driver_abstraction/proton-c/include/proton/ssl.h 
(original)
+++ qpid/proton/branches/driver_abstraction/proton-c/include/proton/ssl.h Tue 
Sep 18 13:08:39 2012
@@ -53,31 +53,6 @@ extern "C" {
 
 typedef struct pn_ssl_t pn_ssl_t;
 
-/** Get the SSL server object associated with a transport.
- *
- * A transport may be configured to be either an SSL server or an SSL client.  
Those
- * transports that will be used to accept incoming connections must be 
configured as an
- * SSL server.
- *
- * @return a pointer to the SSL server object configured for this transport.  
Returns NULL
- * if the server cannot be configured, which would occur if no SSL support is 
available,
- * or the transport has already been configured as an SSL client.
- */
-pn_ssl_t *pn_ssl_server(pn_transport_t *transport);
-
-/** Get the SSL client object associated with a transport.
- *
- * A transport may be configured to be either an SSL server or an SSL client.  
Those
- * transports that will be used to initiate outbound connections must be 
configured as an
- * SSL client.
- *
- * @return a pointer to the SSL client object configured for this transport.  
Returns NULL
- * if the client cannot be configured, which would occur if no SSL support is 
available,
- * or the transport has already been configured as an SSL server.
- */
-pn_ssl_t *pn_ssl_client(pn_transport_t *transport);
-
-
 /** Set the certificate that identifies the local node to the remote.
  *
  * This certificate establishes the identity for the local node.  It will be 
sent to the

Modified: qpid/proton/branches/driver_abstraction/proton-c/src/driver-internal.h
URL: 
http://svn.apache.org/viewvc/qpid/proton/branches/driver_abstraction/proton-c/src/driver-internal.h?rev=1387129&r1=1387128&r2=1387129&view=diff
==============================================================================
--- qpid/proton/branches/driver_abstraction/proton-c/src/driver-internal.h 
(original)
+++ qpid/proton/branches/driver_abstraction/proton-c/src/driver-internal.h Tue 
Sep 18 13:08:39 2012
@@ -54,7 +54,6 @@ struct pn_listener_t {
   void *context;
 
   struct pn_listener_poller_t *poller;
-  struct pn_listener_ssl_t *ssl;
 };
 
 int pn_listener_poller_init( struct pn_listener_t *);
@@ -100,7 +99,6 @@ struct pn_connector_t {
   void *context;
 
   struct pn_connector_poller_t *poller;
-  struct pn_connector_ssl_t *ssl;
 };
 
 int pn_connector_poller_init( struct pn_connector_t *);

Modified: qpid/proton/branches/driver_abstraction/proton-c/src/driver.c
URL: 
http://svn.apache.org/viewvc/qpid/proton/branches/driver_abstraction/proton-c/src/driver.c?rev=1387129&r1=1387128&r2=1387129&view=diff
==============================================================================
--- qpid/proton/branches/driver_abstraction/proton-c/src/driver.c (original)
+++ qpid/proton/branches/driver_abstraction/proton-c/src/driver.c Tue Sep 18 
13:08:39 2012
@@ -26,6 +26,7 @@
 #include <proton/ssl.h>
 #include "util.h"
 #include "driver-internal.h"
+#include "ssl/ssl-internal.h"
 
 #include <stdio.h>
 #include <time.h>
@@ -117,7 +118,6 @@ pn_listener_t *pn_listener_fd(pn_driver_
   l->pending = false;
   l->fd = fd;
   l->context = context;
-  l->ssl = NULL;
 
   pn_listener_poller_init(l);
 
@@ -179,7 +179,6 @@ pn_connector_t *pn_listener_accept(pn_li
       pn_connector_t *c = pn_connector_fd(l->driver, sock, NULL);
       snprintf(c->name, PN_CONNECTOR_NAME_MAX, "%s:%s", host, serv);
       c->listener = l;
-      pn_listener_init_ssl_client( l, c );  // @todo KAG: deal with error 
case!!!
       return c;
     }
   }
@@ -198,7 +197,6 @@ void pn_listener_free(pn_listener_t *l)
   if (!l) return;
 
   if (l->driver) pn_driver_remove_listener(l->driver, l);
-  pn_listener_free_ssl(l);
   pn_listener_poller_destroy(l);
   free(l);
 }
@@ -300,7 +298,6 @@ pn_connector_t *pn_connector_fd(pn_drive
   c->output_done = false;
   c->context = context;
   c->listener = NULL;
-  c->ssl = NULL;
 
   pn_connector_poller_init(c);
 

Modified: 
qpid/proton/branches/driver_abstraction/proton-c/src/ssl/ssl-internal.h
URL: 
http://svn.apache.org/viewvc/qpid/proton/branches/driver_abstraction/proton-c/src/ssl/ssl-internal.h?rev=1387129&r1=1387128&r2=1387129&view=diff
==============================================================================
--- qpid/proton/branches/driver_abstraction/proton-c/src/ssl/ssl-internal.h 
(original)
+++ qpid/proton/branches/driver_abstraction/proton-c/src/ssl/ssl-internal.h Tue 
Sep 18 13:08:39 2012
@@ -32,14 +32,29 @@
  *
  */
 
+/** Get the SSL server object associated with a transport.
+ *
+ * A transport may be configured to be either an SSL server or an SSL client.  
Those
+ * transports that will be used to accept incoming connections must be 
configured as an
+ * SSL server.
+ *
+ * @return a pointer to the SSL server object configured for this transport.  
Returns NULL
+ * if the server cannot be configured, which would occur if no SSL support is 
available,
+ * or the transport has already been configured as an SSL client.
+ */
+pn_ssl_t *pn_ssl_server(pn_transport_t *transport);
 
-/** Configure SSL/TLS on a connector that has just been accepted on the given 
listener.
+/** Get the SSL client object associated with a transport.
+ *
+ * A transport may be configured to be either an SSL server or an SSL client.  
Those
+ * transports that will be used to initiate outbound connections must be 
configured as an
+ * SSL client.
  *
- * @param[in,out] l the listener that has accepted the connnector c.
- * @param[in,out] c the connector that will be configured for SSL/TLS (client 
mode).
- * @return 0 on success, else an error code if SSL/TLS cannot be configured.
+ * @return a pointer to the SSL client object configured for this transport.  
Returns NULL
+ * if the client cannot be configured, which would occur if no SSL support is 
available,
+ * or the transport has already been configured as an SSL server.
  */
-int pn_ssl_client_init( pn_ssl_t *ssl);
+pn_ssl_t *pn_ssl_client(pn_transport_t *transport);
 
 /** Start the SSL/TLS shutdown handshake.
  *
@@ -65,4 +80,5 @@ void pn_ssl_free( pn_ssl_t *ssl);
  */
 int pn_driver_ssl_data_ready( pn_driver_t *d );
 
+void pn_connector_shutdown_ssl(pn_connector_t *c);   // fuck you
 #endif /* ssl.h */

Modified: qpid/proton/branches/driver_abstraction/proton-c/src/ssl/ssl_stub.c
URL: 
http://svn.apache.org/viewvc/qpid/proton/branches/driver_abstraction/proton-c/src/ssl/ssl_stub.c?rev=1387129&r1=1387128&r2=1387129&view=diff
==============================================================================
--- qpid/proton/branches/driver_abstraction/proton-c/src/ssl/ssl_stub.c 
(original)
+++ qpid/proton/branches/driver_abstraction/proton-c/src/ssl/ssl_stub.c Tue Sep 
18 13:08:39 2012
@@ -78,4 +78,15 @@ int pn_ssl_get_peer_authentication(pn_ss
   return -1;
 }
 
+int pn_driver_ssl_data_ready( pn_driver_t *d )
+{
+  return 0;
+}
+
+void pn_connector_shutdown_ssl(pn_connector_t *c)
+{
+  pn_connector_close(c);
+}
+
+
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to