# Temporal files
*~
-tmp/
+tmp
# Unwanted manure shat by imbecile OSs
.DS_Store*
AUTOMAKE_OPTIONS = foreign
-SUBDIRS = src test
+SUBDIRS = src $(MAYBE_TESTS)
+DIST_SUBDIRS = src
Further information can be found in the subsections below.
-| RFC | Implemented |
-|----------------------------------|-------------|
-| 3779 (IP & AS Extensions) | 100% |
-| 6350 (VCARD) | 0% |
-| 6482 (ROA) | 100% |
-| 6486 (Manifests) | 75% |
-| 6488 (Signed Objects) | 90% |
-| 6487, 7318 (Certificates & CRLs) | 100% |
-| 6493 (Ghostbusters) | 100% |
-| 7730 (TALs) | 100% |
-| 7935 (RPKI algorithms) | 100% |
-| 8182 (RRDP) | 0% |
-| 8209 (BGPSec Certificates) | 0% |
-| 8360 (Validation Reconsidered) | 100% |
-
-### RFC 6350 (VCARD)
-
-The VCARD format is only used by Ghostbusters records. 6350 defines the basic VCARD format, while 6493 defines additional requirements for Ghostbusters-specific VCARDs.
-
-The specific requirements have been implemented, while the basic ones have not.
+| RFC | Implemented |
+|----------------------------------------------------------------------------|-------------|
+| [3779](https://tools.ietf.org/html/rfc3779) (IP & AS Extensions) | 100% |
+| [6350](https://tools.ietf.org/html/rfc6350) (vCard) | 0% |
+| [6482](https://tools.ietf.org/html/rfc6482) (ROA) | 100% |
+| [6486](https://tools.ietf.org/html/rfc6486) (Manifests) | 75% |
+| [6487](https://tools.ietf.org/html/rfc6487) (Resource Certificates & CRLs) | 100% |
+| [6488](https://tools.ietf.org/html/rfc6488) (Signed Objects) | 90% |
+| [6493](https://tools.ietf.org/html/rfc6493) (Ghostbusters) | 100% |
+| [7318](https://tools.ietf.org/html/rfc7318) (Policy Qualifiers) | 100% |
+| [7730](https://tools.ietf.org/html/rfc7730) (TALs) | 100% |
+| [7935](https://tools.ietf.org/html/rfc7935) (RPKI algorithms) | 100% |
+| [8182](https://tools.ietf.org/html/rfc8182) (RRDP) | 0% |
+| [8209](https://tools.ietf.org/html/rfc8209) (BGPSec Certificates) | 0% |
+| [8360](https://tools.ietf.org/html/rfc8360) (Validation Reconsidered) | 100% |
+
+### RFC 6350 (vCard)
+
+The vCard format is only used by Ghostbusters records. 6350 defines the basic vCard format, while 6493 defines additional requirements for Ghostbusters-specific vCard.
+
+The specific validations have been implemented, while the basic ones have not.
### RFC 6486 (Manifests)
AC_SEARCH_LIBS([d2i_X509_bio], [crypto], [],
[AC_MSG_ERROR([unable to find the d2i_X509_bio() function])]
)
-
AC_SEARCH_LIBS([toml_parse], [toml], [],
[AC_MSG_ERROR([unable to find the toml_parse() function])]
)
-
AC_SEARCH_LIBS([backtrace],[execinfo],[],
[AC_MSG_ERROR([unable to find backtrace() function])]
)
+# Dependencies managed by pkg-config
+
+# By the way: Apparently PKG_CHECK_MODULES is poor practice now. I can't tell;
+# it's always the same guy complaining about it in Stack Overflow.
+# (Main one: https://stackoverflow.com/questions/10220946)
+# But I couldn't make check work with AC_SEARCH_LIBS, and (probably due to
+# typical obscure bullshit autotools reasoning) I have no idea why.
+
+AC_ARG_WITH(
+ [unit-tests],
+ AS_HELP_STRING(
+ [--with-unit-tests],
+ [Generate unit tests. (Requires pkg-config and check)]
+ )
+)
-# Check dependencies.
-PKG_CHECK_MODULES([CHECK], [check])
+# https://www.gnu.org/software/automake/manual/html_node/Conditional-Subdirectories.html
+# "Subdirectories with AM_CONDITIONAL" never worked for me. The problem might
+# be that it puts `MAYBE_TESTS` in `.PRECIOUS`, which maybe is a bug in the
+# autotools. (I honestly can't tell. They are so incredibly poorly designed.)
+# The code below is implemented as "Subdirectories with AC_SUBST."
+#
+# https://autotools.io/pkgconfig/pkg_check_modules.html#pkgconfig.pkg_check_modules.optional
+# Note: Since Check is the only current user of pkg-config, I don't want to
+# force pkg-config as a dependency; it should only be needed by people who want
+# to unit test. That's why I chose to use an `if` (which skips the
+# `PKG_CHECK_MODULES` on false) instead of an `AS_IF` (which evaluates all paths
+# apparently). In other words, if you ever want to add another pkg-config
+# dependency, you will need the `AS_IF` version.
+if test "x$with_unit_tests" = "xyes"; then
+ PKG_CHECK_MODULES([CHECK], [check])
+ MAYBE_TESTS=test
+else
+ MAYBE_TESTS=
+fi
+AC_SUBST([MAYBE_TESTS])
# Spit out the makefiles.
AC_OUTPUT(Makefile src/Makefile test/Makefile)
int error;
error = download_files(uri);
- if (error)
- return pr_warn("TAL URI '%s' could not be RSYNC'd.");
+ if (error) {
+ return pr_warn("TAL URI '%s' could not be RSYNC'd.",
+ uri->global);
+ }
error = validation_prepare(&state, tal);
if (error)
--- /dev/null
+# Unit Tests
+
+This code is left out of the build by default. If you want to run the tests, configure like this (in the parent directory):
+
+ ./configure --with-unit-tests
+
+Then, to actually run the tests, use
+
+ make check
return false;
}
+enum filename_format
+config_get_filename_format(void)
+{
+ return FNF_NAME;
+}
char *
config_get_rsync_program(void)