Commit graph

452 commits

Author SHA1 Message Date
Dag-Erling Smørgrav
332c7bd54c Clean up a little. 2018-11-17 16:36:44 +01:00
Dag-Erling Smørgrav
d8a72285f7 Rename some files. 2018-11-17 16:35:49 +01:00
Dag-Erling Smørgrav
53885159e0 New alpha release. 2018-11-15 19:07:10 +01:00
Dag-Erling Smørgrav
0ce844d8a5 Bump version. 2018-11-15 18:35:51 +01:00
Dag-Erling Smørgrav
11a5c9c587 Belatedly bump copyright dates. 2018-11-15 18:35:01 +01:00
Dag-Erling Smørgrav
4d76b664d2 Merge counter and lastused.
To prevent replay attacks, HOTP uses a counter, while TOTP keeps track of the time the key was last used.  Since these values have the same type and are never used at the same time, merge them into an anonymous union.
2018-11-15 18:35:01 +01:00
Dag-Erling Smørgrav
a439adc68f Differentiate between provider and consumer.
Introduce a new macro, CRYB_I_AM, which replaces CRYB_INIT for projects that provide Cryb components or extensions.  Currently, the main difference is that they are not required to have the exact same PACKAGE_VERSION as the Cryb version that they use.
2018-11-15 18:34:57 +01:00
Dag-Erling Smørgrav
47547534d7 Switch Travis to Xenial. 2018-11-15 18:08:25 +01:00
Dag-Erling Smørgrav
c4e1eaa820 Add my copyright. 2018-11-14 13:16:01 +01:00
Dag-Erling Smørgrav
04a7104126 New alpha release. 2018-05-13 16:40:29 +02:00
Dag-Erling Smørgrav
20b8f7528b Bump version. 2018-05-13 16:37:46 +02:00
Dag-Erling Smørgrav
323197908d Continue to refine our build system.
Most importantly, differentiate between library and non-library components.  The former can be provided and required, and if provided but disabled, can be replaced by pre-installed versions.  The latter can only be provided and cannot be the target of a dependency relationship.
2018-05-13 00:24:38 +02:00
Dag-Erling Smørgrav
85bf898826 Don't invoke pkg-config unnecessarily.
Previously, we always invoked AX_PKG_CONFIG_CHECK() for a disabled component (i.e. a component which we provide but which was disabled on the configure command line).  This is both excessive (because we only need to run this check for components that will be needed during the build) and insufficient (because we also need to run it for components from other Cryb projects).
2018-05-11 18:21:26 +02:00
Dag-Erling Smørgrav
68809ea833 Add a CRYB_VERBOSE environment variable. 2018-05-11 17:41:54 +02:00
Dag-Erling Smørgrav
bfbd8da63a Bump version. 2018-05-06 20:55:20 +02:00
Dag-Erling Smørgrav
d53673deee
Merge pull request #17 from cryb-to/memsafe
Improved memory-safe functions
2018-05-06 20:08:34 +02:00
Dag-Erling Smørgrav
cdd29a0700 If we're going to have a sentinel, we may as well have fun with it. 2018-05-06 19:21:00 +02:00
Dag-Erling Smørgrav
354759a9f2 Further improvements to memcpy_s(), memset_s(), and their man pages. 2018-05-06 19:12:51 +02:00
Dag-Erling Smørgrav
a1bf5e87f0 Implement rsize_t / RSIZE_MAX (almost) correctly.
The caveat is needed because if you include one of these headers on a system that defines rsize_t without having the correct incantations in your configure.ac, you are going to have a bad time.  But there is no good general solution to the problem.
2018-05-06 19:12:51 +02:00
Dag-Erling Smørgrav
56bd595396 Modernize. 2018-05-06 19:12:51 +02:00
Dag-Erling Smørgrav
d6e82b474f Add man pages for memset_s(3) and memcpy_s(3) 2018-05-06 19:12:51 +02:00
Dag-Erling Smørgrav
c73fd34d97 Implement a memcpy_s() equivalent. 2018-05-06 19:12:51 +02:00
Dag-Erling Smørgrav
bf624acec1 Tweak memset_s() and its unit tests, mostly renaming variables. 2018-05-06 19:12:51 +02:00
Dag-Erling Smørgrav
1a86caaf37
Merge pull request #16 from cryb-to/autoconf
Create a set of autoconf macros to handle Cryb components and dependencies.
2018-05-06 18:55:23 +02:00
Dag-Erling Smørgrav
4bf16e8ee2 Install our autoconf macros. 2018-05-06 17:38:45 +02:00
Dag-Erling Smørgrav
415f4170c6 Take advantage of the new autoconf macros. 2018-05-06 03:21:59 +02:00
Dag-Erling Smørgrav
dc8984d0a0 Create autoconf macros to automate component selection.
These macros are designed to work in concert with the AX_PKG_CONFIG macros.  It is now possible to disable any component, even if another depends on it, provided that it is already installed.  For enabled components, we define the same variables as AX_PKG_CONFIG would, so Makefiles don't need to know if a component they rely on is being built as part of this packge or if it was already installed.
2018-05-06 03:21:59 +02:00
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