summaryrefslogtreecommitdiff
path: root/libnm-core/nm-crypto-nss.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-08-30 21:08:47 +0200
committerThomas Haller <thaller@redhat.com>2018-09-04 07:38:30 +0200
commit67f36f880e58d1c13377cd985e6735087c88bf7a (patch)
tree2d4b9884e75897219ac2cbb9a6e1466e44cbce8e /libnm-core/nm-crypto-nss.c
parentb91e60b1d686c48455a8b231e6eb7a81d0f29340 (diff)
downloadNetworkManager-67f36f880e58d1c13377cd985e6735087c88bf7a.tar.gz
libnm/crypto: rename crypto functions used for testing only
- drop nm_crypto_encrypt(). It's not actually used outside of "nm-crypto.c". - rename internal _nm_crypto_*() functions that are only used in tests. It's so much nicer to visually recognize functions that are used for testing only.
Diffstat (limited to 'libnm-core/nm-crypto-nss.c')
-rw-r--r--libnm-core/nm-crypto-nss.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/libnm-core/nm-crypto-nss.c b/libnm-core/nm-crypto-nss.c
index fb55b95896..6ddc442862 100644
--- a/libnm-core/nm-crypto-nss.c
+++ b/libnm-core/nm-crypto-nss.c
@@ -72,16 +72,16 @@ _nm_crypto_init (GError **error)
}
char *
-_nm_crypto_decrypt (const char *cipher,
- int key_type,
- const guint8 *data,
- gsize data_len,
- const char *iv,
- const gsize iv_len,
- const char *key,
- const gsize key_len,
- gsize *out_len,
- GError **error)
+_nmtst_crypto_decrypt (const char *cipher,
+ int key_type,
+ const guint8 *data,
+ gsize data_len,
+ const char *iv,
+ const gsize iv_len,
+ const char *key,
+ const gsize key_len,
+ gsize *out_len,
+ GError **error)
{
char *output = NULL;
int decrypted_len = 0;
@@ -243,15 +243,15 @@ out:
}
char *
-_nm_crypto_encrypt (const char *cipher,
- const guint8 *data,
- gsize data_len,
- const char *iv,
- gsize iv_len,
- const char *key,
- gsize key_len,
- gsize *out_len,
- GError **error)
+_nmtst_crypto_encrypt (const char *cipher,
+ const guint8 *data,
+ gsize data_len,
+ const char *iv,
+ gsize iv_len,
+ const char *key,
+ gsize key_len,
+ gsize *out_len,
+ GError **error)
{
SECStatus ret;
CK_MECHANISM_TYPE cipher_mech = CKM_DES3_CBC_PAD;