]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
ASN.1: More OID definitions
authorJouni Malinen <jouni@codeaurora.org>
Fri, 31 Jan 2020 15:10:48 +0000 (17:10 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 31 Jan 2020 21:16:05 +0000 (23:16 +0200)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/tls/asn1.c
src/tls/asn1.h

index 54c17deaec9d851e2812666c5ce2288eb4aa7f37..0d8dd44ec9dc3926cefd52b0273f1011a219f3fc 100644 (file)
 #include "common.h"
 #include "asn1.h"
 
-struct asn1_oid asn1_sha1_oid = {
+const struct asn1_oid asn1_sha1_oid = {
        .oid = { 1, 3, 14, 3, 2, 26 },
        .len = 6
 };
 
-struct asn1_oid asn1_sha256_oid = {
+const struct asn1_oid asn1_sha256_oid = {
        .oid = { 2, 16, 840, 1, 101, 3, 4, 2, 1 },
        .len = 9
 };
 
+const struct asn1_oid asn1_ec_public_key_oid = {
+       .oid = { 1, 2, 840, 10045, 2, 1 },
+       .len = 6
+};
+
+const struct asn1_oid asn1_prime256v1_oid = {
+       .oid = { 1, 2, 840, 10045, 3, 1, 7 },
+       .len = 7
+};
+
+const struct asn1_oid asn1_secp384r1_oid = {
+       .oid = { 1, 3, 132, 0, 34 },
+       .len = 5
+};
+
+const struct asn1_oid asn1_secp521r1_oid = {
+       .oid = { 1, 3, 132, 0, 35 },
+       .len = 5
+};
+
+const struct asn1_oid asn1_brainpoolP256r1_oid = {
+       .oid = { 1, 3, 36, 3, 3, 2, 8, 1, 1, 7 },
+       .len = 10
+};
+
+const struct asn1_oid asn1_brainpoolP384r1_oid = {
+       .oid = { 1, 3, 36, 3, 3, 2, 8, 1, 1, 11 },
+       .len = 10
+};
+
+const struct asn1_oid asn1_brainpoolP512r1_oid = {
+       .oid = { 1, 3, 36, 3, 3, 2, 8, 1, 1, 13 },
+       .len = 10
+};
+
+const struct asn1_oid asn1_aes_siv_cmac_aead_256_oid = {
+       .oid = { 1, 2, 840, 113549, 1, 9, 16, 3, 22 },
+       .len = 9
+};
+
+const struct asn1_oid asn1_aes_siv_cmac_aead_384_oid = {
+       .oid = { 1, 2, 840, 113549, 1, 9, 16, 3, 23 },
+       .len = 9
+};
+
+const struct asn1_oid asn1_aes_siv_cmac_aead_512_oid = {
+       .oid = { 1, 2, 840, 113549, 1, 9, 16, 3, 24 },
+       .len = 9
+};
+
+const struct asn1_oid asn1_pbkdf2_oid = {
+       .oid = { 1, 2, 840, 113549, 1, 5, 12 },
+       .len = 7
+};
+
+const struct asn1_oid asn1_pbkdf2_hmac_sha256_oid = {
+       .oid = { 1, 2, 840, 113549, 2, 9 },
+       .len = 6
+};
+
+const struct asn1_oid asn1_pbkdf2_hmac_sha384_oid = {
+       .oid = { 1, 2, 840, 113549, 2, 10 },
+       .len = 6
+};
+
+const struct asn1_oid asn1_pbkdf2_hmac_sha512_oid = {
+       .oid = { 1, 2, 840, 113549, 2, 11 },
+       .len = 6
+};
+
+const struct asn1_oid asn1_dpp_config_params_oid = {
+       .oid = { 1, 3, 6, 1, 4, 1, 40808, 1, 2, 1 },
+       .len = 10
+};
+
+const struct asn1_oid asn1_dpp_asymmetric_key_package_oid = {
+       .oid = { 1, 3, 6, 1, 4, 1, 40808, 1, 2, 2 },
+       .len = 10
+};
+
 
 static int asn1_valid_der_boolean(struct asn1_hdr *hdr)
 {
index 25a05c78bd5c21b523c1636025b120c6e7364a49..fcfb5cb715dfd7734eb518318fef3c5945b6bb28 100644 (file)
@@ -71,7 +71,26 @@ int asn1_get_sequence(const u8 *buf, size_t len, struct asn1_hdr *hdr,
 int asn1_get_alg_id(const u8 *buf, size_t len, struct asn1_oid *oid,
                    const u8 **params, size_t *params_len, const u8 **next);
 
-extern struct asn1_oid asn1_sha1_oid;
-extern struct asn1_oid asn1_sha256_oid;
+extern const struct asn1_oid asn1_sha1_oid;
+extern const struct asn1_oid asn1_sha256_oid;
+extern const struct asn1_oid asn1_ec_public_key_oid;
+extern const struct asn1_oid asn1_prime256v1_oid;
+extern const struct asn1_oid asn1_secp384r1_oid;
+extern const struct asn1_oid asn1_secp521r1_oid;
+extern const struct asn1_oid asn1_brainpoolP256r1_oid;
+extern const struct asn1_oid asn1_brainpoolP384r1_oid;
+extern const struct asn1_oid asn1_brainpoolP512r1_oid;
+extern const struct asn1_oid asn1_aes_siv_cmac_aead_256_oid;
+extern const struct asn1_oid asn1_aes_siv_cmac_aead_384_oid;
+extern const struct asn1_oid asn1_aes_siv_cmac_aead_512_oid;
+extern const struct asn1_oid asn1_aes_siv_cmac_aead_256_oid;
+extern const struct asn1_oid asn1_aes_siv_cmac_aead_384_oid;
+extern const struct asn1_oid asn1_aes_siv_cmac_aead_512_oid;
+extern const struct asn1_oid asn1_pbkdf2_oid;
+extern const struct asn1_oid asn1_pbkdf2_hmac_sha256_oid;
+extern const struct asn1_oid asn1_pbkdf2_hmac_sha384_oid;
+extern const struct asn1_oid asn1_pbkdf2_hmac_sha512_oid;
+extern const struct asn1_oid asn1_dpp_config_params_oid;
+extern const struct asn1_oid asn1_dpp_asymmetric_key_package_oid;
 
 #endif /* ASN1_H */