Mercurial > trustbridge
annotate common/pubkey-test.h @ 1396:05c62ad0c74f 0.9.10
Change error to debug for an expected failure.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Mon, 26 Jan 2015 14:28:13 +0100 |
parents | a2574a029322 |
children |
rev | line source |
---|---|
404 | 1 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik |
2 * Software engineering by Intevation GmbH | |
3 * | |
4 * This file is Free Software under the GNU GPL (v>=2) | |
5 * and comes with ABSOLUTELY NO WARRANTY! | |
6 * See LICENSE.txt for details. | |
7 */ | |
28
e783fd99a9eb
Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
8 #ifndef PUBKEY_TEST_H |
e783fd99a9eb
Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
9 #define PUBKEY_TEST_H |
e783fd99a9eb
Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
10 |
770
7861950f7637
Make RSA Keysize definiable
Andre Heinecke <andre.heinecke@intevation.de>
parents:
758
diff
changeset
|
11 /**@def The size of the RSA modulus */ |
7861950f7637
Make RSA Keysize definiable
Andre Heinecke <andre.heinecke@intevation.de>
parents:
758
diff
changeset
|
12 #define TRUSTBRIDGE_RSA_KEY_SIZE 3072 |
1387
c64b6c56ce96
(issue95) Change keys for release build. Fix release build usage.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
770
diff
changeset
|
13 #define TRUSTBRIDGE_RSA_CODESIGN_SIZE 2048 |
770
7861950f7637
Make RSA Keysize definiable
Andre Heinecke <andre.heinecke@intevation.de>
parents:
758
diff
changeset
|
14 |
1395
a2574a029322
Fix Base 64 signature size calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1387
diff
changeset
|
15 /** @def the size of the base 64 encoded signature. |
a2574a029322
Fix Base 64 signature size calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1387
diff
changeset
|
16 * The formula for this is modulus / 8 * 4 / 3 |
a2574a029322
Fix Base 64 signature size calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1387
diff
changeset
|
17 * +3 if this is not equaly devidable by 3. */ |
a2574a029322
Fix Base 64 signature size calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1387
diff
changeset
|
18 #define TRUSTBRIDGE_RSA_CODESIGN_B64_SIZE 344 |
a2574a029322
Fix Base 64 signature size calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1387
diff
changeset
|
19 #define TRUSTBRIDGE_RSA_B64_SIZE 512 |
a2574a029322
Fix Base 64 signature size calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1387
diff
changeset
|
20 |
28
e783fd99a9eb
Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
21 /* PEM encoded public key */ |
e783fd99a9eb
Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
22 static const unsigned char public_key_pem[] = |
e783fd99a9eb
Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
23 "-----BEGIN PUBLIC KEY-----\n" |
e783fd99a9eb
Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
24 "MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAljObDbSjuYULdW9TtAzl\n" |
e783fd99a9eb
Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
25 "LqopCVdbCTa+j5Vc+SM9damMrpWrKXW7X+PnZstboKJRyENLqUUwgkQYmtD9CzDU\n" |
e783fd99a9eb
Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
26 "HKUqZFQHnnmNjN5FaYEcMG4rcL+Y9BUUIcxMogboeS6UuUnRHH0eZlNd5m7CYhL6\n" |
e783fd99a9eb
Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
27 "y2sD4umJ+lx//K7Rh/qsamjEQHyTX4GeNJnoU6sRu17emGoPi37ACUXguv5D6KMY\n" |
e783fd99a9eb
Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
28 "4FVSlObuYGe1r2RDl2E/EKTgJfXy+NsQswvChtyFVOS/1wv5cLwNFher1ttVP1Oj\n" |
e783fd99a9eb
Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
29 "2ma0sLe4qZlSpNpG6bD9oZzCmwqKAuAZIY9dZNXgoAsnClqR1mdvii6zwI/k+bdy\n" |
e783fd99a9eb
Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
30 "4aPqlNGjyeCXLGAzsZeyxzL7Ka09omr6OE4/okhaaj47xRPsODW7cDwF7kphHmoG\n" |
e783fd99a9eb
Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
31 "IPbDs5Wc6PlYcS9triMyCDYSvwjjsZsYfSaNt8zu2fHrXQC+/ssvRUVvNHPncqUH\n" |
e783fd99a9eb
Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
32 "sEEsfE/qhfQCZTgd/nw3/No4IRQX7spowGhnwtP/qsQTAgMBAAE=\n" |
e783fd99a9eb
Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
33 "-----END PUBLIC KEY-----\n"; |
e783fd99a9eb
Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
34 |
e783fd99a9eb
Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
35 static const size_t public_key_pem_size = 625; |
629
facb13c578f1
Add certificate pinning to verify_binary_win
Andre Heinecke <andre.heinecke@intevation.de>
parents:
404
diff
changeset
|
36 |
facb13c578f1
Add certificate pinning to verify_binary_win
Andre Heinecke <andre.heinecke@intevation.de>
parents:
404
diff
changeset
|
37 /* Key used for codesigning */ |
facb13c578f1
Add certificate pinning to verify_binary_win
Andre Heinecke <andre.heinecke@intevation.de>
parents:
404
diff
changeset
|
38 static const unsigned char public_key_codesign_pem[] = |
facb13c578f1
Add certificate pinning to verify_binary_win
Andre Heinecke <andre.heinecke@intevation.de>
parents:
404
diff
changeset
|
39 "-----BEGIN CERTIFICATE-----\n" |
758
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
40 "MIIFKTCCAxGgAwIBAgIBATANBgkqhkiG9w0BAQUFADBZMSAwHgYDVQQDExdQdWJs\n" |
629
facb13c578f1
Add certificate pinning to verify_binary_win
Andre Heinecke <andre.heinecke@intevation.de>
parents:
404
diff
changeset
|
41 "aWMgVHJ1c3RCcmlkZ2UgVGVzdDEoMCYGA1UEChMfUHVibGljIHNlY3JldCBkbyBu\n" |
facb13c578f1
Add certificate pinning to verify_binary_win
Andre Heinecke <andre.heinecke@intevation.de>
parents:
404
diff
changeset
|
42 "b3QgdHJ1c3QgdGhpczELMAkGA1UEBhMCREUwHhcNMTMwMTAxMDAwMDAwWhcNMTUx\n" |
facb13c578f1
Add certificate pinning to verify_binary_win
Andre Heinecke <andre.heinecke@intevation.de>
parents:
404
diff
changeset
|
43 "MjMxMjM1OTU5WjBlMSwwKgYDVQQDEyNQdWJsaWMgVHJ1c3RCcmlkZ2UgY29kZXNp\n" |
facb13c578f1
Add certificate pinning to verify_binary_win
Andre Heinecke <andre.heinecke@intevation.de>
parents:
404
diff
changeset
|
44 "Z25pbmcgdGVzdDEoMCYGA1UEChMfUHVibGljIHNlY3JldCBkbyBub3QgdHJ1c3Qg\n" |
758
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
45 "dGhpczELMAkGA1UEBhMCREUwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIB\n" |
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
46 "gQDtK3Ow4W0t9UbfrLB/nlQy2X9ejc8McCw2C0vwq1eFs+d8zv7nhzCaFiBN88C/\n" |
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
47 "eYL6wQoIFPjGPqASuQknBaUCM1XCzVu86jiluVCeN4MYbl1nr6f8rDHiK0iJL4mu\n" |
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
48 "ROQ+FhsRsiKpRPhR8/sp5INlgqC2XBUrQ5zde6Yh3gRajjESRdcfOWIaO4vBXIo8\n" |
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
49 "onQ2wBar8b3LWdvhFXqgrYaqcHX6SCn5xaoYn7xb7Gq7lD3LeSQlbgZtUv6mv+H9\n" |
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
50 "LlLgC52Sr9R5JfvomQC6R6l+mXKWrtlxYo3VndQ/Sn603IOXOV6aAswfXDoD3iOM\n" |
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
51 "4BbPYHv0EGQBXRtH+bzqgdUfMZkQU7lIgOIDskmeZo2ovYfpkUTyujsLPOVcHEx8\n" |
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
52 "9MtGiZmzprYuiGXDtJ2sam9KHK4+Mastk4L4k+Qz1wbHMj49VW4Q9iXDgWOkKiFH\n" |
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
53 "+PmmYdEm0UZ8BdheQ9UxIajVt9eOxWg3v5ak0o4LdZf0lAH7H6yOIO8AZEaJ/8Nz\n" |
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
54 "wNsCAwEAAaNwMG4wCQYDVR0TBAIwADAdBgNVHQ4EFgQUCsyNwGUNmueV2MfSimlR\n" |
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
55 "OGBI66kwHwYDVR0jBBgwFoAU5f5GRkaGtHJvNs1uwj598qpODHkwDgYDVR0PAQEB\n" |
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
56 "BAQDAgGAMBEGCWCGSAGG+EIBAQQEAwIAEDANBgkqhkiG9w0BAQUFAAOCAgEAmhpe\n" |
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
57 "dcdqXCwdhNy2sPUxsBGxvU5qdyxgVoTSpaISr1RIZrTTKISWcfTjs2r9/fyjAIER\n" |
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
58 "tXbHYy9pbEG6ILejVRq05dmBMoLD5zrSyEo6C54K045Lwz7rXndw9xJnkv5eT2B+\n" |
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
59 "YWta2h+pwWG1yqaxVDFOUhsTTIR0yBlA2SADXDQejbdSk9n1EoDqCFV5Wn41kP8c\n" |
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
60 "AujPCoVgXBhsIKzfKpOFBLYOXVSL5WtoHZ/hFH1e3qF4P/SyHhnKU5OQ2bqO0Pf7\n" |
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
61 "VACBnqYVCiGvzjOqwIkllSdv5vds++XkaSDPTIsrPdFH7BD1Jowd0e7UQ+ItLA8A\n" |
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
62 "G5iuO0pcRYSCvRA9tc1uTfws0WwHom4nhPsO46KNms+8g+/NOFjEMOYw15cFHk+U\n" |
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
63 "UKKWtIadGp6IHz712xpP5wr2dtkiGvkJVIm44edrNJMH0HHFlVpt7xuMhALuzTK0\n" |
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
64 "uwagUu9+KVU/EWzDF1BkVyZ72d36oUxrt0mK0GuUe89RSwK87kutS0+ophmiBX+x\n" |
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
65 "QMNSVIGr8MdXoGx52zo70qfZcjr/4sjL5YSrecYr2i3Rt5cU3y6xIgTXSPD9+cOm\n" |
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
66 "9M/8Xck6vDKTAy0LE+TFXLCEusKSSZ6JgcC9ItihcxsCEUvUbifbYdEvgIIJhmFj\n" |
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
67 "Y8w7FNHYMiaw2xII1Fcrv7nmO+tysu+GhJ04oj4=\n" |
629
facb13c578f1
Add certificate pinning to verify_binary_win
Andre Heinecke <andre.heinecke@intevation.de>
parents:
404
diff
changeset
|
68 "-----END CERTIFICATE-----\n"; |
facb13c578f1
Add certificate pinning to verify_binary_win
Andre Heinecke <andre.heinecke@intevation.de>
parents:
404
diff
changeset
|
69 |
758
f56c4869aa18
Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
629
diff
changeset
|
70 static const size_t public_key_codesign_pem_size = 1850; |
629
facb13c578f1
Add certificate pinning to verify_binary_win
Andre Heinecke <andre.heinecke@intevation.de>
parents:
404
diff
changeset
|
71 |
28
e783fd99a9eb
Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
72 #endif |