Removed submodules, made them build/runtime dependencies
authorRick van Rein <rick@openfortress.nl>
Thu, 19 May 2016 21:59:20 +0000 (22:59 +0100)
committerRick van Rein <rick@openfortress.nl>
Thu, 19 May 2016 21:59:20 +0000 (22:59 +0100)
 - "derdump" can be installed with the (advised) hexio companion package
 - "asn2quickder" can be installed with the "asn2quickder" package

.gitmodules [deleted file]
INSTALL.MD
Makefile
USING.MD
arpa2/Makefile [deleted file]
rfc/Makefile

diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644 (file)
index f1b3e6d..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-[submodule "tool/hexio"]
-       path = tool/hexio
-       url = https://github.com/vanrein/hexio
-[submodule "tool/asn1ate"]
-       path = tool/asn1ate
-       url = https://github.com/vanrein/asn2quickder
index 28f9ec7..92db236 100644 (file)
@@ -5,25 +5,31 @@
 The basic installation that provides you with the library:
 
     ./configure
-    #OPTIONAL# make mount
     make all
     make install
 
 Other customary build targets include `clean`, `uninstall`.
 
-There is an additional build target `mount` that will incorporate two
-other GIT repositories, and use them during building and installing.
-The result will be additional resources:
+There a few additional utilities that you may need to use alongside
+Quick DER.
+
+  * Include files based on standards, such as RFCs.  The intention is to have
+    a growing set of standards-based include files that can readily be included
+    into a DER project for analysis with Quick-DER.  To build those, there
+    is a need to have an executable `asn2quickder` installed while building
+    Quick DER.
+    You can find the tool in the
+    [asn2quickder](https://github.com/vanrein/asn2quickder)
+    webpage.  This tool is based on
+    [asn1ate](https://github.com/kimgr/asn1ate)
+    and relies on [pyparsing](https://pypi.python.org/pypi/pyparsing).
+    Note that `asn2quickder` is "good enough" for the mapping of at least
+    an important part of the RFCs, but it is work that can still be improved.
 
   * A utility `derdump` that is dumps even *wrongly formatted* DER-encoded
     data.  This is extremely useful to ASN.1 developers, and there does not
     seem to be a comparable tool anywhere else (?)
+    You can find the tool in the [hexio](https://github.com/vanrein/hexio)
+    which is suggested as a co-install for Quick DER.
 
-  * Include files based on standards, such as RFCs.  The intention is to have
-    a growing set of standards-based include files that can readily be included
-    into a DER project for analysis with Quick-DER.
-
-Note that after `make mount` you may need extra facilities to be able to run
-the [asn2quickder](https://github.com/vanrein/asn2quickder) submodule.
-Specifically, it relies on [pyparsing](https://pypi.python.org/pypi/pyparsing).
 
index da1023b..877ae62 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 DESTDIR ?=
 PREFIX ?= /usr/local
 
-# SUBDIRS = lib asn2qder test rfc arpa2
+# SUBDIRS = lib asn2qder test rfc arpa2 itu
 SUBDIRS = lib tool test rfc
 
 SUBMAKE=$(MAKE) PREFIX='$(PREFIX)' DESTDIR='$(DESTDIR)'
@@ -23,5 +23,3 @@ uninstall:
 clean:
        @ $(foreach d,$(SUBDIRS),$(SUBMAKE) -C '$d' clean &&) echo "Cleaned all subdirectories"
 
-mount:
-       git submodule update --init
index ecbffb8..57b6928 100644 (file)
--- a/USING.MD
+++ b/USING.MD
@@ -23,24 +23,24 @@ parser specification file:
 Your source code dealing with DER should read the entire block, and pass it to
 the DER parser.  Initially, it would include:
 
-    #include <der/qparse.h>
+    #include <quick-der/api.h>
     #include "myderparser.h"
 
 and builing should include:
 
     gcc -o myparser.o myparser.c
-    gcc ... myderparser.o -lqder
+    gcc ... myderparser.o -lquickder
 
 You may be lucky, and find your favourite spec precompiled.  In that case, you
 can limit yourself to things like:
 
     #define RFC5280_PREFIX pkix_
-    #include <der/qparse.h>
+    #include <quick-der/api.h>
     #include <der/rfc5280.h>
 
 and link with simply:
 
-    gcc ... -lqder
+    gcc ... -lquickder
 
 
 ### Parsing DER structures
@@ -57,15 +57,15 @@ are accustomed to:
 
 Now, to invoke the parser, you setup a cursor describing the entire content,
 
-   dercursor_t thelot;
-   thelot.derptr = ...pointer-to-data...;
-   thelot.derlen = ...length-of-data...;
+    dercursor_t thelot;
+    thelot.derptr = ...pointer-to-data...;
+    thelot.derlen = ...length-of-data...;
 
 then you invoke the parser, providing it with storage space and the
 precompiled structure to follow while parsing:
 
-   struct pkix_Certificate crt;
-   int prsok = der_unpack (&thelot, asn1_pkix_Certificate, &crt, 1);
+    struct pkix_Certificate crt;
+    int prsok = der_unpack (&thelot, asn1_pkix_Certificate, &crt, 1);
 
 This will parse the DER-encoded data in `thelot` and store the various fields
 in `crt`, so it becomes available as individual cursor structures such as
diff --git a/arpa2/Makefile b/arpa2/Makefile
deleted file mode 100644 (file)
index e0f388e..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# This directory holds .asn1 files derived from the pristine versions in orig/
-# that were adapted (and commented with "--asn1ate" where this is done) to make
-# it pass through the compiler.
-#
-# Current TODO:
-#  - order definitions, the compiler now runs into problems
-#  - check for undefined names, if possible
-#  - map ... to DER_PACK_OPTIONAL, DER_PACK_LEAVE -- and process accordingly
-#
-
-HEADERS = RemotePKCS11.h KXOVER.h
-LITERATE = RemotePKCS11.md RemotePKCS11.rst RemotePKCS11.html RemotePKCS11.epub \
-               RemotePKCS11.tex RemotePKCS11.pdf \
-               KXOVER.md KXOVER.rst KXOVER.html KXOVER.epub KXOVER.tex KXOVER.pdf \
-               KXOVER.txt \
-               CommunicationFilter.md
-TARGETS = $(HEADERS) $(LITERATE)
-
-ASN2QUICKDER_DIR = ../tool/asn1ate
-
-ASN2QUICKDER = PYTHONPATH='$(ASN2QUICKDER_DIR)' $(ASN2QUICKDER_DIR)/asn1ate/asn2quickder.py
-
-ASNLITERATE = ../tool/asn1literate.py 
-
-KXOVER_DEPS = ../rfc/rfc4120.asn1 ../rfc/rfc5280.asn1
-
-all: $(TARGETS) test
-
-test: $(HEADERS)
-       @ $(foreach h,$(HEADERS),echo > '$(h:.h=.c)' '#include "$(h)"' && gcc -c '$(h:.h=.c)' && ) echo 'Passed all header compilation tests'
-
-%.h: %.asn1
-       $(ASN2QUICKDER) '$<' $(foreach f,$($(<:.asn1=_DEPS)),$f)
-
-%.md: %.asn1
-       @ if grep -q '  ' '$<' ; then echo 'Please remove tabs from $<, they mess up the layout' ; exit 1 ; fi
-       $(ASNLITERATE) '$<'
-
-%.txt: %.md
-       @ [ -x /usr/bin/pandoc ] && pandoc --self-contained -o '$@' '$<' || echo Pandoc is not installed -- skipping TeX and PDF generation
-
-%.rst: %.md
-       @ [ -x /usr/bin/pandoc ] && pandoc --self-contained -o '$@' '$<' || echo Pandoc is not installed -- skipping RST generation
-
-%.html: %.md
-       @ [ -x /usr/bin/pandoc ] && pandoc --self-contained -o '$@' '$<' || echo Pandoc is not installed -- skipping HTML generation
-
-%.epub: %.md
-       @ [ -x /usr/bin/pandoc ] && pandoc --self-contained -o '$@' '$<' || echo Pandoc is not installed -- skipping EPUB generation
-
-%.tex: %.md
-       @ [ -x /usr/bin/pandoc ] && pandoc --self-contained -o '$@' '$<' || echo Pandoc is not installed -- skipping TeX and PDF generation
-
-%.pdf: %.tex
-       @ [ -x /usr/bin/pdflatex -a -r '$<' ] && pdflatex '$<' || echo pdfLaTeX is not installed -- skipping PDF generation
-
-clean:
-       rm -f $(TARGETS) $(foreach h,$(TARGETS),$(h:.h=.c) $(h:.h=.o))
-
-anew: clean all
-
-install: all
-       @ mkdir -p $(DESTDIR)$(PREFIX)/include/quick-der
-       @ $(foreach h,$(TARGETS),install '$(h)' '$(DESTDIR)$(PREFIX)/include/quick-der' && ) echo Installed header files
-
-uninstall:
-       @ $(foreach h,$(TARGETS),rm -f '$(DESTDIR)$(PREFIX)/include/quick-der/$(h)' && ) echo Removed header files
-       @ rmdir --ignore-fail-on-non-empty '$(DESTDIR)$(PREFIX)/include/quick-der'
-
index 964ad7c..9bc70b6 100644 (file)
@@ -14,17 +14,15 @@ TARGETS = rfc3280.h rfc4120.h rfc4511.h rfc5280.h \
        rfc2578.h
 #DOWNWARD-SPIRAL-INTO-ITU# TARGETS += InformationFramework.h UsefulDefinitions.h
 
-ASN2QUICKDER_DIR = ../tool/asn1ate
-
-ASN2QUICKDER_CMD = $(ASN2QUICKDER_DIR)/asn1ate/asn2quickder.py
-ASN2QUICKDER_RUN = PYTHONPATH='$(ASN2QUICKDER_DIR)' $(ASN2QUICKDER_CMD)
+ASN2QUICKDER_CMD = $(shell which asn2quickder)
+ASN2QUICKDER_RUN = $(ASN2QUICKDER_CMD)
 
 all: $(TARGETS) test
 
 test: $(TARGETS)
        rm -f quick-der
        ln -s . quick-der
-       @ $(foreach h,$(TARGETS),echo > '$(h:.h=.c)' '#include "$(h)"' && [ -r $h ] && gcc -I . -c '$(h:.h=.c)' && ) echo 'Passed all header compilation tests' || echo Skipped compilation of skipped header files
+       @ $(foreach h,$(TARGETS),echo > '$(h:.h=.c)' '#include "$(h)"' && [ -r $h ] && gcc -I ../include -I . -c '$(h:.h=.c)' && ) echo 'Passed all header compilation tests' || echo Skipped compilation of skipped header files
 
 %.h: %.asn1
        @ [ -r $(ASN2QUICKDER_CMD) ] && $(ASN2QUICKDER_RUN) $< || echo Skipped ASN.1 header file generation for $<