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/bcrypt.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/bcrypt.c')
-rw-r--r-- | lib/libc/crypt/bcrypt.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libc/crypt/bcrypt.c b/lib/libc/crypt/bcrypt.c index 0e6b00f12d4..a8c1b9e7c86 100644 --- a/lib/libc/crypt/bcrypt.c +++ b/lib/libc/crypt/bcrypt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bcrypt.c,v 1.54 2015/09/13 12:42:39 millert Exp $ */ +/* $OpenBSD: bcrypt.c,v 1.55 2015/09/13 15:33:48 guenther Exp $ */ /* * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> @@ -215,6 +215,7 @@ bcrypt_newhash(const char *pass, int log_rounds, char *hash, size_t hashlen) explicit_bzero(salt, sizeof(salt)); return 0; } +DEF_WEAK(bcrypt_newhash); int bcrypt_checkpass(const char *pass, const char *goodhash) @@ -232,13 +233,14 @@ bcrypt_checkpass(const char *pass, const char *goodhash) explicit_bzero(hash, sizeof(hash)); return 0; } +DEF_WEAK(bcrypt_checkpass); /* * Measure this system's performance by measuring the time for 8 rounds. * We are aiming for something that takes around 0.1s, but not too much over. */ int -bcrypt_autorounds(void) +_bcrypt_autorounds(void) { struct timespec before, after; int r = 8; @@ -391,3 +393,4 @@ bcrypt(const char *pass, const char *salt) return gencrypted; } +DEF_WEAK(bcrypt); |