diff common/pubkey-release.h @ 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 c64b6c56ce96
children
line wrap: on
line diff
--- a/common/pubkey-release.h	Fri Jan 23 15:25:50 2015 +0100
+++ b/common/pubkey-release.h	Mon Jan 26 13:17:32 2015 +0100
@@ -12,6 +12,12 @@
 #define TRUSTBRIDGE_RSA_KEY_SIZE 3072
 #define TRUSTBRIDGE_RSA_CODESIGN_SIZE 2048
 
+/** @def the size of the base 64 encoded signature.
+ * The formula for this is modulus / 8 * 4 / 3
+ * +3 if this is not equaly devidable by 3. */
+#define TRUSTBRIDGE_RSA_CODESIGN_B64_SIZE 344
+#define TRUSTBRIDGE_RSA_B64_SIZE 512
+
 static const unsigned char public_key_pem[] =
 "-----BEGIN PUBLIC KEY-----\n"
 "MIIDITANBgkqhkiG9w0BAQEFAAOCAw4AMIIDCQKCAYEArRkubwwOjaXo80+J1P6s\n"

http://wald.intevation.org/projects/trustbridge/