Commit Graph

1269 Commits

Author SHA1 Message Date
Luke Howard
18a7562fa4 asn1: initialize L in ASN1_MALLOC_ENCODE
MSVC complains about uninitialized variables, set (L) to zero in failure case
from ASN1_MALLOC_ENCODE()
2021-09-21 18:59:38 +10:00
Isaac Boukris
bb1d8f2a8c kdc: remove KRB5SignedPath, to be replaced with PAC
KRB5SignedPath was a Heimdal-specific authorization data element used to
protect the authenticity of evidence tickets when used in constrained
delegation (without a Windows PAC).

Remove this, to be replaced with the Windows PAC which itself now supports
signing the entire ticket in the TGS key.
2021-09-19 13:02:12 +10:00
Nicolas Williams
5702bd5b77 asn1: Also decode ProxyCertInfo 2021-09-15 10:56:19 -05:00
Luke Howard
207bfc066d krb5: add unkeyed SHA-2 checksum types
Add unkeyed checksum types for SHA-256, SHA-384 and SHA-512, for future
internal use. They are assigned private (negative) checksum types and must
never appear in cleartext on the wire.
2021-09-13 17:08:32 +10:00
Luke Howard
ebfd48e40a kdc: avoid re-encoding KDC-REQ-BODY
Use --preserve-binary=KDC-REQ-BODY option to ASN.1 compiler to avoid
re-encoding KDC-REQ-BODYs for verification in GSS preauth, TGS and PKINIT.
2021-09-13 13:50:45 +10:00
heitbaum
c7bd01c62a yyerror: update to POSIX standard
To comply with the latest POSIX standard, in Yacc compatibility mode
(options `-y`/`--yacc`) Bison now generates prototypes for yyerror and
yylex.  In some situations, this is breaking compatibility: if the user
has already declared these functions but with some differences (e.g., to
declare them as static, or to use specific attributes), the generated
parser will fail to compile.  To disable these prototypes, #define yyerror
(to `yyerror`), and likewise for yylex.

refer: https://git.savannah.gnu.org/cgit/bison.git/tree/NEWS

GNU Bison 3.8
2021-09-10 09:11:23 +10:00
Luke Howard
ed1ef5d776 asn1: correctly check gmtime_s() return value
gmtime_s(), used on Windows, returns an errno_t not a struct tm *.

The previous code caused strftime() to dereference a NULL struct tm *.
2021-08-27 16:10:03 +10:00
Nicolas Williams
edf259dac9 asn1: Update comment in rfc2459.asn1 2021-08-25 15:42:24 -05:00
Nicolas Williams
df4b09f8af asn1: Also pretty-print cert policies 2021-08-12 17:31:35 -05:00
Luke Howard
49f3f5bd99 kdc: support for GSS-API pre-authentication
Add support for GSS-API pre-authentication to the KDC, using a simplified
variation of draft-perez-krb-wg-gss-preauth-02 that encodes GSS-API context
tokens directly in PADATA, and uses FX-COOKIE for state management.

More information on the protocol and implementation may be found in
lib/gssapi/preauth/README.md.
2021-08-12 17:37:01 +10:00
Luke Howard
89ff0eb462 asn1: ensure template generator includes ASN1CALL
Windows 32-bit builds were broken as the ASN1CALL calling convention
macro was not included in the output of gen_template.c, only in the
generated header.
2021-08-12 16:33:45 +10:00
Isaac Boukris
a4527a28a3 Implement KERB_AP_OPTIONS_CBT (server side)
if the client asserted knowledge of channel-bindings by
passing KERB_AP_OPTIONS_CBT, and the server passed bindings,
require the bindings to match.
2021-08-06 13:15:19 +10:00
Luke Howard
b8728cae14 asn1: GSER is RFC3641, not RFC2641
Update README.md.
2021-07-09 20:04:56 +10:00
Luke Howard
f67dd0f903 roken: move Heimdal vis.h extensions to separate header
vis.h is not built on platforms (such as macOS) that already have
that header, which resulted in prototypes for Heimdal-specific
vis.h extensions being absent.

Move those prototypes to a separate header, vis-extras.h, which
must be explicitly included in order to use the Heimdal extensions.
2021-05-17 10:05:58 +10:00
Nicolas Williams
1e65ebd5eb asn1: Fix Windows build 2021-04-25 10:45:43 -05:00
Nicolas Williams
ec171ef0b6 asn1: Add missing file gen_print.c 2021-04-25 10:45:43 -05:00
Nicolas Williams
5c93af553b asn1: Build both backends
The codegen backend is faster than the template backend, even for
modules that don't use IOS.  On x64 we see the template backend being
4% slower for TGS requests using the kdc-tester program.

So let's build both, libasn1 (codegen) and libasn1template when
configured with --disable-asn1-templating, but make sure that the
asn1_print utility is linked with libasn1template.

Eventually we'll want to either optimize the template backend better,
or add IOS and JSON printing support to the codegen backend.
2021-04-23 22:15:51 -05:00
Nicolas Williams
32b314b174 asn1: Generate print stubs (codegen) 2021-04-23 22:15:51 -05:00
Nicolas Williams
407f12cc0b asn1: Fix --disable-asn1-templating build 2021-04-21 22:40:41 -05:00
Nicolas Williams
9dcab76724 asn1: Fix build concurrency bug 2021-04-01 01:08:00 -05:00
Nicolas Williams
9ff74bcd21 asn1: Fix check/print type confusion 2021-04-01 01:08:00 -05:00
Nicolas Williams
e7a8457fd2 asn1: Fix extra.c printer functions 2021-04-01 01:08:00 -05:00
Nicolas Williams
614b3a5914 asn1: Fix OS X build
We can't use VIS_DQ on when the OS has a vis implementation but lacks
VIS_DQ.
2021-03-27 23:29:34 -05:00
Nicolas Williams
7985f402cb asn1: Attempt to fix makefile concurrency bug 2021-03-26 17:27:47 -05:00
Nicolas Williams
c74c57a143 asn1: Fix lib/asn1/Makefile.am buglet 2021-03-26 17:27:47 -05:00
Nicolas Williams
f0e628c2cf asn1: Add Heimdal cert ext for ticket max_life 2021-03-24 19:12:00 -05:00
Nicolas Williams
94f9d67b3d asn1: Update AFL screenshot 2021-03-18 18:07:23 -05:00
Nicolas Williams
36c6342230 asn1: Fix Linux build 2021-03-18 18:03:34 -05:00
Nicolas Williams
57de79ce6d asn1: Make asn1_print good for benchmarking 2021-03-11 11:58:41 -06:00
Nicolas Williams
c4ff603adf asn1: Fix asn1_print build w/ templating 2021-03-11 11:58:18 -06:00
Nicolas Williams
36c6ff407e asn1: Fix Windows build harder 2021-03-11 09:57:18 -06:00
Nicolas Williams
a858821194 asn1: Fix Windows build 2021-03-11 09:50:48 -06:00
Nicolas Williams
4d39e8c1b2 asn1: Also fuzz using X.690 sample 2021-03-11 09:36:53 -06:00
Nicolas Williams
d0298e5804 asn1: Fix recent der_replace_tag() bug
Recently introduced.
2021-03-11 09:13:09 -06:00
Nicolas Williams
5bb5887f8c asn1: Fix recent der_match_tag2() bug
Recently introduced.
2021-03-11 09:12:43 -06:00
Nicolas Williams
1b5fe4a35c asn1: Test x690 sample with both backends
And remove it from the library itself.
2021-03-10 22:52:07 -06:00
Nicolas Williams
be2525ef29 asn1: Fix rfc2459.asn1 compilation w/o templates 2021-03-10 21:21:26 -06:00
Nicolas Williams
05a952dbb9 asn1: Fix IMPLICIT tagging (codegen) 2021-03-10 19:15:17 -06:00
Nicolas Williams
7f4e9db9f9 asn1: Make int sizing consistent and better 2021-03-10 19:15:17 -06:00
Nicolas Williams
440bfeda58 asn1: Allow asn1_print to build w/o templating 2021-03-10 16:00:04 -06:00
Nicolas Williams
c69a9764bc asn1: Update README.md 2021-03-10 12:24:01 -06:00
Nicolas Williams
659e444e3d asn1: Fix crash found by AFL 2021-03-10 12:23:51 -06:00
Nicolas Williams
a51eaab7b9 asn1: Update README.md 2021-03-09 14:51:19 -06:00
Nicolas Williams
cba34400fe asn1: Fix printing of open type choice names 2021-03-09 12:22:43 -06:00
Nicolas Williams
6b5feba91d asn1: Fix printing of bit string named members
Properly print commas between members.
2021-03-09 12:20:23 -06:00
Nicolas Williams
8bc4bae52d asn1: Free template memory leak
New AFL session in progress.
2021-03-09 11:21:54 -06:00
Nicolas Williams
2a826fb331 asn1: Results from latest AFL session 2021-03-09 11:21:47 -06:00
Nicolas Williams
77126b4058 asn1: Update README-X681.md 2021-03-08 16:16:00 -06:00
Nicolas Williams
00e0475ce2 asn1: Use name not gen_name for JSON enum printing 2021-03-07 16:32:41 -06:00
Nicolas Williams
5d7d1897de asn1: Pretty-print enum values 2021-03-07 13:36:37 -06:00