You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kg...@apache.org on 2012/08/10 20:14:48 UTC
svn commit: r1371796 - in /qpid/proton/branches/driver_abstraction/proton-c:
CMakeLists.txt src/driver_impl.h src/drivers/driver_no_ssl.c
src/drivers/driver_openssl.c
Author: kgiusti
Date: Fri Aug 10 18:14:47 2012
New Revision: 1371796
URL: http://svn.apache.org/viewvc?rev=1371796&view=rev
Log:
NO-JIRA: add ssl impl calls
Added:
qpid/proton/branches/driver_abstraction/proton-c/src/drivers/driver_no_ssl.c (with props)
qpid/proton/branches/driver_abstraction/proton-c/src/drivers/driver_openssl.c (with props)
Modified:
qpid/proton/branches/driver_abstraction/proton-c/CMakeLists.txt
qpid/proton/branches/driver_abstraction/proton-c/src/driver_impl.h
Modified: qpid/proton/branches/driver_abstraction/proton-c/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/branches/driver_abstraction/proton-c/CMakeLists.txt?rev=1371796&r1=1371795&r2=1371796&view=diff
==============================================================================
--- qpid/proton/branches/driver_abstraction/proton-c/CMakeLists.txt (original)
+++ qpid/proton/branches/driver_abstraction/proton-c/CMakeLists.txt Fri Aug 10 18:14:47 2012
@@ -21,6 +21,13 @@ if (HAVE_POLL_H)
endif (HAVE_POLL_H)
set(POLLER ${poller_default} CACHE STRING "Poller implementation (poll/select)")
+# Set the default SSL/TLS implementation
+set(ssl_impl, NONE)
+if (HAVE_OPENSSL_H)
+ set(ssl_impl openssl)
+endif(HAVE_OPENSSL_H)
+set(SSL_IMPL ${ssl_impl} CACHE STRING "SSL/TLS support library")
+
configure_file (
"${PROJECT_SOURCE_DIR}/pn_config.h.in"
"${PROJECT_BINARY_DIR}/pn_config.h"
@@ -51,6 +58,13 @@ elseif (POLLER STREQUAL select)
)
endif (POLLER STREQUAL poll)
+# Link in openssl if present
+if (SSL_IMPL STREQUAL openssl)
+ set (pn_driver_ssl_impl src/drivers/driver_openssl.c)
+else (SSL_IMPL STREQUAL openssl)
+ set (pn_driver_ssl_impl src/drivers/driver_no_ssl.c)
+endif (SSL_IMPL STREQUAL openssl)
+
add_library (
qpid-proton SHARED
@@ -82,6 +96,7 @@ add_library (
src/messenger.c
${pn_driver_impl}
+ ${pn_driver_ssl_impl}
)
find_package(SWIG)
Modified: qpid/proton/branches/driver_abstraction/proton-c/src/driver_impl.h
URL: http://svn.apache.org/viewvc/qpid/proton/branches/driver_abstraction/proton-c/src/driver_impl.h?rev=1371796&r1=1371795&r2=1371796&view=diff
==============================================================================
--- qpid/proton/branches/driver_abstraction/proton-c/src/driver_impl.h (original)
+++ qpid/proton/branches/driver_abstraction/proton-c/src/driver_impl.h Fri Aug 10 18:14:47 2012
@@ -1,5 +1,5 @@
-#ifndef _PROTON_SRC_DRIVER_H
-#define _PROTON_SRC_DRIVER_H 1
+#ifndef PROTON_SRC_DRIVER_H
+#define PROTON_SRC_DRIVER_H 1
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
Added: qpid/proton/branches/driver_abstraction/proton-c/src/drivers/driver_no_ssl.c
URL: http://svn.apache.org/viewvc/qpid/proton/branches/driver_abstraction/proton-c/src/drivers/driver_no_ssl.c?rev=1371796&view=auto
==============================================================================
--- qpid/proton/branches/driver_abstraction/proton-c/src/drivers/driver_no_ssl.c (added)
+++ qpid/proton/branches/driver_abstraction/proton-c/src/drivers/driver_no_ssl.c Fri Aug 10 18:14:47 2012
@@ -0,0 +1,67 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+#define _POSIX_C_SOURCE 1
+
+#include <proton/driver.h>
+
+
+/** @file
+ * SSL/TLS support API.
+ *
+ * This file contains stub implementations of the SSL/TLS API. This implementation is
+ * used if there is no SSL/TLS support in the system's environment.
+ */
+
+
+
+int pn_listener_ssl_set_certificate(pn_listener_t *listener,
+ const char *certificate_file,
+ const char *private_key_file,
+ const char *password)
+{
+ return -1;
+}
+
+int pn_listener_ssl_allow_unsecured_clients(pn_listener_t *listener)
+{
+ return -1;
+}
+
+int pn_connector_ssl_set_trusted_certificates(pn_connector_t *connector,
+ const char *certificates)
+{
+ return -1;
+}
+
+int pn_connector_ssl_set_certificate(pn_connector_t *connector,
+ const char *certificate,
+ const char *private_key,
+ const char *private_key_password)
+{
+ return -1;
+}
+
+int pn_connector_ssl_authenticate_peer(pn_connector_t *connector,
+ const char *certificates)
+{
+ return -1;
+}
Propchange: qpid/proton/branches/driver_abstraction/proton-c/src/drivers/driver_no_ssl.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: qpid/proton/branches/driver_abstraction/proton-c/src/drivers/driver_openssl.c
URL: http://svn.apache.org/viewvc/qpid/proton/branches/driver_abstraction/proton-c/src/drivers/driver_openssl.c?rev=1371796&view=auto
==============================================================================
--- qpid/proton/branches/driver_abstraction/proton-c/src/drivers/driver_openssl.c (added)
+++ qpid/proton/branches/driver_abstraction/proton-c/src/drivers/driver_openssl.c Fri Aug 10 18:14:47 2012
@@ -0,0 +1,67 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+#define _POSIX_C_SOURCE 1
+
+#include <proton/driver.h>
+
+
+/** @file
+ * SSL/TLS support API.
+ *
+ * This file contains stub implementations of the SSL/TLS API. This implementation is
+ * used if there is no SSL/TLS support in the system's environment.
+ */
+
+
+
+int pn_listener_ssl_set_certificate(pn_listener_t *listener,
+ const char *certificate_file,
+ const char *private_key_file,
+ const char *password)
+{
+ return -1;
+}
+
+int pn_listener_ssl_allow_unsecured_clients(pn_listener_t *listener)
+{
+ return -1;
+}
+
+int pn_connector_ssl_set_trusted_certificates(pn_connector_t *connector,
+ const char *certificates)
+{
+ return -1;
+}
+
+int pn_connector_ssl_set_certificate(pn_connector_t *connector,
+ const char *certificate,
+ const char *private_key,
+ const char *private_key_password)
+{
+ return -1;
+}
+
+int pn_connector_ssl_authenticate_peer(pn_connector_t *connector,
+ const char *certificates)
+{
+ return -1;
+}
Propchange: qpid/proton/branches/driver_abstraction/proton-c/src/drivers/driver_openssl.c
------------------------------------------------------------------------------
svn:eol-style = native
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org