Mercurial > trustbridge
diff common/binverify.c @ 1395:a2574a029322
Fix Base 64 signature size calculation.
If the signature byte size is not equally dividable
by three the base 64 encoding needs three additional bytes.
The value is now fixed to avoid such errors in the future.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Mon, 26 Jan 2015 13:17:32 +0100 |
parents | f3e2df6b49ba |
children |
line wrap: on
line diff
--- a/common/binverify.c Fri Jan 23 15:25:50 2015 +0100 +++ b/common/binverify.c Mon Jan 26 13:17:32 2015 +0100 @@ -413,7 +413,7 @@ verify_binary_linux(const char *filename, size_t name_len) { int ret = -1; - const size_t sig_b64_size = TRUSTBRIDGE_RSA_CODESIGN_SIZE / 8 * 4 / 3; + const size_t sig_b64_size = TRUSTBRIDGE_RSA_CODESIGN_B64_SIZE; char *data = NULL, signature_b64[sig_b64_size + 1]; size_t data_size = 0,