summaryrefslogtreecommitdiffstats
path: root/crypto/cipher-nettle.c.inc
Commit message (Collapse)AuthorAgeFilesLines
* crypto: Move cipher->driver init to qcrypto_*_cipher_ctx_newRichard Henderson2020-09-101-0/+3
| | | | | | | | | The class vtable should be set by the class initializer. This will also allow additional subclassing, reducing the amount of indirection in the hierarchy. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* crypto: Allocate QCryptoCipher with the subclassRichard Henderson2020-09-101-11/+13
| | | | | | | | Merge the allocation of "opaque" into the allocation of "cipher". This is step one in reducing the indirection in these classes. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* crypto: Use the correct const type for driverRichard Henderson2020-09-101-1/+1
| | | | | | | This allows the in memory structures to be read-only. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* crypto/nettle: Fix xts_encrypt argumentsRichard Henderson2020-09-101-1/+1
| | | | | | | | The fourth argument to xts_encrypt should be the decrypt callback; we were accidentally passing encrypt twice. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* crypto: Remove redundant includesRichard Henderson2020-09-101-2/+0Star
| | | | | | | | | Both qemu/osdep.h and cipherpriv.h have already been included by the parent cipher.c. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* crypto: Rename cipher include files to .c.incRichard Henderson2020-09-101-0/+734
QEMU standard procedure for included c files is to use *.c.inc. E.g. there are a different set of checks that are applied. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>