comparison 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
comparison
equal deleted inserted replaced
1394:8d27c6d226cd 1395:a2574a029322
9 #define PUBKEY_RELEASE_H 9 #define PUBKEY_RELEASE_H
10 10
11 /**@def The size of the RSA modulus */ 11 /**@def The size of the RSA modulus */
12 #define TRUSTBRIDGE_RSA_KEY_SIZE 3072 12 #define TRUSTBRIDGE_RSA_KEY_SIZE 3072
13 #define TRUSTBRIDGE_RSA_CODESIGN_SIZE 2048 13 #define TRUSTBRIDGE_RSA_CODESIGN_SIZE 2048
14
15 /** @def the size of the base 64 encoded signature.
16 * The formula for this is modulus / 8 * 4 / 3
17 * +3 if this is not equaly devidable by 3. */
18 #define TRUSTBRIDGE_RSA_CODESIGN_B64_SIZE 344
19 #define TRUSTBRIDGE_RSA_B64_SIZE 512
14 20
15 static const unsigned char public_key_pem[] = 21 static const unsigned char public_key_pem[] =
16 "-----BEGIN PUBLIC KEY-----\n" 22 "-----BEGIN PUBLIC KEY-----\n"
17 "MIIDITANBgkqhkiG9w0BAQEFAAOCAw4AMIIDCQKCAYEArRkubwwOjaXo80+J1P6s\n" 23 "MIIDITANBgkqhkiG9w0BAQEFAAOCAw4AMIIDCQKCAYEArRkubwwOjaXo80+J1P6s\n"
18 "Vgj4FbZmA80ZtThEyMDHV3kRjxduGkFspqtArOg/XxqAxkxIXVZexs9BbXCvX8sk\n" 24 "Vgj4FbZmA80ZtThEyMDHV3kRjxduGkFspqtArOg/XxqAxkxIXVZexs9BbXCvX8sk\n"

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