Commit Graph

30009 Commits

Author SHA1 Message Date
Nicolas Williams
b7bf5ca6e8 kadmin: Fix warnings 2022-01-14 14:59:02 -06:00
Nicolas Williams
69eee19541 kadm5: Fix warnings 2022-01-14 14:58:59 -06:00
Nicolas Williams
6be334bfee kcm: Fix warnings 2022-01-14 14:47:13 -06:00
Nicolas Williams
6f467b8097 wind: Fix some warnings 2022-01-14 14:47:13 -06:00
Nicolas Williams
005a43da96 gsspa: Quiet GCC fallthrough warning
Somehow GCC was honoring lower-case "fallthrough" comments elsewhere but
not here.  Anyways, there was no need to fall through, so now we don't.
2022-01-14 14:47:13 -06:00
Jeffrey Altman
6426e7550f roken: do not globally define 'timezone' and 'tzname'
ec866e635e
("Windows 10 SDK build fixes") introduced CPP macros

  timezone -> _timezone
  tzname   -> _tzname

but these names are common and the macros rewrite too much.

The name mapping is only required when building strftime.c
with Visual Studio 2017 and later.  Move the definitions
into strftime.c.

Change-Id: Ic813bff842124595fd3d86761cee6dcea4ae44e4
2022-01-14 14:56:39 -05:00
Nicolas Williams
66d6998e3e GitHub: Complete split of build.yml 2022-01-14 13:52:50 -06:00
Nicolas Williams
02f6147bf1 GitHub: Prep to split build.yml 2022-01-14 13:51:26 -06:00
Nicolas Williams
64301260a5 GitHub: Fix paths that cause builds
We should split build.yml into separate workflows for each OS, that way
we can have Windows builds triggered by changes to NTMakefiles, but not
Linux builds.
2022-01-14 13:40:50 -06:00
Nicolas Williams
05e8c0ede6 Check HMAC_Init_ex() return value 2022-01-14 12:48:32 -06:00
Nicolas Williams
52f3dc6aa4 hcrypto: HMAC_Init_Ex(): return int like OpenSSL 2022-01-14 12:48:32 -06:00
Nicolas Williams
77392d5d9c hcrypto: Fix warnings 2022-01-14 12:48:32 -06:00
Nicolas Williams
ea61f68d55 hx509: Fix name expansion bug 2022-01-14 12:44:00 -06:00
Nicolas Williams
e23bc7d53d hx509: Fix warnings and leaks 2022-01-14 12:42:52 -06:00
Nicolas Williams
d88298649b asn1: Fix ENOMEM NULL deref 2022-01-14 12:36:34 -06:00
Nicolas Williams
f0c46e7830 asn1: Use calloc() in generated C code 2022-01-14 12:25:43 -06:00
Nicolas Williams
1fe3d293e1 asn1: Fix warnings 2022-01-14 12:25:43 -06:00
Nicolas Williams
80dceccdd6 GitHub CI: Fix build.yml?
We need a validator for this.  GitHub Actions tells us nothing about
what might be wrong with our build.yml!
2022-01-14 12:25:00 -06:00
Nicolas Williams
7f8fa65c5b asn1: Fix leak in der_copy_octet_string()
This manifested as a leak via _save fields in the template backend.
2022-01-14 12:01:34 -06:00
Nicolas Williams
a7e11df142 sl: Fix warnings in lib/sl/sl.c 2022-01-14 12:01:33 -06:00
Nicolas Williams
ed0fd1263a base: Fix warnings 2022-01-14 12:01:33 -06:00
Nicolas Williams
69b3c5368c base: Context should optional in more error funcs 2022-01-14 12:01:33 -06:00
Nicolas Williams
94bb267a8b roken: Delete getcap/cgetent/cgetstr() 2022-01-14 12:01:33 -06:00
Nicolas Williams
a90e1cb65c roken: Fix warnings 2022-01-14 12:01:33 -06:00
Jeffrey Altman
3a7c2c6a7f krb5.h: define DOMAIN_X500_COMPRESS macro
db7763ca7b
("asn1: X.681/682/683 magic handling of open types")
renamed 'DOMAIN_X500_COMPRESS' to 'domain_X500_Compress'
for compliance with ASN.1 which requires values to start with
lower case and types to start with upper case.

This change adds a CPP macro DOMAIN_X500_COMPRESS for use by
third-party applications that rely upon the prior name.

Change-Id: I2eb6fec2c795c8adeeef893b00909a202257ad74
2022-01-14 12:46:08 -05:00
Jeffrey Altman
05781f22ab roken: fix net_write if _WIN32 and !SOCKET_IS_NOT_AN_FD
12826c9586
("Handle partial writes on non-blocking sockets") introduced
unconditional use of 'use_write' which is only declared if
defined(SOCKET_IS_NOT_AN_FD).

Change-Id: I0c43ed44a86b4f245acba849afabeb9ce739d0e5
2022-01-14 12:35:50 -05:00
Jeffrey Altman
4caaa7ca0b include: bits conditionalize behavior on HAVE_SNPRINTF
ee2a92c547 ("bits: Fix warnings")
introduced unconditional use of snprintf().   Use of snprintf in
most of the tree is acceptable whenever roken is available because
roken provides snprintf() for platforms that do not provide it.
However, bits.c cannot use roken and therefore must not
unconditionally call snprintf().

This change restores the prior implementation of BITSIZE(TYPE)
when HAVE_SNPRINTF is undefined.

Change-Id: Ibbd2f003abe9f9fb612719266544cfd545809a18
2022-01-14 12:17:39 -05:00
Nicolas Williams
9f2027f216 CI: Add OS X build 2022-01-13 19:56:12 -06:00
Nicolas Williams
e56b558616 osx: Import fix for tommath #159 2022-01-13 19:56:12 -06:00
Nicolas Williams
4d8badc9a8 roken: Handle not having getpwnam_r() 2022-01-13 19:56:02 -06:00
Nicolas Williams
f06b7d1b38 cf: Add missing "no-" for enum-conv (moar) 2022-01-13 19:50:27 -06:00
Nicolas Williams
b747766a14 cf: Add missing "no-" for enum-conv 2022-01-13 19:45:48 -06:00
Nicolas Williams
9d9055c217 README.md: Add Github Actions badge 2022-01-13 16:57:52 -06:00
Nicolas Williams
bb9606b2c9 README.md: Retire Travis-CI badge 2022-01-13 16:57:52 -06:00
Nicolas Williams
1af1d60a8c github: Windows build? 2022-01-13 16:57:52 -06:00
Luke Howard
00ba0ab387 windows: bail early if unknown APPVER
If APPVER is set to an unknown value, bail early rather than invoking compiler
with bogus Windows version macros.
2022-01-14 09:30:33 +11:00
Nicolas Williams
ee2a92c547 bits: Fix warnings 2022-01-13 15:33:04 -06:00
Nicolas Williams
581ca3d44f httpkadmind: Build with older libmicrohttpd (fix GH CI) 2022-01-13 15:33:04 -06:00
Nicolas Williams
aa8eb19b8e bx509d: Build with older libmicrohttpd (fix GH CI) 2022-01-13 15:33:04 -06:00
Nicolas Williams
0c7b06f9ca cf: Check cc support of -Werror=enum-conversion 2022-01-13 15:33:04 -06:00
Marc Dionne
fc4b3ce49b hcrypto: Fix return type for null_Init, null_Update and null_Final
The hc_evp_md_init, hc_evp_md_update and hc_evp_md_final typedefs
are defined as functions returning an int, but null_Init, null_Update
and null_Final are defined as void, and cast with the typedef when
assigned to the function vector.

This might result in some uninitialized value being returned to the
caller, if some of them make use of the return value.  It also causes
warnings if the -Wcast-function-type warning is enabled.

Change the type to in to match the typedef, and return 1 (success).
2022-01-13 16:00:50 -05:00
Luke Howard
6530021f09 kdc: move auth event definitions into KDC header
Move KDC auth event macro definitions out of hdb.h and into a new KDC header,
kdc-audit.h.
2022-01-13 14:51:31 +11:00
Nicolas Williams
04523254c1 asn1: Restore styling of generated sources 2022-01-11 17:45:27 -06:00
Nicolas Williams
ff4033eb59 asn1: Fix Windows build 2022-01-11 17:15:59 -06:00
Nicolas Williams
6ee1554f3e Ignore enum-conversion errors
This is not a very good fix, though the warnings remain.  Such errors
can in principle be a problem because in C there is no standard enum
sizing.

In this case we have two enums with the same elements and so the same
size, so it's clearly not a problem.
2022-01-11 17:15:59 -06:00
Nicolas Williams
284b29a85c asn1: Fix missing LIB_heimbase dependency 2022-01-11 10:55:19 -06:00
Nicolas Williams
40d1271094 asn1: Expand decoration w/ C types
This commits allows `heim_object_t` as a type and causes the generated
code to use the `heim_retain()` and `heim_release()` functions for
copying and releasing values of such types.

Also, now one can have more than one decoration per-type.
2022-01-11 10:21:05 -06:00
Luke Howard
ef906991fd asn1: don't include decoration header for void *
If the decorated external type is a void *, don't include the decoration
header in the ASN.1 header, only in the template implementation. This allows
the copy constructor and destructor to be implementation private.
2022-01-11 09:57:11 -06:00
Nicolas Williams
df3e08485b asn1: Add support for decoration w/ external types
This adds support for asn1_compile --decorate=... variation that causes
decoration of an ASN.1 SET/SEQUENCE type with a field of a non-ASN.1
type.

This means we can now have an ASN.1 type to represent a request that can
then have a "hidden" field -- hidden in that it is neither encoded nor
decoded.  This field will be copied and freed when the decoration is of
an ASN.1 type or of a external, C type that comes with copy constructor
and destructor functions.  Decoration with a `void *` field which is
neither copied nor freed is also supported.

We may end up using this to, for example, replace the `hdb_entry_ex`
type by decorating `HDB_entry` with a C type that points to the `HDB` in
which the entry was found or to which it should be written.
2022-01-11 09:57:11 -06:00
Luke Howard
10fc7730d0 kdc: send request, not TGS, server name in TGS errors
Return the request server principal name in TGS errors rather than the TGS
server name.
2022-01-10 15:29:49 +11:00