Commit Graph

221 Commits

Author SHA1 Message Date
Nicolas Williams 7f1cfb0396 asn1: Add sample from X.690 Appendix A
This helped find a bug fixed in the preceding commit.

This also depends on the earlier fixes to IMPLICT tagging support, thus
implementing a test of that using a test vector from a standard.
2021-01-13 20:17:58 -06:00
Nicolas Williams adaf7c5fb9 asn1: Fix make clean target 2021-01-13 20:17:58 -06:00
Nicolas Williams 727578f7b1 asn1: Add TCG module
This is in preparation for adding support for TPM-related functionality
in lib/hx509 and, eventually, in bx509d.
2021-01-13 20:17:58 -06:00
Nicolas Williams 7f0349e1fb asn1: Import ASN.1 modules from RFCs 4043 and 4108
In preparation for adding support for TPM attestations as an authentication
method in bx509d for a host trust bootstrap mechanism based on TPMs and their
endorsement keys and endorsement key certificates.

The plan is to add support to libhx509 and hxtool for PermanentIdentifier
(RFC4043) and HardwareModuleName (RFC4108) SANs, and then to add a query
parameter to bx509d for passing an attestation and a proof-of-possession
(either CMS or CSR), and add an authorizer plugin call for authorizing a device
manufacturer and serial number to hostname.  Support for TPMs w/o endorsement
key certificates should also be possible based on a digest of the endorsement
key as the "serial number".
2020-12-16 15:11:51 -06:00
Luke Howard d7138cfbe7 base: make heimqueue.h a shared header
Share heimqueue.h between base and asn1, to avoid duplication of code.
2020-02-04 17:28:35 +11:00
Nicolas Williams 5465b2ddec libasn1: Add OID symbol resolution
This commit adds functions for finding OIDs by symbolic name, meaning by
their symbolic names given in the ASN.1 modules that define them.

TBD:

 - Resolve OIDs to names.
 - Support a file in /etc for additional OID resolution.
 - Add support for resolving OID arc names.
2019-10-07 21:32:00 -05:00
Nicolas Williams 6471fcaa54 Move ASN.1 modules from lib/hx509 to lib/asn1
This will help us generate a directory of OIDs from all the ASN.1
modules in lib/asn1, which will then help us create an hx509 API for
resolving OIDs to/from friendly names, which ultimately will help us
make hxtool more user-friendly.
2019-10-07 21:32:00 -05:00
Nicolas Williams 120619dbd0 asn1: use rfc2459.opt 2019-10-07 21:32:00 -05:00
Daria Phoebe Brashear c3e2c048c3 tests: generate test_template_asn1-template.c for testing
the rule to generate test_template_asn1-template.c from
test_template_asn1-template.x was missing. add it.
2019-05-15 14:12:28 -04:00
Nicolas Williams 3e65dfbc32 Fix make dist missing files (#228) 2016-12-15 12:15:56 -06:00
Love Hörnquist Åstrand 514d4d3ef4 remove extra _ 2014-02-16 21:50:03 -08:00
Love Hörnquist Åstrand dffccabe31 clean files 2014-02-16 11:50:43 -08:00
Love Hörnquist Åstrand e507f48d24 more roken rename 2014-02-16 09:15:32 -08:00
Love Hornquist Astrand 5201dadb62 argh, add missing \t 2013-06-04 01:03:32 -07:00
Love Hornquist Astrand c696439942 fix up some more 2013-06-04 00:59:41 -07:00
Love Hornquist Astrand 060474df16 quel 64bit warnings, fixup implicit encoding for template, fix spelling 2013-06-03 21:46:20 -07:00
Roland C. Dowdeswell be5afdbf7f Make concurrent builds work.
To stop the errors when building concurrently, we make a number of
changes:

        1.  stop including generated files in *_SOURCES,

        2.  make *-protos.h and *-private.h depend on the *_SOURCES,

        3.  make all objects depend on *-{protos,private}.h,

        4.  in a few places change dir/header.h to $(srcdir)/dir/header.h,

This appears to work for me with make -j16 on a 4-way box.
2012-08-08 00:04:04 +01:00
Nicolas Williams 6dd66df594 Make master build on Windows
Add strtoll()/strtoull() to lib/roken
    Add stdint.h to lib/roken (Windows only)
    Add logic to detect whether to use lib/roken's stdint.h based on
        Visual Studio version
    Add include of stdint.h in generated ASN.1 code
    Export missing symbols for 64-bit integers in lib/asn1
    Export missing symbols for FAST
    Add missing sources to kdc/NTMakefile
    Fix issue in kuserok
    Fix bsearch issues
2012-01-17 12:10:14 -06:00
Love Hornquist Astrand 9a4f8c3da7 add missing dependency 2011-12-12 23:11:21 -08:00
Nicolas Williams 19d378f44d Add 64-bit integer support to ASN.1 compiler
ASN.1 INTEGERs will now compile to C int64_t or uint64_t, depending
    on whether the constraint ranges include numbers that cannot be
    represented in 32-bit ints and whether they include negative
    numbers.

    Template backend support included.  check-template is now built with
    --template, so we know we're testing it.

    Tests included.
2011-12-12 20:01:20 -06:00
Love Hörnquist Åstrand c204f3c5ce drop dependency 2011-07-24 18:08:52 -07:00
Linus Nordberg 2e35198908 Add version-script.map to _DEPENDENCIES.
Added to 11 out of 14 directories with map files.  Not lib/ntlm,
lib/hcrypto and kdc which have the map file as an explicit dependency
to _OBBJECTS.

Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org>
2011-07-24 14:07:59 -07:00
Love Hörnquist Åstrand 12403a31ce sprinkle more windows files 2011-07-23 11:18:21 -07:00
Love Hörnquist Åstrand 7aaba443bc add NTMakefile and windows directories 2011-07-17 12:16:59 -07:00
Love Hornquist Astrand 46f10ca9c6 remove -template dependencies 2010-11-21 13:00:20 -08:00
Love Hornquist Astrand 6ce02c45a3 use --one-code-file 2010-11-20 13:52:28 -08:00
Love Hornquist Astrand 50ea273b5f clean better 2010-09-14 09:29:29 -07:00
Love Hornquist Astrand a0fcf9241a add id-secsig-sha-1WithRSAEncryption 2010-08-08 15:49:18 -07:00
Love Hornquist Astrand 3c0d127f72 Add DHParameter from PCKS3 2010-06-16 12:22:13 -07:00
Love Hornquist Astrand 702277a3c9 more depenecies 2009-11-22 12:15:43 -08:00
Love Hornquist Astrand 2f1473b186 add depenecy for test.asn1 2009-11-22 06:57:41 -08:00
Love Hornquist Astrand 0431d4cedd bonus files 2009-11-22 01:11:04 -08:00
Love Hornquist Astrand 89b777853a include asn1-common.h in installed header files 2009-11-21 16:01:05 -08:00
Love Hornquist Astrand b939943b07 first stange of asn1 table driven compiler 2009-11-21 10:24:56 -08:00
Love Hornquist Astrand 4d06f484ec implement TeletexString 2009-09-30 00:48:18 -07:00
Love Hornquist Astrand 46443d23bb install tools in libexec/heimdal, fix deps 2009-09-16 05:59:54 -07:00
Love Hornquist Astrand 3d7488398a abstract out depenecy tracking for tools 2009-09-16 05:40:55 -07:00
Love Hornquist Astrand dc4e8669ea Abstract out asn1_compile and slc 2009-09-16 00:12:13 -07:00
Love Hornquist Astrand e57f65f563 clean better 2009-08-06 10:53:35 +02:00
Love Hornquist Astrand 655ee18a17 add missing files, clean better 2009-08-06 10:18:25 +02:00
Love Hörnquist Åstrand fb9b0f1a5d more depencies
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25264 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-06-03 17:25:08 +00:00
Love Hörnquist Åstrand f3197da8dc add .hx depenencies
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25260 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-06-03 17:24:27 +00:00
Love Hörnquist Åstrand b9ff6a94a3 rename parse.y to asn1parse.y
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25255 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-05-28 01:21:29 +00:00
Love Hörnquist Åstrand 0e6b5c5c22 remove trailing whitespace
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25232 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-05-28 01:17:17 +00:00
Love Hörnquist Åstrand 184c439426 makefile fixes from Martin von Gagern
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24801 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-22 23:29:17 +00:00
Love Hörnquist Åstrand 0f6f788f37 Add secp160r1 and secp160r2
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24650 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-07 15:12:45 +00:00
Love Hörnquist Åstrand 711c5ae000 add ec-group-secp256r1
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24635 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-07 04:06:12 +00:00
Love Hörnquist Åstrand 562c74e03d drop id_ec.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24631 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-07 04:05:32 +00:00
Love Hörnquist Åstrand 481aeb5028 add ECDSA_Sig_Value
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24627 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-07 04:04:50 +00:00
Love Hörnquist Åstrand 9d28a20178 add asn1_id_ecdsa_with_SHA256.x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24625 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-07 04:04:30 +00:00