]> git.ipfire.org Git - thirdparty/FORT-validator.git/commitdiff
Review of #includes
authorAlberto Leiva Popper <ydahhrk@gmail.com>
Tue, 14 Jul 2026 21:42:49 +0000 (15:42 -0600)
committerAlberto Leiva Popper <ydahhrk@gmail.com>
Tue, 14 Jul 2026 21:42:49 +0000 (15:42 -0600)
24 files changed:
src/asn1/asn1c/ASProviderAttestation.c
src/asn1/asn1c/ASProviderAttestation.h
src/asn1/asn1c/ProviderASSet.c
src/asn1/asn1c/ProviderASSet.h
src/libcrypto_util.c
src/log.c
src/object/aspa.c
src/object/certificate.c
src/object/certificate.h
src/object/tal.c
src/rrdp.c
src/rtr/db/db_table.c
src/rtr/db/vrps.c
src/rtr/meta.c
src/rtr/meta.h
src/rtr/pdu_handler.c
src/rtr/pdu_sender.c
src/rtr/pdu_sender.h
src/rtr/pdu_stream.c
src/rtr/pdu_stream.h
src/rtr/rtr.c
src/slurm/slurm_loader.c
src/slurm/slurm_loader.h
src/types/aspa.c

index ce435fd5983efb927eb2b3489208484e19fc618a..7e383a5571cc9bd0794a5eef062eb146c378de43 100644 (file)
@@ -7,6 +7,9 @@
 
 #include "asn1/asn1c/ASProviderAttestation.h"
 
+#include "asn1/asn1c/asn_internal.h"
+#include "asn1/asn1c/constr_SEQUENCE.h"
+
 static int asn_DFL_2_cmp_0(const void *sptr) {
        const INTEGER_t *st = sptr;
        
@@ -91,4 +94,3 @@ asn_TYPE_descriptor_t asn_DEF_ASProviderAttestation = {
        3,      /* Elements count */
        &asn_SPC_ASProviderAttestation_specs_1  /* Additional specs */
 };
-
index 2bcae026c368cb16291bf116446989fe9bca532b..ce4d2d3f1b3b4c2bec86b97afae6eafb28c21c4f 100644 (file)
@@ -9,14 +9,7 @@
 #define        _ASProviderAttestation_H_
 
 /* Including external dependencies */
-#include "asn1/asn1c/INTEGER.h"
-#include "asn1/asn1c/ASId.h"
 #include "asn1/asn1c/ProviderASSet.h"
-#include "asn1/asn1c/constr_SEQUENCE.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
 
 /* ASProviderAttestation */
 typedef struct ASProviderAttestation {
@@ -31,9 +24,4 @@ typedef struct ASProviderAttestation {
 /* Implementation */
 extern asn_TYPE_descriptor_t asn_DEF_ASProviderAttestation;
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* _ASProviderAttestation_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 5074d24a81e6720b099d4c4791e6584c3417a93e..5444945f6e2fe874eeb31fc6933ae5226baae777 100644 (file)
@@ -7,6 +7,8 @@
 
 #include "asn1/asn1c/ProviderASSet.h"
 
+#include "asn1/asn1c/constr_SEQUENCE_OF.h"
+
 asn_TYPE_member_t asn_MBR_ProviderASSet_1[] = {
        { ATF_POINTER, 0, 0,
                (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
@@ -41,4 +43,3 @@ asn_TYPE_descriptor_t asn_DEF_ProviderASSet = {
        1,      /* Single element */
        &asn_SPC_ProviderASSet_specs_1  /* Additional specs */
 };
-
index 852193377c3b98b07bcf24a62237abeabedd80a2..eb6c1b28e8cce4d2d00ebd3caa4fe8f95e321f48 100644 (file)
 /* Including external dependencies */
 #include "asn1/asn1c/ASId.h"
 #include "asn1/asn1c/asn_SEQUENCE_OF.h"
-#include "asn1/asn1c/constr_SEQUENCE_OF.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include "asn1/asn1c/constr_SET_OF.h"
 
 /* ProviderASSet */
 typedef struct ProviderASSet {
@@ -30,9 +26,4 @@ extern asn_TYPE_descriptor_t asn_DEF_ProviderASSet;
 extern asn_SET_OF_specifics_t asn_SPC_ProviderASSet_specs_1;
 extern asn_TYPE_member_t asn_MBR_ProviderASSet_1[1];
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* _ProviderASSet_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 7f95b599aab3ea40a056b7ee435c34eea112d52a..783ab8d11051ef69402e14c2405c4980d6137010 100644 (file)
@@ -3,6 +3,7 @@
 #include <openssl/bio.h>
 #include <openssl/bn.h>
 #include <openssl/buffer.h>
+#include <openssl/crypto.h>
 #include <openssl/objects.h>
 #include <openssl/pem.h>
 #include <time.h>
index 103468e4fd5b8626625d8e5c700cb15e05bf59aa..8c0967a050dd063a5cf4b8ff13b656764f6b70db 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -8,9 +8,7 @@
 #include <pthread.h>
 #include <signal.h>
 #include <stdarg.h>
-#include <sys/stat.h>
 #include <syslog.h>
-#include <time.h>
 
 #include "config.h"
 #include "thread_var.h"
index 77613fc90e691263d6e8d8ac1853b0d63c19720a..48f05683efa931b7ffe1c30876891ec581b8715b 100644 (file)
@@ -2,8 +2,6 @@
 
 #include "asn1/asn1c/ASProviderAttestation.h"
 #include "asn1/decode.h"
-#include "asn1/oid.h"
-#include "asn1/signed_data.h"
 #include "config.h"
 #include "log.h"
 #include "object/signed_object.h"
index a3429341bad3489e9acc7c74796f13a0c5a8e6a5..d1dea19cc5e69d37bbc23a09c5a0b7601246e48a 100644 (file)
@@ -9,7 +9,6 @@
 #include <openssl/objects.h>
 #include <openssl/rsa.h>
 #include <syslog.h>
-#include <time.h>
 
 #include "algorithm.h"
 #include "asn1/asn1c/IPAddrBlocks.h"
index 4aa2ace0138b8ae00c89b8a98319a5fe3901520f..de1dc0c903d9d67311d626e68c1ef0127ed0ce2e 100644 (file)
@@ -1,11 +1,7 @@
 #ifndef SRC_OBJECT_CERTIFICATE_H_
 #define SRC_OBJECT_CERTIFICATE_H_
 
-#include "asn1/asn1c/ANY.h"
-#include "asn1/asn1c/SignatureValue.h"
 #include "asn1/signed_data.h"
-#include "certificate_refs.h"
-#include "resource.h"
 
 /* Certificate types in the RPKI */
 enum cert_type {
index 5a492f64f5f3b8b882f58040ff96daf42484eea4..84414bafae101d1ea48787cc67a38b06985d1f2e 100644 (file)
@@ -3,7 +3,6 @@
 #include <errno.h>
 #include <openssl/evp.h>
 #include <sys/queue.h>
-#include <time.h>
 
 #include "common.h"
 #include "config.h"
index 88a781e1f5cd82ecb947f4256643b03704e94295..68244f568240f2e53d20ad935d34fce81c71708e 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <ctype.h>
 #include <libxml/globals.h>
+#include <openssl/crypto.h>
 #include <openssl/evp.h>
 #include <openssl/sha.h>
 
index 1764cdef073383d63f217d6e6db44b474190d3eb..e6190d2c745012752db55561f300d0fed1ac6b91 100644 (file)
@@ -1,9 +1,5 @@
 #include "rtr/db/db_table.h"
 
-#include <errno.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-
 #include "alloc.h"
 #include "config.h"
 #include "data_structure/common.h"
@@ -11,7 +7,6 @@
 #include "file.h"
 #include "log.h"
 #include "rtr/meta.h"
-#include "types/aspa.h"
 
 struct hashable_roa {
        struct vrp data;
index 724fc8ce92955e6cfa40ae84798d0ed3e6cb34b9..d9e526729cf980b8d5e91b137475215f3d7a0a3b 100644 (file)
@@ -1,13 +1,12 @@
 #include "rtr/db/vrps.h"
 
 #include <errno.h>
-#include <time.h>
+#include <sys/stat.h>
 
 #include "config.h"
 #include "log.h"
 #include "object/tal.h"
 #include "output_printer.h"
-#include "rtr/db/db_table.h"
 #include "slurm/slurm_loader.h"
 
 int
index d26d89894c7d45b8eedd6f082ee1466513b41430..31e27e3092deb7f6f2b81892fb439b3908341780 100644 (file)
@@ -1,16 +1,9 @@
 #include "rtr/meta.h"
 
-#include <errno.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-
 #include "alloc.h"
-#include "common.h"
 #include "config.h"
-#include "data_structure/common.h"
-#include "log.h"
 #include "file.h"
+#include "log.h"
 
 /* TODO delete in Fort2 */
 char *
index 738221485bf353e9f998c66b22c385d4aebd2d6a..bf3cd2f4c2eced4f138097dba069ec0d95e0a6a0 100644 (file)
@@ -3,7 +3,7 @@
 
 #include <stdio.h>
 #include <time.h>
-#include <sys/queue.h>
+
 #include "types/serial.h"
 
 struct rtr_metadata {
index ec86a225e09a177b63075fbac485bc2b0c7c3c8a..d148687d8130573135359a8119b587b2acb30166 100644 (file)
@@ -1,13 +1,15 @@
 #include "rtr/pdu_handler.h"
 
-#include <stdio.h>
 #include <errno.h>
 #include <string.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 #include "alloc.h"
 #include "config.h"
-#include "log.h"
 #include "data_structure/common.h"
+#include "log.h"
 #include "rtr/err_pdu.h"
 #include "rtr/pdu_sender.h"
 
index 1768d1109e8b56d32eb6650b3eb6a8c930de4abd..67d7e8b9d49948656b784833a9bfa6651ec14638 100644 (file)
@@ -3,6 +3,7 @@
 #include <errno.h>
 #include <poll.h>
 #include <string.h>
+#include <sys/socket.h>
 #include <unistd.h>
 
 #include "alloc.h"
index eee6245746d1dbbb66e30f0343b4cd83869ec35b..309a8d6855b89ad8794105df8f35f52804c1e8b7 100644 (file)
@@ -1,11 +1,10 @@
 #ifndef SRC_RTR_PDU_SENDER_H_
 #define SRC_RTR_PDU_SENDER_H_
 
-#include "rtr/pdu.h"
 #include "rtr/meta.h"
+#include "rtr/pdu.h"
 #include "types/aspa.h"
 #include "types/router_key.h"
-#include "types/serial.h"
 #include "types/vrp.h"
 
 #define FLAG_WITHDRAWAL                0
index 1d6fc1a22747be1d3f167de6e810d10b0f2ca1fb..d100f5cf265e4a9b5e5df763d36e4831ea5625f7 100644 (file)
@@ -3,12 +3,11 @@
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sys/queue.h>
+#include <sys/socket.h>
 #include <sys/types.h>
 #include <unistd.h>
 
 #include "alloc.h"
-#include "common.h"
 #include "log.h"
 #include "rtr/err_pdu.h"
 
index 1ddf13af55d5e225f129435d22c0195f8dd5ec94..9a6bcd51d5db9bc7604bdd196c394aee4d2a01ee 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <arpa/inet.h>
 #include <netinet/in.h>
-#include <sys/queue.h>
 #include <stdbool.h>
+#include <sys/queue.h>
 
 #include "rtr/pdu.h"
 
index fc180a5c5b5d9405dfb9cc1ce8964b92d8d85965..29d0f36a09b5db6cf8572c309caeafdfd5c49f8f 100644 (file)
@@ -5,9 +5,6 @@
 #include <netdb.h>
 #include <poll.h>
 #include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <unistd.h>
 
 #include "common.h"
 #include "config.h"
index e1f897e65959818a45e125c37ffbfcf2f9312527..ad6b6283012357186996db1e3532cfc1bd1ef91f 100644 (file)
@@ -6,6 +6,7 @@
 #include "config.h"
 #include "crypto/hash.h"
 #include "log.h"
+#include "slurm/db_slurm.h"
 #include "slurm/slurm_parser.h"
 
 #define SLURM_FILE_EXTENSION   ".slurm"
index 96face9458330c0c88eb4ad9f2474cc8591da054..2b1bff216b052310d72bfb6d66465fdec1c03392 100644 (file)
@@ -2,7 +2,6 @@
 #define SRC_SLURM_SLURM_LOADER_H_
 
 #include "rtr/db/db_table.h"
-#include "slurm/db_slurm.h"
 
 /*
  * Load the SLURM file/dir and try to apply it on @db_table.
index 406b7611224685a0f75e844b50e8884f5108d591..4a99bde5ba4877dc9b65d770b4d545e807d4b78d 100644 (file)
@@ -1,7 +1,8 @@
 #include "types/aspa.h"
 
-#include <stdlib.h>
 #include <stdio.h>
+#include <stdlib.h>
+
 #include "data_structure/common.h"
 
 void