]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Fix indentation
authorDimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
Mon, 23 Jun 2025 11:56:25 +0000 (13:56 +0200)
committerDimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
Sat, 26 Jul 2025 16:02:42 +0000 (18:02 +0200)
Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
18 files changed:
array.c
auth-globalprotect.c
auth-juniper.c
auth.c
compat.c
dtls.c
f5.c
gnutls-dtls.c
gnutls.c
gpst.c
gssapi.c
http.c
library.c
main.c
mtucalc.c
ntlm.c
openssl-dtls.c
ppp.c

diff --git a/array.c b/array.c
index e7ee2e40b2dbfe393737820ae0a683901a4a5ead..7409e16eb2cee50e8b44fac5b40f74f6e0bc1fee 100644 (file)
--- a/array.c
+++ b/array.c
 
 static struct oc_auth_form *plain_auth_form(void)
 {
-        struct oc_auth_form *form;
-        struct oc_form_opt *opt, *opt2, *opt3;
-
-        form = calloc(1, sizeof(*form));
-        if (!form) {
-        nomem:
-                free_auth_form(form);
-                return NULL;
-        }
+       struct oc_auth_form *form;
+       struct oc_form_opt *opt, *opt2, *opt3;
+
+       form = calloc(1, sizeof(*form));
+       if (!form) {
+       nomem:
+               free_auth_form(form);
+               return NULL;
+       }
        form->auth_id = strdup("form");
-        opt = form->opts = calloc(1, sizeof(*opt));
-        if (!opt)
-                goto nomem;
-        opt->label = strdup("authgroup:");
-        opt->name = strdup("method");
-        opt->type = OC_FORM_OPT_TEXT;
-
-        opt2 = opt->next = calloc(1, sizeof(*opt2));
-        if (!opt2)
-                goto nomem;
-        opt2->label = strdup("username:");
-        opt2->name = strdup("uname");
-        opt2->type = OC_FORM_OPT_TEXT;
-
-        opt3 = opt2->next = calloc(1, sizeof(*opt3));
-        if (!opt3)
-                goto nomem;
-        opt3->label = strdup("password:");
-        opt3->name = strdup("pwd");
-        opt3->type = OC_FORM_OPT_PASSWORD;
-        return form;
+       opt = form->opts = calloc(1, sizeof(*opt));
+       if (!opt)
+               goto nomem;
+       opt->label = strdup("authgroup:");
+       opt->name = strdup("method");
+       opt->type = OC_FORM_OPT_TEXT;
+
+       opt2 = opt->next = calloc(1, sizeof(*opt2));
+       if (!opt2)
+               goto nomem;
+       opt2->label = strdup("username:");
+       opt2->name = strdup("uname");
+       opt2->type = OC_FORM_OPT_TEXT;
+
+       opt3 = opt2->next = calloc(1, sizeof(*opt3));
+       if (!opt3)
+               goto nomem;
+       opt3->label = strdup("password:");
+       opt3->name = strdup("pwd");
+       opt3->type = OC_FORM_OPT_PASSWORD;
+       return form;
 }
 
 int array_obtain_cookie(struct openconnect_info *vpninfo)
@@ -89,8 +89,8 @@ int array_obtain_cookie(struct openconnect_info *vpninfo)
 
        struct oc_text_buf *req_buf = buf_alloc();
        int ret;
-        if ((ret = buf_error(req_buf)))
-                goto out;
+       if ((ret = buf_error(req_buf)))
+               goto out;
 
        do {
                ret = process_auth_form(vpninfo, form);
@@ -131,10 +131,10 @@ int array_obtain_cookie(struct openconnect_info *vpninfo)
        ret = -EPERM;
 
  out:
-        if (form) free_auth_form(form);
-        if (req_buf) buf_free(req_buf);
+       if (form) free_auth_form(form);
+       if (req_buf) buf_free(req_buf);
        printf("obtain return %d\n", ret);
-        return ret;
+       return ret;
 }
 
 /* XXX: Lifted from oncp.c. Share it. */
@@ -487,7 +487,7 @@ static int parse_interface_info(struct openconnect_info *vpninfo,
  out:
        if (ret) {
                free_optlist(new_opts);
-                free_split_routes(&new_ip_info);
+               free_split_routes(&new_ip_info);
        }
        return ret;
 }
index 7540a4b60ebf9ee250800da3f805933fc36812b3..98d76450674ea7af64ba1f7e931024e440df9076 100644 (file)
@@ -253,7 +253,7 @@ static int challenge_cb(struct openconnect_info *vpninfo, char *prompt, char *in
         * Currently using the heuristic that if the password field in
         * the preceding form wasn't treated as a token field, treat this
         * as a token field.
-        */
+        */
        if (!can_gen_tokencode(vpninfo, form, opt2) && opt2->type == OC_FORM_OPT_PASSWORD)
                opt2->type = OC_FORM_OPT_TOKEN;
        else
@@ -486,7 +486,7 @@ static int parse_portal_xml(struct openconnect_info *vpninfo, xmlNode *xml_node,
         *   or repeated --servercert in order to allow non-interactive
         *   authentication to gateways whose certs aren't trusted by the
         *   system but ARE trusted by the portal (see example at
-         *   https://github.com/dlenski/openconnect/issues/128).
+        *   https://github.com/dlenski/openconnect/issues/128).
         */
        if (xmlnode_is_named(xml_node, "policy")) {
                for (x = xml_node->children; x; x = x->next) {
@@ -810,7 +810,7 @@ int gpst_obtain_cookie(struct openconnect_info *vpninfo)
        int result;
 
        /* An alternate password/secret field may be specified in the "URL path" (or --usergroup).
-        * Known possibilities are:
+        * Known possibilities are:
         *     /portal:portal-userauthcookie
         *     /gateway:prelogin-cookie
         */
index 2ff0448bca7902716a467340bd19c4ae4f896e05..814412cd3a3746bb7526005c2cea4ea9a122bd1d 100644 (file)
@@ -114,7 +114,7 @@ int oncp_send_tncc_command(struct openconnect_info *vpninfo, int start)
                return -EIO;
        }
 
-       /* Mainloop timers need to know the last Trojan was invoked */
+       /* Mainloop timers need to know the last Trojan was invoked */
        vpninfo->last_trojan = time(NULL);
        return buf_free(buf);
 }
diff --git a/auth.c b/auth.c
index cf12ea29e337eef21140b7a27a954540ec0e4c79..ec17c2969da7e2cba7acd3ac284f64e552106ddb 100644 (file)
--- a/auth.c
+++ b/auth.c
@@ -1277,19 +1277,19 @@ static int run_csd_script(struct openconnect_info *vpninfo, char *buf, int bufle
 
                return ret;
        } else {
-                /* in child: will be reaped by init */
-                char scertbuf[MD5_SIZE * 2 + 1];
-                char ccertbuf[MD5_SIZE * 2 + 1];
-                char *csd_argv[32];
-                int i = 0;
-
-                if (set_csd_user(vpninfo) < 0)
-                        exit(1);
-                if (getuid() == 0 && !vpninfo->csd_wrapper) {
-                        fprintf(stderr, _("Warning: you are running insecure CSD code with root privileges\n"
-                                          "\t Use command line option \"--csd-user\"\n"));
-                }
-                /*
+               /* in child: will be reaped by init */
+               char scertbuf[MD5_SIZE * 2 + 1];
+               char ccertbuf[MD5_SIZE * 2 + 1];
+               char *csd_argv[32];
+               int i = 0;
+
+               if (set_csd_user(vpninfo) < 0)
+                       exit(1);
+               if (getuid() == 0 && !vpninfo->csd_wrapper) {
+                       fprintf(stderr, _("Warning: you are running insecure CSD code with root privileges\n"
+                                         "\t Use command line option \"--csd-user\"\n"));
+               }
+               /*
                 * Spurious stdout output from the CSD trojan will break both
                 * the NM tool and the various cookieonly modes.
                 * Also, gnome-shell *closes* stderr so attempt to cope with that
@@ -1304,50 +1304,50 @@ static int run_csd_script(struct openconnect_info *vpninfo, char *buf, int bufle
                                close(nulfd);
                        }
                }
-                dup2(2, 1);
-                if (vpninfo->csd_wrapper)
-                        csd_argv[i++] = openconnect_utf8_to_legacy(vpninfo,
-                                                                   vpninfo->csd_wrapper);
-                csd_argv[i++] = fname;
-                csd_argv[i++] = (char *)"-ticket";
-                if (asprintf(&csd_argv[i++], "\"%s\"", vpninfo->csd_ticket) == -1)
-                        goto out;
-                csd_argv[i++] = (char *)"-stub";
-                csd_argv[i++] = (char *)"\"0\"";
-                csd_argv[i++] = (char *)"-group";
-                if (asprintf(&csd_argv[i++], "\"%s\"", vpninfo->authgroup?:"") == -1)
-                        goto out;
-
-                openconnect_local_cert_md5(vpninfo, ccertbuf);
-                scertbuf[0] = 0;
-                get_cert_md5_fingerprint(vpninfo, vpninfo->peer_cert, scertbuf);
-                csd_argv[i++] = (char *)"-certhash";
-                if (asprintf(&csd_argv[i++], "\"%s:%s\"", scertbuf, ccertbuf) == -1)
-                        goto out;
-
-
-                csd_argv[i++] = (char *)"-url";
-                if (asprintf(&csd_argv[i++], "\"https://%s%s\"", openconnect_get_hostname(vpninfo), vpninfo->csd_starturl) == -1)
-                        goto out;
-
-                csd_argv[i++] = (char *)"-langselen";
-                csd_argv[i++] = NULL;
-
-                if (setenv("CSD_SHA256", openconnect_get_peer_cert_hash(vpninfo)+11, 1))  /* remove initial 'pin-sha256:' */
-                        goto out;
-                if (setenv("CSD_TOKEN", vpninfo->csd_token, 1))
-                        goto out;
-                if (setenv("CSD_HOSTNAME", openconnect_get_hostname(vpninfo), 1))
-                        goto out;
-
-                apply_script_env(vpninfo->csd_env);
-
-                execv(csd_argv[0], csd_argv);
-
-        out:
-                vpn_progress(vpninfo, PRG_ERR,
-                             _("Failed to exec CSD script %s\n"), vpninfo->csd_wrapper ?: fname);
-                exit(1);
+               dup2(2, 1);
+               if (vpninfo->csd_wrapper)
+                       csd_argv[i++] = openconnect_utf8_to_legacy(vpninfo,
+                                                                  vpninfo->csd_wrapper);
+               csd_argv[i++] = fname;
+               csd_argv[i++] = (char *)"-ticket";
+               if (asprintf(&csd_argv[i++], "\"%s\"", vpninfo->csd_ticket) == -1)
+                       goto out;
+               csd_argv[i++] = (char *)"-stub";
+               csd_argv[i++] = (char *)"\"0\"";
+               csd_argv[i++] = (char *)"-group";
+               if (asprintf(&csd_argv[i++], "\"%s\"", vpninfo->authgroup?:"") == -1)
+                       goto out;
+
+               openconnect_local_cert_md5(vpninfo, ccertbuf);
+               scertbuf[0] = 0;
+               get_cert_md5_fingerprint(vpninfo, vpninfo->peer_cert, scertbuf);
+               csd_argv[i++] = (char *)"-certhash";
+               if (asprintf(&csd_argv[i++], "\"%s:%s\"", scertbuf, ccertbuf) == -1)
+                       goto out;
+
+
+               csd_argv[i++] = (char *)"-url";
+               if (asprintf(&csd_argv[i++], "\"https://%s%s\"", openconnect_get_hostname(vpninfo), vpninfo->csd_starturl) == -1)
+                       goto out;
+
+               csd_argv[i++] = (char *)"-langselen";
+               csd_argv[i++] = NULL;
+
+               if (setenv("CSD_SHA256", openconnect_get_peer_cert_hash(vpninfo)+11, 1))  /* remove initial 'pin-sha256:' */
+                       goto out;
+               if (setenv("CSD_TOKEN", vpninfo->csd_token, 1))
+                       goto out;
+               if (setenv("CSD_HOSTNAME", openconnect_get_hostname(vpninfo), 1))
+                       goto out;
+
+               apply_script_env(vpninfo->csd_env);
+
+               execv(csd_argv[0], csd_argv);
+
+       out:
+               vpn_progress(vpninfo, PRG_ERR,
+                            _("Failed to exec CSD script %s\n"), vpninfo->csd_wrapper ?: fname);
+               exit(1);
        }
 
 #endif /* !_WIN32 && !__native_client__ */
index b00ac83e0f2f3cb0e74be93fd9a950fc254bf00e..e5593d9ac2a0beb9cb5a45f3e14ff4dc39df5e1b 100644 (file)
--- a/compat.c
+++ b/compat.c
 #include <sec_api/stdlib_s.h> /* errno_t, size_t */
 #ifndef HAVE_GETENV_S_DECL
 errno_t getenv_s(
-    size_t     *ret_required_buf_size,
-    char       *buf,
-    size_t      buf_size_in_bytes,
-    const char *name
+       size_t     *ret_required_buf_size,
+       char       *buf,
+       size_t      buf_size_in_bytes,
+       const char *name
 );
 #endif
 #ifndef HAVE_PUTENV_S_DECL
 errno_t _putenv_s(
-   const char *varname,
-   const char *value_string
+       const char *varname,
+       const char *value_string
 );
 #endif
 #endif
diff --git a/dtls.c b/dtls.c
index 6e167126fe60d8a2d635329f13bdb7d5ca0bd5fc..427109e873989ea6e4759083a3827a223dbab69e 100644 (file)
--- a/dtls.c
+++ b/dtls.c
@@ -555,17 +555,17 @@ static int probe_mtu(struct openconnect_info *vpninfo, unsigned char *buf)
                gettimeofday(&now_tv, NULL);
 
                if (now_tv.tv_sec > start_tv.tv_sec + 10) {
-                        if (absolute_min == min) {
-                                /* Hm, we never got *anything* back successfully? */
-                                vpn_progress(vpninfo, PRG_ERR,
-                                             _("Too long time in MTU detect loop; assuming negotiated MTU.\n"));
-                                goto fail;
-                        } else {
-                                vpn_progress(vpninfo, PRG_ERR,
-                                             _("Too long time in MTU detect loop; MTU set to %d.\n"), min);
+                       if (absolute_min == min) {
+                               /* Hm, we never got *anything* back successfully? */
+                               vpn_progress(vpninfo, PRG_ERR,
+                                            _("Too long time in MTU detect loop; assuming negotiated MTU.\n"));
+                               goto fail;
+                       } else {
+                               vpn_progress(vpninfo, PRG_ERR,
+                                            _("Too long time in MTU detect loop; MTU set to %d.\n"), min);
                                ret = min;
                                goto out;
-                        }
+                       }
                }
 
 
diff --git a/f5.c b/f5.c
index 0d53ab4266e1cc752458cec04b7c4578b0c6a058..87d386ada4d7502f79c1eef72bd76ee99db13437 100644 (file)
--- a/f5.c
+++ b/f5.c
@@ -533,7 +533,7 @@ static int parse_options(struct openconnect_info *vpninfo, char *buf, int len,
                        int st = xmlnode_bool_or_int_value(xml_node);
                        vpn_progress(vpninfo, PRG_INFO, _("Got SplitTunneling0 value of %d\n"), st);
                        /* XX: Should we ignore split-{in,ex}cludes if this is zero? */
-                }
+               }
                /* XX: This is an objectively stupid way to use XML, a hierarchical data format. */
                else if (   (!strncmp((char *)xml_node->name, "DNS", 3) && isdigit(xml_node->name[3]))
                         || (!strncmp((char *)xml_node->name, "DNS6_", 5) && isdigit(xml_node->name[5])) ) {
@@ -626,7 +626,7 @@ static int parse_options(struct openconnect_info *vpninfo, char *buf, int len,
 
        if (ret || (*ipv4 < 1 && *ipv6 < 1) || !*ur_z || !*session_id) {
                free_optlist(new_opts);
-                free_split_routes(&new_ip_info);
+               free_split_routes(&new_ip_info);
        err:
                vpn_progress(vpninfo, PRG_ERR,
                             _("Failed to find VPN options\n"));
@@ -661,8 +661,8 @@ static int get_ip_address(struct openconnect_info *vpninfo, char *header, char *
                if (!vpninfo->ip_info.addr6 && !vpninfo->ip_info.netmask6)
                        inet_pton(AF_INET6, val, &ppp->out_ipv6_addr);
        }
-        /* XX: The server's IP address(es) X-VPN-server-{IP,IPv6} are also
-         * sent, but the utility of these is unclear. As remarked in oncp.c,
+       /* XX: The server's IP address(es) X-VPN-server-{IP,IPv6} are also
+        * sent, but the utility of these is unclear. As remarked in oncp.c,
         * "this is a tunnel; having a gateway is meaningless." */
        return 0;
 }
index 50a4bb4efcca2d6caa506242701857f427b9113f..c8827918608532709c699b77bf40bd5339caed39 100644 (file)
@@ -347,7 +347,7 @@ static int start_dtls_anon_handshake(struct openconnect_info *vpninfo, gnutls_se
         * precisely the same cert that we get from the HTTPS service,
         * but we tried that for EAP-TTLS in the Pulse protocol and the
         * theory was disproven, so we ended up doing this there too.
-         */
+        */
        gnutls_credentials_set(dtls_ssl, GNUTLS_CRD_CERTIFICATE, vpninfo->https_cred);
 
        /* The F5 BIG-IP server before v16, will crap itself if we
index d0c3acde354d9174df313dbe907b00df713ad871..0ac662262bbb84f93b0e890a77dc6ac967e9822f 100644 (file)
--- a/gnutls.c
+++ b/gnutls.c
@@ -2376,31 +2376,31 @@ int openconnect_open_https(struct openconnect_info *vpninfo)
                                       vpninfo->hostname,
                                       strlen(vpninfo->hostname));
 
-       /*
-       * If a ClientHello is between 256 and 511 bytes, the
-       * server cannot distinguish between a SSLv2 formatted
-       * packet and a SSLv3 formatted packet.
-       *
-       * F5 BIG-IP reverse proxies in particular will
-       * silently drop an ambiguous ClientHello.
-       *
-       * GnuTLS fixes this in v3.2.9+ by padding ClientHello
-       * packets to at least 512 bytes if %COMPAT or %DUMBFW
-       * is specified.
-       *
-       * Discussion:
-       * https://www.ietf.org/mail-archive/web/tls/current/msg10423.html
-       *
-       * GnuTLS commits:
-       * b6d29bb1737f96ac44a8ef9cc9fe7f9837e20465
-       * a9bd8c4d3a639c40adb964349297f891f583a21b
-       * 531bec47037e882af32963f8461988f8c724919e
-       * 7c45ebbdd877cd994b6b938bd6faef19558a01e1
-       * 8d28901a3ebd2589d0fc9941475d50f04047f6fe
-       * 28065ce3896b1b0f87972d0bce9b17641ebb69b9
-       */
-
-        if (!vpninfo->ciphersuite_config) {
+       /*
+        * If a ClientHello is between 256 and 511 bytes, the
+        * server cannot distinguish between a SSLv2 formatted
+        * packet and a SSLv3 formatted packet.
+        *
+        * F5 BIG-IP reverse proxies in particular will
+        * silently drop an ambiguous ClientHello.
+        *
+        * GnuTLS fixes this in v3.2.9+ by padding ClientHello
+        * packets to at least 512 bytes if %COMPAT or %DUMBFW
+        * is specified.
+        *
+        * Discussion:
+        * https://www.ietf.org/mail-archive/web/tls/current/msg10423.html
+        *
+        * GnuTLS commits:
+        * b6d29bb1737f96ac44a8ef9cc9fe7f9837e20465
+        * a9bd8c4d3a639c40adb964349297f891f583a21b
+        * 531bec47037e882af32963f8461988f8c724919e
+        * 7c45ebbdd877cd994b6b938bd6faef19558a01e1
+        * 8d28901a3ebd2589d0fc9941475d50f04047f6fe
+        * 28065ce3896b1b0f87972d0bce9b17641ebb69b9
+        */
+
+       if (!vpninfo->ciphersuite_config) {
                struct oc_text_buf *buf = buf_alloc();
 #ifdef DEFAULT_PRIO
                buf_append(buf, "%s", DEFAULT_PRIO ":%COMPAT");
@@ -2444,7 +2444,7 @@ int openconnect_open_https(struct openconnect_info *vpninfo)
                vpninfo->ciphersuite_config = buf->data;
                buf->data = NULL;
                buf_free(buf);
-        }
+       }
 
        err = gnutls_priority_set_direct(vpninfo->https_sess,
                                         vpninfo->ciphersuite_config, NULL);
diff --git a/gpst.c b/gpst.c
index c94458740891defe06e762b13b1deb2e770b94fa..cb17bcd4d854928a2ec507a8e566c1faa846340f 100644 (file)
--- a/gpst.c
+++ b/gpst.c
@@ -1089,10 +1089,10 @@ int gpst_setup(struct openconnect_info *vpninfo)
        if (ret)
                goto out;
 
-        /* XX: last_trojan is used both as a sentinel to detect the
-         * first time we check/submit HIP, and for the mainloop to timeout
-         * when periodic re-checking is required.
-         */
+       /* XX: last_trojan is used both as a sentinel to detect the
+        * first time we check/submit HIP, and for the mainloop to timeout
+        * when periodic re-checking is required.
+        */
        vpninfo->last_trojan = time(NULL);
 
        /* Default HIP re-checking to 3600 seconds unless already set by
index cf5df1e3685b8c2187cc73580ceb56802986fb1b..837aa69df0c5fa476f50aa0b3f0653dd9db0e63f 100644 (file)
--- a/gssapi.c
+++ b/gssapi.c
@@ -50,7 +50,7 @@ static void print_gss_err(struct openconnect_info *vpninfo, const char *where,
 
 static const char spnego_OID[] = "\x2b\x06\x01\x05\x05\x02";
 static const gss_OID_desc gss_mech_spnego = {
-        6,
+       6,
        (void *)&spnego_OID
 };
 
diff --git a/http.c b/http.c
index 702b6ffa29fa839de9fffa89256ad2b39994e3e0..208c876e46824c1feff48087ad2d183a2a4dc975 100644 (file)
--- a/http.c
+++ b/http.c
@@ -686,13 +686,13 @@ int handle_redirect(struct openconnect_info *vpninfo)
                free(vpninfo->redirect_url);
                vpninfo->redirect_url = NULL;
                return 0;
-        } else if (vpninfo->redirect_url[0] == '/') {
-                /* Absolute redirect within same host */
-                free(vpninfo->urlpath);
-                vpninfo->urlpath = strdup(vpninfo->redirect_url + 1);
-                free(vpninfo->redirect_url);
-                vpninfo->redirect_url = NULL;
-                return 0;
+       } else if (vpninfo->redirect_url[0] == '/') {
+               /* Absolute redirect within same host */
+               free(vpninfo->urlpath);
+               vpninfo->urlpath = strdup(vpninfo->redirect_url + 1);
+               free(vpninfo->redirect_url);
+               vpninfo->redirect_url = NULL;
+               return 0;
        } else if (strstr(vpninfo->redirect_url, "://")) {
                vpn_progress(vpninfo, PRG_ERR,
                             _("Cannot follow redirection to non-https URL '%s'\n"),
index d5021594d7f8f9faa150430e78bfe8c6cca35786..6fbe2d104bbda3aa3990a5f3b4756326a395827f 100644 (file)
--- a/library.c
+++ b/library.c
@@ -282,12 +282,12 @@ int openconnect_get_supported_protocols(struct oc_vpn_proto **protos)
        struct oc_vpn_proto *pr;
        int i, j;
 
-        /* The original version of this function included an all-zero
-         * sentinel value at the end of the array, so we must continue
-         * to do so for ABI compatibility even though it's
-         * functionally redundant as a marker of the array's length,
-         * along with the explicit length in the return value.
-         */
+       /* The original version of this function included an all-zero
+        * sentinel value at the end of the array, so we must continue
+        * to do so for ABI compatibility even though it's
+        * functionally redundant as a marker of the array's length,
+        * along with the explicit length in the return value.
+        */
        *protos = pr = calloc(NR_PROTOS + 1, sizeof(*pr));
        if (!pr)
                return -ENOMEM;
@@ -1485,7 +1485,7 @@ const char *openconnect_get_dtls_cipher(struct openconnect_info *vpninfo)
                        return NULL;
 #endif
        }
-    return vpninfo->dtls_cipher_desc;
+       return vpninfo->dtls_cipher_desc;
 }
 
 int openconnect_set_csd_environ(struct openconnect_info *vpninfo,
diff --git a/main.c b/main.c
index be0e3cd7566a1d4e3e431e93894bfbf77897f42f..e088ea5f9d50c9154823d376d1e6e12c69e92f28 100644 (file)
--- a/main.c
+++ b/main.c
@@ -737,7 +737,7 @@ static void print_supported_protocols(void)
        int n;
 
        n = openconnect_get_supported_protocols(&protos);
-        if (n>=0) {
+       if (n>=0) {
                printf(_("Supported protocols:"));
                for (p=protos; n; p++, n--) {
                        printf("%s%s%s", sep, p->name, p==protos ? _(" (default)") : "");
@@ -754,7 +754,7 @@ static void print_supported_protocols_usage(void)
        int n;
 
        n = openconnect_get_supported_protocols(&protos);
-        if (n>=0) {
+       if (n>=0) {
                printf("\n%s:\n", _("Set VPN protocol"));
                for (p=protos; n; p++, n--)
                        printf("      --protocol=%-16s %s%s\n",
index 3c5ef3897fab2fa866e30a9fc17253fdac50ee21..9db13d034b37d6990b1b599bf88e51ddc7a407e4 100644 (file)
--- a/mtucalc.c
+++ b/mtucalc.c
@@ -89,7 +89,7 @@ int calculate_mtu(struct openconnect_info *vpninfo, int is_udp,
 
        vpn_progress(vpninfo, PRG_TRACE, _("Using base_mtu of %d\n"), base_mtu);
 
-        /* base_mtu is now (we hope) the PMTU between our external network interface
+       /* base_mtu is now (we hope) the PMTU between our external network interface
         * and the VPN gateway */
 
        if (!mtu) {
@@ -106,7 +106,7 @@ int calculate_mtu(struct openconnect_info *vpninfo, int is_udp,
        vpn_progress(vpninfo, PRG_TRACE, _("After removing %s/IPv%d headers, MTU of %d\n"),
                     (is_udp ? "UDP" : "TCP"), vpninfo->peer_addr->sa_family == AF_INET6 ? 6 : 4, mtu);
 
-        /* MTU is now (we hope) the number of payload bytes that can fit in a UDP or
+       /* MTU is now (we hope) the number of payload bytes that can fit in a UDP or
         * TCP packet exchanged with the VPN gateway. */
 
        mtu -= unpadded_overhead; /* remove protocol-specific overhead that isn't affected by padding */
diff --git a/ntlm.c b/ntlm.c
index 01f0aff8be91b6041fdee500349c2b01f35ed47b..3e9a4212e45b93324a58cf049de4f2880c0c4d96 100644 (file)
--- a/ntlm.c
+++ b/ntlm.c
@@ -47,10 +47,10 @@ static int ntlm_sspi(struct openconnect_info *vpninfo, int proxy,
                     struct http_auth_state *auth_state,
                     struct oc_text_buf *buf, const char *challenge)
 {
-        SECURITY_STATUS status;
-        SecBufferDesc input_desc, output_desc;
-        SecBuffer in_token, out_token;
-        ULONG ret_flags;
+       SECURITY_STATUS status;
+       SecBufferDesc input_desc, output_desc;
+       SecBuffer in_token, out_token;
+       ULONG ret_flags;
 
        if (challenge) {
                int token_len = -EINVAL;
@@ -66,13 +66,13 @@ static int ntlm_sspi(struct openconnect_info *vpninfo, int proxy,
                in_token.cbBuffer = token_len;
        }
 
-        output_desc.cBuffers = 1;
-        output_desc.pBuffers = &out_token;
-        output_desc.ulVersion = SECBUFFER_VERSION;
+       output_desc.cBuffers = 1;
+       output_desc.pBuffers = &out_token;
+       output_desc.ulVersion = SECBUFFER_VERSION;
 
-        out_token.BufferType = SECBUFFER_TOKEN;
-        out_token.cbBuffer = 0;
-        out_token.pvBuffer = NULL;
+       out_token.BufferType = SECBUFFER_TOKEN;
+       out_token.cbBuffer = 0;
+       out_token.pvBuffer = NULL;
 
        status = InitializeSecurityContextW(&auth_state->ntlm_sspi_cred,
                                            challenge ? &auth_state->ntlm_sspi_ctx : NULL,
@@ -102,7 +102,7 @@ static int ntlm_helper_spawn(struct openconnect_info *vpninfo, int proxy,
                             struct http_auth_state *auth_state,
                             struct oc_text_buf *buf)
 {
-        SECURITY_STATUS status;
+       SECURITY_STATUS status;
        int ret;
 
        status = AcquireCredentialsHandleW(NULL, (SEC_WCHAR *)L"NTLM",
@@ -738,7 +738,7 @@ static void setup_schedule (const unsigned char *key_56, DES_KS ks)
 
 #define LM_PASSWORD_MAGIC "\x4B\x47\x53\x21\x40\x23\x24\x25" \
                           "\x4B\x47\x53\x21\x40\x23\x24\x25" \
-                         "\x00\x00\x00\x00\x00"
+                          "\x00\x00\x00\x00\x00"
 
 static void ntlm_lanmanager_hash (const char *password, char hash[21])
 {
index 00d1fd99d3b241ef00be5c90770a307f97465622..03d998c17a30a17e02d64f4c2d6f53884aad1fef 100644 (file)
@@ -318,7 +318,7 @@ static unsigned int psk_callback(SSL *ssl, const char *hint, char *identity,
 #ifndef HAVE_SSL_CIPHER_FIND
 static const SSL_CIPHER *SSL_CIPHER_find(SSL *ssl, const unsigned char *ptr)
 {
-    return ssl->method->get_cipher_by_char(ptr);
+       return ssl->method->get_cipher_by_char(ptr);
 }
 #endif
 
diff --git a/ppp.c b/ppp.c
index 7875ab8dc29d4719fef5f768080d8e13b46634b5..e01ed7197caff09cbf764ffef3f45c5391ad2fbc 100644 (file)
--- a/ppp.c
+++ b/ppp.c
@@ -630,7 +630,7 @@ static int queue_config_request(struct openconnect_info *vpninfo, int proto)
        }
 
 out:
-        buf_free(buf);
+       buf_free(buf);
        return ret;
 }
 
@@ -790,7 +790,7 @@ static int handle_config_packet(struct openconnect_info *vpninfo,
                len = load_be16(p + 2);
        }
 
-        if (code > 0 && code <= 11)
+       if (code > 0 && code <= 11)
                vpn_progress(vpninfo, PRG_TRACE, _("Received %s/id %d %s from server\n"), proto_names(proto), id, lcp_names[code]);
        switch (code) {
        case CONFREQ: