summaryrefslogtreecommitdiff
path: root/libnm-core/nm-crypto-impl.h
Commit message (Collapse)AuthorAgeFilesLines
* all: SPDX header conversionLubomir Rintel2019-09-101-15/+1
| | | | | $ find * -type f |xargs perl contrib/scripts/spdx.pl $ git rm contrib/scripts/spdx.pl
* all: drop empty first line from sourcesThomas Haller2019-06-111-1/+0
| | | | git ls-files -z -- ':(exclude)src/settings/plugins/keyfile/tests/keyfiles' | xargs -0 -n1 sed -i '1 { /^$/d }'
* all: drop emacs file variables from source filesThomas Haller2019-06-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | We no longer add these. If you use Emacs, configure it yourself. Also, due to our "smart-tab" usage the editor anyway does a subpar job handling our tabs. However, on the upside every user can choose whatever tab-width he/she prefers. If "smart-tabs" are used properly (like we do), every tab-width will work. No manual changes, just ran commands: F=($(git grep -l -e '-\*-')) sed '1 { /\/\* *-\*- *[mM]ode.*\*\/$/d }' -i "${F[@]}" sed '1,4 { /^\(#\|--\|dnl\) *-\*- [mM]ode/d }' -i "${F[@]}" Check remaining lines with: git grep -e '-\*-' The ultimate purpose of this is to cleanup our files and eventually use SPDX license identifiers. For that, first get rid of the boilerplate lines.
* libnm/crypto: refactor to use enum for supported ciphersThomas Haller2018-09-041-2/+2
| | | | | | | | | We need to (and already did) define our own identifier for ciphers, because the gnutls/nss identifiers must be abstracted. Don't use a string for that. The number of supported ciphers is not generic but fixed and known at compiler time. An enum is better suited.
* libnm/crypto: remove unused argument key_type for decrypt functionsThomas Haller2018-09-041-1/+0
|
* libnm/crypto: adjust signature of crypto functionsThomas Haller2018-09-041-19/+19
| | | | | | | - avoid "const gsize" as type for function arguments. - consistently use "guint8 *" type for binary data, instead of "char *", which indicates a NUL terminated C string.
* libnm/crypto: rename crypto functions used for testing onlyThomas Haller2018-09-041-21/+23
| | | | | | | | - 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.
* libnm/crypto: rework _nm_crypto_verify_cert() to return booleanThomas Haller2018-09-041-3/+3
| | | | | | | | | Rename _nm_crypto_verify_cert() to _nm_crypto_verify_x509(). Also, don't let it return a NMCryptoFileFormat result. This function only checks for a particular format, hence it should only return true/false. Also, fix setting error output argument when the function fails.
* libnm/crypto: rename libnm crypto API to have consistent NM prefixThomas Haller2018-09-041-27/+39
| | | | | | | | Follow our convention, that items in headers are all named with an "NM" prefix. Also, "nm-crypto-impl.h" contains internal functions that are to be implemented by the corresponding crypto backends. Distinguish their names as well.
* libnm/crypto: add header "nm-crypto-impl.h" for crypto implementationThomas Haller2018-09-041-0/+61
There are two aspects: the public crypto API that is provided by "nm-crypto.h" header, and the internal header which crypto backends need to implement. Split them.