summaryrefslogtreecommitdiffstats
path: root/ssl.c
diff options
context:
space:
mode:
authorAdriaan de Jong <dejong@fox-it.com>2011-06-28 11:03:45 +0200
committerDavid Sommerseth <davids@redhat.com>2011-10-21 10:53:32 +0200
commitfef565a31640e9de2bc518ea7264a067a5efd38e (patch)
treedd06122bd66eaf186a5d412bba70895468a10cdb /ssl.c
parent57513aac1aac93190d56ffb3a1a642460f318253 (diff)
downloadopenvpn-fef565a31640e9de2bc518ea7264a067a5efd38e.tar.gz
openvpn-fef565a31640e9de2bc518ea7264a067a5efd38e.tar.xz
openvpn-fef565a31640e9de2bc518ea7264a067a5efd38e.zip
Refactored: moved write_empty_string function back
Signed-off-by: Adriaan de Jong <dejong@fox-it.com> Acked-by: Gert Doering <gert@greenie.muc.de> Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'ssl.c')
-rw-r--r--ssl.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ssl.c b/ssl.c
index 2a27c0b..8653629 100644
--- a/ssl.c
+++ b/ssl.c
@@ -2810,6 +2810,14 @@ key_state_soft_reset (struct tls_session *session)
*/
static bool
+write_empty_string (struct buffer *buf)
+{
+ if (!buf_write_u16 (buf, 0))
+ return false;
+ return true;
+}
+
+static bool
write_string (struct buffer *buf, const char *str, const int maxlen)
{
const int len = strlen (str) + 1;
@@ -2823,14 +2831,6 @@ write_string (struct buffer *buf, const char *str, const int maxlen)
}
static bool
-write_empty_string (struct buffer *buf)
-{
- if (!buf_write_u16 (buf, 0))
- return false;
- return true;
-}
-
-static bool
read_string (struct buffer *buf, char *str, const unsigned int capacity)
{
const int len = buf_read_u16 (buf);