Commit graph

425 commits

Author SHA1 Message Date
Dag-Erling Smørgrav
e603e0bc2e Add support for version checks. 2018-05-06 03:21:59 +02:00
Dag-Erling Smørgrav
42e19ba158 Add .gitignore and remove an unused file. 2018-05-05 15:38:02 +02:00
Dag-Erling Smørgrav
fe064e41db Add missing dependency on cryb-rand for t_oath. 2018-05-05 15:37:55 +02:00
Dag-Erling Smørgrav
9be4ffc412 Make inter-library dependencies public. 2018-05-05 15:37:55 +02:00
Dag-Erling Smørgrav
7a9326dac4 Explicitly enable maintainer mode.
This is the default if the AM_MAINTAINER_MODE macro is not invoked, but invoking it also creates the --disable-maintainer-mode option which some automated build tools use to speed up builds from a clean tree.
2018-05-05 15:37:55 +02:00
Dag-Erling Smørgrav
ff48f79cca New alpha release. 2018-04-26 22:19:48 +02:00
Dag-Erling Smørgrav
780084b9dd Fix incomplete dependency list.
This is a no-op, but suppresses a warning about an unused (albeit empty) substitution variable.
2018-04-26 22:02:07 +02:00
Dag-Erling Smørgrav
2464c55c6e More robust FreeBSD port creation.
Instead of using the enclosing source tree, use automake's distdir target to copy a clean set of sources into WRKSRC.  This protects us from a polluted tree, prevents us from polluting it in turn, and allows the ports framework to perform necessary substitutions in libtool and the like.
2018-04-26 22:00:32 +02:00
Dag-Erling Smørgrav
6e70e11df9 Bump version and copyright years. 2018-04-26 22:00:21 +02:00
Dag-Erling Smørgrav
8693613da9
Merge pull request #15 from cryb-to/cryb-oath
Complete overhaul of the OATH library.
2018-04-26 03:25:51 +02:00
Dag-Erling Smørgrav
31f2831b67 Fix a few key URI validation issues. 2018-04-26 03:09:51 +02:00
Dag-Erling Smørgrav
bd4b5c246e Complete rewrite of oath_key_to_uri().
- The API has changed so that the function now writes its output into a caller-provided buffer, in a style similar to libcryb-enc.

- All parameter values are now correctly percent-encoded.

- The issuer parameter is now supported.
2018-04-26 02:41:47 +02:00
Dag-Erling Smørgrav
48fc358df7 Major cleanup and API overhaul.
- The API has been redesigned so the caller is now responsible for allocating storage.
- A few more macros and typedefs have been added to clean up the namespace.
- Key parameter validation has been strengthened.
2018-04-26 01:31:35 +02:00
Dag-Erling Smørgrav
54c67f337a Add partial support for issuer parameter.
We can read the issuer from a URI (as a separate parameter, not as a prefix to the label) and store it, but not yet output it.  That will be implemented in a future rewrite of oath_key_to_uri().
2018-04-26 00:06:48 +02:00
Dag-Erling Smørgrav
4576565fd1 Make rand_bytes() work more like read(2). 2018-04-25 23:11:47 +02:00
Dag-Erling Smørgrav
5768034d36 Fix signed shift in base32 and base64 decoders. 2017-12-17 16:01:32 +01:00
Dag-Erling Smørgrav
785612b12b Apply developer flags to C++ as well as C. 2017-12-17 14:03:26 +01:00
Dag-Erling Smørgrav
1bf0b415a3 Make it clear that we prefer pkgconf over pkg-config. 2017-09-04 22:49:41 +02:00
Dag-Erling Smørgrav
f3f299b69a Fix case where ${PKG_CONFIG} is not an absolute path. 2017-09-04 22:49:03 +02:00
Dag-Erling Smørgrav
837d7f3a99 New alpha release. 2017-09-04 21:53:12 +02:00
Dag-Erling Smørgrav
636bd7a259 Better macros for unreachable code.
This adds a `CRYB_UNREACHABLE` macro which will cause a segfault if reached, and modifies `CRYB_NO_DEFAULT_CASE` to have essentially the same semantics.  It also removes the conditionals since the coverage macros are always defined.
2017-09-04 21:01:39 +02:00
Dag-Erling Smørgrav
06c2f1280a Add a missing break.
This was harmless as it would either fall through to an empty default statement (if CRYB_COVERAGE was defined) or out of the switch, but it's still bad style.
2017-09-04 21:00:01 +02:00
Dag-Erling Smørgrav
2e5134e217 Bump version. 2017-09-04 16:33:37 +02:00
Dag-Erling Smørgrav
e3e6a0032c Merge pull request #14 from cryb-to/cryb-core
Add strchrnul() and wcschrnul().
2017-08-23 14:24:44 +02:00
Dag-Erling Smørgrav
7744c45b8b Remove unnecessary header. 2017-08-23 13:42:00 +02:00
Dag-Erling Smørgrav
d77ba2a458 Fix unit test for strchrnul(). 2017-08-23 13:41:40 +02:00
Dag-Erling Smørgrav
5c8745138e Add strchrnul(), wcschrnul(), and tests for the former. 2017-08-23 13:41:40 +02:00
Dag-Erling Smørgrav
85f4aa359a Add CRYB_DEQUAL() to strip qualifiers from pointers. 2017-08-23 13:41:40 +02:00
Dag-Erling Smørgrav
944782f506 Remove unnecessary headers. 2017-08-23 13:19:59 +02:00
Dag-Erling Smørgrav
2f71ba6289 Improved unit tests for division. 2017-08-21 14:09:37 +02:00
Dag-Erling Smørgrav
47d81e3dcc Merge pull request #13 from cryb-to/cryb-test
Add a minimal test for the cryb-test allocator and improve leak detection.
2017-05-11 00:32:36 +02:00
Dag-Erling Smørgrav
562ffa391e Slight cleanup. 2017-05-11 00:08:45 +02:00
Dag-Erling Smørgrav
8e0f4a293e Determine the default for CRYB_LEAKTEST at run-time.
When cryb-test is used as a framework for another project, the compile-time test is useless since cryb-test itself will have been built with coverage disabled.  Besides, it is not a reliable indicator of whether leak detection will work.  Instead, check if the heap is already dirty when we first gain control.
2017-05-11 00:08:45 +02:00
Dag-Erling Smørgrav
ea5b521c61 Add a simple test case for the allocator. 2017-05-11 00:08:45 +02:00
Dag-Erling Smørgrav
49c0d954ca Staticize an internal function. 2017-05-11 00:08:45 +02:00
Dag-Erling Smørgrav
5a8998d440 Replace pkg.m4 with our own pkg-config macros. 2017-05-06 02:03:14 +02:00
Dag-Erling Smørgrav
c09b83a2ad AC_HELP_STRING was renamed to AS_HELP_STRING ages ago. 2017-05-06 00:53:37 +02:00
Dag-Erling Smørgrav
fe3d11e87f New alpha release. 2017-05-02 13:26:36 +02:00
Dag-Erling Smørgrav
35e42e7479 Really fix flags for t_cxx.
48269ce tried to fix d43a6bf2 but actually just broke it in a different way.  Restore AM_CPPFLAGS so cross-tree builds work again.
2017-05-02 13:24:08 +02:00
Dag-Erling Smørgrav
8402429448 Bump version. 2017-05-02 13:15:10 +02:00
Dag-Erling Smørgrav
04783e88af Merge pull request #12 from cryb-to/cryb-core
String function improvements.
2017-05-02 13:07:01 +02:00
Dag-Erling Smørgrav
7d22bec7bc Improve man pages for strlcat() and strlcpy(). 2017-05-02 12:52:19 +02:00
Dag-Erling Smørgrav
e99877752f Pass the correct va_list to vsnprintf(). 2017-05-01 21:20:50 +02:00
Dag-Erling Smørgrav
5da37869f2 Use <unistd.h> instead of <sys/types.h> for ssize_t. 2017-05-01 21:20:50 +02:00
Dag-Erling Smørgrav
8ce323c899 Bump copyright year. 2017-05-01 21:20:50 +02:00
Dag-Erling Smørgrav
882312950d Test libc strlcat() and strlcpy().
On systems that have strlcat() and strlcpy() in libc, run the tests twice (once with our implementation and once with the system's) to verify that our tests are correct.
2017-05-01 21:20:50 +02:00
Dag-Erling Smørgrav
d80dc09f3c Improve comments for strlcat() and strlcpy(). 2017-05-01 21:20:50 +02:00
Dag-Erling Smørgrav
d4ae7a43cb Fix compiler warnings in Travis.
Travis forces _FORTIFY_SOURCE, which enables warn_unused_result annotations in glibc. Some of those annotations are of dubious value; in the case of asprintf(3) and vasprintf(3), they flag code that doesn't check the return value as unsafe even if it checks the pointer instead (which is guaranteed to be NULL in case of failure, and arguably more useful than the return value). Unfortunately, gcc intentionally ignores (void) casts, so we have no choice but to quench the warning with -Wno-unused-result. However, some of the compilers we wish to support don't recognize it, so we move it from the developer flags to the Travis environment.

While there, switch Travis from Precious to Trusty.
2017-05-01 16:52:22 +02:00
Dag-Erling Smørgrav
48269ce937 Fix include paths for some tests.
It was wrong to remove $(AM_CPPFLAGS) in d43a6bf2, because it is only used for code for which there is no explicit *_CPPFLAGS.  It is not entirely clear why this did not trip us (or Travis) up until now, although it is possible that it only breaks when $(builddir) != $(srcdir).

On the other hand, there is no reason to use $(INCLUDES).
2017-04-29 18:28:54 +02:00
Dag-Erling Smørgrav
9926ca1118 Use the English name of the University. 2017-04-29 02:31:15 +02:00