summaryrefslogtreecommitdiffstats
path: root/src/openvpn/forward.c
diff options
context:
space:
mode:
authorAlon Bar-Lev <alon.barlev@gmail.com>2012-02-29 22:12:10 +0200
committerDavid Sommerseth <davids@redhat.com>2012-03-22 22:53:39 +0100
commit9b33b5a4b1aa170080d18b0f32f6599b519589f0 (patch)
treebf033b98d14a56d7adb18d3345be2a94df850c0d /src/openvpn/forward.c
parent74bbc71b75bac49f5c9df81827fa184b8a365d36 (diff)
downloadopenvpn-9b33b5a4b1aa170080d18b0f32f6599b519589f0.tar.gz
openvpn-9b33b5a4b1aa170080d18b0f32f6599b519589f0.tar.xz
openvpn-9b33b5a4b1aa170080d18b0f32f6599b519589f0.zip
build: proper crypto detection and usage
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Adriaan de Jong <dejong@fox-it.com> Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'src/openvpn/forward.c')
-rw-r--r--src/openvpn/forward.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c
index 46bbfe7..5e1e2a6 100644
--- a/src/openvpn/forward.c
+++ b/src/openvpn/forward.c
@@ -81,7 +81,7 @@ show_wait_status (struct context *c)
* traffic on the control-channel.
*
*/
-#if defined(USE_CRYPTO) && defined(USE_SSL)
+#if defined(ENABLE_CRYPTO) && defined(ENABLE_SSL)
void
check_tls_dowork (struct context *c)
{
@@ -112,7 +112,7 @@ check_tls_dowork (struct context *c)
}
#endif
-#if defined(USE_CRYPTO) && defined(USE_SSL)
+#if defined(ENABLE_CRYPTO) && defined(ENABLE_SSL)
void
check_tls_errors_co (struct context *c)
@@ -232,7 +232,7 @@ check_connection_established_dowork (struct context *c)
bool
send_control_channel_string (struct context *c, const char *str, int msglevel)
{
-#if defined(USE_CRYPTO) && defined(USE_SSL)
+#if defined(ENABLE_CRYPTO) && defined(ENABLE_SSL)
if (c->c2.tls_multi) {
struct gc_arena gc = gc_new ();
bool stat;
@@ -449,8 +449,8 @@ encrypt_sign (struct context *c, bool comp_frag)
#endif
}
-#ifdef USE_CRYPTO
-#ifdef USE_SSL
+#ifdef ENABLE_CRYPTO
+#ifdef ENABLE_SSL
/*
* If TLS mode, get the key we will use to encrypt
* the packet.
@@ -472,8 +472,8 @@ encrypt_sign (struct context *c, bool comp_frag)
*/
link_socket_get_outgoing_addr (&c->c2.buf, get_link_socket_info (c),
&c->c2.to_link_addr);
-#ifdef USE_CRYPTO
-#ifdef USE_SSL
+#ifdef ENABLE_CRYPTO
+#ifdef ENABLE_SSL
/*
* In TLS mode, prepend the appropriate one-byte opcode
* to the packet which identifies it as a data channel
@@ -498,7 +498,7 @@ encrypt_sign (struct context *c, bool comp_frag)
static void
process_coarse_timers (struct context *c)
{
-#ifdef USE_CRYPTO
+#ifdef ENABLE_CRYPTO
/* flush current packet-id to file once per 60
seconds if --replay-persist was specified */
check_packet_id_persist_flush (c);
@@ -789,8 +789,8 @@ process_incoming_link (struct context *c)
if (!link_socket_verify_incoming_addr (&c->c2.buf, lsi, &c->c2.from))
link_socket_bad_incoming_addr (&c->c2.buf, lsi, &c->c2.from);
-#ifdef USE_CRYPTO
-#ifdef USE_SSL
+#ifdef ENABLE_CRYPTO
+#ifdef ENABLE_SSL
if (c->c2.tls_multi)
{
/*
@@ -820,7 +820,7 @@ process_incoming_link (struct context *c)
if (c->c2.context_auth != CAS_SUCCEEDED)
c->c2.buf.len = 0;
#endif
-#endif /* USE_SSL */
+#endif /* ENABLE_SSL */
/* authenticate and decrypt the incoming packet */
decrypt_status = openvpn_decrypt (&c->c2.buf, c->c2.buffers->decrypt_buf, &c->c2.crypto_options, &c->c2.frame);
@@ -833,7 +833,7 @@ process_incoming_link (struct context *c)
goto done;
}
-#endif /* USE_CRYPTO */
+#endif /* ENABLE_CRYPTO */
#ifdef ENABLE_FRAGMENT
if (c->c2.fragment)