summaryrefslogtreecommitdiffstats
path: root/src/openvpn/crypto.c
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-06-18 20:39:06 +0200
committerDavid Sommerseth <davids@redhat.com>2012-06-22 12:17:33 +0200
commite0ce897db928340539b58e0fbda6db9080815598 (patch)
treee87cc036a47d81c20617083dc6d07931251288f0 /src/openvpn/crypto.c
parent2df1fc83a61e5a67f299eb862a35eea4db7d9fc3 (diff)
downloadopenvpn-e0ce897db928340539b58e0fbda6db9080815598.tar.gz
openvpn-e0ce897db928340539b58e0fbda6db9080815598.tar.xz
openvpn-e0ce897db928340539b58e0fbda6db9080815598.zip
Remove ENABLE_INLINE_FILES conditionals
This code is always enabled and removing the #ifdef make the code a little bit clearer Signed-off-by: Arne Schwabe <arne@rfc2549.org> Acked-by: James Yonan <james@openvpn.net> Message-Id: 1340044749-10694-4-git-send-email-arne@rfc2549.org URL: http://article.gmane.org/gmane.network.openvpn.devel/6746 Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'src/openvpn/crypto.c')
-rw-r--r--src/openvpn/crypto.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/openvpn/crypto.c b/src/openvpn/crypto.c
index 03781fc..ac2eecd 100644
--- a/src/openvpn/crypto.c
+++ b/src/openvpn/crypto.c
@@ -737,7 +737,6 @@ get_tls_handshake_key (const struct key_type *key_type,
kt.cipher_length = 0;
kt.cipher = NULL;
-#if ENABLE_INLINE_FILES
if (flags & GHK_INLINE)
{
/* key was specified inline, key text is in passphrase_file */
@@ -750,7 +749,6 @@ get_tls_handshake_key (const struct key_type *key_type,
msg (M_FATAL, "INLINE tls-auth file lacks the requisite 2 keys");
}
else
-#endif
{
/* first try to parse as an OpenVPN static key file */
read_key_file (&key2, passphrase_file, 0);
@@ -857,7 +855,6 @@ read_key_file (struct key2 *key2, const char *file, const unsigned int flags)
* Key can be provided as a filename in 'file' or if RKF_INLINE
* is set, the actual key data itself in ascii form.
*/
-#if ENABLE_INLINE_FILES
if (flags & RKF_INLINE) /* 'file' is a string containing ascii representation of key */
{
size = strlen (file) + 1;
@@ -865,7 +862,6 @@ read_key_file (struct key2 *key2, const char *file, const unsigned int flags)
error_filename = INLINE_FILE_TAG;
}
else /* 'file' is a filename which refers to a file containing the ascii key */
-#endif
{
in = alloc_buf_gc (2048, &gc);
fd = platform_open (file, O_RDONLY, 0);
@@ -979,9 +975,7 @@ read_key_file (struct key2 *key2, const char *file, const unsigned int flags)
}
/* zero file read buffer if not an inline file */
-#if ENABLE_INLINE_FILES
if (!(flags & RKF_INLINE))
-#endif
buf_clear (&in);
if (key2->n)