[network-manager-openvpn/th/ovpn-import-bgo761285: 12/22] properties: add support for importing <secret> inline certificates



commit 29465d4c71d694cb4c072f1ff585244fd0808847
Author: Thomas Haller <thaller redhat com>
Date:   Fri Jan 29 15:05:38 2016 +0100

    properties: add support for importing <secret> inline certificates

 properties/import-export.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/properties/import-export.c b/properties/import-export.c
index cc1f54c..fe94bf3 100644
--- a/properties/import-export.c
+++ b/properties/import-export.c
@@ -44,6 +44,7 @@
 #define INLINE_BLOB_CA                  "ca"
 #define INLINE_BLOB_CERT                "cert"
 #define INLINE_BLOB_KEY                 "key"
+#define INLINE_BLOB_SECRET              "secret"
 #define INLINE_BLOB_TLS_AUTH            "tls-auth"
 
 #define TAG_AUTH                        "auth"
@@ -1238,6 +1239,9 @@ do_import (const char *path, const char *contents, gsize contents_len, GError **
                        else if (_streq (token, INLINE_BLOB_TLS_AUTH)) {
                                key = NM_OPENVPN_KEY_TA;
                                can_have_direction = TRUE;
+                       } else if (_streq (token, INLINE_BLOB_SECRET)) {
+                               key = NM_OPENVPN_KEY_STATIC_KEY;
+                               can_have_direction = TRUE;
                        } else {
                                line_error = g_strdup_printf (_("unsupported blob/xml element"));
                                goto handle_line_error;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]