annotate common/pubkey-test.h @ 1076:96e448e1cc9f

(issue116) Add error message when selftest failed
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 11 Sep 2014 10:26:07 +0200
parents 7861950f7637
children c64b6c56ce96
rev   line source
404
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 28
diff changeset
1 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 28
diff changeset
2 * Software engineering by Intevation GmbH
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 28
diff changeset
3 *
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 28
diff changeset
4 * This file is Free Software under the GNU GPL (v>=2)
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 28
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY!
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 28
diff changeset
6 * See LICENSE.txt for details.
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 28
diff changeset
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
7861950f7637 Make RSA Keysize definiable
Andre Heinecke <andre.heinecke@intevation.de>
parents: 758
diff changeset
13
28
e783fd99a9eb Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
14 /* PEM encoded public key */
e783fd99a9eb Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
15 static const unsigned char public_key_pem[] =
e783fd99a9eb Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
16 "-----BEGIN PUBLIC KEY-----\n"
e783fd99a9eb Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
17 "MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAljObDbSjuYULdW9TtAzl\n"
e783fd99a9eb Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
18 "LqopCVdbCTa+j5Vc+SM9damMrpWrKXW7X+PnZstboKJRyENLqUUwgkQYmtD9CzDU\n"
e783fd99a9eb Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
19 "HKUqZFQHnnmNjN5FaYEcMG4rcL+Y9BUUIcxMogboeS6UuUnRHH0eZlNd5m7CYhL6\n"
e783fd99a9eb Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
20 "y2sD4umJ+lx//K7Rh/qsamjEQHyTX4GeNJnoU6sRu17emGoPi37ACUXguv5D6KMY\n"
e783fd99a9eb Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
21 "4FVSlObuYGe1r2RDl2E/EKTgJfXy+NsQswvChtyFVOS/1wv5cLwNFher1ttVP1Oj\n"
e783fd99a9eb Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
22 "2ma0sLe4qZlSpNpG6bD9oZzCmwqKAuAZIY9dZNXgoAsnClqR1mdvii6zwI/k+bdy\n"
e783fd99a9eb Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
23 "4aPqlNGjyeCXLGAzsZeyxzL7Ka09omr6OE4/okhaaj47xRPsODW7cDwF7kphHmoG\n"
e783fd99a9eb Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
24 "IPbDs5Wc6PlYcS9triMyCDYSvwjjsZsYfSaNt8zu2fHrXQC+/ssvRUVvNHPncqUH\n"
e783fd99a9eb Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
25 "sEEsfE/qhfQCZTgd/nw3/No4IRQX7spowGhnwtP/qsQTAgMBAAE=\n"
e783fd99a9eb Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
26 "-----END PUBLIC KEY-----\n";
e783fd99a9eb Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
27
e783fd99a9eb Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
28 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
29
facb13c578f1 Add certificate pinning to verify_binary_win
Andre Heinecke <andre.heinecke@intevation.de>
parents: 404
diff changeset
30 /* Key used for codesigning */
facb13c578f1 Add certificate pinning to verify_binary_win
Andre Heinecke <andre.heinecke@intevation.de>
parents: 404
diff changeset
31 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
32 "-----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
33 "MIIFKTCCAxGgAwIBAgIBATANBgkqhkiG9w0BAQUFADBZMSAwHgYDVQQDExdQdWJs\n"
629
facb13c578f1 Add certificate pinning to verify_binary_win
Andre Heinecke <andre.heinecke@intevation.de>
parents: 404
diff changeset
34 "aWMgVHJ1c3RCcmlkZ2UgVGVzdDEoMCYGA1UEChMfUHVibGljIHNlY3JldCBkbyBu\n"
facb13c578f1 Add certificate pinning to verify_binary_win
Andre Heinecke <andre.heinecke@intevation.de>
parents: 404
diff changeset
35 "b3QgdHJ1c3QgdGhpczELMAkGA1UEBhMCREUwHhcNMTMwMTAxMDAwMDAwWhcNMTUx\n"
facb13c578f1 Add certificate pinning to verify_binary_win
Andre Heinecke <andre.heinecke@intevation.de>
parents: 404
diff changeset
36 "MjMxMjM1OTU5WjBlMSwwKgYDVQQDEyNQdWJsaWMgVHJ1c3RCcmlkZ2UgY29kZXNp\n"
facb13c578f1 Add certificate pinning to verify_binary_win
Andre Heinecke <andre.heinecke@intevation.de>
parents: 404
diff changeset
37 "Z25pbmcgdGVzdDEoMCYGA1UEChMfUHVibGljIHNlY3JldCBkbyBub3QgdHJ1c3Qg\n"
758
f56c4869aa18 Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 629
diff changeset
38 "dGhpczELMAkGA1UEBhMCREUwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIB\n"
f56c4869aa18 Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 629
diff changeset
39 "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
40 "eYL6wQoIFPjGPqASuQknBaUCM1XCzVu86jiluVCeN4MYbl1nr6f8rDHiK0iJL4mu\n"
f56c4869aa18 Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 629
diff changeset
41 "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
42 "onQ2wBar8b3LWdvhFXqgrYaqcHX6SCn5xaoYn7xb7Gq7lD3LeSQlbgZtUv6mv+H9\n"
f56c4869aa18 Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 629
diff changeset
43 "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
44 "4BbPYHv0EGQBXRtH+bzqgdUfMZkQU7lIgOIDskmeZo2ovYfpkUTyujsLPOVcHEx8\n"
f56c4869aa18 Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 629
diff changeset
45 "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
46 "+PmmYdEm0UZ8BdheQ9UxIajVt9eOxWg3v5ak0o4LdZf0lAH7H6yOIO8AZEaJ/8Nz\n"
f56c4869aa18 Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 629
diff changeset
47 "wNsCAwEAAaNwMG4wCQYDVR0TBAIwADAdBgNVHQ4EFgQUCsyNwGUNmueV2MfSimlR\n"
f56c4869aa18 Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 629
diff changeset
48 "OGBI66kwHwYDVR0jBBgwFoAU5f5GRkaGtHJvNs1uwj598qpODHkwDgYDVR0PAQEB\n"
f56c4869aa18 Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 629
diff changeset
49 "BAQDAgGAMBEGCWCGSAGG+EIBAQQEAwIAEDANBgkqhkiG9w0BAQUFAAOCAgEAmhpe\n"
f56c4869aa18 Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 629
diff changeset
50 "dcdqXCwdhNy2sPUxsBGxvU5qdyxgVoTSpaISr1RIZrTTKISWcfTjs2r9/fyjAIER\n"
f56c4869aa18 Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 629
diff changeset
51 "tXbHYy9pbEG6ILejVRq05dmBMoLD5zrSyEo6C54K045Lwz7rXndw9xJnkv5eT2B+\n"
f56c4869aa18 Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 629
diff changeset
52 "YWta2h+pwWG1yqaxVDFOUhsTTIR0yBlA2SADXDQejbdSk9n1EoDqCFV5Wn41kP8c\n"
f56c4869aa18 Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 629
diff changeset
53 "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
54 "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
55 "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
56 "UKKWtIadGp6IHz712xpP5wr2dtkiGvkJVIm44edrNJMH0HHFlVpt7xuMhALuzTK0\n"
f56c4869aa18 Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 629
diff changeset
57 "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
58 "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
59 "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
60 "Y8w7FNHYMiaw2xII1Fcrv7nmO+tysu+GhJ04oj4=\n"
629
facb13c578f1 Add certificate pinning to verify_binary_win
Andre Heinecke <andre.heinecke@intevation.de>
parents: 404
diff changeset
61 "-----END CERTIFICATE-----\n";
facb13c578f1 Add certificate pinning to verify_binary_win
Andre Heinecke <andre.heinecke@intevation.de>
parents: 404
diff changeset
62
758
f56c4869aa18 Switch to 3072 bit RSA keys for codesigning as specified.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 629
diff changeset
63 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
64
28
e783fd99a9eb Add public key parsing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
65 #endif

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