V7->V8: Update comments in openconnect.h with better usage information for openconnect_get_ip_info(). Tweak comment formatting for consistency. Add OC_FORM_OPT_NUMERIC hint to tell the UI that a form field expects numeric input only for the token PIN. Change Java FormOpt handling to expose initial server-supplied values (e.g. for secondary_username). Untested. The following changes since commit e39abb44e12f7bd46cf0302c510f67d432f1a75c: Tag version 5.02 (2014-01-01 23:14:26 +0000) are available in the git repository at: git://github.com/cernekee/openconnect.git jni-v8 for you to fetch changes up to 2c4851e64f1d61beadaf131ddc66be14d265e3df: Fix a few minor memory leaks (2014-01-14 18:49:07 -0800) ---------------------------------------------------------------- Kevin Cernekee (70): library: Use named constants for process_auth_form() return value main: Rename process_auth_form() to avoid conflict with library Create a common process_auth_form() wrapper function auth: Remove outdated comment for parse_auth_choice() auth: Introduce free_opt() helper function library: Change oc_form_opt_select->choices to a pointer array auth: Provide information on which auth choice is currently selected process_auth_form: Add code to support NEWGROUP return status from UI main: Extend read_stdin() to accept hidden (password) input main: Split process_auth_form_cb() into smaller functions main: Make the authgroup picker CLI more user-friendly auth: Parse second-auth-related properties from the auth form auth: Hide unused form fields based on the selected authgroup Revert "auth: Temporarily disable XML POST if an authgroup dropdown exists" auth: Add OC_FORM_OPT_NUMERIC hint and apply it to token PIN entry library: Bump API version to 3.0 and document changes main: Update CLI to handle hidden fields and NEWGROUP main: Avoid infinite "303 See Other" loops on certificate-only authgroups main: Don't free password if it isn't used in the first auth form library: Clean up partially completed auth forms on error Unconditionally redirect CSD stdout to stderr ssl: Set FD_CLOEXEC on all sockets gnutls: Remove unused local variable Introduce new helper functions for cancel_fd checking library: Rename cancel_fd to cmd_fd library: Add new openconnect_setup_cmd_pipe() call Add new helper functions to support cmd_fd feature Temporarily build ssl.c + deps into the main executable Move signal handling out of mainloop cstp: Propagate error status up to the mainloop mainloop: Convert vpn_mainloop() into a library function dtls: Add dtls_close() helper function and call it on library cleanup mainloop: Add OC_CMD_PAUSE operation main: Introduce xstrdup() function tun: Export setup_tun() functionality Move vpninfo default settings into library library: Check for failed allocations in openconnect_vpninfo_new() dtls: Export setup_dtls() function cstp: Export make_cstp_connection() library: Move the mainloop guts into libopenconnect library: Update openconnect.pc.in cstp: Close socket after failed connection attempt tun, cstp: Don't exit() on failure library: Free zlib state cstp: Clean up split include/exclude/DNS lists when freeing vpninfo library: Add get/set functions for servercert, ifname, reqmtu library: Move IP information into a public struct library: Make vpn_option a public struct library: Export VPN configuration info to callers library: Tweak openconnect.h comment formatting for consistency library: Add protect_socket callback library: Add support for mobile headers library: Add openconnect_set_xmlpost() to support different CSD modes library: Add new callback for obtaining TX/RX statistics ssl: Don't let cmd_fd activity break timeouts library: Update changelog and bump minor version main: Add openconnect_vpninfo_free() on a couple of exit paths buildsys: Allow overriding -W flags acinclude: Add AX_JNI_INCLUDE_DIR macro JNI: Initial commit of C wrapper functions JNI: Initial commit of Java library + example program android: Enable JNI in build android: Add libstoken to build android: Add liboath to build android: Add "sources" target main: Add --timestamp option library: Fix incorrect platform ID for Mac Update documentation/help with the correct "--os" names www: Update changelog Fix a few minor memory leaks .gitignore | 1 + Makefile.am | 25 +- acinclude.m4 | 125 +++ android/0001-Remove-call-to-mlockall.patch | 33 + ...-fflush-freadahead-fseeko-Fix-for-Android.patch | 43 + android/Makefile | 111 +- auth.c | 237 ++-- configure.ac | 48 +- cstp.c | 177 +-- dtls.c | 119 +-- gnutls.c | 40 +- http.c | 65 +- java/.gitignore | 2 + java/README | 22 + java/build.xml | 33 + java/src/com/example/LibTest.java | 246 +++++ .../infradead/libopenconnect/LibOpenConnect.java | 275 +++++ jni.c | 1129 ++++++++++++++++++++ libopenconnect.map.in | 32 +- library.c | 137 ++- main.c | 491 +++++---- mainloop.c | 68 +- openconnect-internal.h | 68 +- openconnect.8.in | 19 +- openconnect.h | 157 ++- openconnect.pc.in | 2 +- openssl.c | 38 +- ssl.c | 101 +- tun.c | 198 ++-- www/changelog.xml | 7 +- 30 files changed, 3321 insertions(+), 728 deletions(-) create mode 100644 android/0001-Remove-call-to-mlockall.patch create mode 100644 android/0001-fflush-freadahead-fseeko-Fix-for-Android.patch create mode 100644 java/.gitignore create mode 100644 java/README create mode 100644 java/build.xml create mode 100644 java/src/com/example/LibTest.java create mode 100644 java/src/org/infradead/libopenconnect/LibOpenConnect.java create mode 100644 jni.c -- 1.7.9.5