| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
#include "tls/s2n_certificate_keys.h" |
| 17 |
|
| 18 |
#include <openssl/objects.h> |
| 19 |
|
| 20 |
#include "utils/s2n_safety.h" |
| 21 |
|
| 22 |
const struct s2n_certificate_key s2n_rsa_rsae_1024 = { |
| 23 |
.public_key_libcrypto_nid = NID_rsaEncryption, |
| 24 |
.name = "rsa_1024", |
| 25 |
.bits = 1024, |
| 26 |
}; |
| 27 |
|
| 28 |
const struct s2n_certificate_key s2n_rsa_rsae_2048 = { |
| 29 |
.public_key_libcrypto_nid = NID_rsaEncryption, |
| 30 |
.name = "rsa_2048", |
| 31 |
.bits = 2048, |
| 32 |
}; |
| 33 |
|
| 34 |
const struct s2n_certificate_key s2n_rsa_rsae_3072 = { |
| 35 |
.public_key_libcrypto_nid = NID_rsaEncryption, |
| 36 |
.name = "rsa_3072", |
| 37 |
.bits = 3072, |
| 38 |
}; |
| 39 |
|
| 40 |
const struct s2n_certificate_key s2n_rsa_rsae_4096 = { |
| 41 |
.public_key_libcrypto_nid = NID_rsaEncryption, |
| 42 |
.name = "rsa_4096", |
| 43 |
.bits = 4096, |
| 44 |
}; |
| 45 |
|
| 46 |
const struct s2n_certificate_key s2n_rsa_pss_1024 = { |
| 47 |
.public_key_libcrypto_nid = NID_rsassaPss, |
| 48 |
.name = "rsa_pss_1024", |
| 49 |
.bits = 1024, |
| 50 |
}; |
| 51 |
|
| 52 |
const struct s2n_certificate_key s2n_rsa_pss_2048 = { |
| 53 |
.public_key_libcrypto_nid = NID_rsassaPss, |
| 54 |
.name = "rsa_pss_2048", |
| 55 |
.bits = 2048, |
| 56 |
}; |
| 57 |
|
| 58 |
const struct s2n_certificate_key s2n_rsa_pss_3072 = { |
| 59 |
.public_key_libcrypto_nid = NID_rsassaPss, |
| 60 |
.name = "rsa_pss_3072", |
| 61 |
.bits = 3072, |
| 62 |
}; |
| 63 |
|
| 64 |
const struct s2n_certificate_key s2n_rsa_pss_4096 = { |
| 65 |
.public_key_libcrypto_nid = NID_rsassaPss, |
| 66 |
.name = "rsa_pss_4096", |
| 67 |
.bits = 4096, |
| 68 |
}; |
| 69 |
|
| 70 |
const struct s2n_certificate_key s2n_ec_p256 = { |
| 71 |
.public_key_libcrypto_nid = NID_X9_62_prime256v1, |
| 72 |
.name = "ecdsa_p256", |
| 73 |
.bits = 256, |
| 74 |
}; |
| 75 |
|
| 76 |
const struct s2n_certificate_key s2n_ec_p384 = { |
| 77 |
.public_key_libcrypto_nid = NID_secp384r1, |
| 78 |
.name = "ecdsa_p384", |
| 79 |
.bits = 384, |
| 80 |
}; |
| 81 |
|
| 82 |
const struct s2n_certificate_key s2n_ec_p521 = { |
| 83 |
.public_key_libcrypto_nid = NID_secp521r1, |
| 84 |
.name = "ecdsa_p521", |
| 85 |
.bits = 521, |
| 86 |
}; |
| 87 |
|
| 88 |
const struct s2n_certificate_key s2n_mldsa_87 = { |
| 89 |
#if S2N_LIBCRYPTO_SUPPORTS_MLDSA |
| 90 |
.public_key_libcrypto_nid = NID_PQDSA, |
| 91 |
#else |
| 92 |
.public_key_libcrypto_nid = NID_undef, |
| 93 |
#endif |
| 94 |
.name = "mldsa_87", |
| 95 |
.bits = 20736, |
| 96 |
}; |
| 97 |
|
| 98 |
const struct s2n_certificate_key *s2n_certificate_keys_20250429[] = { |
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
&s2n_ec_p384, |
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
&s2n_rsa_rsae_3072, |
| 111 |
&s2n_rsa_rsae_4096, |
| 112 |
&s2n_rsa_pss_3072, |
| 113 |
&s2n_rsa_pss_4096, |
| 114 |
}; |
| 115 |
|
| 116 |
struct s2n_certificate_key_preferences s2n_certificate_key_preferences_20250429 = { |
| 117 |
.count = s2n_array_len(s2n_certificate_keys_20250429), |
| 118 |
.certificate_keys = s2n_certificate_keys_20250429, |
| 119 |
}; |
| 120 |
|
| 121 |
const struct s2n_certificate_key *s2n_certificate_keys_20260219[] = { |
| 122 |
|
| 123 |
&s2n_mldsa_87, |
| 124 |
}; |
| 125 |
|
| 126 |
struct s2n_certificate_key_preferences s2n_certificate_key_preferences_20260219 = { |
| 127 |
.count = s2n_array_len(s2n_certificate_keys_20260219), |
| 128 |
.certificate_keys = s2n_certificate_keys_20260219, |
| 129 |
}; |
| 130 |
|
| 131 |
const struct s2n_certificate_key *s2n_certificate_keys_20260220[] = { |
| 132 |
|
| 133 |
&s2n_mldsa_87, |
| 134 |
|
| 135 |
|
| 136 |
&s2n_ec_p384, |
| 137 |
&s2n_rsa_rsae_3072, |
| 138 |
&s2n_rsa_rsae_4096, |
| 139 |
&s2n_rsa_pss_3072, |
| 140 |
&s2n_rsa_pss_4096, |
| 141 |
}; |
| 142 |
|
| 143 |
struct s2n_certificate_key_preferences s2n_certificate_key_preferences_20260220 = { |
| 144 |
.count = s2n_array_len(s2n_certificate_keys_20260220), |
| 145 |
.certificate_keys = s2n_certificate_keys_20260220, |
| 146 |
}; |