Commit graph

24 commits

Author SHA1 Message Date
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
944782f506 Remove unnecessary headers. 2017-08-23 13:19:59 +02:00
Dag-Erling Smørgrav
fbf69f31cb Start using pkg-config / pkgconf. 2017-03-07 00:54:46 +01:00
Dag-Erling Smørgrav
cf46393d5e Remove an unused header and fix some naming nits. 2017-03-06 23:40:05 +01:00
Dag-Erling Smørgrav
d017611d76 All property names and values may be percent-encoded.
If the key length is not a multiple of 40 bits, its base32 representation may be padded, and that padding will be encoded.   We already decoded the label (which may contain spaces and other unsafe characters), but not the key.  For the sake of simplicity and robustness, we now decode the name and value of every property.

This corresponds to OpenPAM r886.
2017-03-05 17:06:30 +01:00
Dag-Erling Smørgrav
f70dac496f Mechanically bump copyright dates to the date of the latest commit. 2017-02-19 20:07:43 +01:00
Dag-Erling Smørgrav
4cad790446 Fix typo in libcryb-rand's Makefile and ensure that it is built before libcryb-oath, which uses it. 2016-11-21 13:46:49 +01:00
Dag-Erling Smørgrav
94c83d5407 Remove tautological condition. 2016-10-03 16:43:05 +02:00
Dag-Erling Smørgrav
be954631db Finish and hook up half-written name-to-enum / enum-to-name conversion for OATH modes. 2016-10-03 12:26:30 +02:00
Dag-Erling Smørgrav
dc43296a47 Centralize most of .gitignore. 2016-09-17 21:38:54 +02:00
Dag-Erling Smørgrav
85f75bba42 Rename a few more files. 2016-09-04 16:34:30 +02:00
Dag-Erling Smørgrav
06a757e878 Big reorganization and cleanup 2016-09-04 14:56:39 +02:00
Dag-Erling Smørgrav
1d0f2a4ff3 Reserve room in the label buffer for the terminating NUL. 2016-02-19 12:20:25 +01:00
Dag-Erling Smørgrav
f9c8ce7c65 Build system overhaul 2015-12-14 18:08:22 +01:00
Dag-Erling Smørgrav
4d7893004c Prepare for moving to Github 2015-12-14 15:55:38 +01:00
Dag-Erling Smørgrav
f82bbc1400 Catch up with OpenPAM's latest OATH changes:
Add an oath_mode(3) function which translates from mode names to numbers.

 Consistently use UINT_MAX, not -1, to indicate an invalid response.

 Change the meaning of the window parameter to always indicate the number
 of codes to check *in addition* to the current code.  Note that for TOTP,
 the window goes in both directions; a window of 1 means to check the
 current code plus the previous and next.
2014-12-20 01:45:01 +00:00
Dag-Erling Smørgrav
479ffbba4a Remove author and sponsor tags; we'll deal with that some other way.
Remove $Cryb$ tags as it is likely that the code will move to git.
2014-08-01 14:31:07 +00:00
Dag-Erling Smørgrav
7f410bdfd3 Silence a GCC warning about an empty if statement. 2014-07-11 15:14:23 +00:00
Dag-Erling Smørgrav
63bcbcca20 Rename the HMAC-SHA1 code. 2014-07-10 23:57:47 +00:00
Dag-Erling Smørgrav
dff909ba65 Spell the name of the University of Oslo in English. 2014-07-10 17:15:54 +00:00
Dag-Erling Smørgrav
601403cba3 Use custom keywords. 2014-07-04 11:20:46 +00:00
Dag-Erling Smørgrav
ae99587ba4 initial code drop 2014-07-04 11:18:53 +00:00