7 Commits

Author SHA1 Message Date
8364bdd8f3 base: Add JSON string non-ASCII escaping options
- Add HEIM_JSON_F_ESCAPE_NON_ASCII to indicate that non-ASCII must be
   escaped as \uXXXX.

 - Add HEIM_JSON_F_NO_ESCAPE_NON_ASCII to force non-escaping of BMP
   codepoints.

 - If the locale's codeset is not UTF-8 and
   HEIM_JSON_F_NO_ESCAPE_NON_ASCII is not set, then set
   HEIM_JSON_F_ESCAPE_NON_ASCII.
2022-10-02 22:46:37 -05:00
c6a46f0c96 base: Implement JSON string escaping
We encode JSON in the KDC's audit logs, and soon in bx509d's /get-tgts.
Therefore, we should be reasonable in terms of what we encode.
2022-09-29 17:05:24 -05:00
543b94637f more dealloc functions require HEIM_CALLCONV
Change-Id: I68168a387c088b45e2572d5c982d33dfe0aa38a8
2022-01-29 00:15:59 -05:00
97cca6f921 base: use uintptr_t for hash type
Use uintptr_t for hash type; this is consistent with CoreFoundation, which uses
32-bit integers on 32-bit platforms for the hash code, and 64-bit integers on
64-bit platforms. (libheimbase is modelled on CoreFoundation.)

Previously we used unsigned long, which would have the same behavior on
LP32/LP64 systems, but not on Windows (where unsigned long is 32-bits on 64-bit
platforms).
2022-01-06 17:21:06 +11:00
faee4626fb base: Fix leak in heim_string_create_with_format() 2020-09-07 22:04:59 -05:00
01e7b326b6 Remove unused function from lib/base/string.c as it breaks with -Werror. 2012-06-26 22:14:47 +01:00
98809e86ce Move base into lib
This involves reverting dd267e8fc3,
    but that gets lost in the move.

    This builds on Ubuntu and Windows at this time.
2012-06-20 19:32:08 -05:00