diff options
author | 2015-09-13 15:33:48 +0000 | |
---|---|---|
committer | 2015-09-13 15:33:48 +0000 | |
commit | f34159915688c12d4e52fc18c24c63ebe318816d (patch) | |
tree | c4492477e43c3150235ffed0f88c85752904e1cc /lib/libc/crypt/cryptutil.c | |
parent | Overshot w/PROTO_DEPRECATED: seed48_deterministic() is used internally (diff) | |
download | wireguard-openbsd-f34159915688c12d4e52fc18c24c63ebe318816d.tar.xz wireguard-openbsd-f34159915688c12d4e52fc18c24c63ebe318816d.zip |
Wrap <pwd.h> so that calls go direct and the symbols are all weak.
Hide bcrypt_autorounds(), prefixing with an underbar for static builds.
Diffstat (limited to 'lib/libc/crypt/cryptutil.c')
-rw-r--r-- | lib/libc/crypt/cryptutil.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libc/crypt/cryptutil.c b/lib/libc/crypt/cryptutil.c index 20d68b3fd30..f48ba1af2c2 100644 --- a/lib/libc/crypt/cryptutil.c +++ b/lib/libc/crypt/cryptutil.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cryptutil.c,v 1.11 2015/09/12 14:56:50 guenther Exp $ */ +/* $OpenBSD: cryptutil.c,v 1.12 2015/09/13 15:33:48 guenther Exp $ */ /* * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> * @@ -21,8 +21,6 @@ #include <login_cap.h> #include <errno.h> -int bcrypt_autorounds(void); - int crypt_checkpass(const char *pass, const char *goodhash) { @@ -70,12 +68,12 @@ crypt_newhash(const char *pass, const char *pref, char *hash, size_t hashlen) const char *choice = choices[i]; size_t len = strlen(choice); if (strcmp(pref, choice) == 0) { - rounds = bcrypt_autorounds(); + rounds = _bcrypt_autorounds(); break; } else if (strncmp(pref, choice, len) == 0 && pref[len] == ',') { if (strcmp(pref + len + 1, "a") == 0) { - rounds = bcrypt_autorounds(); + rounds = _bcrypt_autorounds(); } else { rounds = strtonum(pref + len + 1, 4, 31, &errstr); if (errstr) { |