commit | 3a661f1eabf7e8db66e28489884d9b54aacb94ea | [log] [tgz] |
---|---|---|
author | Daniel P. Berrange <berrange@redhat.com> | Fri Oct 16 16:35:06 2015 +0100 |
committer | Daniel P. Berrange <berrange@redhat.com> | Thu Oct 22 19:03:08 2015 +0100 |
tree | 4a0b45548a6eb797c9c254797f065b2b5cd9b33e | |
parent | eb2a770b178b9040c3fc04ee31dc38d1775db09a [diff] |
crypto: add sanity checking of plaintext/ciphertext length When encrypting/decrypting data, the plaintext/ciphertext buffers are required to be a multiple of the cipher block size. If this is not done, nettle will abort and gcrypt will report an error. To get consistent behaviour add explicit checks upfront for the buffer sizes. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>