This function is used by both NCP and push, so move it to a more proper
place.
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: David Sommerseth <davids@openvpn.net>
Message-Id: <
20210319153129.8734-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21732.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
#include "crypto_backend.h"
+#include "ssl_util.h"
/*#define MULTI_DEBUG_EVENT_LOOP*/
#include "manage.h"
#include "memdbg.h"
+#include "ssl_util.h"
#if P2MP
gc_free(&gc);
}
}
-
-unsigned int
-extract_iv_proto(const char *peer_info)
-{
- const char *optstr = peer_info ? strstr(peer_info, "IV_PROTO=") : NULL;
- if (optstr)
- {
- int proto = 0;
- int r = sscanf(optstr, "IV_PROTO=%d", &proto);
- if (r == 1 && proto > 0)
- {
- return proto;
- }
- }
- return 0;
-}
-
#endif /* if P2MP */
*/
void send_push_reply_auth_token(struct tls_multi *multi);
-
-/**
- * Extracts the IV_PROTO variable and returns its value or 0
- * if it cannot be extracted.
- *
- * @param peer_info peer info string to search for IV_PROTO
- */
-unsigned int
-extract_iv_proto(const char *peer_info);
-
/**
* Parses an AUTH_PENDING message and if in pull mode extends the timeout
*
var_value[var_end - var_start] = '\0';
return var_value;
}
+
+unsigned int
+extract_iv_proto(const char *peer_info)
+{
+ const char *optstr = peer_info ? strstr(peer_info, "IV_PROTO=") : NULL;
+ if (optstr)
+ {
+ int proto = 0;
+ int r = sscanf(optstr, "IV_PROTO=%d", &proto);
+ if (r == 1 && proto > 0)
+ {
+ return proto;
+ }
+ }
+ return 0;
+}
const char *var,
struct gc_arena *gc);
+/**
+ * Extracts the IV_PROTO variable and returns its value or 0
+ * if it cannot be extracted.
+ *
+ * @param peer_info peer info string to search for IV_PROTO
+ */
+unsigned int
+extract_iv_proto(const char *peer_info);
#endif