2 * Copyright (c) 2011 Nicira Networks.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #include "stream-ssl.h"
21 VLOG_DEFINE_THIS_MODULE(stream_nossl);
23 /* Dummy function definitions, used when OVS is built without OpenSSL. */
26 stream_ssl_is_configured(void)
32 nossl_option(const char *detail)
34 VLOG_FATAL("%s specified but Open vSwitch was built without SSL support",
39 stream_ssl_set_private_key_file(const char *file_name)
41 if (file_name != NULL) {
42 nossl_option("Private key");
47 stream_ssl_set_certificate_file(const char *file_name)
49 if (file_name != NULL) {
50 nossl_option("Certificate");
55 stream_ssl_set_ca_cert_file(const char *file_name, bool bootstrap OVS_UNUSED)
57 if (file_name != NULL) {
58 nossl_option("CA certificate");
63 stream_ssl_set_peer_ca_cert_file(const char *file_name)
65 if (file_name != NULL) {
66 nossl_option("Peer CA certificate");
71 stream_ssl_set_key_and_cert(const char *private_key_file,
72 const char *certificate_file)
74 stream_ssl_set_private_key_file(private_key_file);
75 stream_ssl_set_certificate_file(certificate_file);