diff options
author | Bernhard Schmidt <berni@debian.org> | 2020-09-01 16:52:17 +0200 |
---|---|---|
committer | Bernhard Schmidt <berni@debian.org> | 2020-09-01 16:52:17 +0200 |
commit | 9fc3b98112217f2d92a67977dbde0987cc7a1803 (patch) | |
tree | 29fcc8654ee65d9dd89ade797bea2f3d9dfd9cfd /sample/sample-plugins | |
parent | a8758c0e03eed188dcb9da0e4fd781a67c25bf1e (diff) | |
parent | 69b02b1f7fd609d84ace13ab04697158de2418a9 (diff) |
Merge branch 'debian/experimental-2.5'
Diffstat (limited to 'sample/sample-plugins')
-rw-r--r-- | sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.c | 8 | ||||
-rw-r--r-- | sample/sample-plugins/log/log.c | 4 | ||||
-rw-r--r-- | sample/sample-plugins/log/log_v3.c | 8 |
3 files changed, 13 insertions, 7 deletions
diff --git a/sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.c b/sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.c index 5d3ca14..b53f13f 100644 --- a/sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.c +++ b/sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.c @@ -27,8 +27,6 @@ * See the README file for build instructions. */ -#define ENABLE_CRYPTO - #include <stdio.h> #include <string.h> #include <stdlib.h> @@ -232,7 +230,8 @@ tls_final(struct openvpn_plugin_args_func_in const *args, snprintf(sess->key, sizeof(sess->key) - 1, "%s", key); ovpn_note("app session key: %s", sess->key); - switch (plugin->type) { + switch (plugin->type) + { case SERVER: server_store(args); break; @@ -251,7 +250,8 @@ openvpn_plugin_func_v3(const int version, struct openvpn_plugin_args_func_in const *args, struct openvpn_plugin_args_func_return *rv) { - switch (args->type) { + switch (args->type) + { case OPENVPN_PLUGIN_TLS_VERIFY: return tls_verify(args); diff --git a/sample/sample-plugins/log/log.c b/sample/sample-plugins/log/log.c index ecf62c0..b5c1c3b 100644 --- a/sample/sample-plugins/log/log.c +++ b/sample/sample-plugins/log/log.c @@ -156,11 +156,15 @@ show(const int type, const char *argv[], const char *envp[]) printf("ARGV\n"); for (i = 0; argv[i] != NULL; ++i) + { printf("%d '%s'\n", (int)i, argv[i]); + } printf("ENVP\n"); for (i = 0; envp[i] != NULL; ++i) + { printf("%d '%s'\n", (int)i, envp[i]); + } } OPENVPN_EXPORT int diff --git a/sample/sample-plugins/log/log_v3.c b/sample/sample-plugins/log/log_v3.c index c972951..17b83f3 100644 --- a/sample/sample-plugins/log/log_v3.c +++ b/sample/sample-plugins/log/log_v3.c @@ -35,8 +35,6 @@ #include <string.h> #include <stdlib.h> -#define ENABLE_CRYPTO - #include "openvpn-plugin.h" /* @@ -179,11 +177,15 @@ show(const int type, const char *argv[], const char *envp[]) printf("ARGV\n"); for (i = 0; argv[i] != NULL; ++i) + { printf("%d '%s'\n", (int)i, argv[i]); + } printf("ENVP\n"); for (i = 0; envp[i] != NULL; ++i) + { printf("%d '%s'\n", (int)i, envp[i]); + } } static void @@ -196,7 +198,7 @@ x509_print_info(X509 *x509crt) X509_NAME *x509_name; X509_NAME_ENTRY *ent; const char *objbuf; - unsigned char *buf; + unsigned char *buf = NULL; x509_name = X509_get_subject_name(x509crt); n = X509_NAME_entry_count(x509_name); |