Commit Graph

30998 Commits

Author SHA1 Message Date
Taylor R Campbell
709d317cc9 heim_openlog: Sprinkle const. 2026-01-18 19:06:17 -06:00
Taylor R Campbell
270e0d819c krb5/deprecated: Nix const abuse. 2026-01-18 19:06:17 -06:00
Taylor R Campbell
7ec6b6220d krb5/crypto: Label unconst abuse for iov. 2026-01-18 19:06:17 -06:00
Taylor R Campbell
6da033336e krb5/context: Sprinkle const and note strict aliasing violation. 2026-01-18 19:06:17 -06:00
Taylor R Campbell
5c694deee9 _krb5_load_plugins: Sprinkle const. 2026-01-18 19:06:16 -06:00
Taylor R Campbell
3cc4861888 heim_load_plugins: Sprinkle const. 2026-01-18 19:06:16 -06:00
Taylor R Campbell
9765e2522b asn1: Mitigate const abuse and omit needless casts.
There's still an abusive rk_UNCONST in _asn1_encode_open_type, but
that will take more effort to untangle.
2026-01-18 19:06:16 -06:00
Taylor R Campbell
f494333624 base/json: Sprinkle const. 2026-01-18 19:06:16 -06:00
Taylor R Campbell
a578088705 heim_data_ref_create: Use rk_UNCONST.
This API is used for both const and non-const strings, depending on
whether there is a deallocator passed or not, so the C type system
can't distinguish this for us.

XXX Perhaps this should be two separate APIs, one which takes
const-qualified pointers and one which takes non-const-qualified
pointers.
2026-01-18 19:06:16 -06:00
Taylor R Campbell
f6d1dfd60f *.l: Fix old-style function definitions of yywrap. 2026-01-18 19:06:16 -06:00
Taylor R Campbell
a1d92fefbc Use rk_UNCONST with putenv("...") to pacify -Wwrite-strings. 2026-01-18 19:06:16 -06:00
Taylor R Campbell
7223924aeb roken/hostent_find_fqdn.c: Fix unnecessary const abuse. 2026-01-18 19:06:16 -06:00
Taylor R Campbell
ce43ff7b42 roken/getuserinfo.c: Fix various const abuse. 2026-01-18 19:06:16 -06:00
Nicolas Williams
f36629d150 osx: Fix check-iprop 2026-01-18 19:06:16 -06:00
Nicolas Williams
1a82701a91 osx: Fix warnings/errors 2026-01-18 19:06:16 -06:00
Nicolas Williams
e8f63dd1ac GHA: Get it building 2026-01-18 19:06:16 -06:00
Nicolas Williams
76fbb83e86 hx509: Add a JWT fuzzer 2026-01-18 19:06:16 -06:00
Nicolas Williams
2ff2cc04b8 base: Add a fuzzer for JSON 2026-01-18 19:06:16 -06:00
Nicolas Williams
ae7d6746d1 gsstool: Add GSS-based kinit-like acquire_cred cmd
This has most of the features needed to act as a kinit that uses GSS
APIs, specifically gss_acquire_cred_from() and gss_store_cred_into2().

It's missing some functionality, such as being able to drive prompts
from AS responses (if we add minor status codes for representing KDC
pre-auth proposals, then we do drive prompts, but we would have to
encode a lot of mechanism-specific knowledge into gsstool).

The point of this commit is to explore:

 - GSS functionality for kinit-like actions

 - credential store key/value pairs supported by the mechanisms

 - document the credential store key/value pairs (in gsstool.1)

that might lead to further enhancements.  But gsstool acquire-cred
is quite functional at this point!
2026-01-18 19:06:16 -06:00
Nicolas Williams
b804b22446 gsskrb5: Add cred store PKINIT and FAST options 2026-01-18 19:06:16 -06:00
Nicolas Williams
509ee48669 kadmind: Fix NULL ptr derefs found by fuzzing 2026-01-18 19:06:16 -06:00
Nicolas Williams
9f5db19378 kadmind: Add fuzz mode and fuzz corpus 2026-01-18 19:06:16 -06:00
Nicolas Williams
8964be1eee tests: Prep for older Heimdal interop testing 2026-01-18 19:06:16 -06:00
Nicolas Williams
d1f56c6966 tests: Work around OpenSSL legacy provider being disabled 2026-01-18 19:06:16 -06:00
Nicolas Williams
b9773f7839 tests: Add another MIT Kerberos interop test
We do a small amount of MIT interop testing in tests/kdc/check-fast.in,
which tests some MIT clients against Heimdal KDCs.  This commit adds
more testing via tests/kdc/check-mit-kdc.in, wherein we set up and run
an MIT Kerberos realm and KDCs and test Heimdal clients against it.
2026-01-18 19:06:16 -06:00
Nicolas Williams
9b88e9ec3b tests: Use new framework in tests/gss
Claude-coded with heavy human guidance.  This found several bugs in
tests/gss/check-negoex, and also in SPNEGO.

WARNING: Needs more review.
2026-01-18 19:06:16 -06:00
Nicolas Williams
e362d69972 tests: Improving the tests/ framework
- `test_section "..."` replaces `echo "Now we're testing ..."`

 - `test_run ...` replaces `... || { ...; eval "testsfailed"; }`

 - `test_run not ...` replaces `... && { ...; eval "testsfailed"; }`

`test_section` saves the output of the program and shows it only in the
case of failures.

`test_run` arranges to exit with non-zero status if a test fails.
Use `set -e` to force early exit.  Conversely use `set +e` to continue
running the remaining tests when one fails -- this will be very useful
in reducing the number of CI test runs (e.g., GitHub Actions), thus
saving time and money.

This is Claude-generated code, guided by me, with minor corrections.
2026-01-18 19:06:16 -06:00
Nicolas Williams
167849d621 kdc: Replace token validator plugin system 2026-01-18 19:06:16 -06:00
Nicolas Williams
220a47b000 hx509: Add JOSE functionality 2026-01-18 19:06:16 -06:00
Nicolas Williams
aa7a1a403a cf: Improve --with-openssl=DIR 2026-01-18 19:06:16 -06:00
Nicolas Williams
dafe6323fb krb5: Restore 1DES and 3DES 2026-01-18 19:06:16 -06:00
Nicolas Williams
cbe156d927 Use OpenSSL 3.x _only_ and implement RFC 8636
- No more OpenSSL 1.x support
 - Remove 1DES and 3DES
 - Remove NETLOGON, NTLM (client and 'digest' service)
2026-01-18 19:06:16 -06:00
Nicolas Williams
b857bde4fb kinit: Check writev() result 2026-01-18 16:09:31 -06:00
Nicolas Williams
02ce745c6e sl: Fix OS X build (bison) 2026-01-18 16:09:31 -06:00
Nicolas Williams
7439820618 hcrypto, otp: Remove hcrypto and otp!
We must switch to OpenSSL 3.x, and getting lib/hcrypto to provide
OpenSSL 3.x APIs is too large an undertaking.  Plus the hcrypto backend
is not safe, not secure (probably has timing leaks galore), and no one
has the resources to make it a world-class crypto library, so it just
has to go.
2026-01-18 16:09:31 -06:00
Nicolas Williams
199d6b7f8f tests: Check asprintf() result 2026-01-18 16:09:31 -06:00
Nicolas Williams
318183f90b tests: Avoid DNS 2026-01-18 16:09:31 -06:00
Nicolas Williams
d5583d2e54 tests: Make HDB writes async to speed tests 2026-01-18 16:09:31 -06:00
Nicolas Williams
4fd6a9acf0 tests: Work around race in check-iprop
We need to wait_for the changes to show up, not for log messages or log
entries.  The latter can come before the HDB writes are committed.
2026-01-18 16:09:31 -06:00
Nicolas Williams
567704f20e httpkadmind: Add -A option for async HDB writes 2026-01-18 16:09:31 -06:00
Nicolas Williams
a33d6fb82a kadmind: Fix leak 2026-01-18 16:09:31 -06:00
Nicolas Williams
5a7ace809e kadmind: Add -A option for async HDB writes 2026-01-18 16:09:31 -06:00
Nicolas Williams
16b4b386f2 kadmin: Add -A option for async HDB writes 2026-01-18 16:09:31 -06:00
Nicolas Williams
d64ba321b8 kadmin: Update kadmin(1) man page 2026-01-18 16:09:31 -06:00
Nicolas Williams
c498fed5a5 kadmin: Fix ext_keytab leak 2026-01-18 16:09:31 -06:00
Nicolas Williams
a7e9797919 kadmin: Implement -e for cpw/randkey 2026-01-18 16:09:31 -06:00
Nicolas Williams
697d493ca8 kadmin: Use same supported_enctypes default as default_keys in lib/hdb 2026-01-18 16:09:30 -06:00
Nicolas Williams
b704f45dce iprop: Fix Windows bug 2026-01-18 16:09:30 -06:00
Nicolas Williams
845a9bb0e6 iprop: Fix leaks in ipropd-slave 2026-01-18 16:09:30 -06:00
Nicolas Williams
b8aed2b43e kadm5: Check ftruncate() result 2026-01-18 16:09:30 -06:00