Skip to content

Commit

Permalink
Mostly implemented crypt-tune-costs.
Browse files Browse the repository at this point in the history
Known bugs in the handling of logarithmic cost will be addressed later.
This patch will probably get shuffled to the end of the branch.
  • Loading branch information
zackw committed Oct 19, 2018
1 parent b81e128 commit d888e4c
Show file tree
Hide file tree
Showing 4 changed files with 757 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
/crypt.h
/crypt-hashes.h
/crypt-symbol-vers.h
/crypt-tune-costs
/libcrypt.map
/test-alg-des
/test-alg-hmac-sha1
Expand Down
3 changes: 3 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ libcrypt_la_SOURCES = \

EXTRA_DIST += alg-yescrypt-platform.c

sbin_PROGRAMS = crypt-tune-costs
crypt_tune_costs_LDADD = libcrypt.la -lm

pkgconfig_DATA = libxcrypt.pc
# Install libcrypt.pc symlink to libxcrypt.pc file.
phony_targets = \
Expand Down
13 changes: 13 additions & 0 deletions crypt-port.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,19 @@
#define __THROW /* nothing */
#endif

/* C2011 added a keyword _Noreturn with the same effect as
gcc's longstanding __attribute__ ((noreturn)) extension,
except that it is required to appear _before_ the function
type specifier (which must be 'void'). */
#if (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) >= 201112 || \
defined _Noreturn
# define NORETURN _Noreturn void
#elif defined __GNUC__ && __GNUC__ >= 3
# define NORETURN void __attribute__ ((noreturn))
#else
# define NORETURN void
#endif

/* While actually compiling the library, suppress the __nonnull tags
on the functions in crypt-base.h, so that internal checks for NULL
are not deleted by the compiler. */
Expand Down
Loading

0 comments on commit d888e4c

Please sign in to comment.