From brix@fangorn.brixandersen.dk  Mon Oct 16 10:19:26 2006
Return-Path: <brix@fangorn.brixandersen.dk>
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 <henrik@brixandersen.dk>
Reply-To: Henrik Brix Andersen <henrik@brixandersen.dk>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Sam Leffler <sam@FreeBSD.org>
Subject: src/contrib/wpa_supplicant/wpa_passphrase is not connected to build 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>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:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 16 10:20:22 GMT 2006
>Closed-Date:    Fri Nov 17 19:39:42 GMT 2006
>Last-Modified:  Fri Nov 17 19:40:06 GMT 2006
>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 <bsd.subdir.mk>
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 <bsd.prog.mk>
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 <henrik@brixandersen.dk>
+.\" 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:
State-Changed-From-To: open->closed 
State-Changed-By: sam 
State-Changed-When: Fri Nov 17 19:39:22 UTC 2006 
State-Changed-Why:  
patch committed; thank you! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=104457 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/104457: commit references a PR
Date: Fri, 17 Nov 2006 19:39:01 +0000 (UTC)

 sam         2006-11-17 19:38:51 UTC
 
   FreeBSD src repository
 
   Modified files:
     usr.sbin/wpa         Makefile 
     usr.sbin/wpa/wpa_supplicant wpa_supplicant.conf.5 
   Added files:
     usr.sbin/wpa/wpa_passphrase Makefile wpa_passphrase.8 
   Log:
   add wpa_passphrase utility to the build
   
   PR:             bin/104457
   Submitted by:   Henrik Brix Andersen
   MFC after:      1 week
   
   Revision  Changes    Path
   1.4       +3 -1      src/usr.sbin/wpa/Makefile
   1.1       +11 -0     src/usr.sbin/wpa/wpa_passphrase/Makefile (new)
   1.1       +66 -0     src/usr.sbin/wpa/wpa_passphrase/wpa_passphrase.8 (new)
   1.8       +7 -1      src/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
