summaryrefslogtreecommitdiff
path: root/libnm-core/nm-core-internal.h
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-03-02 17:10:25 +0100
committerThomas Haller <thaller@redhat.com>2019-03-07 22:22:39 +0100
commit0d178a968d7cbc4360a3c5274d21f7caa47a86d3 (patch)
tree06d85ad45143e997f0edb38cc1a83f04393e4773 /libnm-core/nm-core-internal.h
parent506a59b62e442f31857d954bca12f76202d0640c (diff)
downloadNetworkManager-0d178a968d7cbc4360a3c5274d21f7caa47a86d3.tar.gz
libnm: rename and expose nm_utils_base64secret_decode() in libnm
A NetworkManager client requires an API to validate and decode a base64 secret -- like it is used by WireGuard. If we don't have this as part of the API, it's inconvenient. Expose it. Rename it from _nm_utils_wireguard_decode_key(), to give it a more general name. Also, rename _nm_utils_wireguard_normalize_key() to nm_utils_base64secret_normalize(). But this one we keep as internal API. The user will care more about validating and decoding the base64 key. To convert the key back to base64, we don't need a public API in libnm. This is another ABI change since 1.16-rc1. (cherry picked from commit e46ba0186720bfe5e31dcad9a5001a415deb9ce6)
Diffstat (limited to 'libnm-core/nm-core-internal.h')
-rw-r--r--libnm-core/nm-core-internal.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/libnm-core/nm-core-internal.h b/libnm-core/nm-core-internal.h
index 168ae9978e..6e2a5b5e95 100644
--- a/libnm-core/nm-core-internal.h
+++ b/libnm-core/nm-core-internal.h
@@ -765,13 +765,9 @@ gboolean _nm_connection_find_secret (NMConnection *self,
#define nm_auto_unref_wgpeer nm_auto(_nm_auto_unref_wgpeer)
NM_AUTO_DEFINE_FCN_VOID0 (NMWireGuardPeer *, _nm_auto_unref_wgpeer, nm_wireguard_peer_unref)
-gboolean _nm_utils_wireguard_decode_key (const char *base64_key,
- gsize required_key_len,
- guint8 *out_key);
-
-gboolean _nm_utils_wireguard_normalize_key (const char *base64_key,
- gsize required_key_len,
- char **out_base64_key_norm);
+gboolean nm_utils_base64secret_normalize (const char *base64_key,
+ gsize required_key_len,
+ char **out_base64_key_norm);
/*****************************************************************************/