diff options
author | sam <sam@FreeBSD.org> | 2007-07-11 15:48:36 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2007-07-11 15:48:36 +0000 |
commit | 35aef052ff21baa52c4cec68b512986c21f70a48 (patch) | |
tree | c3da7f33886a852f7dceb74373fbdeec49a48f77 /contrib/wpa_supplicant/wpa_passphrase.c | |
parent | 840099f34d8de1ca769f02fae379c4d8e5d6688a (diff) | |
download | FreeBSD-src-35aef052ff21baa52c4cec68b512986c21f70a48.zip FreeBSD-src-35aef052ff21baa52c4cec68b512986c21f70a48.tar.gz |
Import of WPA supplicant 0.5.8
Diffstat (limited to 'contrib/wpa_supplicant/wpa_passphrase.c')
-rw-r--r-- | contrib/wpa_supplicant/wpa_passphrase.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/contrib/wpa_supplicant/wpa_passphrase.c b/contrib/wpa_supplicant/wpa_passphrase.c index 2a68cb5..96b0c32 100644 --- a/contrib/wpa_supplicant/wpa_passphrase.c +++ b/contrib/wpa_supplicant/wpa_passphrase.c @@ -1,6 +1,6 @@ /* * WPA Supplicant - ASCII passphrase to WPA PSK tool - * Copyright (c) 2003-2005, Jouni Malinen <jkmaline@cc.hut.fi> + * Copyright (c) 2003-2005, Jouni Malinen <j@w1.fi> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -12,8 +12,7 @@ * See README and COPYING for more details. */ -#include <stdio.h> -#include <string.h> +#include "includes.h" #include "common.h" #include "sha1.h" @@ -54,12 +53,12 @@ int main(int argc, char *argv[]) passphrase = buf; } - if (strlen(passphrase) < 8 || strlen(passphrase) > 63) { + if (os_strlen(passphrase) < 8 || os_strlen(passphrase) > 63) { printf("Passphrase must be 8..63 characters\n"); return 1; } - pbkdf2_sha1(passphrase, ssid, strlen(ssid), 4096, psk, 32); + pbkdf2_sha1(passphrase, ssid, os_strlen(ssid), 4096, psk, 32); printf("network={\n"); printf("\tssid=\"%s\"\n", ssid); |