diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2021-07-05 20:36:07 +0200 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2021-07-05 20:36:07 +0200 |
| commit | 5d67593e4f1329fc32a36adc5dbc445e7c606bd1 (patch) | |
| tree | 5f470f020ca8f1240ddc29b11912fee174f5d68c /src/libnm-core-impl/nm-crypto-impl.h | |
| parent | 9996e637dc976a77c36f07c6debb737f9a5df0b7 (diff) | |
| parent | 35779c6675728fa6f0fd0a21cefb904408509c23 (diff) | |
Update upstream source from tag 'upstream/1.32.2'
Update to upstream version '1.32.2' with Debian dir db5d9d9657d75d750d835860e38c6af24cc54472
Diffstat (limited to 'src/libnm-core-impl/nm-crypto-impl.h')
| -rw-r--r-- | src/libnm-core-impl/nm-crypto-impl.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/libnm-core-impl/nm-crypto-impl.h b/src/libnm-core-impl/nm-crypto-impl.h new file mode 100644 index 00000000..0fd8f194 --- /dev/null +++ b/src/libnm-core-impl/nm-crypto-impl.h @@ -0,0 +1,49 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Dan Williams <dcbw@redhat.com> + * Copyright (C) 2007 - 2018 Red Hat, Inc. + */ + +#ifndef __NM_CRYPTO_IMPL_H__ +#define __NM_CRYPTO_IMPL_H__ + +#include "nm-crypto.h" + +gboolean _nm_crypto_init(GError **error); + +gboolean _nm_crypto_randomize(void *buffer, gsize buffer_len, GError **error); + +gboolean _nm_crypto_verify_x509(const guint8 *data, gsize len, GError **error); + +gboolean +_nm_crypto_verify_pkcs12(const guint8 *data, gsize data_len, const char *password, GError **error); + +gboolean _nm_crypto_verify_pkcs8(const guint8 *data, + gsize data_len, + gboolean is_encrypted, + const char * password, + GError ** error); + +/*****************************************************************************/ + +guint8 *_nmtst_crypto_encrypt(NMCryptoCipherType cipher, + const guint8 * data, + gsize data_len, + const guint8 * iv, + gsize iv_len, + const guint8 * key, + gsize key_len, + gsize * out_len, + GError ** error); + +guint8 *_nmtst_crypto_decrypt(NMCryptoCipherType cipher, + const guint8 * data, + gsize data_len, + const guint8 * iv, + gsize iv_len, + const guint8 * key, + gsize key_len, + gsize * out_len, + GError ** error); + +#endif /* __NM_CRYPTO_IMPL_H__ */ |