Debian Codegraph @

misc/signingkeys.h

raw symbols SCIP
1 #ifndef CPP_UTILITIES_MISC_SIGNINGKEYS_H
2 #define CPP_UTILITIES_MISC_SIGNINGKEYS_H
3
4 #include <array>
5 #include <string_view>
6
7 namespace CppUtilities {
8
9 /*!
10 * \brief Contains signing keys for verifying releases via OpenSSL or stsigtool.
11 * \remarks
12 * - Check out the header file `verification.h` which contains the function verifySignature() for
13 * verification with OpenSSL.
14 * - Check out the Syncthing library contained in Syncthing Tray for verification with stsigtool.
15 * - The arrays may contain more than one key, e.g. when rotatiung keys and an old key is in progress
16 * of being phased out.
17 * - The concrete type of the contained key variables will change when the number of keys changes.
18 * So do *not* use it in e.g. a function signature or member variable that will become part of
19 * some public API/ABI. The variable is mereley supposed to be passed to verifySignature().
20 * - This namespace is experimental and its members might be changed in incompatible ways (API and ABI
21 * wise) or be completely removed in further minor/patch releases.
22 */
23 namespace SigningKeys {
24
25 // clang-format off
26 constexpr auto stsigtool = std::array<std::string_view, 1>{
27 std::string_view(
28 R"(-----BEGIN EC PUBLIC KEY-----
29 MIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQBzGxkQSS43eE4r+A7HjlcEch5apsn
30 fKOgJWaRE2TOD9dNoBO2RSaJEAzzOXg2BPMsiPdr+Ty99FZtX8fmIcgJHGoB3sE1
31 PmSOaw3YWAXrHUYslrVRJI4iYCLuT4qjFMHgmqvphEE/zGDZ5Tyu6FwVlSjCO4Yy
32 FdsjpzKV6nrX6EsK++o=
33 -----END EC PUBLIC KEY-----
34 )")
35 };
36
37 constexpr auto openssl = std::array<std::string_view, 1>{
38 std::string_view(
39 R"(-----BEGIN PUBLIC KEY-----
40 MIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQAWJAn1E7ZE5Q6H69oaV5sqCIppJdg
41 4bXDan9dJv6GOg70/t7q2CvwcwUXhV4FvCZxCHo25+rWYINfqKU2Utul8koAx8tK
42 59ohfOzI63I+CC76GfX41uRGU0P5i6hS7o/hgBLiVXqT0FgS2BMfmnLMUvUjqnI2
43 YQM7C55/5BM5Vrblkow=
44 -----END PUBLIC KEY-----
45 )")
46 };
47 // clang-format on
48
49 } // namespace SigningKeys
50 } // namespace CppUtilities
51
52 #endif // CPP_UTILITIES_MISC_SIGNINGKEYS_H