]> git.ipfire.org Git - thirdparty/FORT-validator.git/commitdiff
Merge ASID and ASId into ASId
authorAlberto Leiva Popper <ydahhrk@gmail.com>
Fri, 30 Jun 2023 18:04:05 +0000 (12:04 -0600)
committerAlberto Leiva Popper <ydahhrk@gmail.com>
Fri, 30 Jun 2023 18:08:47 +0000 (12:08 -0600)
They are the same data type.

I'm merging them into the latter because it's more widely used.

Fixes #94, I think.

src/asn1/asn1c/ASID.c [deleted file]
src/asn1/asn1c/ASID.h [deleted file]
src/asn1/asn1c/ASId.c
src/asn1/asn1c/ASId.h
src/asn1/asn1c/Makefile.include
src/asn1/asn1c/RouteOriginAttestation.c
src/asn1/asn1c/RouteOriginAttestation.h
src/object/roa.c

diff --git a/src/asn1/asn1c/ASID.c b/src/asn1/asn1c/ASID.c
deleted file mode 100644 (file)
index 457540b..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
- * From ASN.1 module "RPKI-ROA"
- *     found in "rfc6482.asn1"
- *     `asn1c -Werror -fcompound-names -fwide-types -D asn1/asn1c -no-gen-PER -no-gen-example`
- */
-
-#include "ASID.h"
-
-/*
- * This type is implemented using INTEGER,
- * so here we adjust the DEF accordingly.
- */
-static const ber_tlv_tag_t asn_DEF_ASID_tags_1[] = {
-       (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
-};
-asn_TYPE_descriptor_t asn_DEF_ASID = {
-       "ASID",
-       "ASID",
-       &asn_OP_INTEGER,
-       asn_DEF_ASID_tags_1,
-       sizeof(asn_DEF_ASID_tags_1)
-               /sizeof(asn_DEF_ASID_tags_1[0]), /* 1 */
-       asn_DEF_ASID_tags_1,    /* Same as above */
-       sizeof(asn_DEF_ASID_tags_1)
-               /sizeof(asn_DEF_ASID_tags_1[0]), /* 1 */
-       { 0, 0, INTEGER_constraint },
-       0, 0,   /* No members */
-       0       /* No specifics */
-};
-
diff --git a/src/asn1/asn1c/ASID.h b/src/asn1/asn1c/ASID.h
deleted file mode 100644 (file)
index 28dca0c..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
- * From ASN.1 module "RPKI-ROA"
- *     found in "rfc6482.asn1"
- *     `asn1c -Werror -fcompound-names -fwide-types -D asn1/asn1c -no-gen-PER -no-gen-example`
- */
-
-#ifndef        _ASID_H_
-#define        _ASID_H_
-
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
-#include "asn1/asn1c/INTEGER.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* ASID */
-typedef INTEGER_t       ASID_t;
-
-/* Implementation */
-extern asn_TYPE_descriptor_t asn_DEF_ASID;
-asn_struct_free_f ASID_free;
-asn_struct_print_f ASID_print;
-asn_constr_check_f ASID_constraint;
-ber_type_decoder_f ASID_decode_ber;
-der_type_encoder_f ASID_encode_der;
-xer_type_decoder_f ASID_decode_xer;
-xer_type_encoder_f ASID_encode_xer;
-oer_type_decoder_f ASID_decode_oer;
-oer_type_encoder_f ASID_encode_oer;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ASID_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 457540b21189e94faf821bdb8c5e424a09f735f0..e64dd0f957d38472069a0330f4bff83206f35f8e 100644 (file)
@@ -1,29 +1,29 @@
 /*
  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
- * From ASN.1 module "RPKI-ROA"
- *     found in "rfc6482.asn1"
+ * From ASN.1 module "IPAddrAndASCertExtn"
+ *     found in "rfc3779.asn1"
  *     `asn1c -Werror -fcompound-names -fwide-types -D asn1/asn1c -no-gen-PER -no-gen-example`
  */
 
-#include "ASID.h"
+#include "ASId.h"
 
 /*
  * This type is implemented using INTEGER,
  * so here we adjust the DEF accordingly.
  */
-static const ber_tlv_tag_t asn_DEF_ASID_tags_1[] = {
+static const ber_tlv_tag_t asn_DEF_ASId_tags_1[] = {
        (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
 };
-asn_TYPE_descriptor_t asn_DEF_ASID = {
-       "ASID",
-       "ASID",
+asn_TYPE_descriptor_t asn_DEF_ASId = {
+       "ASId",
+       "ASId",
        &asn_OP_INTEGER,
-       asn_DEF_ASID_tags_1,
-       sizeof(asn_DEF_ASID_tags_1)
-               /sizeof(asn_DEF_ASID_tags_1[0]), /* 1 */
-       asn_DEF_ASID_tags_1,    /* Same as above */
-       sizeof(asn_DEF_ASID_tags_1)
-               /sizeof(asn_DEF_ASID_tags_1[0]), /* 1 */
+       asn_DEF_ASId_tags_1,
+       sizeof(asn_DEF_ASId_tags_1)
+               /sizeof(asn_DEF_ASId_tags_1[0]), /* 1 */
+       asn_DEF_ASId_tags_1,    /* Same as above */
+       sizeof(asn_DEF_ASId_tags_1)
+               /sizeof(asn_DEF_ASId_tags_1[0]), /* 1 */
        { 0, 0, INTEGER_constraint },
        0, 0,   /* No members */
        0       /* No specifics */
index 28dca0c9611892ee9aa51fcc2d6ae5b86f5749a5..f8735d9d71cccfb64ebebb94e041961466e81057 100644 (file)
@@ -1,12 +1,12 @@
 /*
  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
- * From ASN.1 module "RPKI-ROA"
- *     found in "rfc6482.asn1"
+ * From ASN.1 module "IPAddrAndASCertExtn"
+ *     found in "rfc3779.asn1"
  *     `asn1c -Werror -fcompound-names -fwide-types -D asn1/asn1c -no-gen-PER -no-gen-example`
  */
 
-#ifndef        _ASID_H_
-#define        _ASID_H_
+#ifndef        _ASId_H_
+#define        _ASId_H_
 
 
 #include "asn1/asn1c/asn_application.h"
 extern "C" {
 #endif
 
-/* ASID */
-typedef INTEGER_t       ASID_t;
+/* ASId */
+typedef INTEGER_t       ASId_t;
 
 /* Implementation */
-extern asn_TYPE_descriptor_t asn_DEF_ASID;
-asn_struct_free_f ASID_free;
-asn_struct_print_f ASID_print;
-asn_constr_check_f ASID_constraint;
-ber_type_decoder_f ASID_decode_ber;
-der_type_encoder_f ASID_encode_der;
-xer_type_decoder_f ASID_decode_xer;
-xer_type_encoder_f ASID_encode_xer;
-oer_type_decoder_f ASID_decode_oer;
-oer_type_encoder_f ASID_encode_oer;
+extern asn_TYPE_descriptor_t asn_DEF_ASId;
+asn_struct_free_f ASId_free;
+asn_struct_print_f ASId_print;
+asn_constr_check_f ASId_constraint;
+ber_type_decoder_f ASId_decode_ber;
+der_type_encoder_f ASId_encode_der;
+xer_type_decoder_f ASId_decode_xer;
+xer_type_encoder_f ASId_encode_xer;
+oer_type_decoder_f ASId_decode_oer;
+oer_type_encoder_f ASId_encode_oer;
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* _ASID_H_ */
+#endif /* _ASId_H_ */
 #include "asn1/asn1c/asn_internal.h"
index 9d606b594d6bb9959cad8b1f0c0aa3f0c7868e43..ffe856d54d459c383040b1fac7dcb23816b4e438 100644 (file)
@@ -54,7 +54,6 @@ ASN_MODULE_SRCS=      \
        asn1/asn1c/SigningTime.c        \
        asn1/asn1c/Countersignature.c   \
        asn1/asn1c/RouteOriginAttestation.c     \
-       asn1/asn1c/ASID.c       \
        asn1/asn1c/ROAIPAddressFamily.c \
        asn1/asn1c/ROAIPAddress.c       \
        asn1/asn1c/Manifest.c   \
@@ -118,7 +117,6 @@ ASN_MODULE_HDRS=    \
        asn1/asn1c/SigningTime.h        \
        asn1/asn1c/Countersignature.h   \
        asn1/asn1c/RouteOriginAttestation.h     \
-       asn1/asn1c/ASID.h       \
        asn1/asn1c/ROAIPAddressFamily.h \
        asn1/asn1c/ROAIPAddress.h       \
        asn1/asn1c/Manifest.h   \
index da26f1523e44fe40bd3f127a8409e18023eb5d62..646964b91b478b41d08661aa5a7c764ec8804a0b 100644 (file)
@@ -110,14 +110,14 @@ static asn_TYPE_member_t asn_MBR_RouteOriginAttestation_1[] = {
                &asn_DFL_2_set_0,       /* Set DEFAULT 0 */
                "version"
                },
-       { ATF_NOFLAGS, 0, offsetof(struct RouteOriginAttestation, asID),
+       { ATF_NOFLAGS, 0, offsetof(struct RouteOriginAttestation, asId),
                (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
                0,
-               &asn_DEF_ASID,
+               &asn_DEF_ASId,
                0,
                { 0, 0, 0 },
                0, 0, /* No default value */
-               "asID"
+               "asId"
                },
        { ATF_NOFLAGS, 0, offsetof(struct RouteOriginAttestation, ipAddrBlocks),
                (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
@@ -134,7 +134,7 @@ static const ber_tlv_tag_t asn_DEF_RouteOriginAttestation_tags_1[] = {
        (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
 };
 static const asn_TYPE_tag2member_t asn_MAP_RouteOriginAttestation_tag2el_1[] = {
-    { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* asID */
+    { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* asId */
     { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 }, /* ipAddrBlocks */
     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* version */
 };
index 39729b7803e042eb61045a3a83d7fb271f04a9ed..c5ae9e419cc650b96cdd8c76949f2c040fe3f717 100644 (file)
@@ -13,7 +13,7 @@
 
 /* Including external dependencies */
 #include "asn1/asn1c/INTEGER.h"
-#include "ASID.h"
+#include "ASId.h"
 #include "asn1/asn1c/asn_SEQUENCE_OF.h"
 #include "asn1/asn1c/constr_SEQUENCE_OF.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
@@ -28,7 +28,7 @@ struct ROAIPAddressFamily;
 /* RouteOriginAttestation */
 typedef struct RouteOriginAttestation {
        INTEGER_t       *version        /* DEFAULT 0 */;
-       ASID_t   asID;
+       ASId_t   asId;
        struct RouteOriginAttestation__ipAddrBlocks {
                A_SEQUENCE_OF(struct ROAIPAddressFamily) list;
                
index fc979e5453afd559705002193594785b28849aeb..6bdb57862e6e60eb89e30a2f27e10dbd975709b1 100644 (file)
@@ -180,7 +180,7 @@ __handle_roa(struct RouteOriginAttestation *roa, struct resources *parent)
        }
 
        /* rfc6482#section-3.2 */
-       if (asn_INTEGER2ulong(&roa->asID, &asn) != 0) {
+       if (asn_INTEGER2ulong(&roa->asId, &asn) != 0) {
                if (errno) {
                        pr_val_err("Error casting ROA's AS ID value: %s",
                            strerror(errno));
@@ -193,7 +193,7 @@ __handle_roa(struct RouteOriginAttestation *roa, struct resources *parent)
                error = pr_val_err("AS value (%lu) is out of range.", asn);
                goto end_error;
        }
-       pr_val_debug("asID: %lu", asn);
+       pr_val_debug("asId: %lu", asn);
 
        /* rfc6482#section-3.3 */