Status:
- And it works!
- We have an extensive test based on decoding a rich EK certficate.
This test exercises all of:
- decoding
- encoding with and without decoded open types
- copying of decoded values with decoded open types
- freeing of decoded values with decoded open types
Valgrind finds no memory errors.
- Added a manual page for the compiler.
- rfc2459.asn1 now has all three primary PKIX types that we care about
defined as in RFC5912, with IOS constraints and parameterization:
- `Extension` (embeds open type in an `OCTET STRING`)
- `OtherName` (embeds open type in an `ANY`-like type)
- `SingleAttribute` (embeds open type in an `ANY`-like type)
- `AttributeSet` (embeds open type in a `SET OF ANY`-like type)
All of these use OIDs as the open type type ID field, but integer
open type type ID fields are also supported (and needed, for
Kerberos).
That will cover every typed hole pattern in all our ASN.1 modules.
With this we'll be able to automatically and recursively decode
through all subject DN attributes even when the subject DN is a
directoryName SAN, and subjectDirectoryAttributes, and all
extensions, and all SANs, and all authorization-data elements, and
PA-data, and...
We're not really using `SingleAttribute` and `AttributeSet` yet
because various changes are needed in `lib/hx509` for that.
- `asn1_compile` builds and recognizes the subset of X.681/682/683 that
we need for, and now use in, rfc2459.asn1. It builds the necessary
AST, generates the correct C types, and generates templating for
object sets and open types!
- See READMEs for details.
- Codegen backend not tested; I won't make it implement automatic open
type handling, but it should at least not crash by substituting
`heim_any` for open types not embedded in `OCTET STRING`.
- We're _really_ starting to have problems with the ITU-T ASN.1
grammar and our version of it...
Type names have to start with upper-case, value names with
lower-case, but it's not enough to disambiguate.
The fact the we've allowed value and type names to violate their
respective start-with case rules is causing us trouble now that we're
adding grammar from X.681/682/683, and we're going to have to undo
that.
In preparation for that I'm capitalizing the `heim_any` and
`heim_any_set` types, and doing some additional cleanup, which
requires changes to other parts of Heimdal (all in this same commit
for now).
Problems we have because of this:
- We cannot IMPORT values into modules because we have no idea if a
symbol being imported refers to a value or a type because the only
clue we would have is the symbol's name, so we assume IMPORTed
symbols are for types.
This means we can't import OIDs, for example, which is super
annoying.
One thing we might be able to do here is mark imported symbols as
being of an undetermined-but-not-undefined type, then coerce the
symbol's type the first time it's used in a context where its type
is inferred as type, value, object, object set, or class. (Though
since we don't generate C symbols for objects or classes, we won't
be able to import them, especially since we need to know them at
compile time and cannot defer their handling to link- or
run-time.)
- The `NULL` type name, and the `NULL` value name now cause two
reduce/reduce conflicts via the `FieldSetting` production.
- Various shift/reduce conflicts involving `NULL` values in
non-top-level contexts (in constraints, for example).
- Currently I have a bug where to disambiguate the grammar I have a
CLASS_IDENTIFIER token that is all caps, while TYPE_IDENTIFIER must
start with a capital but not be all caps, but this breaks Kerberos
since all its types are all capitalized -- oof!
To fix this I made it so class names have to be all caps and
start with an underscore (ick).
TBD:
- Check all the XXX comments and address them
- Apply this treatment to Kerberos! Automatic handling of authz-data
sounds useful :)
- Apply this treatment to PKCS#10 (CSRs) and other ASN.1 modules too.
- Replace various bits of code in `lib/hx509/` with uses of this
feature.
- Add JER.
- Enhance `hxtool` and `asn1_print`.
Getting there!
464 lines
13 KiB
Plaintext
464 lines
13 KiB
Plaintext
########################################################################
|
|
#
|
|
# Copyright (c) 2009, Secure Endpoints Inc.
|
|
# All rights reserved.
|
|
#
|
|
# Redistribution and use in source and binary forms, with or without
|
|
# modification, are permitted provided that the following conditions
|
|
# are met:
|
|
#
|
|
# - Redistributions of source code must retain the above copyright
|
|
# notice, this list of conditions and the following disclaimer.
|
|
#
|
|
# - Redistributions in binary form must reproduce the above copyright
|
|
# notice, this list of conditions and the following disclaimer in
|
|
# the documentation and/or other materials provided with the
|
|
# distribution.
|
|
#
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
# POSSIBILITY OF SUCH DAMAGE.
|
|
#
|
|
|
|
RELDIR=lib\asn1
|
|
|
|
intcflags=-I$(SRCDIR) -I$(OBJ) -DROKEN_RENAME -DASN1_IOS_SUPPORTED
|
|
|
|
!include ../../windows/NTMakefile.w32
|
|
|
|
gen_files_krb5 = $(OBJ)\asn1_krb5_asn1.x
|
|
|
|
gen_files_cms = $(OBJ)\asn1_cms_asn1.x
|
|
|
|
gen_files_crmf = $(OBJ)\asn1_crmf_asn1.x
|
|
|
|
gen_files_rfc2459 = $(OBJ)\asn1_rfc2459_asn1.x
|
|
|
|
gen_files_rfc4108 = $(OBJ)\asn1_rfc4108_asn1.x
|
|
|
|
gen_files_ocsp = $(OBJ)\asn1_ocsp_asn1.x
|
|
|
|
gen_files_pkinit = $(OBJ)\asn1_pkinit_asn1.x
|
|
|
|
gen_files_pkcs12 = $(OBJ)\asn1_pkcs12_asn1.x
|
|
|
|
gen_files_pkcs8 = $(OBJ)\asn1_pkcs8_asn1.x
|
|
|
|
gen_files_pkcs9 = $(OBJ)\asn1_pkcs9_asn1.x
|
|
|
|
gen_files_pkcs10 = $(OBJ)\asn1_pkcs10_asn1.x
|
|
|
|
gen_files_test = $(OBJ)\asn1_test_asn1.x
|
|
|
|
gen_files_test_template = $(OBJ)\asn1_test_template_asn1.x
|
|
|
|
gen_files_digest = $(OBJ)\asn1_digest_asn1.x
|
|
|
|
gen_files_kx509 = $(OBJ)\asn1_kx509_asn1.x
|
|
|
|
gen_files_x690sample = $(OBJ)\asn1_x690sample_asn1.x
|
|
|
|
ASN1_BINARIES = \
|
|
$(LIBEXECDIR)\asn1_compile.exe
|
|
|
|
$(BINDIR)\asn1_compile.exe: \
|
|
$(OBJ)\asn1parse.obj \
|
|
$(OBJ)\gen.obj \
|
|
$(OBJ)\gen_copy.obj \
|
|
$(OBJ)\gen_decode.obj \
|
|
$(OBJ)\gen_encode.obj \
|
|
$(OBJ)\gen_free.obj \
|
|
$(OBJ)\gen_glue.obj \
|
|
$(OBJ)\gen_length.obj \
|
|
$(OBJ)\gen_seq.obj \
|
|
$(OBJ)\gen_template.obj \
|
|
$(OBJ)\hash.obj \
|
|
$(OBJ)\lex.obj \
|
|
$(OBJ)\main.obj \
|
|
$(OBJ)\symbol.obj \
|
|
$(OBJ)\asn1_compile-version.res
|
|
$(EXECONLINK) $(LIBROKEN) $(LIBVERS)
|
|
$(EXEPREP_NOHEIM)
|
|
|
|
$(OBJ)\lex.c: lex.l $(OBJ)\asn1parse.h
|
|
$(LEX) -o$@ lex.l
|
|
|
|
$(OBJ)\lex.obj: $(OBJ)\lex.c
|
|
$(C2OBJ) -DYY_NO_UNISTD_H
|
|
|
|
$(OBJ)\asn1parse.c $(OBJ)\asn1parse.h: asn1parse.y
|
|
$(YACC) -o $(OBJ)\asn1parse.c --defines=$(OBJ)\asn1parse.h $**
|
|
|
|
$(OBJ)\asn1_err.c $(OBJ)\asn1_err.h: asn1_err.et
|
|
cd $(OBJ)
|
|
$(BINDIR)\compile_et.exe $(SRCDIR)\asn1_err.et
|
|
cd $(SRCDIR)
|
|
|
|
$(BINDIR)\asn1_print.exe: $(OBJ)\asn1_print.obj $(LIBHEIMDAL)
|
|
$(EXECONLINK) $(LIBVERS) $(LIBROKEN) $(LIBCOMERR)
|
|
$(EXEPREP)
|
|
|
|
$(BINDIR)\asn1_gen.exe: $(OBJ)\asn1_gen.obj $(LIBHEIMDAL)
|
|
$(EXECONLINK) $(LIBVERS) $(LIBROKEN)
|
|
$(EXEPREP)
|
|
|
|
LIBASN1_OBJS= \
|
|
$(OBJ)\der.obj \
|
|
$(OBJ)\der_get.obj \
|
|
$(OBJ)\der_put.obj \
|
|
$(OBJ)\der_free.obj \
|
|
$(OBJ)\der_length.obj \
|
|
$(OBJ)\der_copy.obj \
|
|
$(OBJ)\der_cmp.obj \
|
|
$(OBJ)\der_format.obj \
|
|
$(OBJ)\template.obj \
|
|
$(OBJ)\extra.obj \
|
|
$(OBJ)\timegm.obj \
|
|
$(gen_files_rfc2459:.x=.obj) \
|
|
$(gen_files_rfc4108:.x=.obj) \
|
|
$(gen_files_cms:.x=.obj) \
|
|
$(gen_files_krb5:.x=.obj) \
|
|
$(gen_files_ocsp:.x=.obj) \
|
|
$(gen_files_pkinit:.x=.obj) \
|
|
$(gen_files_pkcs8:.x=.obj) \
|
|
$(gen_files_pkcs9:.x=.obj) \
|
|
$(gen_files_pkcs10:.x=.obj) \
|
|
$(gen_files_pkcs12:.x=.obj) \
|
|
$(gen_files_digest:.x=.obj) \
|
|
$(gen_files_kx509:.x=.obj) \
|
|
$(gen_files_x690sample:.x=.obj) \
|
|
$(OBJ)\asn1_err.obj
|
|
|
|
$(OBJ)\oid_resolution.obj: $(LIBASN1_OBJS)
|
|
|
|
LIBASN1_OBJS2= $(LIBASN1_OBJS) $(OBJ)\oid_resolution.obj
|
|
|
|
$(LIBASN1): $(LIBASN1_OBJS2)
|
|
$(LIBCON_C) -out:$@ @<<
|
|
$(**: =
|
|
)
|
|
<<
|
|
|
|
clean::
|
|
-$(RM) $(LIBASN1)
|
|
|
|
#
|
|
# Generate list of exports
|
|
#
|
|
# This target is only used during development to generate a list of
|
|
# symbols that are exported from all the object files in LIBASN1_OBJS.
|
|
#
|
|
exports-list.txt: $(LIBASN1_OBJS)
|
|
$(PERL) ..\..\cf\w32-list-externs-from-objs.pl -q -u @<< > $@
|
|
$(**: =
|
|
)
|
|
<<
|
|
|
|
$(gen_files_krb5:.x=.c) : $$(@R).x
|
|
|
|
$(gen_files_ocsp:.x=.c) : $$(@R).x
|
|
|
|
$(gen_files_pkinit:.x=.c) : $$(@R).x
|
|
|
|
$(gen_files_pkcs8:.x=.c) : $$(@R).x
|
|
|
|
$(gen_files_pkcs9:.x=.c) : $$(@R).x
|
|
|
|
$(gen_files_pkcs10:.x=.c) : $$(@R).x
|
|
|
|
$(gen_files_pkcs12:.x=.c) : $$(@R).x
|
|
|
|
$(gen_files_digest:.x=.c) : $$(@R).x
|
|
|
|
$(gen_files_kx509:.x=.c) : $$(@R).x
|
|
|
|
$(gen_files_rfc2459:.x=.c) : $$(@R).x
|
|
|
|
$(gen_files_rfc4108:.x=.c) : $$(@R).x
|
|
|
|
$(gen_files_cms:.x=.c) : $$(@R).x
|
|
|
|
$(gen_files_crmf:.x=.c) : $$(@R).x
|
|
|
|
$(gen_files_x690sample:.x=.c) : $$(@R).x
|
|
|
|
$(gen_files_test:.x=.c) : $$(@R).x
|
|
|
|
$(gen_files_test_template:.x=.c) : $$(@R).x
|
|
|
|
$(gen_files_krb5) $(OBJ)\krb5_asn1.hx: $(BINDIR)\asn1_compile.exe krb5.asn1 krb5.opt
|
|
cd $(OBJ)
|
|
$(BINDIR)\asn1_compile.exe \
|
|
--template \
|
|
--one-code-file \
|
|
--option-file=$(SRCDIR)\krb5.opt \
|
|
$(SRCDIR)\krb5.asn1 krb5_asn1 \
|
|
|| ($(RM) $(OBJ)\krb5_asn1.h ; exit /b 1)
|
|
cd $(SRCDIR)
|
|
|
|
$(gen_files_ocsp) $(OBJ)\ocsp_asn1.hx: $(BINDIR)\asn1_compile.exe ocsp.asn1
|
|
cd $(OBJ)
|
|
$(BINDIR)\asn1_compile.exe \
|
|
--template \
|
|
--one-code-file \
|
|
--option-file=$(SRCDIR)\ocsp.opt \
|
|
$(SRCDIR)\ocsp.asn1 \
|
|
ocsp_asn1 \
|
|
|| ($(RM) $(OBJ)\ocsp_asn1.h ; exit /b 1)
|
|
cd $(SRCDIR)
|
|
|
|
$(gen_files_pkinit) $(OBJ)\pkinit_asn1.hx: $(BINDIR)\asn1_compile.exe pkinit.asn1
|
|
cd $(OBJ)
|
|
$(BINDIR)\asn1_compile.exe --template --one-code-file $(SRCDIR)\pkinit.asn1 pkinit_asn1 \
|
|
|| ($(RM) $(OBJ)\pkinit_asn1.h ; exit /b 1)
|
|
cd $(SRCDIR)
|
|
|
|
$(gen_files_pkcs8) $(OBJ)\pkcs8_asn1.hx: $(BINDIR)\asn1_compile.exe pkcs8.asn1
|
|
cd $(OBJ)
|
|
$(BINDIR)\asn1_compile.exe --template --one-code-file $(SRCDIR)\pkcs8.asn1 pkcs8_asn1 \
|
|
|| ($(RM) $(OBJ)\pkcs8_asn1.h ; exit /b 1)
|
|
cd $(SRCDIR)
|
|
|
|
$(gen_files_pkcs9) $(OBJ)\pkcs9_asn1.hx: $(BINDIR)\asn1_compile.exe pkcs9.asn1
|
|
cd $(OBJ)
|
|
$(BINDIR)\asn1_compile.exe --template --one-code-file $(SRCDIR)\pkcs9.asn1 pkcs9_asn1 \
|
|
|| ($(RM) $(OBJ)\pkcs9_asn1.h ; exit /b 1)
|
|
cd $(SRCDIR)
|
|
|
|
$(gen_files_pkcs10) $(OBJ)\pkcs10_asn1.hx: $(BINDIR)\asn1_compile.exe pkcs10.asn1
|
|
cd $(OBJ)
|
|
$(BINDIR)\asn1_compile.exe \
|
|
--template \
|
|
--one-code-file \
|
|
--option-file=$(SRCDIR)\pkcs10.opt \
|
|
$(SRCDIR)\pkcs10.asn1 \
|
|
pkcs10_asn1 \
|
|
|| ($(RM) $(OBJ)\pkcs10_asn1.h ; exit /b 1)
|
|
cd $(SRCDIR)
|
|
|
|
$(gen_files_pkcs12) $(OBJ)\pkcs12_asn1.hx: $(BINDIR)\asn1_compile.exe pkcs12.asn1
|
|
cd $(OBJ)
|
|
$(BINDIR)\asn1_compile.exe --template --one-code-file $(SRCDIR)\pkcs12.asn1 pkcs12_asn1 \
|
|
|| ($(RM) $(OBJ)\pkcs12_asn1.h ; exit /b 1)
|
|
cd $(SRCDIR)
|
|
|
|
$(gen_files_digest) $(OBJ)\digest_asn1.hx: $(BINDIR)\asn1_compile.exe digest.asn1
|
|
cd $(OBJ)
|
|
$(BINDIR)\asn1_compile.exe --template --one-code-file $(SRCDIR)\digest.asn1 digest_asn1 \
|
|
|| ($(RM) $(OBJ)\digest_asn1.h ; exit /b 1)
|
|
cd $(SRCDIR)
|
|
|
|
$(gen_files_kx509) $(OBJ)\kx509_asn1.hx: $(BINDIR)\asn1_compile.exe kx509.asn1
|
|
cd $(OBJ)
|
|
$(BINDIR)\asn1_compile.exe --template --one-code-file $(SRCDIR)\kx509.asn1 kx509_asn1 \
|
|
|| ($(RM) $(OBJ)\kx509_asn1.h ; exit /b 1)
|
|
cd $(SRCDIR)
|
|
|
|
$(gen_files_rfc2459) $(OBJ)\rfc2459_asn1.hx: $(BINDIR)\asn1_compile.exe rfc2459.asn1
|
|
cd $(OBJ)
|
|
$(BINDIR)\asn1_compile.exe \
|
|
--template \
|
|
--one-code-file \
|
|
--option-file=$(SRCDIR)\rfc2459.opt \
|
|
$(SRCDIR)\rfc2459.asn1 rfc2459_asn1 \
|
|
|| ($(RM) $(OBJ)\rfc2459_asn1.h ; exit /b 1)
|
|
cd $(SRCDIR)
|
|
|
|
$(gen_files_rfc4108) $(OBJ)\rfc4108_asn1.hx: $(BINDIR)\asn1_compile.exe rfc4108.asn1
|
|
cd $(OBJ)
|
|
$(BINDIR)\asn1_compile.exe \
|
|
--template \
|
|
--one-code-file \
|
|
$(SRCDIR)\rfc4108.asn1 rfc4108_asn1 \
|
|
|| ($(RM) $(OBJ)\rfc4108_asn1.h ; exit /b 1)
|
|
cd $(SRCDIR)
|
|
|
|
$(gen_files_cms) $(OBJ)\cms_asn1.hx: $(BINDIR)\asn1_compile.exe cms.asn1 cms.opt
|
|
cd $(OBJ)
|
|
$(BINDIR)\asn1_compile.exe \
|
|
--template \
|
|
--one-code-file --option-file=$(SRCDIR)\cms.opt \
|
|
$(SRCDIR)\cms.asn1 cms_asn1 \
|
|
|| ($(RM) $(OBJ)\cms_asn1.h ; exit /b 1)
|
|
cd $(SRCDIR)
|
|
|
|
$(gen_files_crmf) $(OBJ)\crmf_asn1.hx: $(BINDIR)\asn1_compile.exe crmf.asn1 crmf.opt
|
|
cd $(OBJ)
|
|
$(BINDIR)\asn1_compile.exe \
|
|
--template \
|
|
--one-code-file --option-file=$(SRCDIR)\crmf.opt \
|
|
$(SRCDIR)\crmf.asn1 crmf_asn1 \
|
|
|| ($(RM) $(OBJ)\crmf_asn1.h ; exit /b 1)
|
|
cd $(SRCDIR)
|
|
|
|
$(gen_files_x690sample) $(OBJ)\x690sample_asn1.hx: $(BINDIR)\asn1_compile.exe x690sample.asn1
|
|
cd $(OBJ)
|
|
$(BINDIR)\asn1_compile.exe \
|
|
--template \
|
|
--one-code-file \
|
|
$(SRCDIR)\x690sample.asn1 x690sample_asn1 \
|
|
|| ($(RM) $(OBJ)\x690sample_asn1.h ; exit /b 1)
|
|
cd $(SRCDIR)
|
|
|
|
$(gen_files_test) $(OBJ)\test_asn1.hx: $(BINDIR)\asn1_compile.exe test.asn1
|
|
cd $(OBJ)
|
|
$(BINDIR)\asn1_compile.exe \
|
|
--template \
|
|
--one-code-file --sequence=TESTSeqOf \
|
|
$(SRCDIR)\test.asn1 test_asn1 \
|
|
|| ($(RM) $(OBJ)\test_asn1.h ; exit /b 1)
|
|
cd $(SRCDIR)
|
|
|
|
$(gen_files_test_template) $(OBJ)\test_template_asn1.hx: $(BINDIR)\asn1_compile.exe test.asn1
|
|
cd $(OBJ)
|
|
$(BINDIR)\asn1_compile.exe \
|
|
--template \
|
|
--one-code-file --template \
|
|
--sequence=TESTSeqOf \
|
|
$(SRCDIR)\test.asn1 test_template_asn1 \
|
|
|| ($(RM) $(OBJ)\test_template_asn1.h ; exit /b 1)
|
|
cd $(SRCDIR)
|
|
|
|
INCFILES= \
|
|
$(INCDIR)\der.h \
|
|
$(INCDIR)\heim_asn1.h \
|
|
$(INCDIR)\der-protos.h \
|
|
$(INCDIR)\der-private.h \
|
|
$(INCDIR)\asn1-common.h \
|
|
$(INCDIR)\asn1-template.h \
|
|
$(OBJ)\asn1_err.h
|
|
|
|
$(INCDIR)\der-protos.h: $(OBJ)\der-protos.h
|
|
|
|
GENINCFILES= \
|
|
$(INCDIR)\asn1_err.h \
|
|
$(INCDIR)\cms_asn1.h \
|
|
$(INCDIR)\crmf_asn1.h \
|
|
$(INCDIR)\digest_asn1.h \
|
|
$(INCDIR)\krb5_asn1.h \
|
|
$(INCDIR)\kx509_asn1.h \
|
|
$(INCDIR)\ocsp_asn1.h \
|
|
$(INCDIR)\pkcs12_asn1.h \
|
|
$(INCDIR)\pkcs8_asn1.h \
|
|
$(INCDIR)\pkcs9_asn1.h \
|
|
$(INCDIR)\pkcs10_asn1.h \
|
|
$(INCDIR)\pkinit_asn1.h \
|
|
$(INCDIR)\rfc2459_asn1.h \
|
|
$(INCDIR)\rfc4108_asn1.h \
|
|
$(INCDIR)\x690sample_asn1.h \
|
|
$(OBJ)\krb5_asn1-priv.h \
|
|
$(OBJ)\ocsp_asn1-priv.h \
|
|
$(OBJ)\pkinit_asn1-priv.h \
|
|
$(OBJ)\cms_asn1-priv.h \
|
|
$(OBJ)\crmf_asn1-priv.h \
|
|
$(OBJ)\rfc2459_asn1-priv.h \
|
|
$(OBJ)\rfc4108_asn1-priv.h \
|
|
$(OBJ)\x690sample_asn1-priv.h \
|
|
$(OBJ)\pkcs8_asn1-priv.h \
|
|
$(OBJ)\pkcs9_asn1-priv.h \
|
|
$(OBJ)\pkcs10_asn1-priv.h \
|
|
$(OBJ)\pkcs12_asn1-priv.h \
|
|
$(OBJ)\digest_asn1-priv.h \
|
|
$(OBJ)\kx509_asn1-priv.h \
|
|
$(OBJ)\test_template_asn1.h \
|
|
$(OBJ)\test_template_asn1-priv.h \
|
|
$(OBJ)\test_asn1.h \
|
|
$(OBJ)\test_asn1-priv.h
|
|
|
|
libasn1_base_SOURCES= \
|
|
der_locl.h \
|
|
der.c \
|
|
der.h \
|
|
der_get.c \
|
|
der_put.c \
|
|
der_free.c \
|
|
der_length.c \
|
|
der_copy.c \
|
|
der_cmp.c \
|
|
der_format.c \
|
|
template.c \
|
|
heim_asn1.h \
|
|
extra.c \
|
|
timegm.c
|
|
|
|
libasn1_SOURCES= \
|
|
oid_resolution.c
|
|
|
|
$(OBJ)\der-protos.h: $(libasn1_SOURCES)
|
|
$(PERL) ..\..\cf\make-proto.pl -q -P remove -o $(OBJ)\der-protos.h $(libasn1_base_SOURCES) $(libasn1_SOURCES) || $(RM) $(OBJ)\der-protos.h
|
|
|
|
$(OBJ)\der-private.h: $(libasn1_SOURCES)
|
|
$(PERL) ..\..\cf\make-proto.pl -q -P remove -p $(OBJ)\der-private.h $(libasn1_base_SOURCES) $(libasn1_SOURCES) || $(RM) $(OBJ)\der-private.h
|
|
|
|
clean::
|
|
-$(RM) $(INCDIR)\der-protos.h
|
|
|
|
all:: $(INCFILES) $(GENINCFILES) $(ASN1_BINARIES) $(LIBASN1)
|
|
|
|
all-tools:: $(LIBEXECDIR)\asn1_print.exe $(BINDIR)\asn1_gen.exe
|
|
|
|
clean::
|
|
-$(RM) $(INCFILES)
|
|
-$(RM) $(GENINCFILES)
|
|
-$(RM) $(ASN1_BINARIES:.exe=.*)
|
|
-$(RM) $(LIBASN1)
|
|
-$(RM) $(LIBEXECDIR)\asn1_print.*
|
|
-$(RM) $(LIBEXECDIR)\asn1_gen.*
|
|
|
|
TEST_BINARIES=\
|
|
$(OBJ)\check-der.exe \
|
|
$(OBJ)\check-gen-template.exe \
|
|
$(OBJ)\check-timegm.exe \
|
|
$(OBJ)\check-ber.exe \
|
|
$(OBJ)\check-template.exe
|
|
|
|
test-binaries: $(TEST_BINARIES)
|
|
|
|
test-run:
|
|
cd $(OBJ)
|
|
-check-der.exe
|
|
-check-gen-template.exe
|
|
-check-timegm.exe
|
|
-check-ber.exe
|
|
-check-template.exe
|
|
cd $(SRC)
|
|
|
|
test:: test-binaries test-run
|
|
|
|
clean::
|
|
-$(RM) $(TEST_BINARIES:.exe=*)
|
|
|
|
$(OBJ)\check-ber.exe: $(OBJ)\check-ber.obj \
|
|
$(LIBHEIMDAL) $(LIBROKEN)
|
|
$(EXECONLINK)
|
|
$(EXEPREP_NODIST)
|
|
|
|
$(OBJ)\check-der.exe: $(OBJ)\check-der.obj $(OBJ)\check-common.obj \
|
|
$(LIBHEIMDAL) $(LIBROKEN)
|
|
$(EXECONLINK)
|
|
$(EXEPREP_NODIST)
|
|
|
|
$(OBJ)\check-gen-template.exe: $(OBJ)\check-gen.obj $(OBJ)\check-common.obj \
|
|
$(LIBHEIMDAL) $(LIBROKEN) $(gen_files_test_template:.x=.obj)
|
|
$(EXECONLINK)
|
|
$(EXEPREP_NODIST)
|
|
|
|
$(OBJ)\check-timegm.exe: $(OBJ)\check-timegm.obj \
|
|
$(LIBHEIMDAL) $(LIBROKEN)
|
|
$(EXECONLINK)
|
|
$(EXEPREP_NODIST)
|
|
|
|
$(OBJ)\check-template.exe: $(OBJ)\check-template.obj $(OBJ)\check-common.obj \
|
|
$(LIBHEIMDAL) $(LIBROKEN) $(gen_files_test:.x=.obj)
|
|
$(EXECONLINK)
|
|
$(EXEPREP_NODIST)
|