diff options
author | Bjarke Istrup Pedersen <gurligebis@gentoo.org> | 2015-05-08 17:58:55 +0000 |
---|---|---|
committer | Bjarke Istrup Pedersen <gurligebis@gentoo.org> | 2015-05-08 17:58:55 +0000 |
commit | beefae88de522c0e7fbb388d4cf26dfad9395d37 (patch) | |
tree | 253933fa31c55b3174ab2f2553fa66906a838b1b /net-wireless | |
parent | Version bump. Cleanup old revisions. (diff) | |
download | historical-beefae88de522c0e7fbb388d4cf26dfad9395d37.tar.gz historical-beefae88de522c0e7fbb388d4cf26dfad9395d37.tar.bz2 historical-beefae88de522c0e7fbb388d4cf26dfad9395d37.zip |
Removing old files, and fixing bugs #547588, #544036, #548268, #548742
Package-Manager: portage-2.2.18/cvs/Linux x86_64
Manifest-Sign-Key: 0x15AE484C
Diffstat (limited to 'net-wireless')
18 files changed, 838 insertions, 1086 deletions
diff --git a/net-wireless/wpa_supplicant/ChangeLog b/net-wireless/wpa_supplicant/ChangeLog index 298677f3ffe8..c17cc1e2c129 100644 --- a/net-wireless/wpa_supplicant/ChangeLog +++ b/net-wireless/wpa_supplicant/ChangeLog @@ -1,6 +1,30 @@ # ChangeLog for net-wireless/wpa_supplicant # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog,v 1.237 2015/04/28 08:06:27 zlogene Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog,v 1.238 2015/05/08 17:58:51 gurligebis Exp $ + +*wpa_supplicant-2.4-r2 (08 May 2015) + + 08 May 2015; <gurligebis@gentoo.org> +wpa_supplicant-2.4-r2.ebuild, + -files/wpa_supplicant-2.0-dbus-path-fix.patch, + -files/wpa_supplicant-2.0-do-not-call-dbus-functions-with-NULL-path.patch, + -files/wpa_supplicant-2.0-fix-undefined-reference-to-random_get_bytes.patch, + -files/wpa_supplicant-2.0-generate-libeap-peer.patch, + -files/wpa_supplicant-2.2-dbus-path-fix.patch, + -files/wpa_supplicant-2.2-do-not-call-dbus-functions-with-NULL-path.patch, + -files/wpa_supplicant-2.2-fix-undefined-reference-to-random_get_bytes.patch, + -files/wpa_supplicant-2.2-generate-libeap-peer.patch, + -files/wpa_supplicant-2.4-fix-undefined-reference-to-random_get_bytes.patch, + files/wpa_supplicant-2.4-generate-libeap-peer.patch, + +files/2015-4/0001-EAP-pwd-peer-Fix-payload-length-validation-for-Commi.patch + , + +files/2015-4/0002-EAP-pwd-server-Fix-payload-length-validation-for-Com.patch + , + +files/2015-4/0003-EAP-pwd-peer-Fix-Total-Length-parsing-for-fragment-r.patch + , + +files/2015-4/0004-EAP-pwd-server-Fix-Total-Length-parsing-for-fragment.patch + , + +files/2015-4/0005-EAP-pwd-peer-Fix-asymmetric-fragmentation-behavior.patch: + Removing old files, and fixing bugs #547588, #544036, #548268, #548742 28 Apr 2015; Mikle Kolyada <zlogene@gentoo.org> -wpa_supplicant-2.0-r2.ebuild, -wpa_supplicant-2.2-r1.ebuild: diff --git a/net-wireless/wpa_supplicant/Manifest b/net-wireless/wpa_supplicant/Manifest index 31d1f183e5d9..c807c6ebba48 100644 --- a/net-wireless/wpa_supplicant/Manifest +++ b/net-wireless/wpa_supplicant/Manifest @@ -1,20 +1,16 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 +AUX 2015-4/0001-EAP-pwd-peer-Fix-payload-length-validation-for-Commi.patch 2410 SHA256 a204bc37f52e5346780a306c01706689eb46263dedcdcb1eb2f4c0b291a0db93 SHA512 9440f8d9d18d20b95d236c1a4467d86dfbbc17d8f26b0caa48d6737c6231d1ff14793c6fc8a1e4508f3ad38c9a5d710fd49b85c7de16634dbe6685af05f44f7c WHIRLPOOL 815f07465f0bab5a0de6e1e91dd2c54062d5501f1657b06142936bbdbdf57103932e896f3fe659aa2ee20fe0f2659736273a5e9e19ac9d4028306c6f23dd37cb +AUX 2015-4/0002-EAP-pwd-server-Fix-payload-length-validation-for-Com.patch 2359 SHA256 298fc3b89f987922fb2600d0c95e8c868d6da30d24643748afd47bcd30da7b44 SHA512 0887017bfdb4632baa49bb849b732eed7eec9a498247fdd5ef8448e4a6df10380c06d68fa706e0b2624c04eb6f5a327cdb71c5c71c3476dc383f889ee7372702 WHIRLPOOL 057d7d38734cd323bb0df957ff7bb719ba8b7ccd885bbb85114bfa348363a3e7f752e3b652e22969616ae812444edbe8fceb7b62bd500d69d3bcb44d146a10a4 +AUX 2015-4/0003-EAP-pwd-peer-Fix-Total-Length-parsing-for-fragment-r.patch 1859 SHA256 2fd42fb53be793c54343aa18a84afebe4603aa6ce8b6969ad6b3a8d327c6b142 SHA512 341901aa94c44ae725b6d4dddac2a52b6457234189554fc282c9cf5fa0254125d7323553a7b8118f9a3e2020f039267ed4c912f84ac6f2cb12670b40c28ac652 WHIRLPOOL 3e3b4cab765f373713fc41448ef65e8931a83449438fb7a8e3ab0a34c728a4a5772f996a04ee4b747b292044b1452a0821609e419a15dd681c70c063a125dcc0 +AUX 2015-4/0004-EAP-pwd-server-Fix-Total-Length-parsing-for-fragment.patch 1806 SHA256 c28ca6303a562809dfd1812f9b918808b3b0f0c52cc43070fd1777e1cfc88f18 SHA512 b752f91c3d6dcf0784d9cb20a0c7f8de6c837c38ff62cf77b136d9b818890b13f55eeed1d6097f244181b480be953e1bdfb5651116dc5d62a2d02c018e19042a WHIRLPOOL 069602c36d30afb3df5d9a722da680a9e5450e2272c84776076ef16a6d871397741b51a0460eca5dd7355d06e2f8b8e9adfb03e8caa7e58cde3c4b2a019df48b +AUX 2015-4/0005-EAP-pwd-peer-Fix-asymmetric-fragmentation-behavior.patch 1207 SHA256 04ef66fbd5b2167274cd7123d7f7252963b9a9c1ec2f5edf6558a6ad92d47689 SHA512 07a21f0cc7d00e17bed8ef5ced36159020a410a4606aa0ca24e47223835ab0cc5fbeed3075c4f17d2ce1aee437eedf9fea8f4b95252b2fa255d54a195637cb6f WHIRLPOOL b61d0065dea90cb2234d621b7ecd6e6f9cf29e21b2b7011b275ea25f75a9e7a68c3be53f8cd8a47fb6340567d630d7d0843178a12660f9942f6c7769f2f237b8 AUX wpa_cli.sh 1407 SHA256 a60d145a8874b57a944c6775fdf500d03dd1ce73c24357b00d3de37b14620179 SHA512 613345f142f2e87f7ebe9eaf3a9a60f4cee08f50596d307bd9c0acd88d1c470080bd27c645455ae32cb4fb7fe96ae131ee09fd6c7657cc298fc3476e4dfdc059 WHIRLPOOL c7d461efcde44f9ce98e99217ef27ef713082269380d1a45da17a9e679c5d816c156cb5c00665034a88680b241144e7e71c901a7c73bae075dfca7eb55b10ffd -AUX wpa_supplicant-2.0-dbus-path-fix.patch 1028 SHA256 9d829625bbc8ddc5d9f117726ce5b505e87ceab4c42cee4241eba08d04391579 SHA512 7521764830b0ac27046c9030c632fe4f36937452b8352a257eaba28ff7a628b2d5d0b4187a23cdffe54c5adab42352ec9f7907e2606f68164d708cea34be5e45 WHIRLPOOL d36fa9563368e9670241fc2da4864a1cbe5e3190824d9b0d81739642d9e8f56bea1914dd44832df1f7ea7614331302259c6e1bfb668d7519c41a0e227fc05b61 -AUX wpa_supplicant-2.0-do-not-call-dbus-functions-with-NULL-path.patch 2131 SHA256 05231a2468853898595c6fffc0fd596c66b5d819d423d772ae2073197e9bf14c SHA512 3578594428c0361e5c9bfc80c8d467175082fd1837f026ae46a26bbd5068526a3c800bff474212bad38d7a1924d037e48a1134660332dcbace2245aa6e5f73a4 WHIRLPOOL f03fa121df0f4ffe14e6e65f9698d6cc6daf2454550afed0149a0923888ef5cd42893a3232f8a0aa188d62b45569679855bf4169a7868601b39b83e799ac8654 -AUX wpa_supplicant-2.0-fix-undefined-reference-to-random_get_bytes.patch 633 SHA256 29b9a9ba8d4b53313593c3f56ad13e776ee76fbd04bc33b35e1d6f61e571b496 SHA512 e6e27a982c064bff7c833d33051205ddbaf931f7116724880c9c6e676139ccc69b0302229817d6c618cb3669ec68989b347a1cb40660c4ab124df9841bc7c020 WHIRLPOOL 38950a4044cfb9b9f56852e465297fed94bb9fa76907d4247346a24a7f40457b0c34dd12338d6cff9677da6b6b9d315989f4911242d472d0dbb4f8fcb8a930c9 -AUX wpa_supplicant-2.0-generate-libeap-peer.patch 9778 SHA256 771e2392754c094a8b4bacbcbff77429946e7c4acfdef37be7deab5d6ad2994e SHA512 7ceb37e7d23864351dc4960d6e867f02bd6004b29b2b4d2ca6d9bda2a71946c2dc83d2197828c56d46420ad7c3d3309b684335009b7f9129915cd113b73e6adf WHIRLPOOL 68ee035c05a4bb79479dfd62057695862073c41f4bd9265719e01cbf29328fcea6970ffeb0903e4aec83428bfa2e62a280748bfeab668e490c6763788b903dfa -AUX wpa_supplicant-2.2-dbus-path-fix.patch 1028 SHA256 9d829625bbc8ddc5d9f117726ce5b505e87ceab4c42cee4241eba08d04391579 SHA512 7521764830b0ac27046c9030c632fe4f36937452b8352a257eaba28ff7a628b2d5d0b4187a23cdffe54c5adab42352ec9f7907e2606f68164d708cea34be5e45 WHIRLPOOL d36fa9563368e9670241fc2da4864a1cbe5e3190824d9b0d81739642d9e8f56bea1914dd44832df1f7ea7614331302259c6e1bfb668d7519c41a0e227fc05b61 -AUX wpa_supplicant-2.2-do-not-call-dbus-functions-with-NULL-path.patch 2131 SHA256 05231a2468853898595c6fffc0fd596c66b5d819d423d772ae2073197e9bf14c SHA512 3578594428c0361e5c9bfc80c8d467175082fd1837f026ae46a26bbd5068526a3c800bff474212bad38d7a1924d037e48a1134660332dcbace2245aa6e5f73a4 WHIRLPOOL f03fa121df0f4ffe14e6e65f9698d6cc6daf2454550afed0149a0923888ef5cd42893a3232f8a0aa188d62b45569679855bf4169a7868601b39b83e799ac8654 -AUX wpa_supplicant-2.2-fix-undefined-reference-to-random_get_bytes.patch 633 SHA256 29b9a9ba8d4b53313593c3f56ad13e776ee76fbd04bc33b35e1d6f61e571b496 SHA512 e6e27a982c064bff7c833d33051205ddbaf931f7116724880c9c6e676139ccc69b0302229817d6c618cb3669ec68989b347a1cb40660c4ab124df9841bc7c020 WHIRLPOOL 38950a4044cfb9b9f56852e465297fed94bb9fa76907d4247346a24a7f40457b0c34dd12338d6cff9677da6b6b9d315989f4911242d472d0dbb4f8fcb8a930c9 -AUX wpa_supplicant-2.2-generate-libeap-peer.patch 9820 SHA256 46d81b152ce7bc4905ee6a79ffbf50f6cab3d2df5dfd65314d38aa8a1571a7c8 SHA512 032344070ecf0ec1af362955693fc612031176dd3cac0df0164dab18347b1d2e1f0a4941fe153ed50f329a6fe8b3a4fab6544460b8ad501c7e63acc004eee065 WHIRLPOOL 1a6647b7cdab7919776bb3e95115db2b8e8049cb3ee62b837a937d0261eb72c40dec43950558223427edbfc616b9006af94edbb82057681a027b99b48f9699cd AUX wpa_supplicant-2.4-cve-2015-1863.patch 1642 SHA256 11bf1d9199d8b9a1745bc37c5089ff22f355418815562149affce7a95a7f90ff SHA512 eb6265216b7db929e90dacc338dbbb357b59430eb1be9d263ae1e80bf687eab9db6dd2352a7a442256f6bfdd4cfd0ebe2ae83aa9c3da4123fe0bab70d7ff8926 WHIRLPOOL 9a7bd0eccfd4fcfa1f267ed808f68c750140bc78116d0574328931486d3838dec3b7a21b1d24d09d94591bda94abef160f7fde7bea6e5ef0ffffb1d1af254a7d AUX wpa_supplicant-2.4-dbus-path-fix.patch 1028 SHA256 9d829625bbc8ddc5d9f117726ce5b505e87ceab4c42cee4241eba08d04391579 SHA512 7521764830b0ac27046c9030c632fe4f36937452b8352a257eaba28ff7a628b2d5d0b4187a23cdffe54c5adab42352ec9f7907e2606f68164d708cea34be5e45 WHIRLPOOL d36fa9563368e9670241fc2da4864a1cbe5e3190824d9b0d81739642d9e8f56bea1914dd44832df1f7ea7614331302259c6e1bfb668d7519c41a0e227fc05b61 AUX wpa_supplicant-2.4-do-not-call-dbus-functions-with-NULL-path.patch 2131 SHA256 05231a2468853898595c6fffc0fd596c66b5d819d423d772ae2073197e9bf14c SHA512 3578594428c0361e5c9bfc80c8d467175082fd1837f026ae46a26bbd5068526a3c800bff474212bad38d7a1924d037e48a1134660332dcbace2245aa6e5f73a4 WHIRLPOOL f03fa121df0f4ffe14e6e65f9698d6cc6daf2454550afed0149a0923888ef5cd42893a3232f8a0aa188d62b45569679855bf4169a7868601b39b83e799ac8654 -AUX wpa_supplicant-2.4-fix-undefined-reference-to-random_get_bytes.patch 633 SHA256 29b9a9ba8d4b53313593c3f56ad13e776ee76fbd04bc33b35e1d6f61e571b496 SHA512 e6e27a982c064bff7c833d33051205ddbaf931f7116724880c9c6e676139ccc69b0302229817d6c618cb3669ec68989b347a1cb40660c4ab124df9841bc7c020 WHIRLPOOL 38950a4044cfb9b9f56852e465297fed94bb9fa76907d4247346a24a7f40457b0c34dd12338d6cff9677da6b6b9d315989f4911242d472d0dbb4f8fcb8a930c9 -AUX wpa_supplicant-2.4-generate-libeap-peer.patch 9820 SHA256 46d81b152ce7bc4905ee6a79ffbf50f6cab3d2df5dfd65314d38aa8a1571a7c8 SHA512 032344070ecf0ec1af362955693fc612031176dd3cac0df0164dab18347b1d2e1f0a4941fe153ed50f329a6fe8b3a4fab6544460b8ad501c7e63acc004eee065 WHIRLPOOL 1a6647b7cdab7919776bb3e95115db2b8e8049cb3ee62b837a937d0261eb72c40dec43950558223427edbfc616b9006af94edbb82057681a027b99b48f9699cd +AUX wpa_supplicant-2.4-generate-libeap-peer.patch 9810 SHA256 379bb46b6d6f29b297486fea992029b6dc69ed10083f66ccf315f5a23aea27e5 SHA512 09833f51c425f1a1ad0f478c8da4eca59c300c48d400c0ed3deb13ed110dd2f21a4266d6119ec390db53157975c23dc9844c7f91ad0c5fbfcbd53be0cb5e1627 WHIRLPOOL 823d302abdc7e8f7e90889ad827959a25b6a8ecc6cc27ef162efbccefb50fc3bb3b896afbabb35fa7729ef9331dd38943a4dc5e54a99ddfe3f672d4c9c365d0a AUX wpa_supplicant-conf.d 161 SHA256 61ec59007f66ac5bacc0aa095d1f2ccbc977a687038e161a463d1727223d5a90 SHA512 29103161ec2b9631fca9e8d9a97fafd60ffac3fe78cf613b834395ddcaf8be1e253c22e060d7d9f9b974b2d7ce794caa932a2125e29f6494b75bce475f7b30e1 WHIRLPOOL 5508d1598bd952ec773db0d5e5ab440134337de6e26d7b8c7c6b00789c570559a54457ac507357b65e8604da849f9ab52dff90d27197d9be11ed2cc66eaae1e7 AUX wpa_supplicant-init.d 1249 SHA256 62a3655ea88b3dfff5243666a4e90d3f0eef6370a7889affb849e178ba4a82b0 SHA512 6b245dad8861f71bab7187d9349464d4ae5986202d097928886e26db9ca9c08dedd82852c52dd72d232bd23139f47a76cd8c87e020596796b403fd0c4ac0ffc7 WHIRLPOOL d5edcd9842d3039cbc9b57e24a770b6443a1e869ab3492a86eac60f920aa2a4537b0fdb3d73cbf4b8f85dd257a529839786e16e98ddd4556445d464c43deb012 AUX wpa_supplicant.conf 183 SHA256 15082ad37ebd98f57c3733454a0921a79dc2b41007f1b012fb7e67c09d87de3a SHA512 425a5c955d462ea0d0d3f79c3e1bbf68e15b495df04ad03ed7aee12408b52616af05650dfc147ca5940d69e97360c33995d33733820fef8eb8769b31e58434e8 WHIRLPOOL 4615456a07dfc81139d350cb7618fc204008ae9cfa118f5966f923d758d1339a2d17eb79b631d8eb094225fac583a74705ed5ca4d348554f6b2435f166c16548 @@ -22,14 +18,13 @@ AUX wpa_supplicant.service 264 SHA256 aa76e01677a755270147bcda08dbd8283ba37dc15e AUX wpa_supplicant_at.service 314 SHA256 caa0104f7169909d30f0c4ce9fa9a6c27e7ddb743eaf868cd311a5128c13ac0c SHA512 400e2e4b69408a4fe044409fee9639338e1fd6423e00a544b46065fe1d0215717b17b44ce1abadf0ce5da365724977ea0beffbf75d96c0c6ee1f24618c92428d WHIRLPOOL 1603e4651072e0dfb5381c9a063db64bb412c2bc640226137b7cfd56f2525a6c1e198cb042553f5a25fc234773d1d9438eea09d65fdde71d81dddfd86b5273b0 DIST wpa_supplicant-2.4.tar.gz 2525648 SHA256 058dc832c096139a059e6df814080f50251a8d313c21b13364c54a1e70109122 SHA512 03d8199325b3910f77013ddb7edd803ab4444542230484e1cb465dc3df9372b39ee3307d823ce88730e8f5a5231ef3183954c54cf07297b70432f526e45aac2b WHIRLPOOL 092ae97e2c0f55d7055fd4e5d688e2ba538f785089a13c754129829854b20a98de832d9d0925dce5823a060d10a3bb5882b0bf3d6cf55f8de9bbc2b00fbb7392 EBUILD wpa_supplicant-2.4-r1.ebuild 10128 SHA256 88594c2ea4088cf2ec3f29a7cd56616868292f928c0b10c53df4d2dcc005964b SHA512 f09bbee52b680b259bf915f535212ffc0c1b0508a4068a6dae849d819f7b4455efdddd1720cd15bfc44f2d4ffdd9805949d13321fc7d11bb0ff98e34ac7b7d04 WHIRLPOOL e883943e3cde33e304bd31c657c302206885b782764fc109803db150683118537f93892741a324faebeb07db0264be108411344910d8f50101c7a7ae4eefeed7 -MISC ChangeLog 48695 SHA256 017837b75636e433e315850c8e637291314e738f160caed2b3de9a4280199b61 SHA512 8c17a9b3665a430dc7159c8dbcb1f24324b45150c4e53528fae03216ed5136b8449fb12521057efffeed5abb1484dafecefc3dc1ee00664ef9d3dec648f9d687 WHIRLPOOL 256c260dfc8b200e50ef61b70471af98bb957ad60132d8875d39a2db8208999f0ae38b5254436938bb27d4b4ef67ed971c0b14af516a040d77159e749ad6b9ae +EBUILD wpa_supplicant-2.4-r2.ebuild 10582 SHA256 d29f3bf7e56a5e17d5a180d649c106cf6cb23b4415ac905622f2f00e33a52a18 SHA512 2494e542d67b1326871b293d1467a88c4890513f3420341736cd37e6c9d105e2302e5de9652b64ee09753e5a6ec28c441005a48084784679c1723ad1fc46bd45 WHIRLPOOL c0d7b5208fdd6aefee492a3e5dc76fca5e5797c8fc21cab2dba5f8350f0a1f5bce53c3be20aae7d39f02025cfd7eedb36275721d4bbe7bc0f54d9cb49c778cf4 +MISC ChangeLog 49951 SHA256 bef28a2dfc0e36b2b330f8adc7634c4f38799f961e102991bc168c202981d055 SHA512 4a20972d4b57b23568109229d69e690fbaf407eeea94c9af94c6870e4a0a2c12f00aa07fbfb10176f70bcf380f3a0de92f6607b7c5bfbe921b755ca34d71ae50 WHIRLPOOL 87281968dfb0df3ea30b1722159fda53307091a76fdef59ff4f8231e2e4e039dbdb0bab99b85e5af5b487e154cc2d295280557008f8704ec961c2c1ae755b461 MISC metadata.xml 1253 SHA256 4f58fccaf5db494ac8815c1ca7caf7275e46afe3db674859255bab89ca43837a SHA512 a266e13d347579626be1a28470ab44fc4d47e5c8df1e80166061f6c9bd40eb4a4af7ca0ce007ed5e20be7648b421b57fb13916405af7502d1822b59c7ee9ace4 WHIRLPOOL 56913efc84be9c8ca5bfb82fa5da85771d06358938556c5e6aca6c3e7eb4d922781a6033200ee0d68a764b9c8701dd118c03510cda0c81fa51f3e5df37b3a2bb -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 -iJwEAQEIAAYFAlU/Pw8ACgkQG9wOWsQutdbPFwQAoQuL3AIxHLm7+T+bGNFhYASg -GuMvyHd3BVFxhOw2gYpN5F4vKyfHm6xij0hHvUOxX47mQkMwh71qJJPlaV7jdV8P -F0Lu8cgDvmFNl0clV7ecRnZyq8cZUCsWUsagSrgR2M8Upb2YxCQUFbEMCP0ZgYfg -IZI+O7h9QJxo8P9qnkw= -=qJ8Q +iEYEAREIAAYFAlVM+VwACgkQsR7PQhRXYElKzQCfWBzJ4im9F+mci+K3cyV1hQT+ +7YYAniktnBZV2aAYdfgptAX8VK9n3rCO +=Nb+P -----END PGP SIGNATURE----- diff --git a/net-wireless/wpa_supplicant/files/2015-4/0001-EAP-pwd-peer-Fix-payload-length-validation-for-Commi.patch b/net-wireless/wpa_supplicant/files/2015-4/0001-EAP-pwd-peer-Fix-payload-length-validation-for-Commi.patch new file mode 100644 index 000000000000..91627fb7b7f6 --- /dev/null +++ b/net-wireless/wpa_supplicant/files/2015-4/0001-EAP-pwd-peer-Fix-payload-length-validation-for-Commi.patch @@ -0,0 +1,73 @@ +From dd2f043c9c43d156494e33d7ce22db96e6ef42c7 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen <j@w1.fi> +Date: Fri, 1 May 2015 16:37:45 +0300 +Subject: [PATCH 1/5] EAP-pwd peer: Fix payload length validation for Commit + and Confirm + +The length of the received Commit and Confirm message payloads was not +checked before reading them. This could result in a buffer read +overflow when processing an invalid message. + +Fix this by verifying that the payload is of expected length before +processing it. In addition, enforce correct state transition sequence to +make sure there is no unexpected behavior if receiving a Commit/Confirm +message before the previous exchanges have been completed. + +Thanks to Kostya Kortchinsky of Google security team for discovering and +reporting this issue. + +Signed-off-by: Jouni Malinen <j@w1.fi> +--- + src/eap_peer/eap_pwd.c | 29 +++++++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) + +diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c +index f2b0926..a629437 100644 +--- a/src/eap_peer/eap_pwd.c ++++ b/src/eap_peer/eap_pwd.c +@@ -355,6 +355,23 @@ eap_pwd_perform_commit_exchange(struct eap_sm *sm, struct eap_pwd_data *data, + BIGNUM *mask = NULL, *x = NULL, *y = NULL, *cofactor = NULL; + u16 offset; + u8 *ptr, *scalar = NULL, *element = NULL; ++ size_t prime_len, order_len; ++ ++ if (data->state != PWD_Commit_Req) { ++ ret->ignore = TRUE; ++ goto fin; ++ } ++ ++ prime_len = BN_num_bytes(data->grp->prime); ++ order_len = BN_num_bytes(data->grp->order); ++ ++ if (payload_len != 2 * prime_len + order_len) { ++ wpa_printf(MSG_INFO, ++ "EAP-pwd: Unexpected Commit payload length %u (expected %u)", ++ (unsigned int) payload_len, ++ (unsigned int) (2 * prime_len + order_len)); ++ goto fin; ++ } + + if (((data->private_value = BN_new()) == NULL) || + ((data->my_element = EC_POINT_new(data->grp->group)) == NULL) || +@@ -554,6 +571,18 @@ eap_pwd_perform_confirm_exchange(struct eap_sm *sm, struct eap_pwd_data *data, + u8 conf[SHA256_MAC_LEN], *cruft = NULL, *ptr; + int offset; + ++ if (data->state != PWD_Confirm_Req) { ++ ret->ignore = TRUE; ++ goto fin; ++ } ++ ++ if (payload_len != SHA256_MAC_LEN) { ++ wpa_printf(MSG_INFO, ++ "EAP-pwd: Unexpected Confirm payload length %u (expected %u)", ++ (unsigned int) payload_len, SHA256_MAC_LEN); ++ goto fin; ++ } ++ + /* + * first build up the ciphersuite which is group | random_function | + * prf +-- +1.9.1 + diff --git a/net-wireless/wpa_supplicant/files/2015-4/0002-EAP-pwd-server-Fix-payload-length-validation-for-Com.patch b/net-wireless/wpa_supplicant/files/2015-4/0002-EAP-pwd-server-Fix-payload-length-validation-for-Com.patch new file mode 100644 index 000000000000..5dca20b2771b --- /dev/null +++ b/net-wireless/wpa_supplicant/files/2015-4/0002-EAP-pwd-server-Fix-payload-length-validation-for-Com.patch @@ -0,0 +1,66 @@ +From e28a58be26184c2a23f80b410e0997ef1bd5d578 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen <j@w1.fi> +Date: Fri, 1 May 2015 16:40:44 +0300 +Subject: [PATCH 2/5] EAP-pwd server: Fix payload length validation for Commit + and Confirm + +The length of the received Commit and Confirm message payloads was not +checked before reading them. This could result in a buffer read +overflow when processing an invalid message. + +Fix this by verifying that the payload is of expected length before +processing it. In addition, enforce correct state transition sequence to +make sure there is no unexpected behavior if receiving a Commit/Confirm +message before the previous exchanges have been completed. + +Thanks to Kostya Kortchinsky of Google security team for discovering and +reporting this issue. + +Signed-off-by: Jouni Malinen <j@w1.fi> +--- + src/eap_server/eap_server_pwd.c | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +diff --git a/src/eap_server/eap_server_pwd.c b/src/eap_server/eap_server_pwd.c +index 66bd5d2..3189105 100644 +--- a/src/eap_server/eap_server_pwd.c ++++ b/src/eap_server/eap_server_pwd.c +@@ -656,9 +656,21 @@ eap_pwd_process_commit_resp(struct eap_sm *sm, struct eap_pwd_data *data, + BIGNUM *x = NULL, *y = NULL, *cofactor = NULL; + EC_POINT *K = NULL, *point = NULL; + int res = 0; ++ size_t prime_len, order_len; + + wpa_printf(MSG_DEBUG, "EAP-pwd: Received commit response"); + ++ prime_len = BN_num_bytes(data->grp->prime); ++ order_len = BN_num_bytes(data->grp->order); ++ ++ if (payload_len != 2 * prime_len + order_len) { ++ wpa_printf(MSG_INFO, ++ "EAP-pwd: Unexpected Commit payload length %u (expected %u)", ++ (unsigned int) payload_len, ++ (unsigned int) (2 * prime_len + order_len)); ++ goto fin; ++ } ++ + if (((data->peer_scalar = BN_new()) == NULL) || + ((data->k = BN_new()) == NULL) || + ((cofactor = BN_new()) == NULL) || +@@ -774,6 +786,13 @@ eap_pwd_process_confirm_resp(struct eap_sm *sm, struct eap_pwd_data *data, + u8 conf[SHA256_MAC_LEN], *cruft = NULL, *ptr; + int offset; + ++ if (payload_len != SHA256_MAC_LEN) { ++ wpa_printf(MSG_INFO, ++ "EAP-pwd: Unexpected Confirm payload length %u (expected %u)", ++ (unsigned int) payload_len, SHA256_MAC_LEN); ++ goto fin; ++ } ++ + /* build up the ciphersuite: group | random_function | prf */ + grp = htons(data->group_num); + ptr = (u8 *) &cs; +-- +1.9.1 + diff --git a/net-wireless/wpa_supplicant/files/2015-4/0003-EAP-pwd-peer-Fix-Total-Length-parsing-for-fragment-r.patch b/net-wireless/wpa_supplicant/files/2015-4/0003-EAP-pwd-peer-Fix-Total-Length-parsing-for-fragment-r.patch new file mode 100644 index 000000000000..4d2f9d8aefeb --- /dev/null +++ b/net-wireless/wpa_supplicant/files/2015-4/0003-EAP-pwd-peer-Fix-Total-Length-parsing-for-fragment-r.patch @@ -0,0 +1,52 @@ +From 477c74395acd0123340457ba6f15ab345d42016e Mon Sep 17 00:00:00 2001 +From: Jouni Malinen <j@w1.fi> +Date: Sat, 2 May 2015 19:23:04 +0300 +Subject: [PATCH 3/5] EAP-pwd peer: Fix Total-Length parsing for fragment + reassembly + +The remaining number of bytes in the message could be smaller than the +Total-Length field size, so the length needs to be explicitly checked +prior to reading the field and decrementing the len variable. This could +have resulted in the remaining length becoming negative and interpreted +as a huge positive integer. + +In addition, check that there is no already started fragment in progress +before allocating a new buffer for reassembling fragments. This avoid a +potential memory leak when processing invalid message. + +Signed-off-by: Jouni Malinen <j@w1.fi> +--- + src/eap_peer/eap_pwd.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c +index a629437..1d2079b 100644 +--- a/src/eap_peer/eap_pwd.c ++++ b/src/eap_peer/eap_pwd.c +@@ -866,11 +866,23 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret, + * if it's the first fragment there'll be a length field + */ + if (EAP_PWD_GET_LENGTH_BIT(lm_exch)) { ++ if (len < 2) { ++ wpa_printf(MSG_DEBUG, ++ "EAP-pwd: Frame too short to contain Total-Length field"); ++ ret->ignore = TRUE; ++ return NULL; ++ } + tot_len = WPA_GET_BE16(pos); + wpa_printf(MSG_DEBUG, "EAP-pwd: Incoming fragments whose " + "total length = %d", tot_len); + if (tot_len > 15000) + return NULL; ++ if (data->inbuf) { ++ wpa_printf(MSG_DEBUG, ++ "EAP-pwd: Unexpected new fragment start when previous fragment is still in use"); ++ ret->ignore = TRUE; ++ return NULL; ++ } + data->inbuf = wpabuf_alloc(tot_len); + if (data->inbuf == NULL) { + wpa_printf(MSG_INFO, "Out of memory to buffer " +-- +1.9.1 + diff --git a/net-wireless/wpa_supplicant/files/2015-4/0004-EAP-pwd-server-Fix-Total-Length-parsing-for-fragment.patch b/net-wireless/wpa_supplicant/files/2015-4/0004-EAP-pwd-server-Fix-Total-Length-parsing-for-fragment.patch new file mode 100644 index 000000000000..7edef099eb59 --- /dev/null +++ b/net-wireless/wpa_supplicant/files/2015-4/0004-EAP-pwd-server-Fix-Total-Length-parsing-for-fragment.patch @@ -0,0 +1,50 @@ +From 3035cc2894e08319b905bd6561e8bddc8c2db9fa Mon Sep 17 00:00:00 2001 +From: Jouni Malinen <j@w1.fi> +Date: Sat, 2 May 2015 19:26:06 +0300 +Subject: [PATCH 4/5] EAP-pwd server: Fix Total-Length parsing for fragment + reassembly + +The remaining number of bytes in the message could be smaller than the +Total-Length field size, so the length needs to be explicitly checked +prior to reading the field and decrementing the len variable. This could +have resulted in the remaining length becoming negative and interpreted +as a huge positive integer. + +In addition, check that there is no already started fragment in progress +before allocating a new buffer for reassembling fragments. This avoid a +potential memory leak when processing invalid message. + +Signed-off-by: Jouni Malinen <j@w1.fi> +--- + src/eap_server/eap_server_pwd.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/src/eap_server/eap_server_pwd.c b/src/eap_server/eap_server_pwd.c +index 3189105..2bfc3c2 100644 +--- a/src/eap_server/eap_server_pwd.c ++++ b/src/eap_server/eap_server_pwd.c +@@ -942,11 +942,21 @@ static void eap_pwd_process(struct eap_sm *sm, void *priv, + * the first fragment has a total length + */ + if (EAP_PWD_GET_LENGTH_BIT(lm_exch)) { ++ if (len < 2) { ++ wpa_printf(MSG_DEBUG, ++ "EAP-pwd: Frame too short to contain Total-Length field"); ++ return; ++ } + tot_len = WPA_GET_BE16(pos); + wpa_printf(MSG_DEBUG, "EAP-pwd: Incoming fragments, total " + "length = %d", tot_len); + if (tot_len > 15000) + return; ++ if (data->inbuf) { ++ wpa_printf(MSG_DEBUG, ++ "EAP-pwd: Unexpected new fragment start when previous fragment is still in use"); ++ return; ++ } + data->inbuf = wpabuf_alloc(tot_len); + if (data->inbuf == NULL) { + wpa_printf(MSG_INFO, "EAP-pwd: Out of memory to " +-- +1.9.1 + diff --git a/net-wireless/wpa_supplicant/files/2015-4/0005-EAP-pwd-peer-Fix-asymmetric-fragmentation-behavior.patch b/net-wireless/wpa_supplicant/files/2015-4/0005-EAP-pwd-peer-Fix-asymmetric-fragmentation-behavior.patch new file mode 100644 index 000000000000..a601323f14da --- /dev/null +++ b/net-wireless/wpa_supplicant/files/2015-4/0005-EAP-pwd-peer-Fix-asymmetric-fragmentation-behavior.patch @@ -0,0 +1,32 @@ +From 28a069a545b06b99eb55ad53f63f2c99e65a98f6 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen <j@w1.fi> +Date: Sat, 2 May 2015 19:26:28 +0300 +Subject: [PATCH 5/5] EAP-pwd peer: Fix asymmetric fragmentation behavior + +The L (Length) and M (More) flags needs to be cleared before deciding +whether the locally generated response requires fragmentation. This +fixes an issue where these flags from the server could have been invalid +for the following message. In some cases, this could have resulted in +triggering the wpabuf security check that would terminate the process +due to invalid buffer allocation. + +Signed-off-by: Jouni Malinen <j@w1.fi> +--- + src/eap_peer/eap_pwd.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c +index 1d2079b..e58b13a 100644 +--- a/src/eap_peer/eap_pwd.c ++++ b/src/eap_peer/eap_pwd.c +@@ -968,6 +968,7 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret, + /* + * we have output! Do we need to fragment it? + */ ++ lm_exch = EAP_PWD_GET_EXCHANGE(lm_exch); + len = wpabuf_len(data->outbuf); + if ((len + EAP_PWD_HDR_SIZE) > data->mtu) { + resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_PWD, data->mtu, +-- +1.9.1 + diff --git a/net-wireless/wpa_supplicant/files/wpa_supplicant-2.0-dbus-path-fix.patch b/net-wireless/wpa_supplicant/files/wpa_supplicant-2.0-dbus-path-fix.patch deleted file mode 100644 index 976d71b0ec39..000000000000 --- a/net-wireless/wpa_supplicant/files/wpa_supplicant-2.0-dbus-path-fix.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -aurp a/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in b/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in ---- a/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in 2012-05-15 09:00:03.048545044 +0000 -+++ b/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in 2012-05-15 09:01:19.759550509 +0000 -@@ -1,5 +1,5 @@ - [D-BUS Service] - Name=fi.epitest.hostap.WPASupplicant --Exec=@BINDIR@/wpa_supplicant -u -+Exec=/usr/sbin/wpa_supplicant -u - User=root - SystemdService=wpa_supplicant.service -diff -aurp a/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in b/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in ---- a/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in 2012-05-15 09:00:03.048545044 +0000 -+++ b/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in 2012-05-15 09:01:28.727551913 +0000 -@@ -1,5 +1,5 @@ - [D-BUS Service] - Name=fi.w1.wpa_supplicant1 --Exec=@BINDIR@/wpa_supplicant -u -+Exec=/usr/sbin/wpa_supplicant -u - User=root - SystemdService=wpa_supplicant.service diff --git a/net-wireless/wpa_supplicant/files/wpa_supplicant-2.0-do-not-call-dbus-functions-with-NULL-path.patch b/net-wireless/wpa_supplicant/files/wpa_supplicant-2.0-do-not-call-dbus-functions-with-NULL-path.patch deleted file mode 100644 index bbff73e13d42..000000000000 --- a/net-wireless/wpa_supplicant/files/wpa_supplicant-2.0-do-not-call-dbus-functions-with-NULL-path.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff -aurp a/wpa_supplicant/dbus/dbus_new_helpers.c b/wpa_supplicant/dbus/dbus_new_helpers.c ---- a/wpa_supplicant/dbus/dbus_new_helpers.c 2012-05-15 07:28:37.616150164 +0000 -+++ b/wpa_supplicant/dbus/dbus_new_helpers.c 2012-05-15 07:30:21.904157611 +0000 -@@ -882,7 +882,7 @@ void wpa_dbus_mark_property_changed(stru - const struct wpa_dbus_property_desc *dsc; - int i = 0; - -- if (iface == NULL) -+ if (iface == NULL || path == NULL) - return; - - dbus_connection_get_object_path_data(iface->con, path, -diff -aurp a/wpa_supplicant/dbus/dbus_old.c b/wpa_supplicant/dbus/dbus_old.c ---- a/wpa_supplicant/dbus/dbus_old.c 2012-05-15 07:28:29.502149373 +0000 -+++ b/wpa_supplicant/dbus/dbus_old.c 2012-05-15 07:30:48.859162441 +0000 -@@ -379,7 +379,7 @@ void wpa_supplicant_dbus_notify_scan_res - DBusMessage *_signal; - - /* Do nothing if the control interface is not turned on */ -- if (iface == NULL) -+ if (iface == NULL || wpa_s->dbus_path == NULL) - return; - - _signal = dbus_message_new_signal(wpa_s->dbus_path, -@@ -419,7 +419,7 @@ void wpa_supplicant_dbus_notify_state_ch - if (wpa_s->global == NULL) - return; - iface = wpa_s->global->dbus; -- if (iface == NULL) -+ if (iface == NULL || wpa_s->dbus_path == NULL) - return; - - /* Only send signal if state really changed */ -@@ -478,7 +478,7 @@ void wpa_supplicant_dbus_notify_scanning - dbus_bool_t scanning = wpa_s->scanning ? TRUE : FALSE; - - /* Do nothing if the control interface is not turned on */ -- if (iface == NULL) -+ if (iface == NULL || wpa_s->dbus_path == NULL) - return; - - _signal = dbus_message_new_signal(wpa_s->dbus_path, -@@ -513,7 +513,7 @@ void wpa_supplicant_dbus_notify_wps_cred - if (wpa_s->global == NULL) - return; - iface = wpa_s->global->dbus; -- if (iface == NULL) -+ if (iface == NULL || wpa_s->dbus_path == NULL) - return; - - _signal = dbus_message_new_signal(wpa_s->dbus_path, -@@ -564,7 +564,7 @@ void wpa_supplicant_dbus_notify_certific - if (wpa_s->global == NULL) - return; - iface = wpa_s->global->dbus; -- if (iface == NULL) -+ if (iface == NULL || wpa_s->dbus_path == NULL) - return; - - _signal = dbus_message_new_signal(wpa_s->dbus_path, diff --git a/net-wireless/wpa_supplicant/files/wpa_supplicant-2.0-fix-undefined-reference-to-random_get_bytes.patch b/net-wireless/wpa_supplicant/files/wpa_supplicant-2.0-fix-undefined-reference-to-random_get_bytes.patch deleted file mode 100644 index def43a2ae314..000000000000 --- a/net-wireless/wpa_supplicant/files/wpa_supplicant-2.0-fix-undefined-reference-to-random_get_bytes.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -Naur a/src/eap_peer/Makefile b/src/eap_peer/Makefile ---- a/src/eap_peer/Makefile 2013-05-17 09:51:55.000000000 +0000 -+++ b/src/eap_peer/Makefile 2013-05-17 09:54:03.010830904 +0000 -@@ -36,6 +36,7 @@ - OBJS_both += ../utils/wpa_debug.o - OBJS_both += ../utils/base64.o - OBJS_both += ../utils/wpabuf.o -+OBJS_both += ../utils/eloop.o - OBJS_both += ../crypto/md5.o - ifneq ($(CONFIG_TLS), openssl) - OBJS_both += ../crypto/sha1.o -@@ -48,6 +49,7 @@ - OBJS_both += ../crypto/aes-omac1.o - OBJS_both += ../crypto/ms_funcs.o - OBJS_both += ../crypto/sha256.o -+OBJS_both += ../crypto/random.o - - - OBJS_both += ../eap_common/eap_peap_common.o diff --git a/net-wireless/wpa_supplicant/files/wpa_supplicant-2.0-generate-libeap-peer.patch b/net-wireless/wpa_supplicant/files/wpa_supplicant-2.0-generate-libeap-peer.patch deleted file mode 100644 index 1fb9b103627f..000000000000 --- a/net-wireless/wpa_supplicant/files/wpa_supplicant-2.0-generate-libeap-peer.patch +++ /dev/null @@ -1,349 +0,0 @@ -diff -Naurp a/src/eap_peer/eap_methods.c b/src/eap_peer/eap_methods.c ---- a/src/eap_peer/eap_methods.c 2012-05-15 08:23:17.151386999 +0000 -+++ b/src/eap_peer/eap_methods.c 2012-05-15 08:23:57.403389760 +0000 -@@ -342,6 +342,120 @@ int eap_peer_method_register(struct eap_ - - - /** -+ * eap_peer_register_methods - Register all known EAP peer methods -+ * -+ * This function is called at program start to register all compiled -+ * in EAP peer methods. -+ */ -+int eap_peer_register_methods(void) -+{ -+ int ret = 0; -+ -+#ifdef EAP_MD5 -+ if (ret == 0) -+ ret = eap_peer_md5_register(); -+#endif /* EAP_MD5 */ -+ -+#ifdef EAP_TLS -+ if (ret == 0) -+ ret = eap_peer_tls_register(); -+#endif /* EAP_TLS */ -+ -+#ifdef EAP_MSCHAPv2 -+ if (ret == 0) -+ ret = eap_peer_mschapv2_register(); -+#endif /* EAP_MSCHAPv2 */ -+ -+#ifdef EAP_PEAP -+ if (ret == 0) -+ ret = eap_peer_peap_register(); -+#endif /* EAP_PEAP */ -+ -+#ifdef EAP_TTLS -+ if (ret == 0) -+ ret = eap_peer_ttls_register(); -+#endif /* EAP_TTLS */ -+ -+#ifdef EAP_GTC -+ if (ret == 0) -+ ret = eap_peer_gtc_register(); -+#endif /* EAP_GTC */ -+ -+#ifdef EAP_OTP -+ if (ret == 0) -+ ret = eap_peer_otp_register(); -+#endif /* EAP_OTP */ -+ -+#ifdef EAP_SIM -+ if (ret == 0) -+ ret = eap_peer_sim_register(); -+#endif /* EAP_SIM */ -+ -+#ifdef EAP_LEAP -+ if (ret == 0) -+ ret = eap_peer_leap_register(); -+#endif /* EAP_LEAP */ -+ -+#ifdef EAP_PSK -+ if (ret == 0) -+ ret = eap_peer_psk_register(); -+#endif /* EAP_PSK */ -+ -+#ifdef EAP_AKA -+ if (ret == 0) -+ ret = eap_peer_aka_register(); -+#endif /* EAP_AKA */ -+ -+#ifdef EAP_AKA_PRIME -+ if (ret == 0) -+ ret = eap_peer_aka_prime_register(); -+#endif /* EAP_AKA_PRIME */ -+ -+#ifdef EAP_FAST -+ if (ret == 0) -+ ret = eap_peer_fast_register(); -+#endif /* EAP_FAST */ -+ -+#ifdef EAP_PAX -+ if (ret == 0) -+ ret = eap_peer_pax_register(); -+#endif /* EAP_PAX */ -+ -+#ifdef EAP_SAKE -+ if (ret == 0) -+ ret = eap_peer_sake_register(); -+#endif /* EAP_SAKE */ -+ -+#ifdef EAP_GPSK -+ if (ret == 0) -+ ret = eap_peer_gpsk_register(); -+#endif /* EAP_GPSK */ -+ -+#ifdef EAP_WSC -+ if (ret == 0) -+ ret = eap_peer_wsc_register(); -+#endif /* EAP_WSC */ -+ -+#ifdef EAP_IKEV2 -+ if (ret == 0) -+ ret = eap_peer_ikev2_register(); -+#endif /* EAP_IKEV2 */ -+ -+#ifdef EAP_VENDOR_TEST -+ if (ret == 0) -+ ret = eap_peer_vendor_test_register(); -+#endif /* EAP_VENDOR_TEST */ -+ -+#ifdef EAP_TNC -+ if (ret == 0) -+ ret = eap_peer_tnc_register(); -+#endif /* EAP_TNC */ -+ -+ return ret; -+} -+ -+ -+/** - * eap_peer_unregister_methods - Unregister EAP peer methods - * - * This function is called at program termination to unregister all EAP peer -diff -Naurp a/src/eap_peer/eap_methods.h b/src/eap_peer/eap_methods.h ---- a/src/eap_peer/eap_methods.h 2012-05-15 08:23:17.151386999 +0000 -+++ b/src/eap_peer/eap_methods.h 2012-05-15 08:23:57.404389735 +0000 -@@ -32,6 +32,7 @@ EapType eap_peer_get_type(const char *na - const char * eap_get_name(int vendor, EapType type); - size_t eap_get_names(char *buf, size_t buflen); - char ** eap_get_names_as_string_array(size_t *num); -+int eap_peer_register_methods(void); - void eap_peer_unregister_methods(void); - - #else /* IEEE8021X_EAPOL */ -diff -Naurp a/src/eap_peer/libeap0.pc b/src/eap_peer/libeap0.pc ---- a/src/eap_peer/libeap0.pc 1970-01-01 00:00:00.000000000 +0000 -+++ b/src/eap_peer/libeap0.pc 2012-05-15 08:23:57.404389735 +0000 -@@ -0,0 +1,10 @@ -+prefix=/usr -+exec_prefix=/usr -+libdir=${exec_prefix}/lib -+includedir=${prefix}/include/eap_peer -+ -+Name: libeap0 -+Description: EAP Peer Library API -+Version: 0.7.2 -+Libs: -L${libdir} -leap -+Cflags: -I${includedir} -diff -Naurp a/src/eap_peer/Makefile b/src/eap_peer/Makefile ---- a/src/eap_peer/Makefile 2012-05-15 08:23:17.152386964 +0000 -+++ b/src/eap_peer/Makefile 2012-05-15 08:23:57.403389760 +0000 -@@ -1,11 +1,188 @@ --all: -- @echo Nothing to be made. -+LIBEAP_NAME = libeap -+LIBEAP_CURRENT = 0 -+LIBEAP_REVISION = 0 -+LIBEAP_AGE = 0 -+ -+LIBEAP = $(LIBEAP_NAME).so.$(LIBEAP_CURRENT).$(LIBEAP_REVISION).$(LIBEAP_AGE) -+LIBEAP_SO = $(LIBEAP_NAME).so.$(LIBEAP_CURRENT) -+ -+.PHONY: all clean install uninstall -+ -+all: $(LIBEAP) -+ -+ifndef CC -+CC=gcc -+endif -+ -+ifndef CFLAGS -+CFLAGS = -MMD -O0 -Wall -g -+endif -+ -+CONFIG_TLS=openssl -+ -+INCLUDE_INSTALL_DIR=/usr/include/eap_peer -+ -+# Got to use override all across the board, otherwise a 'make -+# CFLAGS=XX' will kill us because the command line's CFLAGS will -+# overwrite Make's and we'll loose all the infrastructure it sets. -+override CFLAGS += -I. -I.. -I../crypto -I../utils -I../common -+ -+# at least for now, need to include config_ssid.h and config_blob.h from -+# wpa_supplicant directory -+override CFLAGS += -I ../../wpa_supplicant -+ -+OBJS_both += ../utils/common.o -+OBJS_both += ../utils/os_unix.o -+OBJS_both += ../utils/wpa_debug.o -+OBJS_both += ../utils/base64.o -+OBJS_both += ../utils/wpabuf.o -+OBJS_both += ../crypto/md5.o -+ifneq ($(CONFIG_TLS), openssl) -+OBJS_both += ../crypto/sha1.o -+endif -+OBJS_both += ../crypto/sha1-tlsprf.o -+OBJS_both += ../crypto/aes-encblock.o -+OBJS_both += ../crypto/aes-wrap.o -+OBJS_both += ../crypto/aes-ctr.o -+OBJS_both += ../crypto/aes-eax.o -+OBJS_both += ../crypto/aes-omac1.o -+OBJS_both += ../crypto/ms_funcs.o -+OBJS_both += ../crypto/sha256.o -+ -+ -+OBJS_both += ../eap_common/eap_peap_common.o -+OBJS_both += ../eap_common/eap_psk_common.o -+OBJS_both += ../eap_common/eap_pax_common.o -+OBJS_both += ../eap_common/eap_sake_common.o -+OBJS_both += ../eap_common/eap_gpsk_common.o -+OBJS_both += ../eap_common/chap.o -+ -+OBJS_peer += ../eap_peer/eap_tls.o -+OBJS_peer += ../eap_peer/eap_peap.o -+OBJS_peer += ../eap_peer/eap_ttls.o -+OBJS_peer += ../eap_peer/eap_md5.o -+OBJS_peer += ../eap_peer/eap_mschapv2.o -+OBJS_peer += ../eap_peer/mschapv2.o -+OBJS_peer += ../eap_peer/eap_otp.o -+OBJS_peer += ../eap_peer/eap_gtc.o -+OBJS_peer += ../eap_peer/eap_leap.o -+OBJS_peer += ../eap_peer/eap_psk.o -+OBJS_peer += ../eap_peer/eap_pax.o -+OBJS_peer += ../eap_peer/eap_sake.o -+OBJS_peer += ../eap_peer/eap_gpsk.o -+OBJS_peer += ../eap_peer/eap.o -+OBJS_peer += ../eap_common/eap_common.o -+OBJS_peer += ../eap_peer/eap_methods.o -+OBJS_peer += ../eap_peer/eap_tls_common.o -+ -+override CFLAGS += -DEAP_TLS -+override CFLAGS += -DEAP_PEAP -+override CFLAGS += -DEAP_TTLS -+override CFLAGS += -DEAP_MD5 -+override CFLAGS += -DEAP_MSCHAPv2 -+override CFLAGS += -DEAP_GTC -+override CFLAGS += -DEAP_OTP -+override CFLAGS += -DEAP_LEAP -+override CFLAGS += -DEAP_PSK -+override CFLAGS += -DEAP_PAX -+override CFLAGS += -DEAP_SAKE -+override CFLAGS += -DEAP_GPSK -DEAP_GPSK_SHA256 -+override CFLAGS += -DEAP_TLS_FUNCS -+ -+override CFLAGS += -DIEEE8021X_EAPOL -+ -+ifeq ($(CONFIG_TLS), openssl) -+override CFLAGS += -DEAP_TLS_OPENSSL -+OBJS_both += ../crypto/tls_openssl.o -+OBJS_both += ../crypto/crypto_openssl.o -+LIBS += -lssl -lcrypto -+override CFLAGS += -DINTERNAL_SHA256 -+endif -+ -+ifeq ($(CONFIG_TLS), internal) -+OBJS_both += ../crypto/tls_internal.o -+OBJS_both += ../tls/tlsv1_common.o ../../tls/tlsv1_record.o -+OBJS_both += ../tls/tlsv1_cred.o -+OBJS_both += ../tls/asn1.o ../../tls/x509v3.o -+OBJS_both += ../crypto/crypto_internal.o ../../tls/rsa.o ../../tls/bignum.o -+ -+OBJS_peer += ../tls/tlsv1_client.o -+OBJS_peer += ../tls/tlsv1_client_write.o ../../tls/tlsv1_client_read.o -+override CFLAGS += -DCONFIG_TLS_INTERNAL_CLIENT -+ -+OBJS_server += ../tls/tlsv1_server.o -+OBJS_server += ../tls/tlsv1_server_write.o ../../tls/tlsv1_server_read.o -+override CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER -+ -+override CFLAGS += -DCONFIG_TLS_INTERNAL -+override CFLAGS += -DCONFIG_CRYPTO_INTERNAL -+override CFLAGS += -DCONFIG_INTERNAL_X509 -+override CFLAGS += -DINTERNAL_AES -+override CFLAGS += -DINTERNAL_SHA1 -+override CFLAGS += -DINTERNAL_SHA256 -+override CFLAGS += -DINTERNAL_MD5 -+override CFLAGS += -DINTERNAL_MD4 -+override CFLAGS += -DINTERNAL_DES -+ifdef CONFIG_INTERNAL_LIBTOMMATH -+override CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH -+else -+LIBS += -ltommath -+endif -+endif -+ -+ifndef LDO -+LDO=$(CC) -+endif -+ -+ -+OBJS_lib=$(OBJS_both) $(OBJS_peer) -+ -+ #$(OBJS_server) -+ -+override CFLAGS += -fPIC -DPIC -+LDFLAGS += -shared -+ -+$(LIBEAP): $(OBJS_lib) -+ $(LDO) $(LDFLAGS) $(OBJS_lib) -Wl,-soname -Wl,$(LIBEAP_SO) -o $(LIBEAP) $(LIBS) -+ -+ -+UTIL_HEADERS = ../utils/includes.h ../utils/common.h \ -+ ../utils/wpabuf.h ../utils/build_config.h \ -+ ../utils/os.h ../utils/wpa_debug.h -+COMMON_HEADERS = ../common/defs.h -+EAP_COMMON_HEADERS = ../eap_common/eap_defs.h -+MAIN_HEADERS = eap.h eap_methods.h eap_config.h -+CRYPTO_HEADERS = ../crypto/tls.h -+ -+install: -+ -+ mkdir -p $(DESTDIR)/usr/lib -+# copy the lib file to std lib location -+ cp $(LIBEAP) $(DESTDIR)/usr/lib -+ ln -fs $(LIBEAP_SO) $(DESTDIR)/usr/lib/$(LIBEAP_NAME).so -+ ln -fs $(LIBEAP_NAME).so.0.0.0 $(DESTDIR)/usr/lib/$(LIBEAP_NAME).so.0 -+ -+# copy the headers reqd by apps using eap peer library in its own subfolder under /usr/include -+ mkdir -p \ -+ $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/eap_common \ -+ $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/common \ -+ $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/util \ -+ $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/crypto -+ install -m 0644 $(EAP_COMMON_HEADERS) $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/eap_common -+ install -m 0644 $(COMMON_HEADERS) $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/common -+ install -m 0644 $(CRYPTO_HEADERS) $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/crypto -+ install -m 0644 $(UTIL_HEADERS) $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/util -+ install -m 0644 $(MAIN_HEADERS) $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/ -+ -+ mkdir -p $(DESTDIR)/usr/lib/pkgconfig -+ cp libeap0.pc $(DESTDIR)/usr/lib/pkgconfig -+ -+uninstall: -+ -+ rm $(DESTDIR)/usr/lib/$(LIBEAP) -+ rm -fr $(DESTDIR)/$(INCLUDE_INSTALL_DIR) -+ rm -f $(DESTDIR)/usr/lib/pkgconfig/libeap0.pc - - clean: -- rm -f *~ *.o *.so *.d -+ rm -f *~ *.o *.so *.d libeap.a $(LIBEAP) $(OBJS_lib) - --install: -- if ls *.so >/dev/null 2>&1; then \ -- install -d $(DESTDIR)$(LIBDIR)/wpa_supplicant && \ -- cp *.so $(DESTDIR)$(LIBDIR)/wpa_supplicant \ -- ; fi diff --git a/net-wireless/wpa_supplicant/files/wpa_supplicant-2.2-dbus-path-fix.patch b/net-wireless/wpa_supplicant/files/wpa_supplicant-2.2-dbus-path-fix.patch deleted file mode 100644 index 976d71b0ec39..000000000000 --- a/net-wireless/wpa_supplicant/files/wpa_supplicant-2.2-dbus-path-fix.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -aurp a/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in b/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in ---- a/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in 2012-05-15 09:00:03.048545044 +0000 -+++ b/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in 2012-05-15 09:01:19.759550509 +0000 -@@ -1,5 +1,5 @@ - [D-BUS Service] - Name=fi.epitest.hostap.WPASupplicant --Exec=@BINDIR@/wpa_supplicant -u -+Exec=/usr/sbin/wpa_supplicant -u - User=root - SystemdService=wpa_supplicant.service -diff -aurp a/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in b/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in ---- a/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in 2012-05-15 09:00:03.048545044 +0000 -+++ b/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in 2012-05-15 09:01:28.727551913 +0000 -@@ -1,5 +1,5 @@ - [D-BUS Service] - Name=fi.w1.wpa_supplicant1 --Exec=@BINDIR@/wpa_supplicant -u -+Exec=/usr/sbin/wpa_supplicant -u - User=root - SystemdService=wpa_supplicant.service diff --git a/net-wireless/wpa_supplicant/files/wpa_supplicant-2.2-do-not-call-dbus-functions-with-NULL-path.patch b/net-wireless/wpa_supplicant/files/wpa_supplicant-2.2-do-not-call-dbus-functions-with-NULL-path.patch deleted file mode 100644 index bbff73e13d42..000000000000 --- a/net-wireless/wpa_supplicant/files/wpa_supplicant-2.2-do-not-call-dbus-functions-with-NULL-path.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff -aurp a/wpa_supplicant/dbus/dbus_new_helpers.c b/wpa_supplicant/dbus/dbus_new_helpers.c ---- a/wpa_supplicant/dbus/dbus_new_helpers.c 2012-05-15 07:28:37.616150164 +0000 -+++ b/wpa_supplicant/dbus/dbus_new_helpers.c 2012-05-15 07:30:21.904157611 +0000 -@@ -882,7 +882,7 @@ void wpa_dbus_mark_property_changed(stru - const struct wpa_dbus_property_desc *dsc; - int i = 0; - -- if (iface == NULL) -+ if (iface == NULL || path == NULL) - return; - - dbus_connection_get_object_path_data(iface->con, path, -diff -aurp a/wpa_supplicant/dbus/dbus_old.c b/wpa_supplicant/dbus/dbus_old.c ---- a/wpa_supplicant/dbus/dbus_old.c 2012-05-15 07:28:29.502149373 +0000 -+++ b/wpa_supplicant/dbus/dbus_old.c 2012-05-15 07:30:48.859162441 +0000 -@@ -379,7 +379,7 @@ void wpa_supplicant_dbus_notify_scan_res - DBusMessage *_signal; - - /* Do nothing if the control interface is not turned on */ -- if (iface == NULL) -+ if (iface == NULL || wpa_s->dbus_path == NULL) - return; - - _signal = dbus_message_new_signal(wpa_s->dbus_path, -@@ -419,7 +419,7 @@ void wpa_supplicant_dbus_notify_state_ch - if (wpa_s->global == NULL) - return; - iface = wpa_s->global->dbus; -- if (iface == NULL) -+ if (iface == NULL || wpa_s->dbus_path == NULL) - return; - - /* Only send signal if state really changed */ -@@ -478,7 +478,7 @@ void wpa_supplicant_dbus_notify_scanning - dbus_bool_t scanning = wpa_s->scanning ? TRUE : FALSE; - - /* Do nothing if the control interface is not turned on */ -- if (iface == NULL) -+ if (iface == NULL || wpa_s->dbus_path == NULL) - return; - - _signal = dbus_message_new_signal(wpa_s->dbus_path, -@@ -513,7 +513,7 @@ void wpa_supplicant_dbus_notify_wps_cred - if (wpa_s->global == NULL) - return; - iface = wpa_s->global->dbus; -- if (iface == NULL) -+ if (iface == NULL || wpa_s->dbus_path == NULL) - return; - - _signal = dbus_message_new_signal(wpa_s->dbus_path, -@@ -564,7 +564,7 @@ void wpa_supplicant_dbus_notify_certific - if (wpa_s->global == NULL) - return; - iface = wpa_s->global->dbus; -- if (iface == NULL) -+ if (iface == NULL || wpa_s->dbus_path == NULL) - return; - - _signal = dbus_message_new_signal(wpa_s->dbus_path, diff --git a/net-wireless/wpa_supplicant/files/wpa_supplicant-2.2-fix-undefined-reference-to-random_get_bytes.patch b/net-wireless/wpa_supplicant/files/wpa_supplicant-2.2-fix-undefined-reference-to-random_get_bytes.patch deleted file mode 100644 index def43a2ae314..000000000000 --- a/net-wireless/wpa_supplicant/files/wpa_supplicant-2.2-fix-undefined-reference-to-random_get_bytes.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -Naur a/src/eap_peer/Makefile b/src/eap_peer/Makefile ---- a/src/eap_peer/Makefile 2013-05-17 09:51:55.000000000 +0000 -+++ b/src/eap_peer/Makefile 2013-05-17 09:54:03.010830904 +0000 -@@ -36,6 +36,7 @@ - OBJS_both += ../utils/wpa_debug.o - OBJS_both += ../utils/base64.o - OBJS_both += ../utils/wpabuf.o -+OBJS_both += ../utils/eloop.o - OBJS_both += ../crypto/md5.o - ifneq ($(CONFIG_TLS), openssl) - OBJS_both += ../crypto/sha1.o -@@ -48,6 +49,7 @@ - OBJS_both += ../crypto/aes-omac1.o - OBJS_both += ../crypto/ms_funcs.o - OBJS_both += ../crypto/sha256.o -+OBJS_both += ../crypto/random.o - - - OBJS_both += ../eap_common/eap_peap_common.o diff --git a/net-wireless/wpa_supplicant/files/wpa_supplicant-2.2-generate-libeap-peer.patch b/net-wireless/wpa_supplicant/files/wpa_supplicant-2.2-generate-libeap-peer.patch deleted file mode 100644 index 391338b302cd..000000000000 --- a/net-wireless/wpa_supplicant/files/wpa_supplicant-2.2-generate-libeap-peer.patch +++ /dev/null @@ -1,349 +0,0 @@ -diff -Naurp a/src/eap_peer/eap_methods.c b/src/eap_peer/eap_methods.c ---- a/src/eap_peer/eap_methods.c 2012-05-15 08:23:17.151386999 +0000 -+++ b/src/eap_peer/eap_methods.c 2012-05-15 08:23:57.403389760 +0000 -@@ -342,6 +342,120 @@ int eap_peer_method_register(struct eap_ - - - /** -+ * eap_peer_register_methods - Register all known EAP peer methods -+ * -+ * This function is called at program start to register all compiled -+ * in EAP peer methods. -+ */ -+int eap_peer_register_methods(void) -+{ -+ int ret = 0; -+ -+#ifdef EAP_MD5 -+ if (ret == 0) -+ ret = eap_peer_md5_register(); -+#endif /* EAP_MD5 */ -+ -+#ifdef EAP_TLS -+ if (ret == 0) -+ ret = eap_peer_tls_register(); -+#endif /* EAP_TLS */ -+ -+#ifdef EAP_MSCHAPv2 -+ if (ret == 0) -+ ret = eap_peer_mschapv2_register(); -+#endif /* EAP_MSCHAPv2 */ -+ -+#ifdef EAP_PEAP -+ if (ret == 0) -+ ret = eap_peer_peap_register(); -+#endif /* EAP_PEAP */ -+ -+#ifdef EAP_TTLS -+ if (ret == 0) -+ ret = eap_peer_ttls_register(); -+#endif /* EAP_TTLS */ -+ -+#ifdef EAP_GTC -+ if (ret == 0) -+ ret = eap_peer_gtc_register(); -+#endif /* EAP_GTC */ -+ -+#ifdef EAP_OTP -+ if (ret == 0) -+ ret = eap_peer_otp_register(); -+#endif /* EAP_OTP */ -+ -+#ifdef EAP_SIM -+ if (ret == 0) -+ ret = eap_peer_sim_register(); -+#endif /* EAP_SIM */ -+ -+#ifdef EAP_LEAP -+ if (ret == 0) -+ ret = eap_peer_leap_register(); -+#endif /* EAP_LEAP */ -+ -+#ifdef EAP_PSK -+ if (ret == 0) -+ ret = eap_peer_psk_register(); -+#endif /* EAP_PSK */ -+ -+#ifdef EAP_AKA -+ if (ret == 0) -+ ret = eap_peer_aka_register(); -+#endif /* EAP_AKA */ -+ -+#ifdef EAP_AKA_PRIME -+ if (ret == 0) -+ ret = eap_peer_aka_prime_register(); -+#endif /* EAP_AKA_PRIME */ -+ -+#ifdef EAP_FAST -+ if (ret == 0) -+ ret = eap_peer_fast_register(); -+#endif /* EAP_FAST */ -+ -+#ifdef EAP_PAX -+ if (ret == 0) -+ ret = eap_peer_pax_register(); -+#endif /* EAP_PAX */ -+ -+#ifdef EAP_SAKE -+ if (ret == 0) -+ ret = eap_peer_sake_register(); -+#endif /* EAP_SAKE */ -+ -+#ifdef EAP_GPSK -+ if (ret == 0) -+ ret = eap_peer_gpsk_register(); -+#endif /* EAP_GPSK */ -+ -+#ifdef EAP_WSC -+ if (ret == 0) -+ ret = eap_peer_wsc_register(); -+#endif /* EAP_WSC */ -+ -+#ifdef EAP_IKEV2 -+ if (ret == 0) -+ ret = eap_peer_ikev2_register(); -+#endif /* EAP_IKEV2 */ -+ -+#ifdef EAP_VENDOR_TEST -+ if (ret == 0) -+ ret = eap_peer_vendor_test_register(); -+#endif /* EAP_VENDOR_TEST */ -+ -+#ifdef EAP_TNC -+ if (ret == 0) -+ ret = eap_peer_tnc_register(); -+#endif /* EAP_TNC */ -+ -+ return ret; -+} -+ -+ -+/** - * eap_peer_unregister_methods - Unregister EAP peer methods - * - * This function is called at program termination to unregister all EAP peer -diff -Naurp a/src/eap_peer/eap_methods.h b/src/eap_peer/eap_methods.h ---- a/src/eap_peer/eap_methods.h 2012-05-15 08:23:17.151386999 +0000 -+++ b/src/eap_peer/eap_methods.h 2012-05-15 08:23:57.404389735 +0000 -@@ -32,6 +32,7 @@ EapType eap_peer_get_type(const char *na - const char * eap_get_name(int vendor, EapType type); - size_t eap_get_names(char *buf, size_t buflen); - char ** eap_get_names_as_string_array(size_t *num); -+int eap_peer_register_methods(void); - void eap_peer_unregister_methods(void); - - #else /* IEEE8021X_EAPOL */ -diff -Naurp a/src/eap_peer/libeap0.pc b/src/eap_peer/libeap0.pc ---- a/src/eap_peer/libeap0.pc 1970-01-01 00:00:00.000000000 +0000 -+++ b/src/eap_peer/libeap0.pc 2012-05-15 08:23:57.404389735 +0000 -@@ -0,0 +1,10 @@ -+prefix=/usr -+exec_prefix=/usr -+libdir=${exec_prefix}/lib -+includedir=${prefix}/include/eap_peer -+ -+Name: libeap0 -+Description: EAP Peer Library API -+Version: 0.7.2 -+Libs: -L${libdir} -leap -+Cflags: -I${includedir} -diff -Naurp a/src/eap_peer/Makefile b/src/eap_peer/Makefile ---- a/src/eap_peer/Makefile 2012-05-15 08:23:17.152386964 +0000 -+++ b/src/eap_peer/Makefile 2012-05-15 08:23:57.403389760 +0000 -@@ -1,11 +1,188 @@ --all: -- @echo Nothing to be made. -+LIBEAP_NAME = libeap -+LIBEAP_CURRENT = 0 -+LIBEAP_REVISION = 0 -+LIBEAP_AGE = 0 -+ -+LIBEAP = $(LIBEAP_NAME).so.$(LIBEAP_CURRENT).$(LIBEAP_REVISION).$(LIBEAP_AGE) -+LIBEAP_SO = $(LIBEAP_NAME).so.$(LIBEAP_CURRENT) -+ -+.PHONY: all clean install uninstall -+ -+all: $(LIBEAP) -+ -+ifndef CC -+CC=gcc -+endif -+ -+ifndef CFLAGS -+CFLAGS = -MMD -O0 -Wall -g -+endif -+ -+CONFIG_TLS=openssl -+ -+INCLUDE_INSTALL_DIR=/usr/include/eap_peer -+ -+# Got to use override all across the board, otherwise a 'make -+# CFLAGS=XX' will kill us because the command line's CFLAGS will -+# overwrite Make's and we'll loose all the infrastructure it sets. -+override CFLAGS += -I. -I.. -I../crypto -I../utils -I../common -+ -+# at least for now, need to include config_ssid.h and config_blob.h from -+# wpa_supplicant directory -+override CFLAGS += -I ../../wpa_supplicant -+ -+OBJS_both += ../utils/common.o -+OBJS_both += ../utils/os_unix.o -+OBJS_both += ../utils/wpa_debug.o -+OBJS_both += ../utils/base64.o -+OBJS_both += ../utils/wpabuf.o -+OBJS_both += ../crypto/md5.o -+ifneq ($(CONFIG_TLS), openssl) -+OBJS_both += ../crypto/sha1.o -+endif -+OBJS_both += ../crypto/sha1-tlsprf.o -+OBJS_both += ../crypto/aes-encblock.o -+OBJS_both += ../crypto/aes-wrap.o -+OBJS_both += ../crypto/aes-ctr.o -+OBJS_both += ../crypto/aes-eax.o -+OBJS_both += ../crypto/aes-omac1.o -+OBJS_both += ../crypto/ms_funcs.o -+OBJS_both += ../crypto/sha256.o -+ -+ -+OBJS_both += ../eap_common/eap_peap_common.o -+OBJS_both += ../eap_common/eap_psk_common.o -+OBJS_both += ../eap_common/eap_pax_common.o -+OBJS_both += ../eap_common/eap_sake_common.o -+OBJS_both += ../eap_common/eap_gpsk_common.o -+OBJS_both += ../eap_common/chap.o -+ -+OBJS_peer += ../eap_peer/eap_tls.o -+OBJS_peer += ../eap_peer/eap_peap.o -+OBJS_peer += ../eap_peer/eap_ttls.o -+OBJS_peer += ../eap_peer/eap_md5.o -+OBJS_peer += ../eap_peer/eap_mschapv2.o -+OBJS_peer += ../eap_peer/mschapv2.o -+OBJS_peer += ../eap_peer/eap_otp.o -+OBJS_peer += ../eap_peer/eap_gtc.o -+OBJS_peer += ../eap_peer/eap_leap.o -+OBJS_peer += ../eap_peer/eap_psk.o -+OBJS_peer += ../eap_peer/eap_pax.o -+OBJS_peer += ../eap_peer/eap_sake.o -+OBJS_peer += ../eap_peer/eap_gpsk.o -+OBJS_peer += ../eap_peer/eap.o -+OBJS_peer += ../eap_common/eap_common.o -+OBJS_peer += ../eap_peer/eap_methods.o -+OBJS_peer += ../eap_peer/eap_tls_common.o -+ -+override CFLAGS += -DEAP_TLS -+override CFLAGS += -DEAP_PEAP -+override CFLAGS += -DEAP_TTLS -+override CFLAGS += -DEAP_MD5 -+override CFLAGS += -DEAP_MSCHAPv2 -+override CFLAGS += -DEAP_GTC -+override CFLAGS += -DEAP_OTP -+override CFLAGS += -DEAP_LEAP -+override CFLAGS += -DEAP_PSK -+override CFLAGS += -DEAP_PAX -+override CFLAGS += -DEAP_SAKE -+override CFLAGS += -DEAP_GPSK -DEAP_GPSK_SHA256 -+override CFLAGS += -DEAP_TLS_FUNCS -+ -+override CFLAGS += -DIEEE8021X_EAPOL -+ -+ifeq ($(CONFIG_TLS), openssl) -+override CFLAGS += -DEAP_TLS_OPENSSL -+OBJS_both += ../crypto/tls_openssl.o -+OBJS_both += ../crypto/crypto_openssl.o -+LIBS += -lssl -lcrypto -+override CFLAGS += -DINTERNAL_SHA256 -+endif -+ -+ifeq ($(CONFIG_TLS), internal) -+OBJS_both += ../crypto/tls_internal.o -+OBJS_both += ../tls/tlsv1_common.o ../../tls/tlsv1_record.o -+OBJS_both += ../tls/tlsv1_cred.o -+OBJS_both += ../tls/asn1.o ../../tls/x509v3.o -+OBJS_both += ../crypto/crypto_internal.o ../../tls/rsa.o ../../tls/bignum.o -+ -+OBJS_peer += ../tls/tlsv1_client.o -+OBJS_peer += ../tls/tlsv1_client_write.o ../../tls/tlsv1_client_read.o -+override CFLAGS += -DCONFIG_TLS_INTERNAL_CLIENT -+ -+OBJS_server += ../tls/tlsv1_server.o -+OBJS_server += ../tls/tlsv1_server_write.o ../../tls/tlsv1_server_read.o -+override CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER -+ -+override CFLAGS += -DCONFIG_TLS_INTERNAL -+override CFLAGS += -DCONFIG_CRYPTO_INTERNAL -+override CFLAGS += -DCONFIG_INTERNAL_X509 -+override CFLAGS += -DINTERNAL_AES -+override CFLAGS += -DINTERNAL_SHA1 -+override CFLAGS += -DINTERNAL_SHA256 -+override CFLAGS += -DINTERNAL_MD5 -+override CFLAGS += -DINTERNAL_MD4 -+override CFLAGS += -DINTERNAL_DES -+ifdef CONFIG_INTERNAL_LIBTOMMATH -+override CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH -+else -+LIBS += -ltommath -+endif -+endif -+ -+ifndef LDO -+LDO=$(CC) -+endif -+ -+ -+OBJS_lib=$(OBJS_both) $(OBJS_peer) -+ -+ #$(OBJS_server) -+ -+override CFLAGS += -fPIC -DPIC -+LDFLAGS += -shared -+ -+$(LIBEAP): $(OBJS_lib) -+ $(LDO) $(LDFLAGS) $(OBJS_lib) -Wl,-soname -Wl,$(LIBEAP_SO) -o $(LIBEAP) $(LIBS) -+ -+ -+UTIL_HEADERS = ../utils/includes.h ../utils/common.h \ -+ ../utils/wpabuf.h ../utils/build_config.h \ -+ ../utils/os.h ../utils/wpa_debug.h -+COMMON_HEADERS = ../common/defs.h -+EAP_COMMON_HEADERS = ../eap_common/eap_defs.h -+MAIN_HEADERS = eap.h eap_methods.h eap_config.h -+CRYPTO_HEADERS = ../crypto/tls.h -+ -+install: -+ -+ mkdir -p $(DESTDIR)/usr/lib -+# copy the lib file to std lib location -+ cp $(LIBEAP) $(DESTDIR)/usr/lib -+ ln -fs $(LIBEAP_SO) $(DESTDIR)/usr/lib/$(LIBEAP_NAME).so -+ ln -fs $(LIBEAP_NAME).so.0.0.0 $(DESTDIR)/usr/lib/$(LIBEAP_NAME).so.0 -+ -+# copy the headers reqd by apps using eap peer library in its own subfolder under /usr/include -+ mkdir -p \ -+ $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/eap_common \ -+ $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/common \ -+ $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/util \ -+ $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/crypto -+ install -m 0644 $(EAP_COMMON_HEADERS) $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/eap_common -+ install -m 0644 $(COMMON_HEADERS) $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/common -+ install -m 0644 $(CRYPTO_HEADERS) $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/crypto -+ install -m 0644 $(UTIL_HEADERS) $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/util -+ install -m 0644 $(MAIN_HEADERS) $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/ -+ -+ mkdir -p $(DESTDIR)/usr/lib/pkgconfig -+ cp libeap0.pc $(DESTDIR)/usr/lib/pkgconfig -+ -+uninstall: -+ -+ rm $(DESTDIR)/usr/lib/$(LIBEAP) -+ rm -fr $(DESTDIR)/$(INCLUDE_INSTALL_DIR) -+ rm -f $(DESTDIR)/usr/lib/pkgconfig/libeap0.pc - - clean: -- rm -f *~ *.o *.so *.d *.gcno *.gcda *.gcov -+ rm -f *~ *.o *.so *.d *.gcno *.gcda *.gcov libeap.a $(LIBEAP) $(OBJS_lib) - --install: -- if ls *.so >/dev/null 2>&1; then \ -- install -d $(DESTDIR)$(LIBDIR)/wpa_supplicant && \ -- cp *.so $(DESTDIR)$(LIBDIR)/wpa_supplicant \ -- ; fi diff --git a/net-wireless/wpa_supplicant/files/wpa_supplicant-2.4-fix-undefined-reference-to-random_get_bytes.patch b/net-wireless/wpa_supplicant/files/wpa_supplicant-2.4-fix-undefined-reference-to-random_get_bytes.patch deleted file mode 100644 index def43a2ae314..000000000000 --- a/net-wireless/wpa_supplicant/files/wpa_supplicant-2.4-fix-undefined-reference-to-random_get_bytes.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -Naur a/src/eap_peer/Makefile b/src/eap_peer/Makefile ---- a/src/eap_peer/Makefile 2013-05-17 09:51:55.000000000 +0000 -+++ b/src/eap_peer/Makefile 2013-05-17 09:54:03.010830904 +0000 -@@ -36,6 +36,7 @@ - OBJS_both += ../utils/wpa_debug.o - OBJS_both += ../utils/base64.o - OBJS_both += ../utils/wpabuf.o -+OBJS_both += ../utils/eloop.o - OBJS_both += ../crypto/md5.o - ifneq ($(CONFIG_TLS), openssl) - OBJS_both += ../crypto/sha1.o -@@ -48,6 +49,7 @@ - OBJS_both += ../crypto/aes-omac1.o - OBJS_both += ../crypto/ms_funcs.o - OBJS_both += ../crypto/sha256.o -+OBJS_both += ../crypto/random.o - - - OBJS_both += ../eap_common/eap_peap_common.o diff --git a/net-wireless/wpa_supplicant/files/wpa_supplicant-2.4-generate-libeap-peer.patch b/net-wireless/wpa_supplicant/files/wpa_supplicant-2.4-generate-libeap-peer.patch index 391338b302cd..e66d5d4a2399 100644 --- a/net-wireless/wpa_supplicant/files/wpa_supplicant-2.4-generate-libeap-peer.patch +++ b/net-wireless/wpa_supplicant/files/wpa_supplicant-2.4-generate-libeap-peer.patch @@ -1,156 +1,7 @@ -diff -Naurp a/src/eap_peer/eap_methods.c b/src/eap_peer/eap_methods.c ---- a/src/eap_peer/eap_methods.c 2012-05-15 08:23:17.151386999 +0000 -+++ b/src/eap_peer/eap_methods.c 2012-05-15 08:23:57.403389760 +0000 -@@ -342,6 +342,120 @@ int eap_peer_method_register(struct eap_ - - - /** -+ * eap_peer_register_methods - Register all known EAP peer methods -+ * -+ * This function is called at program start to register all compiled -+ * in EAP peer methods. -+ */ -+int eap_peer_register_methods(void) -+{ -+ int ret = 0; -+ -+#ifdef EAP_MD5 -+ if (ret == 0) -+ ret = eap_peer_md5_register(); -+#endif /* EAP_MD5 */ -+ -+#ifdef EAP_TLS -+ if (ret == 0) -+ ret = eap_peer_tls_register(); -+#endif /* EAP_TLS */ -+ -+#ifdef EAP_MSCHAPv2 -+ if (ret == 0) -+ ret = eap_peer_mschapv2_register(); -+#endif /* EAP_MSCHAPv2 */ -+ -+#ifdef EAP_PEAP -+ if (ret == 0) -+ ret = eap_peer_peap_register(); -+#endif /* EAP_PEAP */ -+ -+#ifdef EAP_TTLS -+ if (ret == 0) -+ ret = eap_peer_ttls_register(); -+#endif /* EAP_TTLS */ -+ -+#ifdef EAP_GTC -+ if (ret == 0) -+ ret = eap_peer_gtc_register(); -+#endif /* EAP_GTC */ -+ -+#ifdef EAP_OTP -+ if (ret == 0) -+ ret = eap_peer_otp_register(); -+#endif /* EAP_OTP */ -+ -+#ifdef EAP_SIM -+ if (ret == 0) -+ ret = eap_peer_sim_register(); -+#endif /* EAP_SIM */ -+ -+#ifdef EAP_LEAP -+ if (ret == 0) -+ ret = eap_peer_leap_register(); -+#endif /* EAP_LEAP */ -+ -+#ifdef EAP_PSK -+ if (ret == 0) -+ ret = eap_peer_psk_register(); -+#endif /* EAP_PSK */ -+ -+#ifdef EAP_AKA -+ if (ret == 0) -+ ret = eap_peer_aka_register(); -+#endif /* EAP_AKA */ -+ -+#ifdef EAP_AKA_PRIME -+ if (ret == 0) -+ ret = eap_peer_aka_prime_register(); -+#endif /* EAP_AKA_PRIME */ -+ -+#ifdef EAP_FAST -+ if (ret == 0) -+ ret = eap_peer_fast_register(); -+#endif /* EAP_FAST */ -+ -+#ifdef EAP_PAX -+ if (ret == 0) -+ ret = eap_peer_pax_register(); -+#endif /* EAP_PAX */ -+ -+#ifdef EAP_SAKE -+ if (ret == 0) -+ ret = eap_peer_sake_register(); -+#endif /* EAP_SAKE */ -+ -+#ifdef EAP_GPSK -+ if (ret == 0) -+ ret = eap_peer_gpsk_register(); -+#endif /* EAP_GPSK */ -+ -+#ifdef EAP_WSC -+ if (ret == 0) -+ ret = eap_peer_wsc_register(); -+#endif /* EAP_WSC */ -+ -+#ifdef EAP_IKEV2 -+ if (ret == 0) -+ ret = eap_peer_ikev2_register(); -+#endif /* EAP_IKEV2 */ -+ -+#ifdef EAP_VENDOR_TEST -+ if (ret == 0) -+ ret = eap_peer_vendor_test_register(); -+#endif /* EAP_VENDOR_TEST */ -+ -+#ifdef EAP_TNC -+ if (ret == 0) -+ ret = eap_peer_tnc_register(); -+#endif /* EAP_TNC */ -+ -+ return ret; -+} -+ -+ -+/** - * eap_peer_unregister_methods - Unregister EAP peer methods - * - * This function is called at program termination to unregister all EAP peer -diff -Naurp a/src/eap_peer/eap_methods.h b/src/eap_peer/eap_methods.h ---- a/src/eap_peer/eap_methods.h 2012-05-15 08:23:17.151386999 +0000 -+++ b/src/eap_peer/eap_methods.h 2012-05-15 08:23:57.404389735 +0000 -@@ -32,6 +32,7 @@ EapType eap_peer_get_type(const char *na - const char * eap_get_name(int vendor, EapType type); - size_t eap_get_names(char *buf, size_t buflen); - char ** eap_get_names_as_string_array(size_t *num); -+int eap_peer_register_methods(void); - void eap_peer_unregister_methods(void); - - #else /* IEEE8021X_EAPOL */ -diff -Naurp a/src/eap_peer/libeap0.pc b/src/eap_peer/libeap0.pc ---- a/src/eap_peer/libeap0.pc 1970-01-01 00:00:00.000000000 +0000 -+++ b/src/eap_peer/libeap0.pc 2012-05-15 08:23:57.404389735 +0000 -@@ -0,0 +1,10 @@ -+prefix=/usr -+exec_prefix=/usr -+libdir=${exec_prefix}/lib -+includedir=${prefix}/include/eap_peer -+ -+Name: libeap0 -+Description: EAP Peer Library API -+Version: 0.7.2 -+Libs: -L${libdir} -leap -+Cflags: -I${includedir} -diff -Naurp a/src/eap_peer/Makefile b/src/eap_peer/Makefile ---- a/src/eap_peer/Makefile 2012-05-15 08:23:17.152386964 +0000 -+++ b/src/eap_peer/Makefile 2012-05-15 08:23:57.403389760 +0000 -@@ -1,11 +1,188 @@ +diff -ur a/wpa_supplicant-2.4/src/eap_peer/Makefile b/wpa_supplicant-2.4/src/eap_peer/Makefile +--- a/wpa_supplicant-2.4/src/eap_peer/Makefile 2015-03-15 19:30:39.000000000 -0200 ++++ b/wpa_supplicant-2.4/src/eap_peer/Makefile 2015-04-26 14:40:49.987453098 -0200 +@@ -1,11 +1,192 @@ -all: - @echo Nothing to be made. +LIBEAP_NAME = libeap @@ -191,18 +42,22 @@ diff -Naurp a/src/eap_peer/Makefile b/src/eap_peer/Makefile +OBJS_both += ../utils/wpa_debug.o +OBJS_both += ../utils/base64.o +OBJS_both += ../utils/wpabuf.o -+OBJS_both += ../crypto/md5.o ++OBJS_both += ../utils/eloop.o +ifneq ($(CONFIG_TLS), openssl) ++OBJS_both += ../crypto/md5.o +OBJS_both += ../crypto/sha1.o +endif +OBJS_both += ../crypto/sha1-tlsprf.o +OBJS_both += ../crypto/aes-encblock.o ++ifneq ($(CONFIG_TLS), openssl) +OBJS_both += ../crypto/aes-wrap.o ++endif +OBJS_both += ../crypto/aes-ctr.o +OBJS_both += ../crypto/aes-eax.o +OBJS_both += ../crypto/aes-omac1.o +OBJS_both += ../crypto/ms_funcs.o +OBJS_both += ../crypto/sha256.o ++OBJS_both += ../crypto/random.o + + +OBJS_both += ../eap_common/eap_peap_common.o @@ -347,3 +202,141 @@ diff -Naurp a/src/eap_peer/Makefile b/src/eap_peer/Makefile - install -d $(DESTDIR)$(LIBDIR)/wpa_supplicant && \ - cp *.so $(DESTDIR)$(LIBDIR)/wpa_supplicant \ - ; fi +diff -ur a/wpa_supplicant-2.4/src/eap_peer/eap_methods.c b/wpa_supplicant-2.4/src/eap_peer/eap_methods.c +--- a/wpa_supplicant-2.4/src/eap_peer/eap_methods.c 2015-03-15 19:30:39.000000000 -0200 ++++ b/wpa_supplicant-2.4/src/eap_peer/eap_methods.c 2015-04-26 14:39:58.247099942 -0200 +@@ -336,6 +336,120 @@ + + + /** ++ * eap_peer_register_methods - Register all known EAP peer methods ++ * ++ * This function is called at program start to register all compiled ++ * in EAP peer methods. ++ */ ++int eap_peer_register_methods(void) ++{ ++ int ret = 0; ++ ++#ifdef EAP_MD5 ++ if (ret == 0) ++ ret = eap_peer_md5_register(); ++#endif /* EAP_MD5 */ ++ ++#ifdef EAP_TLS ++ if (ret == 0) ++ ret = eap_peer_tls_register(); ++#endif /* EAP_TLS */ ++ ++#ifdef EAP_MSCHAPv2 ++ if (ret == 0) ++ ret = eap_peer_mschapv2_register(); ++#endif /* EAP_MSCHAPv2 */ ++ ++#ifdef EAP_PEAP ++ if (ret == 0) ++ ret = eap_peer_peap_register(); ++#endif /* EAP_PEAP */ ++ ++#ifdef EAP_TTLS ++ if (ret == 0) ++ ret = eap_peer_ttls_register(); ++#endif /* EAP_TTLS */ ++ ++#ifdef EAP_GTC ++ if (ret == 0) ++ ret = eap_peer_gtc_register(); ++#endif /* EAP_GTC */ ++ ++#ifdef EAP_OTP ++ if (ret == 0) ++ ret = eap_peer_otp_register(); ++#endif /* EAP_OTP */ ++ ++#ifdef EAP_SIM ++ if (ret == 0) ++ ret = eap_peer_sim_register(); ++#endif /* EAP_SIM */ ++ ++#ifdef EAP_LEAP ++ if (ret == 0) ++ ret = eap_peer_leap_register(); ++#endif /* EAP_LEAP */ ++ ++#ifdef EAP_PSK ++ if (ret == 0) ++ ret = eap_peer_psk_register(); ++#endif /* EAP_PSK */ ++ ++#ifdef EAP_AKA ++ if (ret == 0) ++ ret = eap_peer_aka_register(); ++#endif /* EAP_AKA */ ++ ++#ifdef EAP_AKA_PRIME ++ if (ret == 0) ++ ret = eap_peer_aka_prime_register(); ++#endif /* EAP_AKA_PRIME */ ++ ++#ifdef EAP_FAST ++ if (ret == 0) ++ ret = eap_peer_fast_register(); ++#endif /* EAP_FAST */ ++ ++#ifdef EAP_PAX ++ if (ret == 0) ++ ret = eap_peer_pax_register(); ++#endif /* EAP_PAX */ ++ ++#ifdef EAP_SAKE ++ if (ret == 0) ++ ret = eap_peer_sake_register(); ++#endif /* EAP_SAKE */ ++ ++#ifdef EAP_GPSK ++ if (ret == 0) ++ ret = eap_peer_gpsk_register(); ++#endif /* EAP_GPSK */ ++ ++#ifdef EAP_WSC ++ if (ret == 0) ++ ret = eap_peer_wsc_register(); ++#endif /* EAP_WSC */ ++ ++#ifdef EAP_IKEV2 ++ if (ret == 0) ++ ret = eap_peer_ikev2_register(); ++#endif /* EAP_IKEV2 */ ++ ++#ifdef EAP_VENDOR_TEST ++ if (ret == 0) ++ ret = eap_peer_vendor_test_register(); ++#endif /* EAP_VENDOR_TEST */ ++ ++#ifdef EAP_TNC ++ if (ret == 0) ++ ret = eap_peer_tnc_register(); ++#endif /* EAP_TNC */ ++ ++ return ret; ++} ++ ++ ++/** + * eap_peer_unregister_methods - Unregister EAP peer methods + * + * This function is called at program termination to unregister all EAP peer +Only in b/wpa_supplicant-2.4/src/eap_peer: eap_methods.c.orig +diff -ur a/wpa_supplicant-2.4/src/eap_peer/eap_methods.h b/wpa_supplicant-2.4/src/eap_peer/eap_methods.h +--- a/wpa_supplicant-2.4/src/eap_peer/eap_methods.h 2015-03-15 19:30:39.000000000 -0200 ++++ b/wpa_supplicant-2.4/src/eap_peer/eap_methods.h 2015-04-26 14:39:58.248099929 -0200 +@@ -26,6 +26,7 @@ + const char * eap_get_name(int vendor, EapType type); + size_t eap_get_names(char *buf, size_t buflen); + char ** eap_get_names_as_string_array(size_t *num); ++int eap_peer_register_methods(void); + void eap_peer_unregister_methods(void); + + #else /* IEEE8021X_EAPOL */ +Only in b/wpa_supplicant-2.4/src/eap_peer: eap_methods.h.orig +Only in b/wpa_supplicant-2.4/src/eap_peer: libeap0.pc diff --git a/net-wireless/wpa_supplicant/wpa_supplicant-2.4-r2.ebuild b/net-wireless/wpa_supplicant/wpa_supplicant-2.4-r2.ebuild new file mode 100644 index 000000000000..3f7c873281ed --- /dev/null +++ b/net-wireless/wpa_supplicant/wpa_supplicant-2.4-r2.ebuild @@ -0,0 +1,382 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/wpa_supplicant-2.4-r2.ebuild,v 1.1 2015/05/08 17:58:51 gurligebis Exp $ + +EAPI=5 + +inherit eutils toolchain-funcs qt4-r2 systemd multilib + +DESCRIPTION="IEEE 802.1X/WPA supplicant for secure wireless transfers" +HOMEPAGE="http://hostap.epitest.fi/wpa_supplicant/" +SRC_URI="http://hostap.epitest.fi/releases/${P}.tar.gz" +LICENSE="|| ( GPL-2 BSD )" + +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="ap dbus gnutls eap-sim fasteap +hs2-0 p2p ps3 qt4 readline selinux smartcard ssl tdls uncommon-eap-types wimax wps kernel_linux kernel_FreeBSD" +REQUIRED_USE="fasteap? ( !gnutls !ssl ) smartcard? ( ssl )" + +CDEPEND="dbus? ( sys-apps/dbus ) + kernel_linux? ( + eap-sim? ( sys-apps/pcsc-lite ) + dev-libs/libnl:3 + net-wireless/crda + ) + !kernel_linux? ( net-libs/libpcap ) + qt4? ( + dev-qt/qtcore:4 + dev-qt/qtgui:4 + dev-qt/qtsvg:4 + ) + readline? ( + sys-libs/ncurses + sys-libs/readline:0 + ) + ssl? ( dev-libs/openssl:0 ) + !ssl? ( gnutls? ( net-libs/gnutls ) ) + !ssl? ( !gnutls? ( dev-libs/libtommath ) ) +" +DEPEND="${CDEPEND} + virtual/pkgconfig +" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-networkmanager ) +" + +S="${WORKDIR}/${P}/${PN}" + +Kconfig_style_config() { + #param 1 is CONFIG_* item + #param 2 is what to set it = to, defaulting in y + CONFIG_PARAM="${CONFIG_HEADER:-CONFIG_}$1" + setting="${2:-y}" + + if [ ! $setting = n ]; then + #first remove any leading "# " if $2 is not n + sed -i "/^# *$CONFIG_PARAM=/s/^# *//" .config || echo "Kconfig_style_config error uncommenting $CONFIG_PARAM" + #set item = $setting (defaulting to y) + sed -i "/^$CONFIG_PARAM/s/=.*/=$setting/" .config || echo "Kconfig_style_config error setting $CONFIG_PARAM=$setting" + else + #ensure item commented out + sed -i "/^$CONFIG_PARAM/s/$CONFIG_PARAM/# $CONFIG_PARAM/" .config || echo "Kconfig_style_config error commenting $CONFIG_PARAM" + fi +} + +pkg_setup() { + if use gnutls && use ssl ; then + elog "You have both 'gnutls' and 'ssl' USE flags enabled: defaulting to USE=\"ssl\"" + fi +} + +src_prepare() { + # net/bpf.h needed for net-libs/libpcap on Gentoo/FreeBSD + sed -i \ + -e "s:\(#include <pcap\.h>\):#include <net/bpf.h>\n\1:" \ + ../src/l2_packet/l2_packet_freebsd.c || die + + # People seem to take the example configuration file too literally (bug #102361) + sed -i \ + -e "s:^\(opensc_engine_path\):#\1:" \ + -e "s:^\(pkcs11_engine_path\):#\1:" \ + -e "s:^\(pkcs11_module_path\):#\1:" \ + wpa_supplicant.conf || die + + # Change configuration to match Gentoo locations (bug #143750) + sed -i \ + -e "s:/usr/lib/opensc:/usr/$(get_libdir):" \ + -e "s:/usr/lib/pkcs11:/usr/$(get_libdir):" \ + wpa_supplicant.conf || die + + if use dbus; then + epatch "${FILESDIR}/${P}-dbus-path-fix.patch" + fi + + # systemd entries to D-Bus service files (bug #372877) + echo 'SystemdService=wpa_supplicant.service' \ + | tee -a dbus/*.service >/dev/null || die + + cd "${WORKDIR}/${P}" + + if use wimax; then + # generate-libeap-peer.patch comes before + # fix-undefined-reference-to-random_get_bytes.patch + epatch "${FILESDIR}/${P}-generate-libeap-peer.patch" + + # multilib-strict fix (bug #373685) + sed -e "s/\/usr\/lib/\/usr\/$(get_libdir)/" -i src/eap_peer/Makefile + fi + + # bug (548742) + epatch "${FILESDIR}/2015-4/0001-EAP-pwd-peer-Fix-payload-length-validation-for-Commi.patch" + epatch "${FILESDIR}/2015-4/0002-EAP-pwd-server-Fix-payload-length-validation-for-Com.patch" + epatch "${FILESDIR}/2015-4/0003-EAP-pwd-peer-Fix-Total-Length-parsing-for-fragment-r.patch" + epatch "${FILESDIR}/2015-4/0004-EAP-pwd-server-Fix-Total-Length-parsing-for-fragment.patch" + epatch "${FILESDIR}/2015-4/0005-EAP-pwd-peer-Fix-asymmetric-fragmentation-behavior.patch" + + # bug (320097) + epatch "${FILESDIR}/${P}-do-not-call-dbus-functions-with-NULL-path.patch" + + # TODO - NEED TESTING TO SEE IF STILL NEEDED, NOT COMPATIBLE WITH 1.0 OUT OF THE BOX, + # SO WOULD BE NICE TO JUST DROP IT, IF IT IS NOT NEEDED. + # bug (374089) + #epatch "${FILESDIR}/${P}-dbus-WPAIE-fix.patch" + + epatch "${FILESDIR}"/wpa_supplicant-2.4-cve-2015-1863.patch +} + +src_configure() { + # Toolchain setup + tc-export CC + + cp defconfig .config + + # Basic setup + Kconfig_style_config CTRL_IFACE + Kconfig_style_config BACKEND file + Kconfig_style_config IBSS_RSN + Kconfig_style_config IEEE80211W + Kconfig_style_config IEEE80211R + + # Basic authentication methods + # NOTE: we don't set GPSK or SAKE as they conflict + # with the below options + Kconfig_style_config EAP_GTC + Kconfig_style_config EAP_MD5 + Kconfig_style_config EAP_OTP + Kconfig_style_config EAP_PAX + Kconfig_style_config EAP_PSK + Kconfig_style_config EAP_TLV + Kconfig_style_config EAP_EXE + Kconfig_style_config IEEE8021X_EAPOL + Kconfig_style_config PKCS12 + Kconfig_style_config PEERKEY + Kconfig_style_config EAP_LEAP + Kconfig_style_config EAP_MSCHAPV2 + Kconfig_style_config EAP_PEAP + Kconfig_style_config EAP_TLS + Kconfig_style_config EAP_TTLS + + # Enabling background scanning. + Kconfig_style_config BGSCAN_SIMPLE + Kconfig_style_config BGSCAN_LEARN + + if use dbus ; then + Kconfig_style_config CTRL_IFACE_DBUS + Kconfig_style_config CTRL_IFACE_DBUS_NEW + Kconfig_style_config CTRL_IFACE_DBUS_INTRO + fi + + # Enable support for writing debug info to a log file and syslog. + Kconfig_style_config DEBUG_FILE + Kconfig_style_config DEBUG_SYSLOG + + if use hs2-0 ; then + Kconfig_style_config INTERWORKING + Kconfig_style_config HS20 + fi + + if use uncommon-eap-types; then + Kconfig_style_config EAP_GPSK + Kconfig_style_config EAP_SAKE + Kconfig_style_config EAP_GPSK_SHA256 + Kconfig_style_config EAP_IKEV2 + Kconfig_style_config EAP_EKE + fi + + if use eap-sim ; then + # Smart card authentication + Kconfig_style_config EAP_SIM + Kconfig_style_config EAP_AKA + Kconfig_style_config EAP_AKA_PRIME + Kconfig_style_config PCSC + fi + + if use fasteap ; then + Kconfig_style_config EAP_FAST + fi + + if use readline ; then + # readline/history support for wpa_cli + Kconfig_style_config READLINE + else + #internal line edit mode for wpa_cli + Kconfig_style_config WPA_CLI_EDIT + fi + + # SSL authentication methods + if use ssl ; then + Kconfig_style_config TLS openssl + elif use gnutls ; then + Kconfig_style_config TLS gnutls + Kconfig_style_config GNUTLS_EXTRA + else + Kconfig_style_config TLS internal + fi + + if use smartcard ; then + Kconfig_style_config SMARTCARD + fi + + if use tdls ; then + Kconfig_style_config TDLS + fi + + if use kernel_linux ; then + # Linux specific drivers + Kconfig_style_config DRIVER_ATMEL + Kconfig_style_config DRIVER_HOSTAP + Kconfig_style_config DRIVER_IPW + Kconfig_style_config DRIVER_NL80211 + Kconfig_style_config DRIVER_RALINK + Kconfig_style_config DRIVER_WEXT + Kconfig_style_config DRIVER_WIRED + + if use ps3 ; then + Kconfig_style_config DRIVER_PS3 + fi + + elif use kernel_FreeBSD ; then + # FreeBSD specific driver + Kconfig_style_config DRIVER_BSD + fi + + # Wi-Fi Protected Setup (WPS) + if use wps ; then + Kconfig_style_config WPS + Kconfig_style_config WPS2 + # USB Flash Drive + Kconfig_style_config WPS_UFD + # External Registrar + Kconfig_style_config WPS_ER + # Universal Plug'n'Play + Kconfig_style_config WPS_UPNP + # Near Field Communication + Kconfig_style_config WPS_NFC + fi + + # Wi-Fi Direct (WiDi) + if use p2p ; then + Kconfig_style_config P2P + Kconfig_style_config WIFI_DISPLAY + fi + + # Access Point Mode + if use ap ; then + Kconfig_style_config AP + fi + + # Enable mitigation against certain attacks against TKIP + Kconfig_style_config DELAYED_MIC_ERROR_REPORT + + # If we are using libnl 2.0 and above, enable support for it + # Bug 382159 + # Removed for now, since the 3.2 version is broken, and we don't + # support it. + if has_version ">=dev-libs/libnl-3.2"; then + Kconfig_style_config LIBNL32 + fi + + if use qt4 ; then + pushd "${S}"/wpa_gui-qt4 > /dev/null + eqmake4 wpa_gui.pro + popd > /dev/null + fi +} + +src_compile() { + einfo "Building wpa_supplicant" + emake V=1 BINDIR=/usr/sbin + + if use wimax; then + emake -C ../src/eap_peer clean + emake -C ../src/eap_peer + fi + + if use qt4 ; then + pushd "${S}"/wpa_gui-qt4 > /dev/null + einfo "Building wpa_gui" + emake + popd > /dev/null + fi +} + +src_install() { + dosbin wpa_supplicant + dobin wpa_cli wpa_passphrase + + # baselayout-1 compat + if has_version "<sys-apps/baselayout-2.0.0"; then + dodir /sbin + dosym /usr/sbin/wpa_supplicant /sbin/wpa_supplicant + dodir /bin + dosym /usr/bin/wpa_cli /bin/wpa_cli + fi + + if has_version ">=sys-apps/openrc-0.5.0"; then + newinitd "${FILESDIR}/${PN}-init.d" wpa_supplicant + newconfd "${FILESDIR}/${PN}-conf.d" wpa_supplicant + fi + + exeinto /etc/wpa_supplicant/ + newexe "${FILESDIR}/wpa_cli.sh" wpa_cli.sh + + dodoc ChangeLog {eap_testing,todo}.txt README{,-WPS} \ + wpa_supplicant.conf + + newdoc .config build-config + + doman doc/docbook/*.{5,8} + + if use qt4 ; then + into /usr + dobin wpa_gui-qt4/wpa_gui + doicon wpa_gui-qt4/icons/wpa_gui.svg + make_desktop_entry wpa_gui "WPA Supplicant Administration GUI" "wpa_gui" "Qt;Network;" + fi + + use wimax && emake DESTDIR="${D}" -C ../src/eap_peer install + + if use dbus ; then + pushd "${S}"/dbus > /dev/null + insinto /etc/dbus-1/system.d + newins dbus-wpa_supplicant.conf wpa_supplicant.conf + insinto /usr/share/dbus-1/system-services + doins fi.epitest.hostap.WPASupplicant.service fi.w1.wpa_supplicant1.service + popd > /dev/null + + # This unit relies on dbus support, bug 538600. + systemd_dounit systemd/wpa_supplicant.service + fi + + systemd_dounit "systemd/wpa_supplicant@.service" + systemd_dounit "systemd/wpa_supplicant-nl80211@.service" + systemd_dounit "systemd/wpa_supplicant-wired@.service" +} + +pkg_postinst() { + elog "If this is a clean installation of wpa_supplicant, you" + elog "have to create a configuration file named" + elog "/etc/wpa_supplicant/wpa_supplicant.conf" + elog + elog "An example configuration file is available for reference in" + elog "/usr/share/doc/${PF}/" + + if [[ -e ${ROOT}etc/wpa_supplicant.conf ]] ; then + echo + ewarn "WARNING: your old configuration file ${ROOT}etc/wpa_supplicant.conf" + ewarn "needs to be moved to ${ROOT}etc/wpa_supplicant/wpa_supplicant.conf" + fi + + # Mea culpa, feel free to remove that after some time --mgorny. + local fn + for fn in wpa_supplicant{,@wlan0}.service; do + if [[ -e "${ROOT}"/etc/systemd/system/network.target.wants/${fn} ]] + then + ebegin "Moving ${fn} to multi-user.target" + mv "${ROOT}"/etc/systemd/system/network.target.wants/${fn} \ + "${ROOT}"/etc/systemd/system/multi-user.target.wants/ + eend ${?} \ + "Please try to re-enable ${fn}" + fi + done +} |