forked from 0x90/wifi-arsenal
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git subrepo clone https://github.com/CTU-IIG/802.11p-wireless-regdb 8…
…02.11p-wireless-regdb subrepo: subdir: "802.11p-wireless-regdb" merged: "74149ca" upstream: origin: "https://github.com/CTU-IIG/802.11p-wireless-regdb" branch: "master" commit: "74149ca" git-subrepo: version: "0.2.0" origin: "https://github.com/ingydotnet/git-subrepo" commit: "5c38bbc"
- Loading branch information
Showing
20 changed files
with
1,841 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
key.priv.pem | ||
dbparse.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
; DO NOT EDIT (unless you know what you are doing) | ||
; | ||
; This subdirectory is a git "subrepo", and this file is maintained by the | ||
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme | ||
; | ||
[subrepo] | ||
remote = https://github.com/CTU-IIG/802.11p-wireless-regdb | ||
branch = master | ||
commit = 74149ca236121fafba3c28e779c735b7ec13c20a | ||
parent = 763291f0487e47c60c9a607ec3809bc2ddaa3104 | ||
cmdver = 0.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Copyright (c) 2008, Luis R. Rodriguez <[email protected]> | ||
Copyright (c) 2008, Johannes Berg <[email protected]> | ||
Copyright (c) 2008, Michael Green <[email protected]> | ||
|
||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted, provided that the above | ||
copyright notice and this permission notice appear in all copies. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
# Install prefix | ||
PREFIX ?= /usr | ||
CRDA_PATH ?= $(PREFIX)/lib/crda | ||
CRDA_KEY_PATH ?= $(CRDA_PATH)/pubkeys | ||
|
||
MANDIR ?= $(PREFIX)/share/man/ | ||
|
||
SHA1SUM ?= /usr/bin/sha1sum | ||
LSB_RELEASE ?= /usr/bin/lsb_release | ||
WHOAMI ?= /usr/bin/whoami | ||
|
||
# Distro name: Ubuntu, Debian, Fedora, if not present you get | ||
# "custom-distro", if your distribution does not have the LSB stuff, | ||
# then set this variable when calling make if you don't want "custom-distro" | ||
LSB_ID ?= $(shell if [ -f $(LSB_RELEASE) ]; then \ | ||
$(LSB_RELEASE) -i -s; \ | ||
else \ | ||
echo custom-distro; \ | ||
fi) | ||
|
||
DISTRO_PRIVKEY ?= ~/.wireless-regdb-$(LSB_ID).key.priv.pem | ||
DISTRO_PUBKEY ?= ~/.wireless-regdb-$(LSB_ID).key.priv.pem | ||
|
||
REGDB_AUTHOR ?= $(shell if [ -f $(DISTRO_PRIVKEY) ]; then \ | ||
echo $(LSB_ID) ; \ | ||
elif [ -f $(WHOAMI) ]; then \ | ||
$(WHOAMI); \ | ||
else \ | ||
echo custom-user; \ | ||
fi) | ||
|
||
REGDB_PRIVKEY ?= ~/.wireless-regdb-$(REGDB_AUTHOR).key.priv.pem | ||
REGDB_PUBKEY ?= $(REGDB_AUTHOR).key.pub.pem | ||
|
||
REGDB_UPSTREAM_PUBKEY ?= linville.key.pub.pem | ||
|
||
REGDB_CHANGED = $(shell $(SHA1SUM) -c --status sha1sum.txt >/dev/null 2>&1; \ | ||
if [ $$? -ne 0 ]; then \ | ||
echo maintainer-clean $(REGDB_PUBKEY); \ | ||
fi) | ||
|
||
.PHONY: all clean mrproper install maintainer-clean install-distro-key | ||
|
||
all: $(REGDB_CHANGED) regulatory.bin sha1sum.txt | ||
|
||
clean: | ||
@rm -f *.pyc *.gz | ||
|
||
maintainer-clean: clean | ||
@rm -f regulatory.bin | ||
|
||
mrproper: clean maintainer-clean | ||
@echo Removed public key, regulatory.bin and compresed man pages | ||
@rm -f $(REGDB_PUBKEY) .custom | ||
|
||
regulatory.bin: db.txt $(REGDB_PRIVKEY) $(REGDB_PUBKEY) | ||
@echo Generating $@ digitally signed by $(REGDB_AUTHOR)... | ||
./db2bin.py regulatory.bin db.txt $(REGDB_PRIVKEY) | ||
|
||
sha1sum.txt: db.txt | ||
sha1sum $< > $@ | ||
|
||
$(REGDB_PUBKEY): $(REGDB_PRIVKEY) | ||
@echo "Generating public key for $(REGDB_AUTHOR)..." | ||
openssl rsa -in $(REGDB_PRIVKEY) -out $(REGDB_PUBKEY) -pubout -outform PEM | ||
@echo $(REGDB_PUBKEY) > .custom | ||
|
||
|
||
$(REGDB_PRIVKEY): | ||
@echo "Generating private key for $(REGDB_AUTHOR)..." | ||
openssl genrsa -out $(REGDB_PRIVKEY) 2048 | ||
|
||
ifneq ($(shell test -e $(DISTRO_PRIVKEY) && echo yes),yes) | ||
$(DISTRO_PRIVKEY): | ||
@echo "Generating private key for $(LSB_ID) packager..." | ||
openssl genrsa -out $(DISTRO_PRIVKEY) 2048 | ||
endif | ||
|
||
install-distro-key: maintainer-clean $(DISTRO_PRIVKEY) | ||
|
||
%.gz: % | ||
gzip < $< > $@ | ||
|
||
# Users should just do: | ||
# sudo make install | ||
# | ||
# Developers should do: | ||
# make maintainer-clean | ||
# make | ||
# sudo make install | ||
# | ||
# Distributions packagers should do only once: | ||
# make install-distro-key | ||
# This will create a private key for you and install it into | ||
# ~/.wireless-regdb-$(LSB_ID).key.priv.pem | ||
# To make new releaes just do: | ||
# make maintainer-clean | ||
# make | ||
# sudo make install | ||
install: regulatory.bin.5.gz | ||
install -m 755 -d $(DESTDIR)/$(CRDA_PATH) | ||
install -m 755 -d $(DESTDIR)/$(CRDA_KEY_PATH) | ||
if [ -f .custom ]; then \ | ||
install -m 644 -t $(DESTDIR)/$(CRDA_KEY_PATH)/ $(shell cat .custom); \ | ||
fi | ||
@# In linville we trust | ||
install -m 644 -t $(DESTDIR)/$(CRDA_KEY_PATH)/ $(REGDB_UPSTREAM_PUBKEY) | ||
install -m 644 -t $(DESTDIR)/$(CRDA_PATH)/ regulatory.bin | ||
install -m 755 -d $(DESTDIR)/$(MANDIR)/man5/ | ||
install -m 644 -t $(DESTDIR)/$(MANDIR)/man5/ regulatory.bin.5.gz | ||
|
||
uninstall: | ||
rm -rf $(DESTDIR)/$(CRDA_PATH)/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
This repository contains the plain text version of the regulatory | ||
database file I maintain for use with Central Regulatory Database | ||
Agent daemon. Also included is the compiled binary version of this | ||
file signed with my RSA key. This represents a good faith attempt | ||
to capture regulatory information that is correct at the time of its last | ||
modification. This information is provided to you with no warranty | ||
either expressed or implied. | ||
|
||
Also included are the tools used to compile and sign the regulatory.bin | ||
file as well as a MoinMoin macro used for viewing the database. | ||
|
||
TECHNICAL INFORMATION | ||
======================= | ||
|
||
The regulatory information in `db.txt' is stored in a human-readable | ||
format which can be read using the `dbparse.py' python module. This | ||
python module is used by the web viewer (Regulatory.py) which is | ||
implemented as a MoinMoin macro (and used on http://wireless.kernel.org) | ||
to allow viewing the database for verification. | ||
|
||
The dbparse module is also used by db2bin.py, the `compiler', which | ||
compiles and signs the binary database. | ||
|
||
For more information, please see the CRDA git repository: | ||
|
||
git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/crda.git | ||
|
||
John W. Linville | ||
17 November 2008 |
Oops, something went wrong.