summaryrefslogtreecommitdiff
path: root/src/lib/libc/crypt/cryptutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/crypt/cryptutil.c')
-rw-r--r--src/lib/libc/crypt/cryptutil.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/libc/crypt/cryptutil.c b/src/lib/libc/crypt/cryptutil.c
index 20d68b3fd3..f48ba1af2c 100644
--- a/src/lib/libc/crypt/cryptutil.c
+++ b/src/lib/libc/crypt/cryptutil.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cryptutil.c,v 1.11 2015/09/12 14:56:50 guenther Exp $ */ 1/* $OpenBSD: cryptutil.c,v 1.12 2015/09/13 15:33:48 guenther Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> 3 * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org>
4 * 4 *
@@ -21,8 +21,6 @@
21#include <login_cap.h> 21#include <login_cap.h>
22#include <errno.h> 22#include <errno.h>
23 23
24int bcrypt_autorounds(void);
25
26int 24int
27crypt_checkpass(const char *pass, const char *goodhash) 25crypt_checkpass(const char *pass, const char *goodhash)
28{ 26{
@@ -70,12 +68,12 @@ crypt_newhash(const char *pass, const char *pref, char *hash, size_t hashlen)
70 const char *choice = choices[i]; 68 const char *choice = choices[i];
71 size_t len = strlen(choice); 69 size_t len = strlen(choice);
72 if (strcmp(pref, choice) == 0) { 70 if (strcmp(pref, choice) == 0) {
73 rounds = bcrypt_autorounds(); 71 rounds = _bcrypt_autorounds();
74 break; 72 break;
75 } else if (strncmp(pref, choice, len) == 0 && 73 } else if (strncmp(pref, choice, len) == 0 &&
76 pref[len] == ',') { 74 pref[len] == ',') {
77 if (strcmp(pref + len + 1, "a") == 0) { 75 if (strcmp(pref + len + 1, "a") == 0) {
78 rounds = bcrypt_autorounds(); 76 rounds = _bcrypt_autorounds();
79 } else { 77 } else {
80 rounds = strtonum(pref + len + 1, 4, 31, &errstr); 78 rounds = strtonum(pref + len + 1, 4, 31, &errstr);
81 if (errstr) { 79 if (errstr) {