From owner-freebsd-bugs@FreeBSD.ORG Mon Oct 16 10:20:24 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 60E8B16A47C for ; Mon, 16 Oct 2006 10:20:24 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 863AF43D5F for ; Mon, 16 Oct 2006 10:20:23 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k9GAKNP6023203 for ; Mon, 16 Oct 2006 10:20:23 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k9GAKN4k023202; Mon, 16 Oct 2006 10:20:23 GMT (envelope-from gnats) Resent-Date: Mon, 16 Oct 2006 10:20:23 GMT Resent-Message-Id: <200610161020.k9GAKN4k023202@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Henrik Brix Andersen Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9D73116A415; Mon, 16 Oct 2006 10:19:26 +0000 (UTC) (envelope-from brix@fangorn.brixandersen.dk) Received: from ns2.pil.dk (ns2.pil.dk [195.41.47.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C3E943D62; Mon, 16 Oct 2006 10:19:25 +0000 (GMT) (envelope-from brix@fangorn.brixandersen.dk) Received: from fangorn.brixandersen.dk (osgiliath.brixandersen.dk [87.53.223.189]) by ns2.pil.dk (Postfix) with ESMTP id ACFFA7BA1DE; Mon, 16 Oct 2006 12:19:24 +0200 (CEST) Received: by fangorn.brixandersen.dk (Postfix, from userid 1001) id 5071F2E04B; Mon, 16 Oct 2006 12:19:24 +0200 (CEST) Message-Id: <20061016101924.5071F2E04B@fangorn.brixandersen.dk> Date: Mon, 16 Oct 2006 12:19:24 +0200 (CEST) From: Henrik Brix Andersen To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Sam Leffler Subject: bin/104457: src/contrib/wpa_supplicant/wpa_passphrase is not connected to build X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Henrik Brix Andersen List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Oct 2006 10:20:24 -0000 >Number: 104457 >Category: bin >Synopsis: src/contrib/wpa_supplicant/wpa_passphrase is not connected to build >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Oct 16 10:20:22 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Henrik Brix Andersen >Release: FreeBSD 6.2-PRERELEASE i386 >Organization: pil.dk >Environment: System: FreeBSD fangorn.brixandersen.dk 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #20: Mon Oct 16 11:21:02 CEST 2006 root@fangorn.brixandersen.dk:/usr/obj/usr/src/sys/FANGORN i386 >Description: The wpa_passphrase utility from src/contrib/wpa_supplicant is not connected to the build. This utility is rather handy for converting ASCII passphrases to 256-bit pre-shared WPA keys for use in wpa_supplicant.conf(5). >How-To-Repeat: # wpa_passphrase wpa_passphrase: Command not found. >Fix: The patch below connects wpa_passphrase to the build. It also includes a minimalistic man page for wpa_passphrase(8) along with a reference to this new man page from wpa_supplicant.conf(5). The diff is against todays RELENG_6. I have optimistically noted that the wpa_passphrase(8) utility first appeared in FreeBSD 6.2 ;-) --- wpa_passphrase.diff begins here --- diff -purN src/usr.sbin/wpa.orig/Makefile src/usr.sbin/wpa/Makefile --- src/usr.sbin/wpa.orig/Makefile Sun Oct 15 18:26:57 2006 +++ src/usr.sbin/wpa/Makefile Sun Oct 15 18:27:19 2006 @@ -1,5 +1,5 @@ # $FreeBSD: src/usr.sbin/wpa/Makefile,v 1.2.2.1 2005/10/27 17:06:46 wpaul Exp $ -SUBDIR= wpa_supplicant wpa_cli hostapd hostapd_cli ndis_events +SUBDIR= wpa_supplicant wpa_cli wpa_passphrase hostapd hostapd_cli ndis_events .include diff -purN src/usr.sbin/wpa.orig/wpa_passphrase/Makefile src/usr.sbin/wpa/wpa_passphrase/Makefile --- src/usr.sbin/wpa.orig/wpa_passphrase/Makefile Thu Jan 1 01:00:00 1970 +++ src/usr.sbin/wpa/wpa_passphrase/Makefile Sun Oct 15 18:40:34 2006 @@ -0,0 +1,11 @@ +# $FreeBSD$ + +WPA_SUPPLICANT_DISTDIR?= ${.CURDIR}/../../../contrib/wpa_supplicant +.PATH: ${WPA_SUPPLICANT_DISTDIR} + +PROG= wpa_passphrase +SRCS= wpa_passphrase.c sha1.c md5.c + +MAN= wpa_passphrase.8 + +.include diff -purN src/usr.sbin/wpa.orig/wpa_passphrase/wpa_passphrase.8 src/usr.sbin/wpa/wpa_passphrase/wpa_passphrase.8 --- src/usr.sbin/wpa.orig/wpa_passphrase/wpa_passphrase.8 Thu Jan 1 01:00:00 1970 +++ src/usr.sbin/wpa/wpa_passphrase/wpa_passphrase.8 Mon Oct 16 00:12:26 2006 @@ -0,0 +1,66 @@ +.\" Copyright (c) 2006 Henrik Brix Andersen +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd October 16, 2006 +.Dt WPA_PASSPHRASE 8 +.Os +.Sh NAME +.Nm wpa_passphrase +.Nd "utility for generating a 256-bit pre-shared WPA key from an ASCII passphrase" +.Sh SYNOPSIS +.Nm +.Aq Ar ssid +.Op Ar passphrase +.Sh DESCRIPTION +The +.Nm +utility is a small program for generating a 256-bit pre-shared WPA key +from an ASCII passphrase and a given SSID. The output is formatted for +inclusion in +.Xr wpa_supplicant.conf 5 . +.Pp +If +.Nm +is called with only an SSID as argument it will prompt for a +passphrase on standard input. +.Sh SEE ALSO +.Xr wpa_supplicant.conf 5 , +.Xr wpa_supplicant 8 +.Sh HISTORY +The +.Nm +utility first appeared in +.Fx 6.2 . +.Sh AUTHORS +The +.Nm +utility was written by +.An Jouni Malinen +.Aq jkmaline@cc.hut.fi . +.Pp +This manual page was written by +.An Henrik Brix Andersen +.Aq henrik@brixandersen.dk . diff -purN src/usr.sbin/wpa.orig/wpa_supplicant/wpa_supplicant.conf.5 src/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 --- src/usr.sbin/wpa.orig/wpa_supplicant/wpa_supplicant.conf.5 Sun Oct 15 18:26:57 2006 +++ src/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Sun Oct 15 20:33:49 2006 @@ -218,7 +218,12 @@ an 8-63 character .Tn ASCII passphrase. .Tn ASCII -passphrases are converted to a 256-bit key using the network SSID. +passphrases are dynamically converted to a 256-bit key at runtime +using the network SSID, or they can be statically converted at +configuration time using +the +.Xr wpa_passphrase 8 +utility. .It Va eapol_flags Dynamic WEP key usage for non-WPA mode, specified as a bit field. Bit 0 (1) forces dynamically generated unicast WEP keys to be used. @@ -510,6 +515,7 @@ network={ } .Ed .Sh SEE ALSO +.Xr wpa_passphrase 8 , .Xr wpa_cli 8 , .Xr wpa_supplicant 8 .Sh HISTORY --- wpa_passphrase.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: