]> git.ipfire.org Git - thirdparty/FORT-validator.git/commitdiff
Straighten up #includes
authorAlberto Leiva Popper <ydahhrk@gmail.com>
Wed, 22 May 2024 01:25:33 +0000 (19:25 -0600)
committerAlberto Leiva Popper <ydahhrk@gmail.com>
Wed, 22 May 2024 01:25:33 +0000 (19:25 -0600)
Also, remove cyclical #includes, to further automate this.

209 files changed:
src/algorithm.h
src/asn1/asn1c/ANY.c
src/asn1/asn1c/ANY.h
src/asn1/asn1c/ASId.h
src/asn1/asn1c/ASIdOrRange.h
src/asn1/asn1c/ASIdentifierChoice.h
src/asn1/asn1c/ASIdentifiers.h
src/asn1/asn1c/ASRange.h
src/asn1/asn1c/AlgorithmIdentifier.h
src/asn1/asn1c/AttributeType.h
src/asn1/asn1c/AttributeTypeAndValue.h
src/asn1/asn1c/AttributeValue.h
src/asn1/asn1c/BIT_STRING.c
src/asn1/asn1c/BIT_STRING.h
src/asn1/asn1c/BOOLEAN.c
src/asn1/asn1c/BOOLEAN.h
src/asn1/asn1c/BinarySigningTime.h
src/asn1/asn1c/BinaryTime.h
src/asn1/asn1c/CMSAttribute.c
src/asn1/asn1c/CMSAttribute.h
src/asn1/asn1c/CMSAttributeValue.h
src/asn1/asn1c/CMSSubjectKeyIdentifier.h
src/asn1/asn1c/CMSVersion.h
src/asn1/asn1c/CRL.c
src/asn1/asn1c/Certificate.c
src/asn1/asn1c/Certificate.h
src/asn1/asn1c/CertificateList.h
src/asn1/asn1c/CertificateSerialNumber.h
src/asn1/asn1c/CertificateSet.c
src/asn1/asn1c/CertificateSet.h
src/asn1/asn1c/ContentInfo.c
src/asn1/asn1c/ContentInfo.h
src/asn1/asn1c/ContentType.h
src/asn1/asn1c/ContentTypePKCS7.h
src/asn1/asn1c/Countersignature.h
src/asn1/asn1c/DigestAlgorithmIdentifier.h
src/asn1/asn1c/DigestAlgorithmIdentifiers.h
src/asn1/asn1c/DistinguishedName.h
src/asn1/asn1c/EncapsulatedContentInfo.c
src/asn1/asn1c/EncapsulatedContentInfo.h
src/asn1/asn1c/EncapsulatedContentInfoPKCS7.h
src/asn1/asn1c/Extension.c
src/asn1/asn1c/Extension.h
src/asn1/asn1c/Extensions.h
src/asn1/asn1c/FileAndHash.h
src/asn1/asn1c/GeneralizedTime.c
src/asn1/asn1c/GeneralizedTime.h
src/asn1/asn1c/IA5String.c
src/asn1/asn1c/INTEGER.c
src/asn1/asn1c/INTEGER.h
src/asn1/asn1c/IPAddrBlocks.h
src/asn1/asn1c/IPAddress.h
src/asn1/asn1c/IPAddressChoice.h
src/asn1/asn1c/IPAddressFamily.h
src/asn1/asn1c/IPAddressOrRange.h
src/asn1/asn1c/IPAddressRange.h
src/asn1/asn1c/IssuerAndSerialNumber.h
src/asn1/asn1c/Makefile.include
src/asn1/asn1c/Manifest.c
src/asn1/asn1c/Manifest.h
src/asn1/asn1c/MessageDigest.h
src/asn1/asn1c/NULL.c
src/asn1/asn1c/NULL.h
src/asn1/asn1c/Name.h
src/asn1/asn1c/OBJECT_IDENTIFIER.c
src/asn1/asn1c/OBJECT_IDENTIFIER.h
src/asn1/asn1c/OCTET_STRING.c
src/asn1/asn1c/OCTET_STRING.h
src/asn1/asn1c/OPEN_TYPE.c
src/asn1/asn1c/OPEN_TYPE.h
src/asn1/asn1c/OtherRevocationInfoFormat.h
src/asn1/asn1c/RDNSequence.h
src/asn1/asn1c/ROAIPAddress.h
src/asn1/asn1c/ROAIPAddressFamily.h
src/asn1/asn1c/RelativeDistinguishedName.h
src/asn1/asn1c/RevocationInfoChoice.h
src/asn1/asn1c/RevocationInfoChoices.h
src/asn1/asn1c/RouteOriginAttestation.c
src/asn1/asn1c/RouteOriginAttestation.h
src/asn1/asn1c/SignatureAlgorithmIdentifier.h
src/asn1/asn1c/SignatureValue.h
src/asn1/asn1c/SignedAttributes.h
src/asn1/asn1c/SignedData.h
src/asn1/asn1c/SignedDataPKCS7.h
src/asn1/asn1c/SignerIdentifier.h
src/asn1/asn1c/SignerInfo.h
src/asn1/asn1c/SignerInfos.h
src/asn1/asn1c/SigningTime.h
src/asn1/asn1c/TBSCertList.h
src/asn1/asn1c/Time.h
src/asn1/asn1c/UTCTime.c
src/asn1/asn1c/UTCTime.h
src/asn1/asn1c/UnsignedAttributes.h
src/asn1/asn1c/Version.h
src/asn1/asn1c/asn_SEQUENCE_OF.c
src/asn1/asn1c/asn_SET_OF.c
src/asn1/asn1c/asn_application.c [deleted file]
src/asn1/asn1c/asn_application.h [deleted file]
src/asn1/asn1c/asn_codecs_prim.c
src/asn1/asn1c/asn_codecs_prim.h
src/asn1/asn1c/asn_internal.h
src/asn1/asn1c/asn_ioc.h
src/asn1/asn1c/ber_decoder.c
src/asn1/asn1c/ber_decoder.h
src/asn1/asn1c/ber_tlv_length.c
src/asn1/asn1c/ber_tlv_length.h
src/asn1/asn1c/ber_tlv_tag.c
src/asn1/asn1c/constr_CHOICE.c
src/asn1/asn1c/constr_CHOICE.h
src/asn1/asn1c/constr_SEQUENCE.c
src/asn1/asn1c/constr_SEQUENCE.h
src/asn1/asn1c/constr_SEQUENCE_OF.c
src/asn1/asn1c/constr_SEQUENCE_OF.h
src/asn1/asn1c/constr_SET_OF.c
src/asn1/asn1c/constr_SET_OF.h
src/asn1/asn1c/constr_TYPE.c
src/asn1/asn1c/constr_TYPE.h
src/asn1/asn1c/constraints.c
src/asn1/asn1c/constraints.h
src/asn1/asn1c/der_encoder.c
src/asn1/asn1c/der_encoder.h
src/asn1/asn1c/json_encoder.c
src/asn1/asn1c/json_encoder.h
src/asn1/asn1c/xer_encoder.c
src/asn1/asn1c/xer_encoder.h
src/asn1/content_info.c
src/asn1/decode.c
src/asn1/decode.h
src/asn1/oid.c
src/asn1/oid.h
src/asn1/signed_data.c
src/asn1/signed_data.h
src/cache/local_cache.c
src/cert_stack.c
src/cert_stack.h
src/config.c
src/config/boolean.c
src/config/file_type.c
src/config/filename_format.c
src/config/log_conf.c
src/config/mode.c
src/config/output_format.c
src/config/string_array.c
src/config/uint.c
src/crypto/base64.c
src/crypto/hash.c
src/crypto/hash.h
src/daemon.c
src/data_structure/array_list.h
src/data_structure/path_builder.c
src/data_structure/path_builder.h
src/extension.c
src/extension.h
src/file.c
src/file.h
src/http/http.c
src/incidence/incidence.c
src/init.c
src/json_handler.c
src/json_util.c
src/libcrypto_util.c
src/libcrypto_util.h
src/log.c
src/log.h
src/main.c
src/nid.c
src/object/bgpsec.c
src/object/certificate.c
src/object/certificate.h
src/object/crl.c
src/object/crl.h
src/object/ghostbusters.c
src/object/manifest.c
src/object/name.c
src/object/roa.c
src/object/signed_object.c
src/object/tal.c
src/object/tal.h
src/output_printer.c
src/print_file.c
src/resource.c
src/resource.h
src/resource/asn.h
src/rpp.c
src/rpp.h
src/rrdp.c
src/rtr/db/db_table.c
src/rtr/db/db_table.h
src/rtr/db/delta.c
src/rtr/db/deltas_array.h
src/rtr/db/vrps.c
src/rtr/db/vrps.h
src/rtr/err_pdu.c
src/rtr/pdu.h
src/rtr/pdu_handler.c
src/rtr/pdu_sender.h
src/rtr/pdu_stream.c
src/rtr/pdu_stream.h
src/rtr/rtr.c
src/slurm/db_slurm.h
src/slurm/slurm_loader.c
src/slurm/slurm_parser.c
src/state.c
src/state.h
src/thread/thread_pool.c
src/types/address.h
src/types/bio_seq.c
src/types/uri.c
src/validation_handler.h

index a7a7e062a2d283ca606268ca2450e17b3bbb1fa3..322e09f959f5c16d13f15b494467b9f3b63a4d66 100644 (file)
@@ -2,6 +2,7 @@
 #define SRC_ALGORITHM_H_
 
 #include <openssl/x509.h>
+
 #include "asn1/asn1c/AlgorithmIdentifier.h"
 #include "asn1/asn1c/OBJECT_IDENTIFIER.h"
 
index 8edaa8e99933e5772535de7798115053dbb58f41..3c0e10bd0bd59b0bf5e3445b3b6ccdca68fe1614 100644 (file)
@@ -2,11 +2,17 @@
  * Copyright (c) 2004-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
-#include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/ANY.h"
+
 #include <assert.h>
 #include <errno.h>
 
+#include "asn1/asn1c/asn_internal.h"
+#include "asn1/asn1c/ber_decoder.h"
+#include "asn1/asn1c/der_encoder.h"
+#include "asn1/asn1c/json_encoder.h"
+#include "asn1/asn1c/xer_encoder.h"
+
 asn_OCTET_STRING_specifics_t asn_SPC_ANY_specs = {
        sizeof(ANY_t),
        offsetof(ANY_t, _asn_ctx),
@@ -43,7 +49,7 @@ asn_TYPE_descriptor_t asn_DEF_ANY = {
 
 asn_enc_rval_t
 ANY_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
-               enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb,
+               int flags, asn_app_consume_bytes_f *cb,
                void *app_key) {
     if(flags & XER_F_CANONICAL) {
                /*
index 01c7d41b86313391ca4a8ba5ffc049d89314a8a3..462ddb752ba1351cd302de1e4a8341451243dfa2 100644 (file)
@@ -5,7 +5,8 @@
 #ifndef ASN_TYPE_ANY_H
 #define ASN_TYPE_ANY_H
 
-#include "asn1/asn1c/OCTET_STRING.h"   /* Implemented via OCTET STRING type */
+#include "asn1/asn1c/OCTET_STRING.h"
+#include "asn1/asn1c/constraints.h"
 
 typedef struct ANY {
        uint8_t *buf;   /* BER-encoded ANY contents */
index eb03c8480446005599576bbaf1a335d81845c37e..1355d95f18b4d44f619f1ce58e962c46d95f6feb 100644 (file)
@@ -8,11 +8,8 @@
 #ifndef        _ASId_H_
 #define        _ASId_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/INTEGER.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* ASId */
 typedef INTEGER_t       ASId_t;
@@ -27,4 +24,3 @@ der_type_encoder_f ASId_encode_der;
 xer_type_encoder_f ASId_encode_xer;
 
 #endif /* _ASId_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 87f3dee345e55d8f5a4a425b3a25c76483a5dcf0..2f47e30760d4a2b14174c95532e9695efee7f968 100644 (file)
@@ -8,13 +8,10 @@
 #ifndef        _ASIdOrRange_H_
 #define        _ASIdOrRange_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/ASId.h"
 #include "asn1/asn1c/ASRange.h"
 #include "asn1/asn1c/constr_CHOICE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Dependencies */
 typedef enum ASIdOrRange_PR {
@@ -41,4 +38,3 @@ extern asn_CHOICE_specifics_t asn_SPC_ASIdOrRange_specs_1;
 extern asn_TYPE_member_t asn_MBR_ASIdOrRange_1[2];
 
 #endif /* _ASIdOrRange_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 1f5d7875d437c4620206600c68604dce5d20b924..1c66f74bb6d81a0efd202bb80ae1b2ebcb3ea249 100644 (file)
@@ -8,14 +8,12 @@
 #ifndef        _ASIdentifierChoice_H_
 #define        _ASIdentifierChoice_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
+#include "asn1/asn1c/ASIdOrRange.h"
 #include "asn1/asn1c/NULL.h"
 #include "asn1/asn1c/asn_SEQUENCE_OF.h"
-#include "asn1/asn1c/constr_SEQUENCE_OF.h"
 #include "asn1/asn1c/constr_CHOICE.h"
+#include "asn1/asn1c/constr_SEQUENCE_OF.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Dependencies */
 typedef enum ASIdentifierChoice_PR {
@@ -49,8 +47,4 @@ extern asn_TYPE_descriptor_t asn_DEF_ASIdentifierChoice;
 extern asn_CHOICE_specifics_t asn_SPC_ASIdentifierChoice_specs_1;
 extern asn_TYPE_member_t asn_MBR_ASIdentifierChoice_1[2];
 
-/* Referred external types */
-#include "asn1/asn1c/ASIdOrRange.h"
-
 #endif /* _ASIdentifierChoice_H_ */
-#include "asn1/asn1c/asn_internal.h"
index bf64f35c1087a589f99708916aad6e1dc08aa8d5..5c17193de5e38748923edaa761bae8d03ccfe2d6 100644 (file)
@@ -8,11 +8,9 @@
 #ifndef        _ASIdentifiers_H_
 #define        _ASIdentifiers_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
+#include "asn1/asn1c/ASIdentifierChoice.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Forward declarations */
 struct ASIdentifierChoice;
@@ -29,8 +27,4 @@ typedef struct ASIdentifiers {
 /* Implementation */
 extern asn_TYPE_descriptor_t asn_DEF_ASIdentifiers;
 
-/* Referred external types */
-#include "asn1/asn1c/ASIdentifierChoice.h"
-
 #endif /* _ASIdentifiers_H_ */
-#include "asn1/asn1c/asn_internal.h"
index ac25726fcb96adfdcf84c4bb7d51935e701db44d..99e14d13d5f8f04a597eb477ac88fa77c739313c 100644 (file)
@@ -8,12 +8,9 @@
 #ifndef        _ASRange_H_
 #define        _ASRange_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/ASId.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* ASRange */
 typedef struct ASRange {
@@ -30,4 +27,3 @@ extern asn_SEQUENCE_specifics_t asn_SPC_ASRange_specs_1;
 extern asn_TYPE_member_t asn_MBR_ASRange_1[2];
 
 #endif /* _ASRange_H_ */
-#include "asn1/asn1c/asn_internal.h"
index bc40e9609bb54f1e54a340fdba0d2ea6a42df0a1..08bd7e9a355ea647c1c5e77338119a2e79fed35b 100644 (file)
@@ -8,13 +8,10 @@
 #ifndef        _AlgorithmIdentifier_H_
 #define        _AlgorithmIdentifier_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
-#include "asn1/asn1c/OBJECT_IDENTIFIER.h"
 #include "asn1/asn1c/ANY.h"
+#include "asn1/asn1c/OBJECT_IDENTIFIER.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* AlgorithmIdentifier */
 typedef struct AlgorithmIdentifier {
@@ -31,4 +28,3 @@ extern asn_SEQUENCE_specifics_t asn_SPC_AlgorithmIdentifier_specs_1;
 extern asn_TYPE_member_t asn_MBR_AlgorithmIdentifier_1[2];
 
 #endif /* _AlgorithmIdentifier_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 8552996eaa869ca5e24ca1338f1307835186191e..99881aeb4dd7046af0a4da6d5ff267b83cf678b2 100644 (file)
@@ -8,11 +8,8 @@
 #ifndef        _AttributeType_H_
 #define        _AttributeType_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/OBJECT_IDENTIFIER.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* AttributeType */
 typedef OBJECT_IDENTIFIER_t     AttributeType_t;
@@ -27,4 +24,3 @@ der_type_encoder_f AttributeType_encode_der;
 xer_type_encoder_f AttributeType_encode_xer;
 
 #endif /* _AttributeType_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 8c21acca33453dbbed5481efdbf80b8b1101efbb..7de860b3efe3ece4cbae1c4e95e0cb0a5043f1d5 100644 (file)
@@ -8,13 +8,10 @@
 #ifndef        _AttributeTypeAndValue_H_
 #define        _AttributeTypeAndValue_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/AttributeType.h"
 #include "asn1/asn1c/AttributeValue.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* AttributeTypeAndValue */
 typedef struct AttributeTypeAndValue {
@@ -31,4 +28,3 @@ extern asn_SEQUENCE_specifics_t asn_SPC_AttributeTypeAndValue_specs_1;
 extern asn_TYPE_member_t asn_MBR_AttributeTypeAndValue_1[2];
 
 #endif /* _AttributeTypeAndValue_H_ */
-#include "asn1/asn1c/asn_internal.h"
index d9462dc89c8bd0eb9a0ad0553602055410080d16..81f0b07f1152cb34d39159040a126a68ddb7a635 100644 (file)
@@ -8,11 +8,8 @@
 #ifndef        _AttributeValue_H_
 #define        _AttributeValue_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/ANY.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* AttributeValue */
 typedef ANY_t   AttributeValue_t;
@@ -27,4 +24,3 @@ der_type_encoder_f AttributeValue_encode_der;
 xer_type_encoder_f AttributeValue_encode_xer;
 
 #endif /* _AttributeValue_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 94f9d788c56d6782c393d84f95471a506946d4fd..fbca75be0dab2f9a2647f39e8423e0aa4e9a52c4 100644 (file)
@@ -3,11 +3,12 @@
  * Redistribution and modifications are permitted subject to BSD license.
  */
 
+#include "asn1/asn1c/BIT_STRING.h"
+
 #include <assert.h>
 
 #include "asn1/asn1c/asn_internal.h"
-#include "asn1/asn1c/BIT_STRING.h"
-#include "asn1/asn1c/asn_internal.h"
+#include "asn1/asn1c/xer_encoder.h"
 
 /*
  * BIT STRING basic type description.
@@ -78,7 +79,7 @@ static const char *_bit_pattern[16] = {
 
 asn_enc_rval_t
 BIT_STRING_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
-                      int ilevel, enum xer_encoder_flags_e flags,
+                      int ilevel, int flags,
                       asn_app_consume_bytes_f *cb, void *app_key) {
     asn_enc_rval_t er;
        char scratch[128];
index 0176dde7bcb1ca8f9a359b7254dc6b7b27b6cc59..6f0f748d67c30339a9d8db56ba0ff26b2a59ab52 100644 (file)
@@ -5,7 +5,7 @@
 #ifndef        _BIT_STRING_H_
 #define        _BIT_STRING_H_
 
-#include "asn1/asn1c/OCTET_STRING.h"   /* Some help from OCTET STRING */
+#include "asn1/asn1c/OCTET_STRING.h"
 
 typedef struct BIT_STRING_s {
        uint8_t *buf;   /* BIT STRING body */
index d646f7b159e92ad81e69e7ef9c5854514e57bada..e825aec42335c72f190928186616e94e81fc8c45 100644 (file)
@@ -2,10 +2,14 @@
  * Copyright (c) 2003, 2005 Lev Walkin <vlm@lionet.info>. All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
-#include "asn1/asn1c/asn_internal.h"
-#include "asn1/asn1c/asn_codecs_prim.h"
 #include "asn1/asn1c/BOOLEAN.h"
 
+#include "asn1/asn1c/asn_codecs_prim.h"
+#include "asn1/asn1c/asn_internal.h"
+#include "asn1/asn1c/ber_decoder.h"
+#include "asn1/asn1c/constraints.h"
+#include "asn1/asn1c/der_encoder.h"
+
 /*
  * BOOLEAN basic type description.
  */
@@ -141,8 +145,7 @@ BOOLEAN_encode_json(const struct asn_TYPE_descriptor_s *td, const void *sptr)
 
 asn_enc_rval_t
 BOOLEAN_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
-       int ilevel, enum xer_encoder_flags_e flags,
-               asn_app_consume_bytes_f *cb, void *app_key) {
+       int ilevel, int flags, asn_app_consume_bytes_f *cb, void *app_key) {
        const BOOLEAN_t *st = (const BOOLEAN_t *)sptr;
        asn_enc_rval_t er = {0, 0, 0};
 
index 22f4272ac5b2cd5e7e90de3be62d5b80d2d4165e..fb2411bae96dba01926b99bdad3d6cde14a2fe94 100644 (file)
@@ -5,7 +5,7 @@
 #ifndef        _BOOLEAN_H_
 #define        _BOOLEAN_H_
 
-#include "asn1/asn1c/asn_application.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /*
  * The underlying integer may contain various values, but everything
index 80507c1fb0f2ba39d81b7d53f0b310b9ff32690a..f118b85fca5485eee7ff3c1c0cae18f750dbd2d6 100644 (file)
@@ -8,11 +8,8 @@
 #ifndef        _BinarySigningTime_H_
 #define        _BinarySigningTime_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/BinaryTime.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* BinarySigningTime */
 typedef BinaryTime_t    BinarySigningTime_t;
@@ -27,4 +24,3 @@ der_type_encoder_f BinarySigningTime_encode_der;
 xer_type_encoder_f BinarySigningTime_encode_xer;
 
 #endif /* _BinarySigningTime_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 727d03b84362aba5987d909659b83f4411e76e6e..25d18883ae143cde453e14db8e17a68c5afa6506 100644 (file)
@@ -8,11 +8,8 @@
 #ifndef        _BinaryTime_H_
 #define        _BinaryTime_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/INTEGER.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* BinaryTime */
 typedef INTEGER_t       BinaryTime_t;
@@ -27,4 +24,3 @@ der_type_encoder_f BinaryTime_encode_der;
 xer_type_encoder_f BinaryTime_encode_xer;
 
 #endif /* _BinaryTime_H_ */
-#include "asn1/asn1c/asn_internal.h"
index d4425609e0074d1ee08efc0c0edf4890c4b7731e..5b0a268403d4c95845b95182a758a25d08eba267 100644 (file)
@@ -7,11 +7,12 @@
 
 #include "asn1/asn1c/CMSAttribute.h"
 
-#include <openssl/objects.h>
-#include "json_util.h"
+#include <openssl/obj_mac.h>
+
 #include "asn1/asn1c/ContentType.h"
 #include "asn1/asn1c/MessageDigest.h"
 #include "asn1/asn1c/SigningTime.h"
+#include "json_util.h"
 
 json_t *
 CMSAttribute_encode_json(const asn_TYPE_descriptor_t *td, const void *sptr)
index ad7552bb6a4342f1350fccbce4e5ccc8c92f5f66..414cd5c6a578d9a68a6a47c6e542ce838e319bf1 100644 (file)
@@ -8,15 +8,12 @@
 #ifndef        _CMSAttribute_H_
 #define        _CMSAttribute_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
-#include "asn1/asn1c/OBJECT_IDENTIFIER.h"
 #include "asn1/asn1c/CMSAttributeValue.h"
+#include "asn1/asn1c/OBJECT_IDENTIFIER.h"
 #include "asn1/asn1c/asn_SET_OF.h"
-#include "asn1/asn1c/constr_SET_OF.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
+#include "asn1/asn1c/constr_SET_OF.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* CMSAttribute */
 typedef struct CMSAttribute {
@@ -38,4 +35,3 @@ extern asn_SEQUENCE_specifics_t asn_SPC_CMSAttribute_specs_1;
 extern asn_TYPE_member_t asn_MBR_CMSAttribute_1[2];
 
 #endif /* _CMSAttribute_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 8a445f74a5e88ab34ae9fdb9df947adca49e291d..9bb9d85e87f2351442d1900f5888933db06d74da 100644 (file)
@@ -8,11 +8,8 @@
 #ifndef        _CMSAttributeValue_H_
 #define        _CMSAttributeValue_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/ANY.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* CMSAttributeValue */
 typedef ANY_t   CMSAttributeValue_t;
@@ -27,4 +24,3 @@ der_type_encoder_f CMSAttributeValue_encode_der;
 xer_type_encoder_f CMSAttributeValue_encode_xer;
 
 #endif /* _CMSAttributeValue_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 7fe5da2ab96666e6019c5f0beb1d269ee2d78ca3..8e6a468b8b639cf96772c7619109af406e9c8532 100644 (file)
@@ -8,11 +8,8 @@
 #ifndef        _CMSSubjectKeyIdentifier_H_
 #define        _CMSSubjectKeyIdentifier_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/OCTET_STRING.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* CMSSubjectKeyIdentifier */
 typedef OCTET_STRING_t  CMSSubjectKeyIdentifier_t;
@@ -27,4 +24,3 @@ der_type_encoder_f CMSSubjectKeyIdentifier_encode_der;
 xer_type_encoder_f CMSSubjectKeyIdentifier_encode_xer;
 
 #endif /* _CMSSubjectKeyIdentifier_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 05235e7f58589751d0c48315b05cf47400da77d6..ffd6ee50b46c8ba6d04d9aea2190d6d4541c224c 100644 (file)
@@ -8,11 +8,8 @@
 #ifndef        _CMSVersion_H_
 #define        _CMSVersion_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/INTEGER.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Dependencies */
 typedef enum CMSVersion {
@@ -37,4 +34,3 @@ der_type_encoder_f CMSVersion_encode_der;
 xer_type_encoder_f CMSVersion_encode_xer;
 
 #endif /* _CMSVersion_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 89edd6b398bf182773c07d35d2577dc6640d63b7..fbcc02ecb1c8d978e8dded601916b555553198c4 100644 (file)
@@ -1,7 +1,6 @@
 #include "asn1/asn1c/CRL.h"
 
-#include <openssl/x509v3.h>
-#include <openssl/pem.h>
+#include <openssl/objects.h>
 
 #include "extension.h"
 #include "json_util.h"
index df6542c446803a6339b90070322255d789ecbe66..7352786eacfeb056edf34658a5600acd2ca7412a 100644 (file)
@@ -1,6 +1,6 @@
 #include "asn1/asn1c/Certificate.h"
 
-#include <openssl/x509v3.h>
+#include <openssl/objects.h>
 
 #include "extension.h"
 #include "json_util.h"
index 1eeac081ca2871aacf36d56285361b1036124171..39f0126f88b0b8b0b9941e7e57c0a0bd5d105d84 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef SRC_ASN1_ASN1C_CERTIFICATE_H_
 #define SRC_ASN1_ASN1C_CERTIFICATE_H_
 
-#include <jansson.h>
 #include <openssl/bio.h>
+
 #include "asn1/asn1c/ANY.h"
 
 json_t *Certificate_any2json(ANY_t *);
index 4f2ddfbd555c568deb4ff7d57140f3e428d1ba58..19c92520074e796d9e6fa596d54157d393cdd0c5 100644 (file)
@@ -8,14 +8,11 @@
 #ifndef        _CertificateList_H_
 #define        _CertificateList_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
-#include "asn1/asn1c/TBSCertList.h"
 #include "asn1/asn1c/AlgorithmIdentifier.h"
 #include "asn1/asn1c/BIT_STRING.h"
+#include "asn1/asn1c/TBSCertList.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* CertificateList */
 typedef struct CertificateList {
@@ -33,4 +30,3 @@ extern asn_SEQUENCE_specifics_t asn_SPC_CertificateList_specs_1;
 extern asn_TYPE_member_t asn_MBR_CertificateList_1[3];
 
 #endif /* _CertificateList_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 6851cd017823af3d8805f66e663cfc275d3c328b..b02927cb6424f111a6fc3d22d6ec1b2e4195678f 100644 (file)
@@ -8,11 +8,8 @@
 #ifndef        _CertificateSerialNumber_H_
 #define        _CertificateSerialNumber_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/INTEGER.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* CertificateSerialNumber */
 typedef INTEGER_t       CertificateSerialNumber_t;
@@ -27,4 +24,3 @@ der_type_encoder_f CertificateSerialNumber_encode_der;
 xer_type_encoder_f CertificateSerialNumber_encode_xer;
 
 #endif /* _CertificateSerialNumber_H_ */
-#include "asn1/asn1c/asn_internal.h"
index b627f29f27bcf41185cfc4fa357d89827d2c4005..d83c6dc62587dbd4f54d10fa4f555bc5dd07f81e 100644 (file)
@@ -7,8 +7,8 @@
 
 #include "asn1/asn1c/CertificateSet.h"
 
-#include "json_util.h"
 #include "asn1/asn1c/Certificate.h"
+#include "json_util.h"
 
 static json_t *
 CertificateSet_encode_json(const struct asn_TYPE_descriptor_s *td,
index f5e96d87bc0e777e23172b350c48c38ab009564d..09027225f3d0a8dbbbcce903a903dcb364c53927 100644 (file)
@@ -8,13 +8,10 @@
 #ifndef        _CertificateSet_H_
 #define        _CertificateSet_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/ANY.h"
 #include "asn1/asn1c/asn_SET_OF.h"
 #include "asn1/asn1c/constr_SET_OF.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* CertificateSet */
 typedef struct CertificateSet {
@@ -30,4 +27,3 @@ extern asn_SET_OF_specifics_t asn_SPC_CertificateSet_specs_1;
 extern asn_TYPE_member_t asn_MBR_CertificateSet_1[1];
 
 #endif /* _CertificateSet_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 0a0b2d7ececfdbceec30ac0d67b023afe245e85d..0a97f082a84c39fc1de2bf8a66e5ee975650ec23 100644 (file)
@@ -7,9 +7,10 @@
 
 #include "asn1/asn1c/ContentInfo.h"
 
-#include <openssl/objects.h>
-#include "json_util.h"
+#include <openssl/obj_mac.h>
+
 #include "asn1/asn1c/SignedData.h"
+#include "json_util.h"
 
 json_t *
 ContentInfo_encode_json(const asn_TYPE_descriptor_t *td, const void *sptr)
index 838525ba42694382dabe73a8b6740149ab192e8f..8bc91ad790ec9c0444123633c7f1ebba222ef16f 100644 (file)
@@ -8,13 +8,10 @@
 #ifndef        _ContentInfo_H_
 #define        _ContentInfo_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
-#include "asn1/asn1c/ContentType.h"
 #include "asn1/asn1c/ANY.h"
+#include "asn1/asn1c/ContentType.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* ContentInfo */
 typedef struct ContentInfo {
@@ -29,4 +26,3 @@ typedef struct ContentInfo {
 extern asn_TYPE_descriptor_t asn_DEF_ContentInfo;
 
 #endif /* _ContentInfo_H_ */
-#include "asn1/asn1c/asn_internal.h"
index a03f9a98719df3ed5bc9d9851de0e0768c040e13..0fcff7a8c5b4df1882dcf3d38e50621ff6d8a3ff 100644 (file)
@@ -8,11 +8,8 @@
 #ifndef        _ContentType_H_
 #define        _ContentType_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/OBJECT_IDENTIFIER.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* ContentType */
 typedef OBJECT_IDENTIFIER_t     ContentType_t;
@@ -27,4 +24,3 @@ der_type_encoder_f ContentType_encode_der;
 xer_type_encoder_f ContentType_encode_xer;
 
 #endif /* _ContentType_H_ */
-#include "asn1/asn1c/asn_internal.h"
index f09c3d195a1fd0faed8c81c73e39b7cf7457d340..d3050ed184314edb807a6dd7bdaea962b948bc80 100644 (file)
@@ -8,11 +8,8 @@
 #ifndef        _ContentTypePKCS7_H_
 #define        _ContentTypePKCS7_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/OCTET_STRING.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* ContentTypePKCS7 */
 typedef OCTET_STRING_t  ContentTypePKCS7_t;
@@ -27,4 +24,3 @@ der_type_encoder_f ContentTypePKCS7_encode_der;
 xer_type_encoder_f ContentTypePKCS7_encode_xer;
 
 #endif /* _ContentTypePKCS7_H_ */
-#include "asn1/asn1c/asn_internal.h"
index cb6cca45525144991c8d1bf37a3d514d1d0a189c..755b76db46f95b8d09a06956922181ef84542804 100644 (file)
@@ -8,11 +8,8 @@
 #ifndef        _Countersignature_H_
 #define        _Countersignature_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/SignerInfo.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Countersignature */
 typedef SignerInfo_t    Countersignature_t;
@@ -27,4 +24,3 @@ der_type_encoder_f Countersignature_encode_der;
 xer_type_encoder_f Countersignature_encode_xer;
 
 #endif /* _Countersignature_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 3e0f636de2ce570877ae6b812538e8f032d02c60..cc36066300abfc2f62bafda0115c87f31d7566de 100644 (file)
@@ -8,11 +8,8 @@
 #ifndef        _DigestAlgorithmIdentifier_H_
 #define        _DigestAlgorithmIdentifier_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/AlgorithmIdentifier.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* DigestAlgorithmIdentifier */
 typedef AlgorithmIdentifier_t   DigestAlgorithmIdentifier_t;
@@ -27,4 +24,3 @@ der_type_encoder_f DigestAlgorithmIdentifier_encode_der;
 xer_type_encoder_f DigestAlgorithmIdentifier_encode_xer;
 
 #endif /* _DigestAlgorithmIdentifier_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 86bde70130b238666be03dbbd2cdc3cfb8f1529b..27783eebdb1ee7fb9f8520938c79a9ef748af21b 100644 (file)
@@ -8,12 +8,10 @@
 #ifndef        _DigestAlgorithmIdentifiers_H_
 #define        _DigestAlgorithmIdentifiers_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
+#include "asn1/asn1c/DigestAlgorithmIdentifier.h"
 #include "asn1/asn1c/asn_SET_OF.h"
 #include "asn1/asn1c/constr_SET_OF.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Forward declarations */
 struct DigestAlgorithmIdentifier;
@@ -31,8 +29,4 @@ extern asn_TYPE_descriptor_t asn_DEF_DigestAlgorithmIdentifiers;
 extern asn_SET_OF_specifics_t asn_SPC_DigestAlgorithmIdentifiers_specs_1;
 extern asn_TYPE_member_t asn_MBR_DigestAlgorithmIdentifiers_1[1];
 
-/* Referred external types */
-#include "asn1/asn1c/DigestAlgorithmIdentifier.h"
-
 #endif /* _DigestAlgorithmIdentifiers_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 602accb1baff2bfdb053b6011b1d64639f4f8559..698b589f64c3fa5ec12c28408dbaa40ddd4ce968 100644 (file)
@@ -8,11 +8,8 @@
 #ifndef        _DistinguishedName_H_
 #define        _DistinguishedName_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/RDNSequence.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* DistinguishedName */
 typedef RDNSequence_t   DistinguishedName_t;
@@ -27,4 +24,3 @@ der_type_encoder_f DistinguishedName_encode_der;
 xer_type_encoder_f DistinguishedName_encode_xer;
 
 #endif /* _DistinguishedName_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 2d0b259d1f5340a5ae93aaa0b281de9fb018c467..bc9f7c4e4d94982446a6e89a69b55e4e7034a953 100644 (file)
@@ -7,10 +7,10 @@
 
 #include "asn1/asn1c/EncapsulatedContentInfo.h"
 
-#include "nid.h"
-#include "json_util.h"
 #include "asn1/asn1c/Manifest.h"
 #include "asn1/asn1c/RouteOriginAttestation.h"
+#include "json_util.h"
+#include "nid.h"
 
 json_t *
 EncapsulatedContentInfo_encode_json(const asn_TYPE_descriptor_t *td,
index 9faa6da6c9338de2ebc28ed490eaca68849f21b9..57683b55cc6590abb463b5540a13bd279b36ddca 100644 (file)
@@ -8,13 +8,10 @@
 #ifndef        _EncapsulatedContentInfo_H_
 #define        _EncapsulatedContentInfo_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/ContentType.h"
 #include "asn1/asn1c/OCTET_STRING.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* EncapsulatedContentInfo */
 typedef struct EncapsulatedContentInfo {
@@ -31,4 +28,3 @@ extern asn_SEQUENCE_specifics_t asn_SPC_EncapsulatedContentInfo_specs_1;
 extern asn_TYPE_member_t asn_MBR_EncapsulatedContentInfo_1[2];
 
 #endif /* _EncapsulatedContentInfo_H_ */
-#include "asn1/asn1c/asn_internal.h"
index fc28c4fdb8482f26ac5b63b9ff78df655b3d3887..0a80e0ba9125a51981bd38a5404e2d64e4477b02 100644 (file)
@@ -8,13 +8,10 @@
 #ifndef        _EncapsulatedContentInfoPKCS7_H_
 #define        _EncapsulatedContentInfoPKCS7_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
-#include "asn1/asn1c/ContentType.h"
 #include "asn1/asn1c/ANY.h"
+#include "asn1/asn1c/ContentType.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* EncapsulatedContentInfoPKCS7 */
 typedef struct EncapsulatedContentInfoPKCS7 {
@@ -31,4 +28,3 @@ extern asn_SEQUENCE_specifics_t asn_SPC_EncapsulatedContentInfoPKCS7_specs_1;
 extern asn_TYPE_member_t asn_MBR_EncapsulatedContentInfoPKCS7_1[2];
 
 #endif /* _EncapsulatedContentInfoPKCS7_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 5588ed75d1d871a482c3ab5074250db0c07a4f85..b868c88ce9ba951b4a9fb25a0a634dd9fe7d6b4d 100644 (file)
@@ -7,6 +7,8 @@
 
 #include "asn1/asn1c/Extension.h"
 
+#include "asn1/asn1c/asn_internal.h"
+
 static int asn_DFL_3_cmp_0(const void *sptr) {
        const BOOLEAN_t *st = sptr;
        
index 6b0749a086fc419adf7c45143b02db198970b0c7..ad427001894610d0e2f41e2a0e4dae4bbb4688de 100644 (file)
@@ -8,14 +8,11 @@
 #ifndef        _Extension_H_
 #define        _Extension_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
-#include "asn1/asn1c/OBJECT_IDENTIFIER.h"
 #include "asn1/asn1c/BOOLEAN.h"
+#include "asn1/asn1c/OBJECT_IDENTIFIER.h"
 #include "asn1/asn1c/OCTET_STRING.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Extension */
 typedef struct Extension {
@@ -33,4 +30,3 @@ extern asn_SEQUENCE_specifics_t asn_SPC_Extension_specs_1;
 extern asn_TYPE_member_t asn_MBR_Extension_1[3];
 
 #endif /* _Extension_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 10ff33740e956683499dd5768e54bb23e4c14b24..81badbc31c89c25ca700638a9c335fe4586b36ef 100644 (file)
@@ -8,12 +8,10 @@
 #ifndef        _Extensions_H_
 #define        _Extensions_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
+#include "asn1/asn1c/Extension.h"
 #include "asn1/asn1c/asn_SEQUENCE_OF.h"
 #include "asn1/asn1c/constr_SEQUENCE_OF.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Forward declarations */
 struct Extension;
@@ -31,8 +29,4 @@ extern asn_TYPE_descriptor_t asn_DEF_Extensions;
 extern asn_SET_OF_specifics_t asn_SPC_Extensions_specs_1;
 extern asn_TYPE_member_t asn_MBR_Extensions_1[1];
 
-/* Referred external types */
-#include "asn1/asn1c/Extension.h"
-
 #endif /* _Extensions_H_ */
-#include "asn1/asn1c/asn_internal.h"
index d61d2a3a5be2947b0a7f885ffd7895f4ce242f60..52d90096879c5b624cc25b9d345b7cf0890f6c60 100644 (file)
@@ -8,13 +8,10 @@
 #ifndef        _FileAndHash_H_
 #define        _FileAndHash_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
-#include "asn1/asn1c/IA5String.h"
 #include "asn1/asn1c/BIT_STRING.h"
+#include "asn1/asn1c/IA5String.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* FileAndHash */
 typedef struct FileAndHash {
@@ -31,4 +28,3 @@ extern asn_SEQUENCE_specifics_t asn_SPC_FileAndHash_specs_1;
 extern asn_TYPE_member_t asn_MBR_FileAndHash_1[2];
 
 #endif /* _FileAndHash_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 933fa20f950cde9a8403683d8904ca6bb40c029e..8bee55a1f39230f76f643fc0efd2c08d0a6ec588 100644 (file)
@@ -6,11 +6,13 @@
 #define        _REENTRANT                      /* for Sun */
 #define __EXTENSIONS__                  /* for Sun */
 
-#include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/GeneralizedTime.h"
 
 #include <assert.h>
 #include <errno.h>
+
+#include "asn1/asn1c/asn_internal.h"
+#include "asn1/asn1c/xer_encoder.h"
 #include "json_util.h"
 
 #define        ATZVARS do {                                                    \
@@ -156,7 +158,7 @@ GeneralizedTime_encode_json(const struct asn_TYPE_descriptor_s *td, const void *
 
 asn_enc_rval_t
 GeneralizedTime_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
-                           int ilevel, enum xer_encoder_flags_e flags,
+                           int ilevel, int flags,
                            asn_app_consume_bytes_f *cb, void *app_key) {
     if(flags & XER_F_CANONICAL) {
                GeneralizedTime_t *gt;
index fa98755f45700ba0a6a9d97bfd2cfab6c64eea46..95baefb97826a2574325f2eb1cb0e3df0c46b808 100644 (file)
@@ -5,10 +5,11 @@
 #ifndef        _GeneralizedTime_H_
 #define        _GeneralizedTime_H_
 
-#include "asn1/asn1c/OCTET_STRING.h"
 #include <sys/stat.h>
 #include <time.h>
 
+#include "asn1/asn1c/OCTET_STRING.h"
+
 typedef OCTET_STRING_t GeneralizedTime_t;  /* Implemented via OCTET STRING */
 
 extern asn_TYPE_descriptor_t asn_DEF_GeneralizedTime;
index 5f574e83e84f6c7e2ecf92e1164d8d7a920a7604..573f560e715817aa9c47a639b5e41659458c6d6d 100644 (file)
@@ -2,7 +2,6 @@
  * Copyright (c) 2003 Lev Walkin <vlm@lionet.info>. All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
-#include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/IA5String.h"
 
 /*
index c95996ce204f056b66005c2d03f5f892103fbe7a..3885fd798b2b870e659d37d1d11597fd8a5ffbb9 100644 (file)
@@ -3,14 +3,14 @@
  * All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
-#include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/INTEGER.h"
 
 #include <assert.h>
 #include <errno.h>
 
+#include "asn1/asn1c/asn_codecs_prim.h"
+#include "asn1/asn1c/asn_internal.h"
 #include "json_util.h"
-#include "asn1/asn1c/asn_codecs_prim.h"        /* Encoder and decoder of a primitive type */
 
 /*
  * INTEGER basic type description.
@@ -246,7 +246,7 @@ INTEGER_encode_json(const struct asn_TYPE_descriptor_s *td, const void *sptr)
 
 asn_enc_rval_t
 INTEGER_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
-                   int ilevel, enum xer_encoder_flags_e flags,
+                   int ilevel, int flags,
                    asn_app_consume_bytes_f *cb, void *app_key) {
     const INTEGER_t *st = (const INTEGER_t *)sptr;
        asn_enc_rval_t er;
index 584f8fc945d24a5727ff25c81f847a762c20b3c7..b09933a776a73aee54668b2a06cb2d4261b71e36 100644 (file)
@@ -5,8 +5,9 @@
 #ifndef        _INTEGER_H_
 #define        _INTEGER_H_
 
-#include "asn1/asn1c/asn_application.h"
 #include "asn1/asn1c/asn_codecs_prim.h"
+#include "asn1/asn1c/constr_TYPE.h"
+#include "asn1/asn1c/constraints.h"
 
 typedef ASN__PRIMITIVE_TYPE_t INTEGER_t;
 
index 3d55e79b51169faa41c6ae51cceb3e2ee4491e0e..a41fd0afd10ab91cbdfa0aee631a26bbbaf5db12 100644 (file)
@@ -8,12 +8,10 @@
 #ifndef        _IPAddrBlocks_H_
 #define        _IPAddrBlocks_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
+#include "asn1/asn1c/IPAddressFamily.h"
 #include "asn1/asn1c/asn_SEQUENCE_OF.h"
 #include "asn1/asn1c/constr_SEQUENCE_OF.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Forward declarations */
 struct IPAddressFamily;
@@ -29,8 +27,4 @@ typedef struct IPAddrBlocks {
 /* Implementation */
 extern asn_TYPE_descriptor_t asn_DEF_IPAddrBlocks;
 
-/* Referred external types */
-#include "asn1/asn1c/IPAddressFamily.h"
-
 #endif /* _IPAddrBlocks_H_ */
-#include "asn1/asn1c/asn_internal.h"
index bf1731431abbc516b8e0beffabad38738afa7290..ea13999648bcac782e1977fe24b0d7efaa4d0456 100644 (file)
@@ -8,11 +8,8 @@
 #ifndef        _IPAddress_H_
 #define        _IPAddress_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/BIT_STRING.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* IPAddress */
 typedef BIT_STRING_t    IPAddress_t;
@@ -27,4 +24,3 @@ der_type_encoder_f IPAddress_encode_der;
 xer_type_encoder_f IPAddress_encode_xer;
 
 #endif /* _IPAddress_H_ */
-#include "asn1/asn1c/asn_internal.h"
index fc275fb32f67133f3377007c2da6d3bf5bda429e..54ee62ef5f76d92428abf51a699face2a7e904f0 100644 (file)
@@ -8,14 +8,12 @@
 #ifndef        _IPAddressChoice_H_
 #define        _IPAddressChoice_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
+#include "asn1/asn1c/IPAddressOrRange.h"
 #include "asn1/asn1c/NULL.h"
 #include "asn1/asn1c/asn_SEQUENCE_OF.h"
-#include "asn1/asn1c/constr_SEQUENCE_OF.h"
 #include "asn1/asn1c/constr_CHOICE.h"
+#include "asn1/asn1c/constr_SEQUENCE_OF.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Dependencies */
 typedef enum IPAddressChoice_PR {
@@ -49,8 +47,4 @@ extern asn_TYPE_descriptor_t asn_DEF_IPAddressChoice;
 extern asn_CHOICE_specifics_t asn_SPC_IPAddressChoice_specs_1;
 extern asn_TYPE_member_t asn_MBR_IPAddressChoice_1[2];
 
-/* Referred external types */
-#include "asn1/asn1c/IPAddressOrRange.h"
-
 #endif /* _IPAddressChoice_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 3fddc08f35b9f08d020d6d0efd168f0720273dce..b16192144ca1e0502a17f191acdf290ec0b66624 100644 (file)
@@ -8,13 +8,10 @@
 #ifndef        _IPAddressFamily_H_
 #define        _IPAddressFamily_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
-#include "asn1/asn1c/OCTET_STRING.h"
 #include "asn1/asn1c/IPAddressChoice.h"
+#include "asn1/asn1c/OCTET_STRING.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* IPAddressFamily */
 typedef struct IPAddressFamily {
@@ -31,4 +28,3 @@ extern asn_SEQUENCE_specifics_t asn_SPC_IPAddressFamily_specs_1;
 extern asn_TYPE_member_t asn_MBR_IPAddressFamily_1[2];
 
 #endif /* _IPAddressFamily_H_ */
-#include "asn1/asn1c/asn_internal.h"
index b6c86ab2ba08030ffeccb5db1a83df1c2897a887..b7cd15e28605c256d7e7bdd1b4dafcb7d35e4e01 100644 (file)
@@ -8,13 +8,10 @@
 #ifndef        _IPAddressOrRange_H_
 #define        _IPAddressOrRange_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/IPAddress.h"
 #include "asn1/asn1c/IPAddressRange.h"
 #include "asn1/asn1c/constr_CHOICE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Dependencies */
 typedef enum IPAddressOrRange_PR {
@@ -41,4 +38,3 @@ extern asn_CHOICE_specifics_t asn_SPC_IPAddressOrRange_specs_1;
 extern asn_TYPE_member_t asn_MBR_IPAddressOrRange_1[2];
 
 #endif /* _IPAddressOrRange_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 8be2d3ab5274aa73af0dfa7d9a62248ab5efc930..d218d8cc156bb655ed8733ca469957b140ffd226 100644 (file)
@@ -8,12 +8,9 @@
 #ifndef        _IPAddressRange_H_
 #define        _IPAddressRange_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/IPAddress.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* IPAddressRange */
 typedef struct IPAddressRange {
@@ -30,4 +27,3 @@ extern asn_SEQUENCE_specifics_t asn_SPC_IPAddressRange_specs_1;
 extern asn_TYPE_member_t asn_MBR_IPAddressRange_1[2];
 
 #endif /* _IPAddressRange_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 9198b824b744c81a38b4a34b54f876c0daea35b3..18820a9f257eb60a103bb3ceb057aa55dd09aa48 100644 (file)
@@ -8,13 +8,10 @@
 #ifndef        _IssuerAndSerialNumber_H_
 #define        _IssuerAndSerialNumber_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
-#include "asn1/asn1c/Name.h"
 #include "asn1/asn1c/CertificateSerialNumber.h"
+#include "asn1/asn1c/Name.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* IssuerAndSerialNumber */
 typedef struct IssuerAndSerialNumber {
@@ -31,4 +28,3 @@ extern asn_SEQUENCE_specifics_t asn_SPC_IssuerAndSerialNumber_specs_1;
 extern asn_TYPE_member_t asn_MBR_IssuerAndSerialNumber_1[2];
 
 #endif /* _IssuerAndSerialNumber_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 5fafde390a4d33ad690c5b47bd55f50eefe13363..9b602c27c92b5f380d880d522027d603198faa07 100644 (file)
@@ -159,8 +159,6 @@ ASN_MODULE_HDRS+=asn1/asn1c/constr_SEQUENCE_OF.h
 ASN_MODULE_SRCS+=asn1/asn1c/constr_SEQUENCE_OF.c
 ASN_MODULE_HDRS+=asn1/asn1c/constr_SET_OF.h
 ASN_MODULE_SRCS+=asn1/asn1c/constr_SET_OF.c
-ASN_MODULE_HDRS+=asn1/asn1c/asn_application.h
-ASN_MODULE_SRCS+=asn1/asn1c/asn_application.c
 ASN_MODULE_HDRS+=asn1/asn1c/asn_ioc.h
 ASN_MODULE_HDRS+=asn1/asn1c/asn_system.h
 ASN_MODULE_HDRS+=asn1/asn1c/asn_codecs.h
index 0d5911212a9d338568ec9785f45b323861d2195e..1ae4f76d3af70fc82d709c68d1a8e6f1f5dbe2ea 100644 (file)
@@ -7,6 +7,8 @@
 
 #include "asn1/asn1c/Manifest.h"
 
+#include "asn1/asn1c/asn_internal.h"
+
 static int
 memb_manifestNumber_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
                        asn_app_constraint_failed_f *ctfailcb, void *app_key) {
index 1444ba1830ba4309cf1251f7fa4f58c4112d20fb..c066cf94b1acd640449d8d898d68412a5c124954 100644 (file)
@@ -8,16 +8,14 @@
 #ifndef        _Manifest_H_
 #define        _Manifest_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
-#include "asn1/asn1c/INTEGER.h"
+#include "asn1/asn1c/FileAndHash.h"
 #include "asn1/asn1c/GeneralizedTime.h"
+#include "asn1/asn1c/INTEGER.h"
 #include "asn1/asn1c/OBJECT_IDENTIFIER.h"
 #include "asn1/asn1c/asn_SEQUENCE_OF.h"
-#include "asn1/asn1c/constr_SEQUENCE_OF.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
+#include "asn1/asn1c/constr_SEQUENCE_OF.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Forward declarations */
 struct FileAndHash;
@@ -43,8 +41,4 @@ typedef struct Manifest {
 /* Implementation */
 extern asn_TYPE_descriptor_t asn_DEF_Manifest;
 
-/* Referred external types */
-#include "asn1/asn1c/FileAndHash.h"
-
 #endif /* _Manifest_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 0b786db970787d53a331b667c36dde3efd4db66d..5b72392ea4e70658ea665a0d519674f4f8925871 100644 (file)
@@ -8,11 +8,8 @@
 #ifndef        _MessageDigest_H_
 #define        _MessageDigest_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/OCTET_STRING.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* MessageDigest */
 typedef OCTET_STRING_t  MessageDigest_t;
@@ -27,4 +24,3 @@ der_type_encoder_f MessageDigest_encode_der;
 xer_type_encoder_f MessageDigest_encode_xer;
 
 #endif /* _MessageDigest_H_ */
-#include "asn1/asn1c/asn_internal.h"
index b4bd171798bf1369ca410898fd5e3bcaa03f3edf..7daf9247fd7e17e4ee10ed264f600bef2ed811f6 100644 (file)
@@ -2,10 +2,14 @@
  * Copyright (c) 2003, 2005 Lev Walkin <vlm@lionet.info>. All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
-#include "asn1/asn1c/asn_internal.h"
-#include "asn1/asn1c/asn_codecs_prim.h"
 #include "asn1/asn1c/NULL.h"
 
+#include "asn1/asn1c/asn_codecs_prim.h"
+#include "asn1/asn1c/asn_internal.h"
+#include "asn1/asn1c/ber_decoder.h"
+#include "asn1/asn1c/constraints.h"
+#include "asn1/asn1c/der_encoder.h"
+
 /*
  * NULL basic type description.
  */
@@ -116,7 +120,7 @@ NULL_encode_json(const struct asn_TYPE_descriptor_s *td, const void *sptr)
 
 asn_enc_rval_t
 NULL_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
-                enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb,
+                int flags, asn_app_consume_bytes_f *cb,
                 void *app_key) {
     asn_enc_rval_t er;
 
index 1c9bfec68714ed43bae216570ec9759b9187946c..b19d853c136a4a25e3f6dddfa073468f8c8697a9 100644 (file)
@@ -5,7 +5,7 @@
 #ifndef        ASN_TYPE_NULL_H
 #define        ASN_TYPE_NULL_H
 
-#include "asn1/asn1c/asn_application.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /*
  * The value of the NULL type is meaningless.
index a543aca57f233126d8b42cb9579cf62288cab51e..431506e94a8c2fc54d591fb449e0ce37d64c8b4a 100644 (file)
@@ -8,12 +8,9 @@
 #ifndef        _Name_H_
 #define        _Name_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/RDNSequence.h"
 #include "asn1/asn1c/constr_CHOICE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Dependencies */
 typedef enum Name_PR {
@@ -38,4 +35,3 @@ extern asn_CHOICE_specifics_t asn_SPC_Name_specs_1;
 extern asn_TYPE_member_t asn_MBR_Name_1[1];
 
 #endif /* _Name_H_ */
-#include "asn1/asn1c/asn_internal.h"
index f5df8df45436a9fe0efed572ef7bb9f6b0ea0270..e3d0cb1a13e71ff8c346c6feca426605b7603a68 100644 (file)
@@ -3,16 +3,18 @@
  * Redistribution and modifications are permitted subject to BSD license.
  */
 
-#include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/OBJECT_IDENTIFIER.h"
 
 #include <assert.h>
 #include <errno.h>
+#include <openssl/asn1.h>
+#include <openssl/obj_mac.h>
 #include <openssl/objects.h>
 
-#include "json_util.h"
 #include "asn1/asn1c/INTEGER.h"
 #include "asn1/asn1c/OCTET_STRING.h"
+#include "asn1/asn1c/asn_internal.h"
+#include "json_util.h"
 
 /*
  * OBJECT IDENTIFIER basic type description.
@@ -174,7 +176,7 @@ OBJECT_IDENTIFIER__dump_body(const OBJECT_IDENTIFIER_t *st,
 
 asn_enc_rval_t
 OBJECT_IDENTIFIER_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
-                             int ilevel, enum xer_encoder_flags_e flags,
+                             int ilevel, int flags,
                              asn_app_consume_bytes_f *cb, void *app_key) {
     const OBJECT_IDENTIFIER_t *st = (const OBJECT_IDENTIFIER_t *)sptr;
        asn_enc_rval_t er;
index 461e96324b7e833d09f3fc9f0e1d8d26e182ceea..db74cae534a17fb0a029acdc3e3b44fde279a95e 100644 (file)
@@ -5,10 +5,11 @@
 #ifndef        _OBJECT_IDENTIFIER_H_
 #define        _OBJECT_IDENTIFIER_H_
 
-#include <stdbool.h>
-#include "asn1/asn1c/asn_application.h"
-#include "asn1/asn1c/asn_codecs_prim.h"
+#include <netdb.h>
+
 #include "asn1/asn1c/OCTET_STRING.h"
+#include "asn1/asn1c/asn_codecs_prim.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 typedef uint32_t asn_oid_arc_t;
 #define ASN_OID_ARC_MAX (~((asn_oid_arc_t)0))
index 3994bf59c69b2f6efa8cfcd44d3b31b90b6346ea..247c1c4c532c695465c4091092e5fdf780ef3fec 100644 (file)
@@ -3,15 +3,19 @@
  * All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
-#include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/OCTET_STRING.h"
 
 #include <assert.h>
 #include <errno.h>
 
 #include "alloc.h"
+#include "asn1/asn1c/BIT_STRING.h"
+#include "asn1/asn1c/asn_internal.h"
+#include "asn1/asn1c/ber_decoder.h"
+#include "asn1/asn1c/der_encoder.h"
+#include "asn1/asn1c/json_encoder.h"
+#include "asn1/asn1c/xer_encoder.h"
 #include "json_util.h"
-#include "asn1/asn1c/BIT_STRING.h"     /* for .bits_unused member */
 
 /*
  * OCTET STRING basic type description.
@@ -619,7 +623,7 @@ OCTET_STRING_encode_json_utf8(const struct asn_TYPE_descriptor_s *td,
 
 asn_enc_rval_t
 OCTET_STRING_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
-                        int ilevel, enum xer_encoder_flags_e flags,
+                        int ilevel, int flags,
                         asn_app_consume_bytes_f *cb, void *app_key) {
     const char * const h2c = "0123456789ABCDEF";
        const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
@@ -731,7 +735,7 @@ static const struct OCTET_STRING__xer_escape_table_s {
 
 asn_enc_rval_t
 OCTET_STRING_encode_xer_utf8(const asn_TYPE_descriptor_t *td, const void *sptr,
-                             int ilevel, enum xer_encoder_flags_e flags,
+                             int ilevel, int flags,
                              asn_app_consume_bytes_f *cb, void *app_key) {
     const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
        asn_enc_rval_t er;
index 28b0872a34284f5b28edfa6ec5ab59ccc577eb8c..100605180edb380727e0ee614705f9b69bb7acce 100644 (file)
@@ -5,7 +5,8 @@
 #ifndef        _OCTET_STRING_H_
 #define        _OCTET_STRING_H_
 
-#include "asn1/asn1c/asn_application.h"
+#include "asn1/asn1c/constr_TYPE.h"
+#include "asn1/asn1c/constraints.h"
 
 /*
  * Note: Though this sometimes represents an actual string, I don't see any
index 4fcee5a967a2d1cabb2d6c640ef2b035526fd2eb..0ffe7cba7bbd30a2aff2116d440a75771c632e97 100644 (file)
@@ -2,10 +2,10 @@
  * Copyright (c) 2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
-#include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/OPEN_TYPE.h"
+
+#include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/constr_CHOICE.h"
-#include <assert.h>
 
 asn_TYPE_operation_t asn_OP_OPEN_TYPE = {
        OPEN_TYPE_free,
index 87ed5919770342abc69d6f2c1c69eece590216ce..75ed60ef4a9985694d0469fef4f313fcd1eba454 100644 (file)
@@ -5,7 +5,7 @@
 #ifndef ASN_OPEN_TYPE_H
 #define ASN_OPEN_TYPE_H
 
-#include "asn1/asn1c/asn_application.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 #define OPEN_TYPE_free CHOICE_free
 #define OPEN_TYPE_print CHOICE_print
index f5db354a7a593f99f3a219e56b5d713e5e8b0ff5..dabc56cd86df77ebfcf13b5265fb94aa2c8cd6ed 100644 (file)
@@ -8,13 +8,10 @@
 #ifndef        _OtherRevocationInfoFormat_H_
 #define        _OtherRevocationInfoFormat_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
-#include "asn1/asn1c/OBJECT_IDENTIFIER.h"
 #include "asn1/asn1c/ANY.h"
+#include "asn1/asn1c/OBJECT_IDENTIFIER.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* OtherRevocationInfoFormat */
 typedef struct OtherRevocationInfoFormat {
@@ -31,4 +28,3 @@ extern asn_SEQUENCE_specifics_t asn_SPC_OtherRevocationInfoFormat_specs_1;
 extern asn_TYPE_member_t asn_MBR_OtherRevocationInfoFormat_1[2];
 
 #endif /* _OtherRevocationInfoFormat_H_ */
-#include "asn1/asn1c/asn_internal.h"
index ee9cbe7817c776f1cc982fb466addd0605b2dc61..60fb1fa3184181f76ca4172ac75a29d463c99fd4 100644 (file)
@@ -8,12 +8,10 @@
 #ifndef        _RDNSequence_H_
 #define        _RDNSequence_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
+#include "asn1/asn1c/RelativeDistinguishedName.h"
 #include "asn1/asn1c/asn_SEQUENCE_OF.h"
 #include "asn1/asn1c/constr_SEQUENCE_OF.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Forward declarations */
 struct RelativeDistinguishedName;
@@ -31,8 +29,4 @@ extern asn_TYPE_descriptor_t asn_DEF_RDNSequence;
 extern asn_SET_OF_specifics_t asn_SPC_RDNSequence_specs_1;
 extern asn_TYPE_member_t asn_MBR_RDNSequence_1[1];
 
-/* Referred external types */
-#include "asn1/asn1c/RelativeDistinguishedName.h"
-
 #endif /* _RDNSequence_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 42d9fdc4580a9d8975b3f36c1b1e065fa335347a..ff60eec3c5c1b6d21d6e6e10c51dea7e1f34e4e3 100644 (file)
@@ -8,13 +8,10 @@
 #ifndef        _ROAIPAddress_H_
 #define        _ROAIPAddress_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
-#include "asn1/asn1c/IPAddress.h"
 #include "asn1/asn1c/INTEGER.h"
+#include "asn1/asn1c/IPAddress.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* ROAIPAddress */
 typedef struct ROAIPAddress {
@@ -31,4 +28,3 @@ extern asn_SEQUENCE_specifics_t asn_SPC_ROAIPAddress_specs_1;
 extern asn_TYPE_member_t asn_MBR_ROAIPAddress_1[2];
 
 #endif /* _ROAIPAddress_H_ */
-#include "asn1/asn1c/asn_internal.h"
index fabd266e983d3758185aaa164407627496f42741..302b457d77414bf78d45d4292fe7577783f0667a 100644 (file)
@@ -8,14 +8,12 @@
 #ifndef        _ROAIPAddressFamily_H_
 #define        _ROAIPAddressFamily_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/OCTET_STRING.h"
+#include "asn1/asn1c/ROAIPAddress.h"
 #include "asn1/asn1c/asn_SEQUENCE_OF.h"
-#include "asn1/asn1c/constr_SEQUENCE_OF.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
+#include "asn1/asn1c/constr_SEQUENCE_OF.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Forward declarations */
 struct ROAIPAddress;
@@ -39,8 +37,4 @@ extern asn_TYPE_descriptor_t asn_DEF_ROAIPAddressFamily;
 extern asn_SEQUENCE_specifics_t asn_SPC_ROAIPAddressFamily_specs_1;
 extern asn_TYPE_member_t asn_MBR_ROAIPAddressFamily_1[2];
 
-/* Referred external types */
-#include "asn1/asn1c/ROAIPAddress.h"
-
 #endif /* _ROAIPAddressFamily_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 1ddd5661bf0c2594d01880cbbaaaa889f98c4c6c..d41f2d9220221182c36dd8e8dd9dfbf3a291aeb8 100644 (file)
@@ -8,12 +8,10 @@
 #ifndef        _RelativeDistinguishedName_H_
 #define        _RelativeDistinguishedName_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
+#include "asn1/asn1c/AttributeTypeAndValue.h"
 #include "asn1/asn1c/asn_SET_OF.h"
 #include "asn1/asn1c/constr_SET_OF.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Forward declarations */
 struct AttributeTypeAndValue;
@@ -31,8 +29,4 @@ extern asn_TYPE_descriptor_t asn_DEF_RelativeDistinguishedName;
 extern asn_SET_OF_specifics_t asn_SPC_RelativeDistinguishedName_specs_1;
 extern asn_TYPE_member_t asn_MBR_RelativeDistinguishedName_1[1];
 
-/* Referred external types */
-#include "asn1/asn1c/AttributeTypeAndValue.h"
-
 #endif /* _RelativeDistinguishedName_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 26576a83460361c8d2b408432c7ea011162503be..974073145085f4d1d9e4d85679a2fd357c9a2a1f 100644 (file)
@@ -8,13 +8,10 @@
 #ifndef        _RevocationInfoChoice_H_
 #define        _RevocationInfoChoice_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/CertificateList.h"
 #include "asn1/asn1c/OtherRevocationInfoFormat.h"
 #include "asn1/asn1c/constr_CHOICE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Dependencies */
 typedef enum RevocationInfoChoice_PR {
@@ -41,4 +38,3 @@ extern asn_CHOICE_specifics_t asn_SPC_RevocationInfoChoice_specs_1;
 extern asn_TYPE_member_t asn_MBR_RevocationInfoChoice_1[2];
 
 #endif /* _RevocationInfoChoice_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 342fbbff000e1c2d7d99d2b56a950ab2f01ea347..a37537d425e0c22cfb7e6e10b09c35c9e82e37a3 100644 (file)
@@ -8,12 +8,10 @@
 #ifndef        _RevocationInfoChoices_H_
 #define        _RevocationInfoChoices_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
+#include "asn1/asn1c/RevocationInfoChoice.h"
 #include "asn1/asn1c/asn_SET_OF.h"
 #include "asn1/asn1c/constr_SET_OF.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Forward declarations */
 struct RevocationInfoChoice;
@@ -31,8 +29,4 @@ extern asn_TYPE_descriptor_t asn_DEF_RevocationInfoChoices;
 extern asn_SET_OF_specifics_t asn_SPC_RevocationInfoChoices_specs_1;
 extern asn_TYPE_member_t asn_MBR_RevocationInfoChoices_1[1];
 
-/* Referred external types */
-#include "asn1/asn1c/RevocationInfoChoice.h"
-
 #endif /* _RevocationInfoChoices_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 7871f584e9c18c34844626520966810f7876b995..ecaa7db582ccb8b27e00106b9be55e7356ae4b2e 100644 (file)
@@ -7,6 +7,8 @@
 
 #include "asn1/asn1c/RouteOriginAttestation.h"
 
+#include "asn1/asn1c/asn_internal.h"
+
 static int
 memb_ipAddrBlocks_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
                        asn_app_constraint_failed_f *ctfailcb, void *app_key) {
index a5a0722988b798f7087bddd9df84bde012fb90bc..1320aa778b9e94652f5b50f4fe204c3012592a74 100644 (file)
@@ -8,15 +8,13 @@
 #ifndef        _RouteOriginAttestation_H_
 #define        _RouteOriginAttestation_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
-#include "asn1/asn1c/INTEGER.h"
 #include "asn1/asn1c/ASId.h"
+#include "asn1/asn1c/INTEGER.h"
+#include "asn1/asn1c/ROAIPAddressFamily.h"
 #include "asn1/asn1c/asn_SEQUENCE_OF.h"
-#include "asn1/asn1c/constr_SEQUENCE_OF.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
+#include "asn1/asn1c/constr_SEQUENCE_OF.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Forward declarations */
 struct ROAIPAddressFamily;
@@ -39,8 +37,4 @@ typedef struct RouteOriginAttestation {
 /* Implementation */
 extern asn_TYPE_descriptor_t asn_DEF_RouteOriginAttestation;
 
-/* Referred external types */
-#include "asn1/asn1c/ROAIPAddressFamily.h"
-
 #endif /* _RouteOriginAttestation_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 9a725150efbd20a81801b0d20b0c868161098ac7..6575c3d3893127a83ab91dcafce89227abd3c63d 100644 (file)
@@ -8,11 +8,8 @@
 #ifndef        _SignatureAlgorithmIdentifier_H_
 #define        _SignatureAlgorithmIdentifier_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/AlgorithmIdentifier.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* SignatureAlgorithmIdentifier */
 typedef AlgorithmIdentifier_t   SignatureAlgorithmIdentifier_t;
@@ -27,4 +24,3 @@ der_type_encoder_f SignatureAlgorithmIdentifier_encode_der;
 xer_type_encoder_f SignatureAlgorithmIdentifier_encode_xer;
 
 #endif /* _SignatureAlgorithmIdentifier_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 20c7b65f2614a0eba23596d61ca457888fa5f4af..2c5dbd82539522a4b6f48dd550de88da55e29284 100644 (file)
@@ -8,11 +8,8 @@
 #ifndef        _SignatureValue_H_
 #define        _SignatureValue_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/OCTET_STRING.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* SignatureValue */
 typedef OCTET_STRING_t  SignatureValue_t;
@@ -27,4 +24,3 @@ der_type_encoder_f SignatureValue_encode_der;
 xer_type_encoder_f SignatureValue_encode_xer;
 
 #endif /* _SignatureValue_H_ */
-#include "asn1/asn1c/asn_internal.h"
index fb97588fa43fa9c6bf05f2509231d1636d044a77..0f6900e402dfdf037159e22bc3927cb4e3ddec47 100644 (file)
@@ -8,12 +8,10 @@
 #ifndef        _SignedAttributes_H_
 #define        _SignedAttributes_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
+#include "asn1/asn1c/CMSAttribute.h"
 #include "asn1/asn1c/asn_SET_OF.h"
 #include "asn1/asn1c/constr_SET_OF.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Forward declarations */
 struct CMSAttribute;
@@ -31,8 +29,4 @@ extern asn_TYPE_descriptor_t asn_DEF_SignedAttributes;
 extern asn_SET_OF_specifics_t asn_SPC_SignedAttributes_specs_1;
 extern asn_TYPE_member_t asn_MBR_SignedAttributes_1[1];
 
-/* Referred external types */
-#include "asn1/asn1c/CMSAttribute.h"
-
 #endif /* _SignedAttributes_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 5c3e4fec7a1cb09234c89aa80a86bd44b8dd4f6b..36270934ad1cc49fffb6911a584a41781bc5aee8 100644 (file)
@@ -8,15 +8,14 @@
 #ifndef        _SignedData_H_
 #define        _SignedData_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/CMSVersion.h"
+#include "asn1/asn1c/CertificateSet.h"
 #include "asn1/asn1c/DigestAlgorithmIdentifiers.h"
 #include "asn1/asn1c/EncapsulatedContentInfo.h"
+#include "asn1/asn1c/RevocationInfoChoices.h"
 #include "asn1/asn1c/SignerInfos.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Forward declarations */
 struct CertificateSet;
@@ -38,9 +37,4 @@ typedef struct SignedData {
 /* Implementation */
 extern asn_TYPE_descriptor_t asn_DEF_SignedData;
 
-/* Referred external types */
-#include "asn1/asn1c/CertificateSet.h"
-#include "asn1/asn1c/RevocationInfoChoices.h"
-
 #endif /* _SignedData_H_ */
-#include "asn1/asn1c/asn_internal.h"
index df4f9e6fe21a51bf41ae1754ccb31372e7ad25ce..c019472af0fc525056aee11b68d1b15b38d1ec2c 100644 (file)
@@ -8,15 +8,14 @@
 #ifndef        _SignedDataPKCS7_H_
 #define        _SignedDataPKCS7_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/CMSVersion.h"
+#include "asn1/asn1c/CertificateSet.h"
 #include "asn1/asn1c/DigestAlgorithmIdentifiers.h"
 #include "asn1/asn1c/EncapsulatedContentInfoPKCS7.h"
+#include "asn1/asn1c/RevocationInfoChoices.h"
 #include "asn1/asn1c/SignerInfos.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Forward declarations */
 struct CertificateSet;
@@ -38,9 +37,4 @@ typedef struct SignedDataPKCS7 {
 /* Implementation */
 extern asn_TYPE_descriptor_t asn_DEF_SignedDataPKCS7;
 
-/* Referred external types */
-#include "asn1/asn1c/CertificateSet.h"
-#include "asn1/asn1c/RevocationInfoChoices.h"
-
 #endif /* _SignedDataPKCS7_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 60edd2938b0263a963cb3673f7b4247dd0dc80b6..5cb7a84b95294d8f06c68288a3ea57255818b79a 100644 (file)
@@ -8,13 +8,10 @@
 #ifndef        _SignerIdentifier_H_
 #define        _SignerIdentifier_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
-#include "asn1/asn1c/IssuerAndSerialNumber.h"
 #include "asn1/asn1c/CMSSubjectKeyIdentifier.h"
+#include "asn1/asn1c/IssuerAndSerialNumber.h"
 #include "asn1/asn1c/constr_CHOICE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Dependencies */
 typedef enum SignerIdentifier_PR {
@@ -41,4 +38,3 @@ extern asn_CHOICE_specifics_t asn_SPC_SignerIdentifier_specs_1;
 extern asn_TYPE_member_t asn_MBR_SignerIdentifier_1[2];
 
 #endif /* _SignerIdentifier_H_ */
-#include "asn1/asn1c/asn_internal.h"
index ff1a74917fcedfc52ae9f56822fdd319f1657f0a..b68ef3895bc762e2ae0f09ee08d94e7f34395d2f 100644 (file)
@@ -8,16 +8,15 @@
 #ifndef        _SignerInfo_H_
 #define        _SignerInfo_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/CMSVersion.h"
-#include "asn1/asn1c/SignerIdentifier.h"
 #include "asn1/asn1c/DigestAlgorithmIdentifier.h"
 #include "asn1/asn1c/SignatureAlgorithmIdentifier.h"
 #include "asn1/asn1c/SignatureValue.h"
+#include "asn1/asn1c/SignedAttributes.h"
+#include "asn1/asn1c/SignerIdentifier.h"
+#include "asn1/asn1c/UnsignedAttributes.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Forward declarations */
 struct SignedAttributes;
@@ -42,9 +41,4 @@ extern asn_TYPE_descriptor_t asn_DEF_SignerInfo;
 extern asn_SEQUENCE_specifics_t asn_SPC_SignerInfo_specs_1;
 extern asn_TYPE_member_t asn_MBR_SignerInfo_1[7];
 
-/* Referred external types */
-#include "asn1/asn1c/SignedAttributes.h"
-#include "asn1/asn1c/UnsignedAttributes.h"
-
 #endif /* _SignerInfo_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 977ec0132dc9f9415dbdb23d1823a69c542a9603..4005a47c3e1a88f3b5b7df401a8a01ce573700ee 100644 (file)
@@ -8,12 +8,10 @@
 #ifndef        _SignerInfos_H_
 #define        _SignerInfos_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
+#include "asn1/asn1c/SignerInfo.h"
 #include "asn1/asn1c/asn_SET_OF.h"
 #include "asn1/asn1c/constr_SET_OF.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Forward declarations */
 struct SignerInfo;
@@ -31,8 +29,4 @@ extern asn_TYPE_descriptor_t asn_DEF_SignerInfos;
 extern asn_SET_OF_specifics_t asn_SPC_SignerInfos_specs_1;
 extern asn_TYPE_member_t asn_MBR_SignerInfos_1[1];
 
-/* Referred external types */
-#include "asn1/asn1c/SignerInfo.h"
-
 #endif /* _SignerInfos_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 9e94881e6c94c222c20b3ab27e83643a17622d51..a396e3e970a6b19082df42970abf09a1db34c407 100644 (file)
@@ -8,11 +8,8 @@
 #ifndef        _SigningTime_H_
 #define        _SigningTime_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/Time.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* SigningTime */
 typedef Time_t  SigningTime_t;
@@ -27,4 +24,3 @@ der_type_encoder_f SigningTime_encode_der;
 xer_type_encoder_f SigningTime_encode_xer;
 
 #endif /* _SigningTime_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 844b560f04329d2bfef3f9a89b9df42c0053d3eb..bfbbbfd7bedbddd3da46420fe481db665cf297db 100644 (file)
@@ -8,18 +8,16 @@
 #ifndef        _TBSCertList_H_
 #define        _TBSCertList_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
-#include "asn1/asn1c/Version.h"
 #include "asn1/asn1c/AlgorithmIdentifier.h"
+#include "asn1/asn1c/CertificateSerialNumber.h"
+#include "asn1/asn1c/Extensions.h"
 #include "asn1/asn1c/Name.h"
 #include "asn1/asn1c/Time.h"
+#include "asn1/asn1c/Version.h"
 #include "asn1/asn1c/asn_SEQUENCE_OF.h"
-#include "asn1/asn1c/CertificateSerialNumber.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
 #include "asn1/asn1c/constr_SEQUENCE_OF.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Forward declarations */
 struct Time;
@@ -59,9 +57,4 @@ extern asn_TYPE_descriptor_t asn_DEF_TBSCertList;
 extern asn_SEQUENCE_specifics_t asn_SPC_TBSCertList_specs_1;
 extern asn_TYPE_member_t asn_MBR_TBSCertList_1[7];
 
-/* Referred external types */
-#include "asn1/asn1c/Time.h"
-#include "asn1/asn1c/Extensions.h"
-
 #endif /* _TBSCertList_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 413c957e4d8505c4ac681fc6f52c142d95bbecca..3ed85802b3d5e52c99ee2a2b34f8c669af108a3d 100644 (file)
@@ -8,13 +8,10 @@
 #ifndef        _Time_H_
 #define        _Time_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
-#include "asn1/asn1c/UTCTime.h"
 #include "asn1/asn1c/GeneralizedTime.h"
+#include "asn1/asn1c/UTCTime.h"
 #include "asn1/asn1c/constr_CHOICE.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Dependencies */
 typedef enum Time_PR {
@@ -41,4 +38,3 @@ extern asn_CHOICE_specifics_t asn_SPC_Time_specs_1;
 extern asn_TYPE_member_t asn_MBR_Time_1[2];
 
 #endif /* _Time_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 5409ba684d0e4490511a03d392db851df6d6a3d3..f3ba02ab720deb752c0da7ed63fdc7d7e4d4dafd 100644 (file)
@@ -3,14 +3,15 @@
  * Redistribution and modifications are permitted subject to BSD license.
  */
 
-#include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/UTCTime.h"
 
 #include <assert.h>
 #include <errno.h>
 
-#include "json_util.h"
 #include "asn1/asn1c/GeneralizedTime.h"
+#include "asn1/asn1c/asn_internal.h"
+#include "asn1/asn1c/xer_encoder.h"
+#include "json_util.h"
 
 #ifndef        ASN___INTERNAL_TEST_MODE
 
@@ -74,7 +75,7 @@ UTCTime_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
 
 asn_enc_rval_t
 UTCTime_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
-                   int ilevel, enum xer_encoder_flags_e flags,
+                   int ilevel, int flags,
                    asn_app_consume_bytes_f *cb, void *app_key) {
     if(flags & XER_F_CANONICAL) {
                asn_enc_rval_t rv;
index 1e085cbfcf6247273ba1f197461cb4b086b4a5f3..f326617266029da7e365a4aaf1fa7cde85e4b459 100644 (file)
@@ -5,10 +5,11 @@
 #ifndef        _UTCTime_H_
 #define        _UTCTime_H_
 
-#include "asn1/asn1c/OCTET_STRING.h"
 #include <sys/stat.h>
 #include <time.h>
 
+#include "asn1/asn1c/OCTET_STRING.h"
+
 typedef OCTET_STRING_t UTCTime_t;  /* Implemented via OCTET STRING */
 
 extern asn_TYPE_descriptor_t asn_DEF_UTCTime;
index 6bbc80445c1383e68a9197468fa3418b0e3821ae..9079b59a327bd1e131775f79c40549e49ca4017a 100644 (file)
@@ -8,12 +8,10 @@
 #ifndef        _UnsignedAttributes_H_
 #define        _UnsignedAttributes_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
+#include "asn1/asn1c/CMSAttribute.h"
 #include "asn1/asn1c/asn_SET_OF.h"
 #include "asn1/asn1c/constr_SET_OF.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Forward declarations */
 struct CMSAttribute;
@@ -31,8 +29,4 @@ extern asn_TYPE_descriptor_t asn_DEF_UnsignedAttributes;
 extern asn_SET_OF_specifics_t asn_SPC_UnsignedAttributes_specs_1;
 extern asn_TYPE_member_t asn_MBR_UnsignedAttributes_1[1];
 
-/* Referred external types */
-#include "asn1/asn1c/CMSAttribute.h"
-
 #endif /* _UnsignedAttributes_H_ */
-#include "asn1/asn1c/asn_internal.h"
index 574113e361cfbe20cec7a11b6b399106815126c7..1c744c1f2f65794d8ddfb88c9dbbff709c124332 100644 (file)
@@ -8,11 +8,8 @@
 #ifndef        _Version_H_
 #define        _Version_H_
 
-
-#include "asn1/asn1c/asn_application.h"
-
-/* Including external dependencies */
 #include "asn1/asn1c/INTEGER.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Dependencies */
 typedef enum Version {
@@ -34,4 +31,3 @@ der_type_encoder_f Version_encode_der;
 xer_type_encoder_f Version_encode_xer;
 
 #endif /* _Version_H_ */
-#include "asn1/asn1c/asn_internal.h"
index ef80a0234ba5a5028d2b2f3a0621825de1a6ad4b..640cf764aef9990ad003cfbec86f9f5b8d818c10 100644 (file)
@@ -2,7 +2,6 @@
  * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
-#include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/asn_SEQUENCE_OF.h"
 
 typedef A_SEQUENCE_OF(void) asn_sequence;
index fcf2ce95e70cf41c65e927c62d224f3c3f61aa15..cffea4a92d71b7445d37e001b23d3e7bfc703dfe 100644 (file)
@@ -2,10 +2,12 @@
  * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
-#include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/asn_SET_OF.h"
+
 #include <errno.h>
 
+#include "asn1/asn1c/asn_internal.h"
+
 /*
  * Add another element into the set.
  */
diff --git a/src/asn1/asn1c/asn_application.c b/src/asn1/asn1c/asn_application.c
deleted file mode 100644 (file)
index 469a0a4..0000000
+++ /dev/null
@@ -1,292 +0,0 @@
-/*
- * Copyright (c) 2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
- * Redistribution and modifications are permitted subject to BSD license.
- */
-#include "asn1/asn1c/asn_internal.h"
-#include "asn1/asn1c/asn_application.h"
-#include <assert.h>
-#include <errno.h>
-
-static asn_enc_rval_t asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx,
-                                          enum asn_transfer_syntax syntax,
-                                          const asn_TYPE_descriptor_t *td,
-                                          const void *sptr,
-                                          asn_app_consume_bytes_f *callback,
-                                          void *callback_key);
-
-
-struct callback_count_bytes_key {
-    asn_app_consume_bytes_f *callback;
-    void *callback_key;
-    size_t computed_size;
-};
-
-/*
- * Encoder which just counts bytes that come through it.
- */
-static int
-callback_count_bytes_cb(const void *data, size_t size, void *keyp) {
-    struct callback_count_bytes_key *key = keyp;
-    int ret;
-
-    ret = key->callback(data, size, key->callback_key);
-    if(ret >= 0) {
-        key->computed_size += size;
-    }
-
-    return ret;
-}
-
-struct overrun_encoder_key {
-    void *buffer;
-    size_t buffer_size;
-    size_t computed_size;
-};
-
-struct dynamic_encoder_key {
-    void *buffer;
-    size_t buffer_size;
-    size_t computed_size;
-};
-
-struct callback_failure_catch_key {
-    asn_app_consume_bytes_f *callback;
-    void *callback_key;
-    int callback_failed;
-};
-
-/*
- * Encoder which doesn't stop counting bytes
- * even if it reaches the end of the buffer.
- */
-static int
-overrun_encoder_cb(const void *data, size_t size, void *keyp) {
-    struct overrun_encoder_key *key = keyp;
-
-    if(key->computed_size + size > key->buffer_size) {
-        /*
-         * Avoid accident on the next call:
-         * stop adding bytes to the buffer.
-         */
-        key->buffer_size = 0;
-    } else {
-        memcpy((char *)key->buffer + key->computed_size, data, size);
-    }
-    key->computed_size += size;
-
-    return 0;
-}
-
-/*
- * Encoder which dynamically allocates output, and continues
- * to count even if allocation failed.
- */
-static int
-dynamic_encoder_cb(const void *data, size_t size, void *keyp) {
-    struct dynamic_encoder_key *key = keyp;
-
-    if(key->buffer) {
-        if(key->computed_size + size >= key->buffer_size) {
-            void *p;
-            size_t new_size = key->buffer_size;
-
-            do {
-                new_size *= 2;
-            } while(new_size <= key->computed_size + size);
-
-            p = REALLOC(key->buffer, new_size);
-            if(p) {
-                key->buffer = p;
-                key->buffer_size = new_size;
-            } else {
-                FREEMEM(key->buffer);
-                key->buffer = 0;
-                key->buffer_size = 0;
-                key->computed_size += size;
-                return 0;
-            }
-        }
-        memcpy((char *)key->buffer + key->computed_size, data, size);
-    }
-
-    key->computed_size += size;
-
-    return 0;
-}
-
-/*
- * Encoder which help convert the application level encoder failure into EIO.
- */
-static int
-callback_failure_catch_cb(const void *data, size_t size, void *keyp) {
-    struct callback_failure_catch_key *key = keyp;
-    int ret;
-
-    ret = key->callback(data, size, key->callback_key);
-    if(ret < 0) {
-        key->callback_failed = 1;
-    }
-
-    return ret;
-}
-
-asn_enc_rval_t
-asn_encode(const asn_codec_ctx_t *opt_codec_ctx,
-           enum asn_transfer_syntax syntax, const asn_TYPE_descriptor_t *td,
-           const void *sptr, asn_app_consume_bytes_f *callback, void *callback_key) {
-    struct callback_failure_catch_key cb_key;
-    asn_enc_rval_t er;
-
-    if(!callback) {
-        errno = EINVAL;
-        ASN__ENCODE_FAILED;
-    }
-
-    cb_key.callback = callback;
-    cb_key.callback_key = callback_key;
-    cb_key.callback_failed = 0;
-
-    er = asn_encode_internal(opt_codec_ctx, syntax, td, sptr,
-                             callback_failure_catch_cb, &cb_key);
-    if(cb_key.callback_failed) {
-        assert(er.encoded == -1);
-        assert(errno == EBADF);
-        errno = EIO;
-    }
-
-    return er;
-}
-
-asn_enc_rval_t
-asn_encode_to_buffer(const asn_codec_ctx_t *opt_codec_ctx,
-                     enum asn_transfer_syntax syntax,
-                     const asn_TYPE_descriptor_t *td, const void *sptr,
-                     void *buffer, size_t buffer_size) {
-    struct overrun_encoder_key buf_key;
-    asn_enc_rval_t er;
-
-    if(buffer_size > 0 && !buffer) {
-        errno = EINVAL;
-        ASN__ENCODE_FAILED;
-    }
-
-    buf_key.buffer = buffer;
-    buf_key.buffer_size = buffer_size;
-    buf_key.computed_size = 0;
-
-    er = asn_encode_internal(opt_codec_ctx, syntax, td, sptr,
-                             overrun_encoder_cb, &buf_key);
-
-    if(er.encoded >= 0 && (size_t)er.encoded != buf_key.computed_size) {
-        ASN_DEBUG("asn_encode() returned %" ASN_PRI_SSIZE
-                  " yet produced %" ASN_PRI_SIZE " bytes",
-                  er.encoded, buf_key.computed_size);
-        assert(er.encoded < 0 || (size_t)er.encoded == buf_key.computed_size);
-    }
-
-    return er;
-}
-
-asn_encode_to_new_buffer_result_t
-asn_encode_to_new_buffer(const asn_codec_ctx_t *opt_codec_ctx,
-                         enum asn_transfer_syntax syntax,
-                         const asn_TYPE_descriptor_t *td, const void *sptr) {
-    struct dynamic_encoder_key buf_key;
-    asn_encode_to_new_buffer_result_t res;
-
-    buf_key.buffer_size = 16;
-    buf_key.buffer = MALLOC(buf_key.buffer_size);
-    buf_key.computed_size = 0;
-
-    res.result = asn_encode_internal(opt_codec_ctx, syntax, td, sptr,
-                                     dynamic_encoder_cb, &buf_key);
-
-    if(res.result.encoded >= 0
-       && (size_t)res.result.encoded != buf_key.computed_size) {
-        ASN_DEBUG("asn_encode() returned %" ASN_PRI_SSIZE
-                  " yet produced %" ASN_PRI_SIZE " bytes",
-                  res.result.encoded, buf_key.computed_size);
-        assert(res.result.encoded < 0
-               || (size_t)res.result.encoded == buf_key.computed_size);
-    }
-
-    res.buffer = buf_key.buffer;
-
-    /* 0-terminate just in case. */
-    if(res.buffer) {
-        assert(buf_key.computed_size < buf_key.buffer_size);
-        ((char *)res.buffer)[buf_key.computed_size] = '\0';
-    }
-
-    return res;
-}
-
-static asn_enc_rval_t
-asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx,
-                    enum asn_transfer_syntax syntax,
-                    const asn_TYPE_descriptor_t *td, const void *sptr,
-                    asn_app_consume_bytes_f *callback, void *callback_key) {
-    asn_enc_rval_t er;
-
-    (void)opt_codec_ctx; /* Parameters are not checked on encode yet. */
-
-    if(!td || !sptr) {
-        errno = EINVAL;
-        ASN__ENCODE_FAILED;
-    }
-
-    switch(syntax) {
-    case ATS_NONSTANDARD_PLAINTEXT:
-        if(td->op->print_struct) {
-            struct callback_count_bytes_key cb_key;
-            cb_key.callback = callback;
-            cb_key.callback_key = callback_key;
-            cb_key.computed_size = 0;
-            if(td->op->print_struct(td, sptr, 1, callback_count_bytes_cb,
-                                    &cb_key)
-                   < 0
-               || callback_count_bytes_cb("\n", 1, &cb_key) < 0) {
-                errno = EBADF; /* Structure has incorrect form. */
-                er.encoded = -1;
-                er.failed_type = td;
-                er.structure_ptr = sptr;
-            } else {
-                er.encoded = cb_key.computed_size;
-                er.failed_type = 0;
-                er.structure_ptr = 0;
-            }
-        } else {
-            errno = ENOENT; /* Transfer syntax is not defined for this type. */
-            ASN__ENCODE_FAILED;
-        }
-        break;
-
-    case ATS_BER:
-        /* BER is a superset of DER. */
-        /* Fall through. */
-    case ATS_DER:
-        if(td->op->der_encoder) {
-            er = der_encode(td, sptr, callback, callback_key);
-            if(er.encoded == -1) {
-                if(er.failed_type && er.failed_type->op->der_encoder) {
-                    errno = EBADF;  /* Structure has incorrect form. */
-                } else {
-                    errno = ENOENT; /* DER is not defined for this type. */
-                }
-            }
-        } else {
-            errno = ENOENT; /* Transfer syntax is not defined for this type. */
-            ASN__ENCODE_FAILED;
-        }
-        break;
-    case ATS_CER:
-        errno = ENOENT; /* Transfer syntax is not defined for any type. */
-        ASN__ENCODE_FAILED;
-
-    default:
-        errno = ENOENT;
-        ASN__ENCODE_FAILED;
-    }
-
-    return er;
-}
diff --git a/src/asn1/asn1c/asn_application.h b/src/asn1/asn1c/asn_application.h
deleted file mode 100644 (file)
index e59ab43..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*-
- * Copyright (c) 2004-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
- * Redistribution and modifications are permitted subject to BSD license.
- */
-/*
- * Application-level ASN.1 callbacks.
- */
-#ifndef        ASN_APPLICATION_H
-#define        ASN_APPLICATION_H
-
-#include "asn1/asn1c/asn_system.h"     /* for platform-dependent types */
-#include "asn1/asn1c/asn_codecs.h"     /* for ASN.1 codecs specifics */
-
-/*
- * A selection of ASN.1 Transfer Syntaxes to use with generalized
- * encoders and decoders declared further in this .h file.
- */
-enum asn_transfer_syntax {
-    /* Avoid appearance of a default transfer syntax. */
-    ATS_INVALID = 0,
-    /* Plaintext output (not conforming to any standard), for debugging. */
-    ATS_NONSTANDARD_PLAINTEXT,
-    /*
-     * X.690:
-     * BER: Basic Encoding Rules.
-     * DER: Distinguished Encoding Rules.
-     * CER: Canonical Encoding Rules.
-     * DER and CER are more strict variants of BER.
-     */
-    ATS_BER,
-    ATS_DER,
-    ATS_CER, /* Only decoding is supported */
-};
-
-/*
- * A generic encoder for any supported transfer syntax.
- * RETURN VALUES:
- * The (.encoded) field of the return value is REDEFINED to mean the following:
- * >=0: The computed size of the encoded data. Can exceed the (buffer_size).
- *  -1: Error encoding the structure. See the error code in (errno):
- *      EINVAL: Incorrect parameters to the function, such as NULLs.
- *      ENOENT: Encoding transfer syntax is not defined (for this type).
- *      EBADF:  The structure has invalid form or content constraint failed.
- *      The (.failed_type) and (.structure_ptr) MIGHT be set to the appropriate
- *      values at the place of failure, if at all possible.
- * WARNING: The (.encoded) field of the return value can exceed the buffer_size.
- * This is similar to snprintf(3) contract which might return values
- * greater than the buffer size.
- */
-asn_enc_rval_t asn_encode_to_buffer(
-    const asn_codec_ctx_t *opt_codec_parameters, /* See asn_codecs.h */
-    enum asn_transfer_syntax,
-    const struct asn_TYPE_descriptor_s *type_to_encode,
-    const void *structure_to_encode, void *buffer, size_t buffer_size);
-
-/*
- * A variant of asn_encode_to_buffer() with automatically allocated buffer.
- * RETURN VALUES:
- * On success, returns a newly allocated (.buffer) containing the whole message.
- * The message size is returned in (.result.encoded).
- * On failure:
- *  (.buffer) is NULL,
- *  (.result.encoded) as in asn_encode_to_buffer(),
- *  The errno codes as in asn_encode_to_buffer(), plus the following:
- *      ENOMEM: Memory allocation failed due to system or internal limits.
- * The user is responsible for freeing the (.buffer).
- */
-typedef struct asn_encode_to_new_buffer_result_s {
-    void *buffer;   /* NULL if failed to encode. */
-    asn_enc_rval_t result;
-} asn_encode_to_new_buffer_result_t;
-asn_encode_to_new_buffer_result_t asn_encode_to_new_buffer(
-    const asn_codec_ctx_t *opt_codec_parameters, /* See asn_codecs.h */
-    enum asn_transfer_syntax,
-    const struct asn_TYPE_descriptor_s *type_to_encode,
-    const void *structure_to_encode);
-
-
-/*
- * Generic type of an application-defined callback to return various
- * types of data to the application.
- * EXPECTED RETURN VALUES:
- *  -1: Failed to consume bytes. Abort the mission.
- * Non-negative return values indicate success, and ignored.
- */
-typedef int(asn_app_consume_bytes_f)(const void *buffer, size_t size,
-                                     void *application_specific_key);
-
-
-/*
- * A generic encoder for any supported transfer syntax.
- * Returns the comprehensive encoding result descriptor (see asn_codecs.h).
- * RETURN VALUES:
- * The negative (.encoded) field of the return values is accompanied with the
- * following error codes (errno):
- *      EINVAL: Incorrect parameters to the function, such as NULLs.
- *      ENOENT: Encoding transfer syntax is not defined (for this type).
- *      EBADF:  The structure has invalid form or content constraint failed.
- *      EIO:    The (callback) has returned negative value during encoding.
- */
-asn_enc_rval_t asn_encode(
-    const asn_codec_ctx_t *opt_codec_parameters, /* See asn_codecs.h */
-    enum asn_transfer_syntax,
-    const struct asn_TYPE_descriptor_s *type_to_encode,
-    const void *structure_to_encode,
-    asn_app_consume_bytes_f *callback, void *callback_key);
-
-
-/*
- * A callback of this type is called whenever constraint validation fails
- * on some ASN.1 type. See "constraints.h" for more details on constraint
- * validation.
- * This callback specifies a descriptor of the ASN.1 type which failed
- * the constraint check, as well as human readable message on what
- * particular constraint has failed.
- */
-typedef void (asn_app_constraint_failed_f)(void *application_specific_key,
-       const struct asn_TYPE_descriptor_s *type_descriptor_which_failed,
-       const void *structure_which_failed_ptr,
-       const char *error_message_format, ...) CC_PRINTFLIKE(4, 5);
-
-#include "asn1/asn1c/constr_TYPE.h"    /* for asn_TYPE_descriptor_t */
-
-#endif /* ASN_APPLICATION_H */
index cc2fcf86a6e4fadd13c77599cd13b4e4ebcb0c8c..d16160927b7c90b096808e50bde012d5f746a72d 100644 (file)
@@ -2,10 +2,14 @@
  * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
-#include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/asn_codecs_prim.h"
+
 #include <assert.h>
 
+#include "asn1/asn1c/asn_internal.h"
+#include "asn1/asn1c/ber_decoder.h"
+#include "asn1/asn1c/der_encoder.h"
+
 /*
  * Decode an always-primitive type.
  */
index 30675ca9837109af389647859358340afecea099..08a75a840dde9d9f0013caf1609ca6c54cafe8fc 100644 (file)
@@ -5,7 +5,7 @@
 #ifndef        ASN_CODECS_PRIM_H
 #define        ASN_CODECS_PRIM_H
 
-#include "asn1/asn1c/asn_application.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 typedef struct ASN__PRIMITIVE_TYPE_s {
     uint8_t *buf;   /* Buffer with consecutive primitive encoding bytes */
index ae8157f68a44d4dd066051cf5edc0196cdd5387c..54aa25e13d3dcdfff784f64b558028725331ff85 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef __EXTENSIONS__
 #define __EXTENSIONS__          /* for Sun */
 #endif
-#include "asn1/asn1c/asn_application.h"        /* Application-visible API */
+#include "asn1/asn1c/constr_TYPE.h"
 
 /* Environment version might be used to avoid running with the old library */
 #define        ASN1C_ENVIRONMENT_VERSION       923     /* Compile-time version */
index 06c2a35e6266d2ea856bf4e3beba66396ae3aa61..90026908a259d2cba280b8cb3cf2f5784b60f199 100644 (file)
@@ -6,7 +6,7 @@
 #ifndef        ASN_IOC_H
 #define        ASN_IOC_H
 
-#include "asn1/asn1c/asn_system.h"             /* Platform-specific types */
+#include "asn1/asn1c/asn_system.h"
 
 struct asn_TYPE_descriptor_s;
 struct asn_ioc_cell_s;
index b7ba96dde8b4fa49e273616b2bb274afd0f9743b..fa712df997e39bc605e0e71a84a18418ac959ef9 100644 (file)
@@ -2,6 +2,7 @@
  * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
+#include "asn1/asn1c/ber_decoder.h"
 
 #include <assert.h>
 
index 72fb98b783d07c460e3da81274a24fa7d9aecc10..6178c3ac521b614eb5f9094b4205c965d5c12d39 100644 (file)
@@ -5,7 +5,7 @@
 #ifndef        _BER_DECODER_H_
 #define        _BER_DECODER_H_
 
-#include "asn1/asn1c/asn_application.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 struct asn_TYPE_descriptor_s;  /* Forward declaration */
 struct asn_codec_ctx_s;                /* Forward declaration */
@@ -25,14 +25,6 @@ asn_dec_rval_t ber_decode(
     size_t size         /* Size of that buffer */
 );
 
-/*
- * Type of generic function which decodes the byte stream into the structure.
- */
-typedef asn_dec_rval_t(ber_type_decoder_f)(
-    const struct asn_codec_ctx_s *opt_codec_ctx,
-    const struct asn_TYPE_descriptor_s *type_descriptor, void **struct_ptr,
-    const void *buf_ptr, size_t size, int tag_mode);
-
 /*******************************
  * INTERNALLY USEFUL FUNCTIONS *
  *******************************/
index 1e9d58d0eba7ee06e8c859ca2368963e0a15c296..0df8a7405bc5f7cfc3eaa23d7db90f1860c86db1 100644 (file)
@@ -2,8 +2,9 @@
  * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
-#include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/ber_tlv_length.h"
+
+#include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/ber_tlv_tag.h"
 
 ssize_t
index 133fc09823a3211d78d552c6302e7b4d5b1d8955..93cb4f92ddcd115eaba53635dd60e55c732bf028 100644 (file)
@@ -5,13 +5,7 @@
 #ifndef        _BER_TLV_LENGTH_H_
 #define        _BER_TLV_LENGTH_H_
 
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <strings.h>
-#include <sys/types.h>
-#include <unistd.h>
+#include "asn1/asn1c/asn_codecs.h"
 
 typedef ssize_t ber_tlv_len_t;
 
index b0c7879239de3787c6aa211f74da13f22dad2e4a..2380f945b8c718c1926f94d81d3cda574c2b4d59 100644 (file)
@@ -3,8 +3,8 @@
  * Redistribution and modifications are permitted subject to BSD license.
  */
 
-#include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/ber_tlv_tag.h"
+
 #include <errno.h>
 
 ssize_t
index df67ffa38c35cc02ba5359db4bb719349e29e9cb..2efec8fe39b8648bddecec97b2a1a69b49a101dc 100644 (file)
@@ -2,11 +2,15 @@
  * Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
+#include "asn1/asn1c/constr_CHOICE.h"
 
 #include <assert.h>
 
 #include "asn1/asn1c/asn_internal.h"
-#include "asn1/asn1c/constr_CHOICE.h"
+#include "asn1/asn1c/ber_decoder.h"
+#include "asn1/asn1c/constraints.h"
+#include "asn1/asn1c/der_encoder.h"
+#include "asn1/asn1c/xer_encoder.h"
 
 /*
  * Number of bytes left for this structure.
@@ -548,7 +552,7 @@ CHOICE_encode_json(const asn_TYPE_descriptor_t *td, const void *sptr)
 
 asn_enc_rval_t
 CHOICE_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
-                  enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb,
+                  int flags, asn_app_consume_bytes_f *cb,
                   void *app_key) {
     const asn_CHOICE_specifics_t *specs =
         (const asn_CHOICE_specifics_t *)td->specifics;
index 704a4d448e9f83c916587fc7c6d75177c1d88c6f..87c473e5c29d403846f79b03d8b3364943be7432 100644 (file)
@@ -5,7 +5,7 @@
 #ifndef        _CONSTR_CHOICE_H_
 #define        _CONSTR_CHOICE_H_
 
-#include "asn1/asn1c/asn_application.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 typedef struct asn_CHOICE_specifics_s {
        /*
index 64f402c38a7924af54ab4ac4df5474d14d03dbf1..d2342eab42c2d8f701dc02d1a9f8cb9877485d4c 100644 (file)
@@ -4,12 +4,17 @@
  * Redistribution and modifications are permitted subject to BSD license.
  */
 
-#include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/constr_SEQUENCE.h"
 
 #include <assert.h>
-#include "json_util.h"
+
 #include "asn1/asn1c/OPEN_TYPE.h"
+#include "asn1/asn1c/asn_internal.h"
+#include "asn1/asn1c/ber_decoder.h"
+#include "asn1/asn1c/constraints.h"
+#include "asn1/asn1c/der_encoder.h"
+#include "asn1/asn1c/xer_encoder.h"
+#include "json_util.h"
 
 /*
  * Number of bytes left for this structure.
@@ -650,7 +655,7 @@ fail:       json_decref(parent);
 
 asn_enc_rval_t
 SEQUENCE_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
-                    int ilevel, enum xer_encoder_flags_e flags,
+                    int ilevel, int flags,
                     asn_app_consume_bytes_f *cb, void *app_key) {
     asn_enc_rval_t er;
     int xcan = (flags & XER_F_CANONICAL);
index c64142c1ffbd4e7d02f81f7ee9ac5619d0e02300..4507f3be858fa44b1f4066dbf4af7cfb525d73b3 100644 (file)
@@ -5,7 +5,7 @@
 #ifndef        _CONSTR_SEQUENCE_H_
 #define        _CONSTR_SEQUENCE_H_
 
-#include "asn1/asn1c/asn_application.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 typedef struct asn_SEQUENCE_specifics_s {
        /*
index 1e7475fa9794aeabdadc5cd5dcd835e4afce298c..117e02911242f9ad4acc436dc00bc2243bbaba44 100644 (file)
@@ -3,9 +3,12 @@
  * All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
-#include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/constr_SEQUENCE_OF.h"
+
 #include "asn1/asn1c/asn_SEQUENCE_OF.h"
+#include "asn1/asn1c/asn_internal.h"
+#include "asn1/asn1c/der_encoder.h"
+#include "asn1/asn1c/xer_encoder.h"
 
 /*
  * The DER encoder of the SEQUENCE OF type.
@@ -89,7 +92,7 @@ SEQUENCE_OF_encode_der(const asn_TYPE_descriptor_t *td, const void *ptr,
 
 asn_enc_rval_t
 SEQUENCE_OF_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
-                       int ilevel, enum xer_encoder_flags_e flags,
+                       int ilevel, int flags,
                        asn_app_consume_bytes_f *cb, void *app_key) {
     asn_enc_rval_t er;
     const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics;
index 916f063c963089c2641994aedebd81802c82daa5..ec2e438983f462b21a7dc9dc24a480b1ed76b2df 100644 (file)
@@ -5,8 +5,8 @@
 #ifndef        _CONSTR_SEQUENCE_OF_H_
 #define        _CONSTR_SEQUENCE_OF_H_
 
-#include "asn1/asn1c/asn_application.h"
-#include "asn1/asn1c/constr_SET_OF.h"          /* Implemented using SET OF */
+#include "asn1/asn1c/constr_SET_OF.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 /*
  * A set specialized functions dealing with the SEQUENCE OF type.
index cadbacf0f243a8f2985138c0836f7898569696cf..e4a01a5bc4b2bb388e7ef69524585759db06ce5e 100644 (file)
@@ -4,12 +4,17 @@
  * Redistribution and modifications are permitted subject to BSD license.
  */
 
-#include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/constr_SET_OF.h"
 
 #include <assert.h>
-#include "json_util.h"
+
 #include "asn1/asn1c/asn_SET_OF.h"
+#include "asn1/asn1c/asn_internal.h"
+#include "asn1/asn1c/ber_decoder.h"
+#include "asn1/asn1c/constraints.h"
+#include "asn1/asn1c/der_encoder.h"
+#include "asn1/asn1c/xer_encoder.h"
+#include "json_util.h"
 
 /*
  * Number of bytes left for this structure.
@@ -560,7 +565,7 @@ SET_OF_xer_order(const void *aptr, const void *bptr) {
 
 asn_enc_rval_t
 SET_OF_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
-                  enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb,
+                  int flags, asn_app_consume_bytes_f *cb,
                   void *app_key) {
     asn_enc_rval_t er;
        const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics;
index 3d77f3813e0d09371a923df18e5a2e2720dde678..dba104dbf277a182488ca9ae323e068e9bbe7be2 100644 (file)
@@ -5,7 +5,7 @@
 #ifndef        CONSTR_SET_OF_H
 #define        CONSTR_SET_OF_H
 
-#include "asn1/asn1c/asn_application.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 typedef struct asn_SET_OF_specifics_s {
     /*
index 602b263175475ac769db26c8fea4c20ca7320344..9e329dd858327890d8a958d0b038a78d99259100 100644 (file)
@@ -2,11 +2,13 @@
  * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
-#include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/constr_TYPE.h"
+
 #include <errno.h>
 #include <stdarg.h>
 
+#include "asn1/asn1c/asn_internal.h"
+
 /*
  * Version of the ASN.1 infrastructure shipped with compiler.
  */
index 758e6312fa503a5222a86cea218bdd524e66b0d1..065830e6719307acef3f0f11341cf4bcc72f2b7e 100644 (file)
@@ -11,6 +11,9 @@
 #ifndef        _CONSTR_TYPE_H_
 #define        _CONSTR_TYPE_H_
 
+#include <jansson.h>
+
+#include "asn1/asn1c/asn_system.h"
 #include "asn1/asn1c/ber_tlv_length.h"
 #include "asn1/asn1c/ber_tlv_tag.h"
 
@@ -30,12 +33,6 @@ typedef struct asn_struct_ctx_s {
        ber_tlv_len_t left;     /* Number of bytes left, -1 for indefinite */
 } asn_struct_ctx_t;
 
-#include "asn1/asn1c/ber_decoder.h"    /* Basic Encoding Rules decoder */
-#include "asn1/asn1c/der_encoder.h"    /* Distinguished Encoding Rules encoder */
-#include "asn1/asn1c/xer_encoder.h"    /* Encoder into XER (XML, text) */
-#include "asn1/asn1c/json_encoder.h"   /* Encoder into JSON */
-#include "asn1/asn1c/constraints.h"    /* Subtype constraints support */
-
 /*
  * Free the structure according to its specification.
  * Use one of ASN_STRUCT_{FREE,RESET,CONTENTS_ONLY} macros instead.
@@ -77,6 +74,16 @@ typedef void (asn_struct_free_f)(
 #define ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF, ptr) \
     (asn_DEF).op->free_struct(&(asn_DEF), (ptr), ASFM_FREE_UNDERLYING)
 
+/*
+ * Generic type of an application-defined callback to return various
+ * types of data to the application.
+ * EXPECTED RETURN VALUES:
+ *  -1: Failed to consume bytes. Abort the mission.
+ * Non-negative return values indicate success, and ignored.
+ */
+typedef int(asn_app_consume_bytes_f)(const void *buffer, size_t size,
+                                     void *application_specific_key);
+
 /*
  * Print the structure according to its specification.
  */
@@ -97,6 +104,37 @@ typedef int (asn_struct_compare_f)(
                const void *struct_A,
                const void *struct_B);
 
+/* Decodes a BER byte stream into a structure. */
+typedef asn_dec_rval_t(ber_type_decoder_f)(
+    const struct asn_codec_ctx_s *opt_codec_ctx,
+    const struct asn_TYPE_descriptor_s *type_descriptor, void **struct_ptr,
+    const void *buf_ptr, size_t size, int tag_mode);
+
+/* Encodes a structure into a DER byte stream. */
+typedef asn_enc_rval_t(der_type_encoder_f)(
+    const struct asn_TYPE_descriptor_s *type_descriptor,
+    const void *struct_ptr, /* Structure to be encoded */
+    int tag_mode,           /* {-1,0,1}: IMPLICIT, no, EXPLICIT */
+    ber_tlv_tag_t tag, asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */
+    void *app_key /* Arbitrary callback argument */
+);
+
+/* Encodes a structure into a JSON. */
+typedef json_t *(json_type_encoder_f)(
+    const struct asn_TYPE_descriptor_s *type_descriptor,
+    const void *struct_ptr /* Structure to be encoded */
+);
+
+/* Encodes a structure into an XML stream. */
+typedef asn_enc_rval_t(xer_type_encoder_f)(
+    const struct asn_TYPE_descriptor_s *type_descriptor,
+    const void *struct_ptr, /* Structure to be encoded */
+    int ilevel,             /* Level of indentation */
+    int xer_flags,          /* enum xer_encoder_flags_e */
+    asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */
+    void *app_key                              /* Arbitrary callback argument */
+);
+
 /*
  * Return the outmost tag of the type.
  * If the type is untagged CHOICE, the dynamic operation is performed.
@@ -109,6 +147,29 @@ typedef ber_tlv_tag_t (asn_outmost_tag_f)(
 /* The instance of the above function type; used internally. */
 asn_outmost_tag_f asn_TYPE_outmost_tag;
 
+/*
+ * A callback of this type is called whenever constraint validation fails
+ * on some ASN.1 type. See "constraints.h" for more details on constraint
+ * validation.
+ * This callback specifies a descriptor of the ASN.1 type which failed
+ * the constraint check, as well as human readable message on what
+ * particular constraint has failed.
+ */
+typedef void (asn_app_constraint_failed_f)(void *application_specific_key,
+       const struct asn_TYPE_descriptor_s *type_descriptor_which_failed,
+       const void *structure_which_failed_ptr,
+       const char *error_message_format, ...) CC_PRINTFLIKE(4, 5);
+
+/*
+ * Generic type for constraint checking callback,
+ * associated with every type descriptor.
+ */
+typedef int(asn_constr_check_f)(
+    const struct asn_TYPE_descriptor_s *type_descriptor, const void *struct_ptr,
+    asn_app_constraint_failed_f *optional_callback, /* Log the error */
+    void *optional_app_key /* Opaque key passed to a callback */
+);
+
 /*
  * Fetch the desired type of the Open Type based on the
  * Information Object Set driven constraints.
index 3cfbe94c646eb01af20d5b6f574ba1de63681f0f..f3dffc6d32d5602d0fc0d04171bbf34841bd02e6 100644 (file)
@@ -1,5 +1,5 @@
-#include "asn1/asn1c/asn_internal.h"
 #include "asn1/asn1c/constraints.h"
+
 #include <stdarg.h>
 
 int
index 16150e07fa9d788444315a9c0a44c0aedbcd4716..18d97863490aad848267014aafde860199e6660a 100644 (file)
@@ -5,7 +5,8 @@
 #ifndef        ASN1_CONSTRAINTS_VALIDATOR_H
 #define        ASN1_CONSTRAINTS_VALIDATOR_H
 
-#include "asn1/asn1c/asn_system.h"             /* Platform-dependent types */
+#include "asn1/asn1c/asn_system.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 struct asn_TYPE_descriptor_s;          /* Forward declaration */
 
@@ -28,17 +29,6 @@ int asn_check_constraints(
     size_t *errlen          /* Length of the error description */
 );
 
-
-/*
- * Generic type for constraint checking callback,
- * associated with every type descriptor.
- */
-typedef int(asn_constr_check_f)(
-    const struct asn_TYPE_descriptor_s *type_descriptor, const void *struct_ptr,
-    asn_app_constraint_failed_f *optional_callback, /* Log the error */
-    void *optional_app_key /* Opaque key passed to a callback */
-);
-
 /*******************************
  * INTERNALLY USEFUL FUNCTIONS *
  *******************************/
index d0db21ed06239b8ec13fee2f81513a6acc7bd67f..58621076e11ae677d499b39ef91425b7acf9d10b 100644 (file)
@@ -2,9 +2,12 @@
  * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
-#include "asn1/asn1c/asn_internal.h"
+#include "asn1/asn1c/der_encoder.h"
+
 #include <assert.h>
 
+#include "asn1/asn1c/asn_internal.h"
+
 static ssize_t der_write_TL(ber_tlv_tag_t tag, ber_tlv_len_t len,
        asn_app_consume_bytes_f *cb, void *app_key, int constructed);
 
index 37005550cbb594da7ec8c707261e38c9d740c02a..c6420b938d4650cf540386d63569298807b7b22a 100644 (file)
@@ -5,7 +5,7 @@
 #ifndef        _DER_ENCODER_H_
 #define        _DER_ENCODER_H_
 
-#include "asn1/asn1c/asn_application.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 struct asn_TYPE_descriptor_s;  /* Forward declaration */
 
@@ -30,18 +30,6 @@ asn_enc_rval_t der_encode_to_buffer(
     size_t buffer_size      /* Initial buffer size (maximum) */
 );
 
-/*
- * Type of the generic DER encoder.
- */
-typedef asn_enc_rval_t(der_type_encoder_f)(
-    const struct asn_TYPE_descriptor_s *type_descriptor,
-    const void *struct_ptr, /* Structure to be encoded */
-    int tag_mode,           /* {-1,0,1}: IMPLICIT, no, EXPLICIT */
-    ber_tlv_tag_t tag, asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */
-    void *app_key /* Arbitrary callback argument */
-);
-
-
 /*******************************
  * INTERNALLY USEFUL FUNCTIONS *
  *******************************/
index fce881c80f77f75bb1a320bf4ef9831a4ebe3dc9..b14c697e66f87d2ca83e608a51552a3aecd802e7 100644 (file)
@@ -1,6 +1,7 @@
 #include "asn1/asn1c/json_encoder.h"
 
 #include "asn1/asn1c/asn_internal.h"
+#include "asn1/asn1c/ber_decoder.h"
 
 json_t *
 json_encode(const asn_TYPE_descriptor_t *td, const void *sptr)
index e5e6c8b01e7a69d73edd08a77c71d8751478786a..f1cc4ec5fac0e4f95466643f34b36774b2f2ef3a 100644 (file)
@@ -2,7 +2,15 @@
 #define SRC_ASN1_ASN1C_JSON_ENCODER_H_
 
 #include <jansson.h>
+#include <netinet/in.h>
+#include <stddef.h>
 #include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 struct asn_TYPE_descriptor_s;  /* Forward declaration */
 
@@ -13,12 +21,4 @@ json_t *json_encode(
 
 json_t *ber2json(struct asn_TYPE_descriptor_s const *, uint8_t *, size_t);
 
-/*
- * Type of the generic JSON encoder.
- */
-typedef json_t *(json_type_encoder_f)(
-    const struct asn_TYPE_descriptor_s *type_descriptor,
-    const void *struct_ptr /* Structure to be encoded */
-);
-
 #endif /* SRC_ASN1_ASN1C_JSON_ENCODER_H_ */
index e3d411c32d92e33c82d0c80853751cf6e441fe07..6b7a864e09609caf70420029dbdae6b2f90f145f 100644 (file)
@@ -2,6 +2,8 @@
  * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
+#include "asn1/asn1c/xer_encoder.h"
+
 #include "asn1/asn1c/asn_internal.h"
 
 /*
index 95a4cf7831ddeb854c7b246af914364f19cdb84d..0d9a4a02526e3c1f83117251fd88a4293785d883 100644 (file)
@@ -5,7 +5,7 @@
 #ifndef        _XER_ENCODER_H_
 #define        _XER_ENCODER_H_
 
-#include "asn1/asn1c/asn_application.h"
+#include "asn1/asn1c/constr_TYPE.h"
 
 struct asn_TYPE_descriptor_s;  /* Forward declaration */
 
@@ -38,16 +38,4 @@ asn_enc_rval_t xer_encode(const struct asn_TYPE_descriptor_s *type_descriptor,
 int xer_fprint(FILE *stream, const struct asn_TYPE_descriptor_s *td,
                const void *struct_ptr);
 
-/*
- * Type of the generic XER encoder.
- */
-typedef asn_enc_rval_t(xer_type_encoder_f)(
-    const struct asn_TYPE_descriptor_s *type_descriptor,
-    const void *struct_ptr, /* Structure to be encoded */
-    int ilevel,             /* Level of indentation */
-    enum xer_encoder_flags_e xer_flags,
-    asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */
-    void *app_key                              /* Arbitrary callback argument */
-);
-
 #endif /* _XER_ENCODER_H_ */
index fa6900bb6a8cd9ea78cee4cae179fe3aaf6b6e40..8088c632d18dc653e1f11e869c106fa35a34625d 100644 (file)
@@ -1,10 +1,10 @@
 #include "asn1/content_info.h"
 
+#include "asn1/asn1c/ContentType.h"
+#include "asn1/decode.h"
+#include "asn1/oid.h"
 #include "file.h"
 #include "log.h"
-#include "asn1/oid.h"
-#include "asn1/decode.h"
-#include "asn1/asn1c/ContentType.h"
 
 static int
 validate(struct ContentInfo *info)
index 48abd16a0f29622842b403c288e959cff936aabe..1de93080e081b7f39f0d7e0a3b938cdda53bfb6e 100644 (file)
@@ -1,8 +1,10 @@
 #include "asn1/decode.h"
 
+#include "asn1/asn1c/ber_decoder.h"
+#include "asn1/asn1c/constraints.h"
 #include "common.h"
-#include "log.h"
 #include "incidence/incidence.h"
+#include "log.h"
 
 #define COND_LOG(log, pr) (log ? pr : -EINVAL)
 
index 217a4fb15868c3f8e281a62d18cf76eaf5d04037..f16cbccb88bebdc619099725b88b7856b4110a1c 100644 (file)
@@ -1,9 +1,11 @@
 #ifndef SRC_ASN1_DECODE_H_
 #define SRC_ASN1_DECODE_H_
 
-#include "file.h"
+#include <stdbool.h>
+
 #include "asn1/asn1c/ANY.h"
 #include "asn1/asn1c/constr_TYPE.h"
+#include "file.h"
 
 int asn1_decode(const void *, size_t, asn_TYPE_descriptor_t const *, void **,
     bool);
index 53271b4f62c263b782f2353f38e7c5509dbd31de..5a331c06fbe4eb9562287e043800a5167a7ea1b1 100644 (file)
@@ -1,9 +1,9 @@
 #include "asn1/oid.h"
 
 #include "alloc.h"
+#include "asn1/decode.h"
 #include "common.h"
 #include "log.h"
-#include "asn1/decode.h"
 
 void
 free_arcs(struct oid_arcs *arcs)
index 8718e3b9f7484d4865568944ca7df853d242f12e..4fb051c5abe2f0bd0ab2756a9defa314ba79322b 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef SRC_OID_H_
 #define SRC_OID_H_
 
-#include "common.h"
 #include "asn1/asn1c/ANY.h"
 #include "asn1/asn1c/OBJECT_IDENTIFIER.h"
+#include "common.h"
 
 /* These objects are expected to live on the stack. */
 struct oid_arcs {
index 8dd1bcff62c30118d5308e722b8e5eff49e3c4d0..1604ccc5836fae2f8cf67a8884006f63322254cc 100644 (file)
@@ -2,17 +2,17 @@
 
 #include "algorithm.h"
 #include "alloc.h"
-#include "config.h"
-#include "log.h"
-#include "asn1/oid.h"
-#include "thread_var.h"
-#include "asn1/decode.h"
 #include "asn1/asn1c/ContentType.h"
 #include "asn1/asn1c/ContentTypePKCS7.h"
 #include "asn1/asn1c/MessageDigest.h"
 #include "asn1/asn1c/SignedDataPKCS7.h"
+#include "asn1/decode.h"
+#include "asn1/oid.h"
+#include "config.h"
 #include "crypto/hash.h"
+#include "log.h"
 #include "object/certificate.h"
+#include "thread_var.h"
 
 static const OID oid_cta = OID_CONTENT_TYPE_ATTR;
 static const OID oid_mda = OID_MESSAGE_DIGEST_ATTR;
index 9bf4107294748d16e5d25a4f0e4ff2c67d2ed445..3ab2d03c2ed87ca3839e33b21d5704f541106299 100644 (file)
@@ -3,9 +3,9 @@
 
 /* Some wrappers for asn1/asn1c/SignedData.h. */
 
-#include "resource.h"
 #include "asn1/asn1c/SignedData.h"
 #include "object/certificate.h"
+#include "resource.h"
 
 struct ee_cert {
        /** CRL that might or might not revoke the EE certificate. */
index 802b5914bf120667147ce9867162b47fc45f4652..506f7309389e5793ee7ebc031e465591ba64878d 100644 (file)
@@ -8,14 +8,14 @@
 #include "common.h"
 #include "config.h"
 #include "configure_ac.h"
-#include "file.h"
-#include "json_util.h"
-#include "log.h"
-#include "rrdp.h"
 #include "data_structure/array_list.h"
 #include "data_structure/path_builder.h"
 #include "data_structure/uthash.h"
+#include "file.h"
 #include "http/http.h"
+#include "json_util.h"
+#include "log.h"
+#include "rrdp.h"
 #include "rsync/rsync.h"
 
 struct cache_node {
index 2fd64c685f753d3ba42ca768a8c83b838ee06967..be29978f6e3988302192cd5421344e729273c876 100644 (file)
@@ -4,11 +4,11 @@
 #include <sys/queue.h>
 
 #include "alloc.h"
+#include "data_structure/array_list.h"
+#include "object/name.h"
 #include "resource.h"
 #include "str_token.h"
 #include "thread_var.h"
-#include "data_structure/array_list.h"
-#include "object/name.h"
 
 enum defer_node_type {
        DNT_SEPARATOR,
index e2fedb6b55ebd6dd6fb3183b988edfc5cd54b1cb..8801ea42d42367c5c4d312564a81c8a9e5fbb301 100644 (file)
@@ -2,9 +2,10 @@
 #define SRC_CERT_STACK_H_
 
 #include <openssl/bn.h>
-#include "resource.h"
+
 #include "object/certificate.h"
 #include "object/name.h"
+#include "resource.h"
 #include "types/uri.h"
 
 /*
index 87040334a276f3d16313173d1efeef18a289860a..69373460a1265f20e36793d26211ade3a3cf9c9e 100644 (file)
@@ -7,17 +7,17 @@
 
 #include "alloc.h"
 #include "common.h"
+#include "config/boolean.h"
+#include "config/incidences.h"
+#include "config/str.h"
+#include "config/uint.h"
+#include "config/work_offline.h"
 #include "configure_ac.h"
 #include "daemon.h"
 #include "file.h"
 #include "init.h"
 #include "json_handler.h"
 #include "log.h"
-#include "config/boolean.h"
-#include "config/incidences.h"
-#include "config/str.h"
-#include "config/uint.h"
-#include "config/work_offline.h"
 
 /**
  * To add a member to this structure,
index 39a60444a73786d8d4b87ce45585e0b03e9021d5..1c2c0841aae0c384f89f2c6308b70728d65f61f8 100644 (file)
@@ -1,6 +1,7 @@
 #include "config/boolean.h"
 
 #include <getopt.h>
+
 #include "log.h"
 
 #define DEREFERENCE(void_value) (*((bool *) void_value))
index 5c2535a0ddcad2c260c2beb62e3c4af71759aaa1..f74e52b6c46a79f347536aa81da55d0121fb1b5c 100644 (file)
@@ -2,8 +2,8 @@
 
 #include <getopt.h>
 
-#include "log.h"
 #include "config/str.h"
+#include "log.h"
 
 #define VALUE_ROA      "roa"
 #define VALUE_MFT      "mft"
index 35253f24bf608da5e5b014336e858c2a39d22d54..9dc4caa9420b72956a4a3a97c913297d2489b5f5 100644 (file)
@@ -2,8 +2,8 @@
 
 #include <getopt.h>
 
-#include "log.h"
 #include "config/str.h"
+#include "log.h"
 
 #define FNF_VALUE_GLOBAL "global-url"
 #define FNF_VALUE_LOCAL "local-path"
index a5fc14ced24addf769a31d809b41a75739f48b8d..29ecf3019576199dd7ec92d88565a04521f72afb 100644 (file)
@@ -7,8 +7,8 @@
 #include <stdint.h>
 #include <syslog.h>
 
-#include "log.h"
 #include "config/str.h"
+#include "log.h"
 
 #define LOG_LEVEL_VALUE_ERROR "error"
 #define LOG_LEVEL_VALUE_WARNING "warning"
index 12d379fbc740425cf8f5a1c81abb962ec4ff2239..8483cc1d2c5f58275af346f560d2774d25a62b94 100644 (file)
@@ -2,8 +2,8 @@
 
 #include <getopt.h>
 
-#include "log.h"
 #include "config/str.h"
+#include "log.h"
 
 #define VALUE_SERVER           "server"
 #define VALUE_STANDALONE       "standalone"
index 471102b14c9267271ea72c10141b61527e0a093c..34d9365a010a47124298ce07d2e1514f6aa72a54 100644 (file)
@@ -2,8 +2,8 @@
 
 #include <getopt.h>
 
-#include "log.h"
 #include "config/str.h"
+#include "log.h"
 
 #define OFM_VALUE_CSV  "csv"
 #define OFM_VALUE_JSON "json"
index 4bb2734e0b977388e50f4239eabe5e183337878c..7293b7f8e99e72875619366fc6285c50fd0f5dbf 100644 (file)
@@ -3,9 +3,9 @@
 #include <getopt.h>
 
 #include "alloc.h"
+#include "config/str.h"
 #include "log.h"
 #include "str_token.h"
-#include "config/str.h"
 
 void
 string_array_init(struct string_array *array, char const *const *values,
index a7487a9f4b527f03370fdf2d9f13f8c88fa7a22f..1edee7636125caf65fa3aa7ff3d2dac2f9ae0863 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <errno.h>
 #include <getopt.h>
+
 #include "log.h"
 
 static void
index 096a44f5567d8d6cfaab8401428d9e674604a1ec..ee807e261e0d33dc3dcc229f95e29d11707826bc 100644 (file)
@@ -3,6 +3,7 @@
 #include <openssl/buffer.h>
 #include <openssl/err.h>
 #include <openssl/evp.h>
+
 #include "alloc.h"
 
 /*
index a6e05b6ad51e01684e5368443f96bea381c1037e..fb967bfc4ffe29f238e37ae27ed342d22cb475bb 100644 (file)
@@ -3,10 +3,10 @@
 #include <openssl/evp.h>
 
 #include "alloc.h"
+#include "asn1/oid.h"
 #include "common.h"
 #include "file.h"
 #include "log.h"
-#include "asn1/oid.h"
 
 static int
 get_md(char const *algorithm, EVP_MD const **result)
index f27fc336f4a477db64abcef3b7215699779b3ef9..b3ae47d48f80c89cdfdad74f840bde4442adeafb 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef SRC_HASH_H_
 #define SRC_HASH_H_
 
-#include "types/uri.h"
 #include "asn1/asn1c/BIT_STRING.h"
+#include "types/uri.h"
 
 int hash_validate_mft_file(struct rpki_uri *uri, BIT_STRING_t const *);
 int hash_validate_file(struct rpki_uri *, unsigned char const *, size_t);
index 11b0f0b1e83b5b5909b3a829744bb40d6a242c38..e23f252a06d7e95397751c0d0d4e9d191c97ca8b 100644 (file)
@@ -10,6 +10,7 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <unistd.h>
+
 #include "log.h"
 
 /*
index 96948a4a9fc994e5d77fc73f0119d5a86d7dd94d..7777ec2593f0aa3f332b9fa635963db3148b89cb 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef SRC_DATA_STRUCTURE_ARRAY_LIST_H_
 #define SRC_DATA_STRUCTURE_ARRAY_LIST_H_
 
-#include "log.h"
 #include "data_structure/common.h"
+#include "log.h"
 
 #define DEFINE_ARRAY_LIST_STRUCT(name, elem_type)                      \
        struct name {                                                   \
index a9ab658c0a2be436a53ad32767544b6274c75efb..4653379b9777cd7d8a141228177703c8107b5c68 100644 (file)
@@ -4,8 +4,8 @@
 
 #include "alloc.h"
 #include "config.h"
-#include "log.h"
 #include "crypto/hash.h"
+#include "log.h"
 
 #define SHA256_LEN (256 >> 3) /* 256 / 8, bits -> bytes */
 
index 89989d8380e3bf3af8bf8a0ff877751db160c409..a3c39cd8d14a9d2232b7ae6936bdc84afea3488e 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef SRC_DATA_STRUCTURE_PATH_BUILDER_H_
 #define SRC_DATA_STRUCTURE_PATH_BUILDER_H_
 
+#include <netdb.h>
+
 #include "types/uri.h"
 
 struct path_builder {
index 19283252ae2986f010d19af552a70eaa47de5fee..99045fa99f8c883991f0018fd02453f56016d8bb 100644 (file)
@@ -1,17 +1,17 @@
 #include "extension.h"
 
 #include <openssl/asn1t.h>
+#include <openssl/obj_mac.h>
 #include <openssl/objects.h>
-#include <openssl/x509v3.h>
 
 #include "cert_stack.h"
 #include "common.h"
+#include "crypto/hash.h"
 #include "json_util.h"
 #include "libcrypto_util.h"
 #include "log.h"
 #include "nid.h"
 #include "thread_var.h"
-#include "crypto/hash.h"
 
 static json_t *
 unimplemented(void const *arg)
index 91adbd423cf6ffb7c8f4553cc55f841dfef1252d..7b9362e29cf7114725b2227e8b267c01eacc2ba5 100644 (file)
@@ -2,6 +2,7 @@
 #define SRC_EXTENSION_H_
 
 #include <jansson.h>
+#include <openssl/asn1.h>
 #include <openssl/safestack.h>
 #include <openssl/x509.h>
 #include <stdbool.h>
index 1de8fc95d13024231d74943e160deff3d5494063..72c34b490d5a6afced64cf60a09825e614998bf4 100644 (file)
@@ -3,8 +3,8 @@
 #include <ftw.h>
 
 #include "alloc.h"
-#include "log.h"
 #include "data_structure/uthash.h"
+#include "log.h"
 
 int
 file_open(char const *file_name, FILE **result, struct stat *stat)
index a8218fc2c77eaa0dbd82776b8a662af0f8b142ca..0379a424813509a3f3f357e17408199c7ba77ee5 100644 (file)
@@ -3,7 +3,6 @@
 
 #include <dirent.h>
 #include <errno.h>
-#include <stdbool.h>
 #include <stddef.h>
 #include <stdio.h>
 #include <stdlib.h>
index 7bf062de48031baf7d15b7e5b568fef086c00703..bd4069b56d29e2cef8ede34cce13a9a229742a4a 100644 (file)
@@ -3,12 +3,12 @@
 #include <curl/curl.h>
 
 #include "alloc.h"
+#include "cache/local_cache.h"
 #include "common.h"
 #include "config.h"
+#include "data_structure/uthash.h"
 #include "file.h"
 #include "log.h"
-#include "data_structure/uthash.h"
-#include "cache/local_cache.h"
 
 struct http_handler {
        CURL *curl;
index dc5e49806283361388d3fed956f9090c448760c8..7b0c13e1527523453a0c5b57ee33cfbf9858e0f4 100644 (file)
@@ -1,10 +1,11 @@
 #include "incidence/incidence.h"
 
 #include <assert.h>
+
 #include "common.h"
+#include "data_structure/common.h"
 #include "json_util.h"
 #include "log.h"
-#include "data_structure/common.h"
 
 struct incidence {
        const enum incidence_id id;
index 9018188291459da91e023a0cd1256168efe50301..dbfb7bfd1e620fc282e57304ce288baa79730a93 100644 (file)
@@ -2,8 +2,8 @@
 
 #include "alloc.h"
 #include "config.h"
-#include "log.h"
 #include "http/http.h"
+#include "log.h"
 
 static int
 fetch_url(char const *url)
index 19f3cd687fccfeaca3186a163b039efa180129d1..79504090880ba92ee1002182168837c22f74480d 100644 (file)
@@ -4,8 +4,8 @@
 
 #include "alloc.h"
 #include "config.h"
-#include "log.h"
 #include "config/types.h"
+#include "log.h"
 
 static json_t *
 find_json(struct json_t *root, char const *full_name)
index 7c60b903831657571b995828ce8cf09a07e21405..858c3e0c903147f3e1e50acc13ba8673b9df00e1 100644 (file)
@@ -3,6 +3,7 @@
 #include <errno.h>
 #include <limits.h>
 #include <time.h>
+
 #include "log.h"
 
 /*
index 2608f5f7da5d5e6158224977584b87d8a4135667..db2e344b988e875dca0a2755f2e77740d332f8b8 100644 (file)
@@ -1,14 +1,16 @@
 #include "libcrypto_util.h"
 
-#include <stdlib.h>
-#include <openssl/asn1.h>
-#include <openssl/opensslv.h>
+#include <openssl/bio.h>
+#include <openssl/bn.h>
+#include <openssl/buffer.h>
+#include <openssl/objects.h>
 #include <openssl/pem.h>
+#include <time.h>
 
 #include "alloc.h"
+#include "asn1/asn1c/OBJECT_IDENTIFIER.h"
 #include "extension.h"
 #include "json_util.h"
-#include "asn1/asn1c/OBJECT_IDENTIFIER.h"
 
 /* Swallows @bio. */
 static json_t *
@@ -147,7 +149,7 @@ fail:       json_decref(root);
 }
 
 json_t *
-gn2json(GENERAL_NAME const *gn)
+gn2json(GENERAL_NAME *gn)
 {
        ASN1_IA5STRING *str;
        int type;
index 4045021c3e62997eb45d2a4bbbf7b6800c338724..493640c80dbf4ffef08c29d76a492a193cfd8642 100644 (file)
@@ -3,7 +3,9 @@
 
 #include <jansson.h>
 #include <openssl/asn1.h>
-#include <openssl/bio.h>
+#include <openssl/evp.h>
+#include <openssl/safestack.h>
+#include <openssl/x509.h>
 #include <openssl/x509v3.h>
 
 json_t *oid2json(ASN1_OBJECT const *);
@@ -11,7 +13,7 @@ json_t *asn1int2json(ASN1_INTEGER const *);
 json_t *asn1str2json(ASN1_STRING const *); /* octet string, bit string, etc */
 json_t *asn1time2json(ASN1_TIME const *);
 json_t *name2json(X509_NAME const *);
-json_t *gn2json(GENERAL_NAME const *);
+json_t *gn2json(GENERAL_NAME *);
 json_t *gns2json(GENERAL_NAMES const *);
 json_t *pubkey2json(EVP_PKEY *); /* LibreSSL needs not const */
 json_t *exts2json(const STACK_OF(X509_EXTENSION) *);
index 9ea0fea31161b151a4e2b49a75082c2f29e37dd3..ecff284eb3a192ac63711c4f48b5c5e789bf3168 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -1,10 +1,9 @@
 #include "log.h"
 
+#include <errno.h>
 #ifdef BACKTRACE_ENABLED
 #include <execinfo.h>
 #endif
-
-#include <errno.h>
 #include <openssl/err.h>
 #include <pthread.h>
 #include <signal.h>
index 8b0c6cfad321914a9eae6331285b27431c14755b..a8ac304dcc527c0e72d3e51389f01f9864a14a62 100644 (file)
--- a/src/log.h
+++ b/src/log.h
@@ -3,6 +3,7 @@
 
 #include <stdbool.h>
 #include <stdio.h>
+
 #include "incidence/incidence.h"
 
 /*
index 1f88bd14320321c9de59567c4eab10d4d2988cbd..64581afbf42bcc9cf752bfaa9391b4c2e8ac9c1e 100644 (file)
@@ -2,14 +2,14 @@
 
 #include "config.h"
 #include "extension.h"
-#include "log.h"
-#include "nid.h"
-#include "thread_var.h"
 #include "http/http.h"
 #include "incidence/incidence.h"
+#include "log.h"
+#include "nid.h"
 #include "print_file.h"
-#include "rtr/rtr.h"
 #include "rtr/db/vrps.h"
+#include "rtr/rtr.h"
+#include "thread_var.h"
 #include "xml/relax_ng.h"
 
 static int
index 74816d8c8f970786b459951cb19eacd2baece3d2..b801b95e65efb672aabb00dd093fc1d858cd7a94 100644 (file)
--- a/src/nid.c
+++ b/src/nid.c
@@ -1,6 +1,7 @@
 #include "nid.h"
 
 #include <errno.h>
+#include <openssl/obj_mac.h>
 #include <openssl/objects.h>
 
 #include "log.h"
index 7da60091526038fb6c5f20f0ca38f0f6549aa614..7847405d695cf3c56eeec85f296f56c7bf9ab6d6 100644 (file)
@@ -2,8 +2,8 @@
 
 #include "alloc.h"
 #include "log.h"
-#include "validation_handler.h"
 #include "object/certificate.h"
+#include "validation_handler.h"
 
 struct resource_params {
        unsigned char const *ski;
index 51dc590f772e114f209efed3032d83012512cc38..50524882c36aa69b21b351c6a55b8ec0f443160e 100644 (file)
@@ -2,37 +2,37 @@
 
 #include <openssl/asn1t.h>
 #include <openssl/bio.h>
+#if OPENSSL_VERSION_MAJOR >= 3
+#include <openssl/core_names.h>
+#endif
 #include <openssl/evp.h>
+#include <openssl/obj_mac.h>
 #include <openssl/objects.h>
 #include <openssl/rsa.h>
 #include <openssl/x509v3.h>
 #include <syslog.h>
 
-#if OPENSSL_VERSION_MAJOR >= 3
-#include <openssl/core_names.h>
-#endif
-
 #include "algorithm.h"
 #include "alloc.h"
-#include "cert_stack.h"
-#include "config.h"
-#include "extension.h"
-#include "log.h"
-#include "nid.h"
-#include "rrdp.h"
-#include "str_token.h"
-#include "thread_var.h"
+#include "asn1/asn1c/IPAddrBlocks.h"
 #include "asn1/decode.h"
 #include "asn1/oid.h"
-#include "asn1/asn1c/IPAddrBlocks.h"
+#include "cache/local_cache.h"
+#include "cert_stack.h"
+#include "config.h"
 #include "crypto/hash.h"
 #include "data_structure/array_list.h"
+#include "extension.h"
 #include "incidence/incidence.h"
+#include "log.h"
+#include "nid.h"
 #include "object/bgpsec.h"
-#include "object/name.h"
 #include "object/manifest.h"
+#include "object/name.h"
 #include "object/signed_object.h"
-#include "cache/local_cache.h"
+#include "rrdp.h"
+#include "str_token.h"
+#include "thread_var.h"
 
 /*
  * The X509V3_EXT_METHOD that references NID_sinfo_access uses the AIA item.
index ad4c2a39a6719d2dae7f4a2ac43d4a13eb869c54..8045425896a03024a811da5eb1201f198e64b36e 100644 (file)
@@ -1,12 +1,12 @@
 #ifndef SRC_OBJECT_CERTIFICATE_H_
 #define SRC_OBJECT_CERTIFICATE_H_
 
+#include "asn1/asn1c/ANY.h"
+#include "asn1/asn1c/SignatureValue.h"
 #include "certificate_refs.h"
 #include "resource.h"
 #include "rpp.h"
 #include "types/uri.h"
-#include "asn1/asn1c/ANY.h"
-#include "asn1/asn1c/SignatureValue.h"
 
 /* Certificate types in the RPKI */
 enum cert_type {
index aa0b3ba52954ed61661809daf7dc7c26ef3cd9cd..78e9bfbed22e5bab0ec7ac413de32743a3f196fc 100644 (file)
@@ -3,11 +3,12 @@
 #include <openssl/bio.h>
 #include <openssl/bn.h>
 #include <syslog.h>
+
 #include "algorithm.h"
 #include "extension.h"
 #include "log.h"
-#include "thread_var.h"
 #include "object/name.h"
+#include "thread_var.h"
 
 static int
 __crl_load(struct rpki_uri *uri, X509_CRL **result)
index 3c80d470c48d0caead6d22ee047900e1ae8de357..7aacffdf4b362418c093a08fd5b763b131fc5719 100644 (file)
@@ -2,6 +2,7 @@
 #define SRC_OBJECT_CRL_H_
 
 #include <openssl/x509.h>
+
 #include "types/uri.h"
 
 int crl_load(struct rpki_uri *uri, X509_CRL **);
index 19a1b1b63337506e3063d058d76c65b19c38d882..b25cc0843506730db80fb22e7d0f861940e3513c 100644 (file)
@@ -1,10 +1,10 @@
 #include "object/ghostbusters.h"
 
-#include "log.h"
-#include "thread_var.h"
 #include "asn1/oid.h"
+#include "log.h"
 #include "object/signed_object.h"
 #include "object/vcard.h"
+#include "thread_var.h"
 
 static int
 handle_vcard(struct signed_object *sobj)
index d3267644d1bb23c8291e7a3c5faba0526e49163e..de150a72803e84f0b339d02bab79856c59a05eec 100644 (file)
@@ -1,18 +1,18 @@
 #include "object/manifest.h"
 
 #include "algorithm.h"
-#include "common.h"
-#include "log.h"
-#include "thread_var.h"
-#include "asn1/decode.h"
-#include "asn1/oid.h"
 #include "asn1/asn1c/GeneralizedTime.h"
 #include "asn1/asn1c/Manifest.h"
+#include "asn1/decode.h"
+#include "asn1/oid.h"
+#include "common.h"
 #include "crypto/hash.h"
+#include "log.h"
 #include "object/certificate.h"
 #include "object/crl.h"
 #include "object/roa.h"
 #include "object/signed_object.h"
+#include "thread_var.h"
 
 static int
 cage(struct rpki_uri **uri, struct rpki_uri *notif)
index fa59cf25cf0e93299e237bdd54683ce7105c38b0..f1b66b39584c7dc1cbd4236e6edf08476830809d 100644 (file)
@@ -1,6 +1,7 @@
 #include "object/name.h"
 
 #include <openssl/asn1.h>
+#include <openssl/obj_mac.h>
 #include <openssl/objects.h>
 #include <syslog.h>
 
index 99ff75f97772543127c3cbc1c3070d01b0c8856c..42e0379fb39b764ef0dbca72cc2a7b60c9508695 100644 (file)
@@ -1,12 +1,12 @@
 #include "object/roa.h"
 
-#include "config.h"
-#include "log.h"
-#include "thread_var.h"
+#include "asn1/asn1c/RouteOriginAttestation.h"
 #include "asn1/decode.h"
 #include "asn1/oid.h"
-#include "asn1/asn1c/RouteOriginAttestation.h"
+#include "config.h"
+#include "log.h"
 #include "object/signed_object.h"
+#include "thread_var.h"
 
 static int
 decode_roa(struct signed_object *sobj, struct RouteOriginAttestation **result)
index 0efd1f0a922baf0d338314170b81f85e8a687315..0ed8805f3decb60097b99967923f048716334a78 100644 (file)
@@ -1,7 +1,7 @@
 #include "object/signed_object.h"
 
-#include "log.h"
 #include "asn1/content_info.h"
+#include "log.h"
 
 int
 signed_object_decode(struct signed_object *sobj, struct rpki_uri *uri)
index ebc588f40f2c288d75711a116081fd4d1d1a8b55..2a60f655db33cf8478098c5536a6f52afeafec71 100644 (file)
@@ -6,18 +6,18 @@
 #include <time.h>
 
 #include "alloc.h"
+#include "cache/local_cache.h"
 #include "cert_stack.h"
 #include "common.h"
 #include "config.h"
+#include "crypto/base64.h"
 #include "line_file.h"
 #include "log.h"
+#include "object/certificate.h"
+#include "rtr/db/vrps.h"
 #include "state.h"
 #include "thread_var.h"
 #include "validation_handler.h"
-#include "crypto/base64.h"
-#include "object/certificate.h"
-#include "rtr/db/vrps.h"
-#include "cache/local_cache.h"
 
 typedef int (*foreach_uri_cb)(struct tal *, struct rpki_uri *, void *);
 
index dfa3af4da363424ab9e148e0ce6d29fa082e6adc..cd909464789de5942e6352809557d8eaa3a0c335 100644 (file)
@@ -3,8 +3,8 @@
 
 /* This is RFC 8630. */
 
-#include "types/uri.h"
 #include "rtr/db/db_table.h"
+#include "types/uri.h"
 
 struct tal;
 
index 946dbd146da0655d101960d5a5fd080dba136331..c4f8fb8d17a1b87112627c73891f13ad0ebed47f 100644 (file)
@@ -2,9 +2,9 @@
 
 #include "common.h"
 #include "config.h"
+#include "crypto/base64.h"
 #include "file.h"
 #include "log.h"
-#include "crypto/base64.h"
 #include "types/vrp.h"
 
 typedef struct json_out {
index 57eb6048b5921bacd9a0a09acae9005302a223ed..423e68e7379bb2da63e225ca33020299db9482d3 100644 (file)
@@ -1,16 +1,15 @@
 #include "print_file.h"
 
-#include <errno.h>
-#include <stdlib.h>
-
+#include "asn1/asn1c/CRL.h"
+#include "asn1/asn1c/Certificate.h"
+#include "asn1/asn1c/ber_decoder.h"
+#include "asn1/asn1c/json_encoder.h"
+#include "asn1/content_info.h"
 #include "common.h"
 #include "config.h"
+#include "data_structure/path_builder.h"
 #include "file.h"
 #include "log.h"
-#include "asn1/content_info.h"
-#include "asn1/asn1c/Certificate.h"
-#include "asn1/asn1c/CRL.h"
-#include "data_structure/path_builder.h"
 #include "rsync/rsync.h"
 #include "types/bio_seq.h"
 #include "types/uri.h"
index 3c35364887317e33423a16665e2ea87597002542..33ee85e639c88b5f32ac0b82c53d76dc2a1319d2 100644 (file)
@@ -5,11 +5,11 @@
 #include "alloc.h"
 #include "cert_stack.h"
 #include "log.h"
+#include "resource/ip4.h"
+#include "resource/ip6.h"
 #include "sorted_array.h"
 #include "thread_var.h"
 #include "types/address.h"
-#include "resource/ip4.h"
-#include "resource/ip6.h"
 
 /* The resources we extracted from one certificate. */
 struct resources {
index f40877a9ea517dc43411d5d62efe377180c98efd..661e3b7bae0280e1704f79dc803ef496ac557085 100644 (file)
@@ -1,10 +1,10 @@
 #ifndef SRC_RESOURCE_H_
 #define SRC_RESOURCE_H_
 
-#include "resource/asn.h"
-#include "types/address.h"
 #include "asn1/asn1c/ASIdentifiers.h"
 #include "asn1/asn1c/IPAddressFamily.h"
+#include "resource/asn.h"
+#include "types/address.h"
 
 enum rpki_policy {
        /**
index 665f40023d76b692c0b86d5131df82f99df5bac0..058cbd33be2be785dcf228761215ed827d53d03d 100644 (file)
@@ -2,6 +2,7 @@
 #define SRC_RESOURCE_ASN_H_
 
 #include <stdbool.h>
+
 #include "as_number.h"
 #include "asn1/asn1c/ASId.h"
 
index e8d795f93e9dca9802467a80eb1f50b2fd194d6a..42b0e4af88fb9aa61f53e46725e933e3b3a417d5 100644 (file)
--- a/src/rpp.c
+++ b/src/rpp.c
@@ -2,14 +2,14 @@
 
 #include "alloc.h"
 #include "cert_stack.h"
-#include "log.h"
-#include "thread_var.h"
-#include "types/uri.h"
 #include "data_structure/array_list.h"
+#include "log.h"
 #include "object/certificate.h"
 #include "object/crl.h"
 #include "object/ghostbusters.h"
 #include "object/roa.h"
+#include "thread_var.h"
+#include "types/uri.h"
 
 /** A Repository Publication Point (RFC 6481), as described by some manifest. */
 struct rpp {
index f8eb4dde41ac132c1f63e9363d6423b2ff630ed0..f328b911a5fed0c2d36f5efa336eb5779ad28476 100644 (file)
--- a/src/rpp.h
+++ b/src/rpp.h
@@ -3,6 +3,7 @@
 
 #include <openssl/safestack.h>
 #include <openssl/x509.h>
+
 #include "types/uri.h"
 
 struct rpp;
index efd18dbf6d78d821fc5c366cc8749c41edca8fc6..4e2a74ebd97a13a12f46d7c4deef5763ddbff93b 100644 (file)
@@ -3,15 +3,16 @@
 #include <ctype.h>
 #include <openssl/bn.h>
 #include <openssl/evp.h>
+#include <openssl/sha.h>
 
 #include "alloc.h"
+#include "cache/local_cache.h"
 #include "common.h"
+#include "crypto/base64.h"
+#include "crypto/hash.h"
 #include "file.h"
 #include "log.h"
 #include "thread_var.h"
-#include "cache/local_cache.h"
-#include "crypto/base64.h"
-#include "crypto/hash.h"
 #include "xml/relax_ng.h"
 
 /* RRDP's XML namespace */
index 2f8bbb73900c9b14251a263d150a48230d268e45..f2736e4a62c0cd7be840c152d278c84a2ce5f3ea 100644 (file)
@@ -3,8 +3,8 @@
 #include <errno.h>
 
 #include "alloc.h"
-#include "log.h"
 #include "data_structure/uthash.h"
+#include "log.h"
 
 struct hashable_roa {
        struct vrp data;
index e6ac9e37e1a5490ec6f3bdbcccc777cdc1da55b2..af86cdfd8d7a6d64e2cb18d15a543e806b0eab58 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef SRC_RTR_DB_DB_TABLE_H_
 #define SRC_RTR_DB_DB_TABLE_H_
 
+#include "rtr/db/delta.h"
 #include "types/address.h"
 #include "types/vrp.h"
-#include "rtr/db/delta.h"
 
 struct db_table;
 
index d7d5fae3321fc4ffafebd5e3bb169815394aee25..1689e3f534a408b3b9d1726aea5e80431e679fb8 100644 (file)
@@ -1,9 +1,10 @@
 #include "rtr/db/delta.h"
 
 #include <stdatomic.h>
+
 #include "alloc.h"
-#include "types/address.h"
 #include "data_structure/array_list.h"
+#include "types/address.h"
 
 struct delta_v4 {
        uint32_t as;
index 085b50784ee1018524af464e34cbfced10f23fc2..65e687cd8ed90abb36367526f6424d426246d7f3 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef SRC_RTR_DB_DELTAS_ARRAY_H_
 #define SRC_RTR_DB_DELTAS_ARRAY_H_
 
-#include "types/serial.h"
 #include "rtr/db/delta.h"
+#include "types/serial.h"
 
 struct deltas_array;
 
index 3bfe42f6dd33a8867078b8b782fee244e21de0c4..97a95175832b4aa6155785ea7e3e5ee655679b10 100644 (file)
@@ -6,14 +6,14 @@
 #include "alloc.h"
 #include "common.h"
 #include "config.h"
-#include "output_printer.h"
-#include "validation_handler.h"
-#include "types/router_key.h"
 #include "data_structure/array_list.h"
 #include "object/tal.h"
-#include "rtr/rtr.h"
+#include "output_printer.h"
 #include "rtr/db/db_table.h"
+#include "rtr/rtr.h"
 #include "slurm/slurm_loader.h"
+#include "types/router_key.h"
+#include "validation_handler.h"
 
 struct vrp_node {
        struct delta_vrp delta;
index 73a66dbad3e30339cb51a7f9331fb80ba81ad1c6..0020f6d1a63c284d208e61255c1d0e894c13d677 100644 (file)
@@ -8,8 +8,8 @@
  */
 
 #include "as_number.h"
-#include "types/address.h"
 #include "rtr/db/deltas_array.h"
+#include "types/address.h"
 
 int vrps_init(void);
 void vrps_destroy(void);
index bb2d5ae1b12a4f9094078e2a9ce0a8767dce5e87..bf032defbb7c458e2655526d73522e8f28daa229 100644 (file)
@@ -1,9 +1,10 @@
 #include "rtr/err_pdu.h"
 
 #include <errno.h>
+
 #include "alloc.h"
-#include "rtr/pdu_sender.h"
 #include "log.h"
+#include "rtr/pdu_sender.h"
 
 typedef enum rtr_error_code {
        ERR_PDU_CORRUPT_DATA                    = 0,
index f8e42e7d688a6e8544b53f0ef8d874444c7ae9b5..b25c1dda00ef69d48035d9c567dd0b465e15f4cd 100644 (file)
@@ -1,9 +1,16 @@
 #ifndef RTR_PDU_H_
 #define RTR_PDU_H_
 
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <unistd.h>
+
 #include "common.h"
-#include "types/router_key.h"
 #include "rtr/rtr.h"
+#include "types/router_key.h"
 
 enum rtr_version {
        RTR_V0                  = 0,
index 62dadde9c096aa7ad1f519bd86c34ec4bd10d6b7..dd82eb016fb984e5301727247795b7e0dd560eb8 100644 (file)
@@ -1,6 +1,7 @@
 #include "rtr/pdu_handler.h"
 
 #include <errno.h>
+
 #include "log.h"
 #include "rtr/err_pdu.h"
 #include "rtr/pdu_sender.h"
index cecb95d75f68a70caa48e6bfde622e20049cbc02..a3009be140fcb736272da36600319f866495145c 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef SRC_RTR_PDU_SENDER_H_
 #define SRC_RTR_PDU_SENDER_H_
 
+#include "rtr/db/vrps.h"
 #include "rtr/pdu.h"
 #include "types/router_key.h"
-#include "rtr/db/vrps.h"
 
 int send_serial_notify_pdu(int, uint8_t, serial_t);
 int send_cache_reset_pdu(int, uint8_t);
index a3dffff516ad623263ac7b0e18598920c1bbf62e..f28906f378cc4c6f1790c39b2cf261e3d65195e7 100644 (file)
@@ -2,10 +2,10 @@
 
 #include <errno.h>
 
-#include "log.h"
 #include "alloc.h"
-#include "rtr/pdu.h"
+#include "log.h"
 #include "rtr/err_pdu.h"
+#include "rtr/pdu.h"
 
 enum buffer_state {
        /* We've read all available bytes for now. */
index e0f279e98596ecdba596b5309ae802b1c0fda98a..4622291427708a06c6999461d9d7f40ea44993f7 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef SRC_RTR_PDU_STREAM_H_
 #define SRC_RTR_PDU_STREAM_H_
 
+#include "data_structure/array_list.h"
 #include "rtr/pdu.h"
 #include "rtr/rtr.h"
-#include "data_structure/array_list.h"
 
 struct pdu_stream; /* It's an *input* stream. */
 
index eef1cb613dd6b9fa086433f87606c0536ca57f79..69d9e96a4881b71d479de8e1fd07f1d418803331 100644 (file)
@@ -6,15 +6,15 @@
 
 #include "alloc.h"
 #include "config.h"
-#include "types/address.h"
 #include "data_structure/array_list.h"
+#include "rtr/db/vrps.h"
 #include "rtr/err_pdu.h"
 #include "rtr/pdu.h"
 #include "rtr/pdu_handler.h"
 #include "rtr/pdu_sender.h"
 #include "rtr/pdu_stream.h"
-#include "rtr/db/vrps.h"
 #include "thread/thread_pool.h"
+#include "types/address.h"
 #include "types/serial.h"
 
 struct rtr_server {
index 5dd988fb4f2c02f5583d983caa8b85f9ae67a521..2eefde3b37095b1dffb566be0f31703334e1cf9d 100644 (file)
@@ -3,8 +3,9 @@
 
 #include <openssl/evp.h>
 #include <sys/queue.h>
-#include "types/vrp.h"
+
 #include "types/router_key.h"
+#include "types/vrp.h"
 
 /* Flags to get data from structs */
 #define SLURM_COM_FLAG_NONE            0x00
index 6562a4692a20f90c4d19bed832058b83eb94792e..91ace54beeeb2aee5576ba9d86286c1b1830bfb0 100644 (file)
@@ -1,11 +1,12 @@
 #include "slurm/slurm_loader.h"
 
 #include <errno.h>
+
 #include "alloc.h"
-#include "log.h"
-#include "config.h"
 #include "common.h"
+#include "config.h"
 #include "crypto/hash.h"
+#include "log.h"
 #include "slurm/slurm_parser.h"
 
 #define SLURM_FILE_EXTENSION   ".slurm"
index 0c5ce11bf95c0005d91cf40520cead9b95739f35..e03f3d28ceace9fd59b17e0bc058eb32ea5d281e 100644 (file)
@@ -3,14 +3,14 @@
 #include <errno.h>
 #include <openssl/asn1.h>
 
-#include "crypto/base64.h"
 #include "algorithm.h"
 #include "alloc.h"
+#include "crypto/base64.h"
 #include "json_util.h"
 #include "log.h"
+#include "slurm/db_slurm.h"
 #include "types/address.h"
 #include "types/router_key.h"
-#include "slurm/db_slurm.h"
 
 /* JSON members */
 #define SLURM_VERSION                  "slurmVersion"
index a21f4bb4c71ef632f8e4848d75ea84b8921175f1..5b1d30f0f159648a2541bc5d176a3890ef9e7be7 100644 (file)
@@ -1,10 +1,10 @@
 #include "state.h"
 
 #include "alloc.h"
+#include "cache/local_cache.h"
 #include "cert_stack.h"
 #include "log.h"
 #include "thread_var.h"
-#include "cache/local_cache.h"
 
 /**
  * The current state of the validation cycle.
index 47374f74fd515be5fcf9dee96c8917958b02981d..1da419a77087dea1c74530ccaebe1704d824c8d4 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef SRC_STATE_H_
 #define SRC_STATE_H_
 
-#include "validation_handler.h"
 #include "object/tal.h"
+#include "validation_handler.h"
 
 struct validation;
 
index 186a28452e24d8fbb485182b6bbb97374c1dfcc9..7ec30d102fcd8f43583a21c4a3dd6447b96f5656 100644 (file)
@@ -1,6 +1,7 @@
 #include "thread/thread_pool.h"
 
 #include <sys/queue.h>
+
 #include "alloc.h"
 #include "common.h"
 #include "log.h"
index 749a6565bb2e36ee99ffc759e3413530b06eb7b3..188c89b2d399114564c6c6436b70a75173f85a07 100644 (file)
@@ -1,8 +1,10 @@
 #ifndef SRC_TYPES_ADDRESS_H_
 #define SRC_TYPES_ADDRESS_H_
 
+#include <netdb.h>
 #include <stdbool.h>
 #include <sys/socket.h>
+
 #include "asn1/asn1c/IPAddress.h"
 #include "asn1/asn1c/IPAddressRange.h"
 
index c11c377e54e1f5b1be06fc259b451e5dcc6b8b88..3f68c986b9ea72749092b29a24d55097b19cdaa0 100644 (file)
@@ -1,7 +1,7 @@
 #include "types/bio_seq.h"
 
-#include "log.h"
 #include "alloc.h"
+#include "log.h"
 
 static BIO_METHOD *method;
 
index 85ac41e585746c01219a85efc0af99282cd88cbb..cdc0f4dd4d192c314988f7124bfe8653f71d451f 100644 (file)
@@ -3,13 +3,13 @@
 #include "alloc.h"
 #include "common.h"
 #include "config.h"
+#include "config/filename_format.h"
+#include "data_structure/path_builder.h"
 #include "log.h"
 #include "rrdp.h"
 #include "state.h"
 #include "str_token.h"
 #include "thread_var.h"
-#include "config/filename_format.h"
-#include "data_structure/path_builder.h"
 
 /**
  * Design notes:
index e70ca1ad55b621f854234df0ca295f1ced185762..9beec0a07fd3640b7158e65f7cf018d43627a631 100644 (file)
@@ -2,9 +2,9 @@
 #define SRC_VALIDATION_HANDLER_H_
 
 #include "as_number.h"
+#include "object/name.h"
 #include "types/address.h"
 #include "types/router_key.h"
-#include "object/name.h"
 
 /**
  * Functions that handle validation results.