1
// Copyright 2012 Google Inc
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
7
// http://www.apache.org/licenses/LICENSE-2.0
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
15
#ifndef MOD_SPDY_APACHE_SSL_UTIL_H_
16
#define MOD_SPDY_APACHE_SSL_UTIL_H_
18
// This file contains some utility functions for communicating to mod_ssl.
24
// This must be called from optional_fn_retrieve hook at startup before
25
// using any of the methods below.
26
void RetrieveModSslFunctions();
28
// Disables SSL on a connection. Returns true if successful, false if failed
29
// for some reason (such as the optional function not being available, or
30
// mod_ssl indicating a problem).
31
bool DisableSslForConnection(conn_rec* connection);
33
// Returns true if the given connection is using SSL. Note that this answers
34
// whether the connection is really using SSL rather than whether we should tell
35
// others that it is. This distinction matters for slave connection belonging to
36
// an SSL master --- we're not really using SSL for them (so this method
37
// will return false), but will claim we are (since they'll be encrypted once
38
// going to other outside world).
39
bool IsUsingSslForConnection(conn_rec* connection);
41
} // namespace mod_spdy
43
#endif // MOD_SPDY_APACHE_SOCKADDR_UTIL_H_