summaryrefslogtreecommitdiff
path: root/net-wireless/crda
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-09-23 10:22:15 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-09-23 10:22:15 +0100
commit8b4ace9c50842c5b83401ea7b179dcab940387e1 (patch)
tree230f3135ceaace633cf93e9838b185c4a6664c2e /net-wireless/crda
parent9ee6d97c2883d42f204a533a8bc1f4562df778fb (diff)
gentoo resync : 23.09.2020
Diffstat (limited to 'net-wireless/crda')
-rw-r--r--net-wireless/crda/Manifest3
-rw-r--r--net-wireless/crda/crda-3.18-r3.ebuild83
-rw-r--r--net-wireless/crda/files/crda-3.18-openssl-1.1.0-compatibility.patch315
3 files changed, 0 insertions, 401 deletions
diff --git a/net-wireless/crda/Manifest b/net-wireless/crda/Manifest
index a7f6e1e1ea50..3116a970d473 100644
--- a/net-wireless/crda/Manifest
+++ b/net-wireless/crda/Manifest
@@ -1,4 +1,3 @@
-AUX crda-3.18-openssl-1.1.0-compatibility.patch 8782 BLAKE2B 7906eedd86aca173199ec957516167cf940d41da668cc7c5b5935232984f88960c1e00c87dfcd03c7d068cdb9168525378c46e1c52b28a9714d14cddce9240df SHA512 417a67139f61c467cd13274d0e6ad1542107dbb00765beed5becccdb64ac0228236498241e1fba9dfd4a5e1acb04ee583c435b699cca9b6a6461e5b7e86328cb
AUX crda-4.14-do-not-compress-doc.patch 1367 BLAKE2B 021a25a898dc225e52bee293ba94152e5f7e8229c5c0a813a126f239819fd727edfa34c9b85f25e31d7630c13598f797dfcd855d31fd28beec5443866f3841fb SHA512 d3545fff1f6c6ae9ae1ae9c833bb137f84783a32dfb9e2f50075079268f67ee1b001fc904d99c68ff0aad97d674fabd591c1ca2ba378e14551759e56bc3f2e45
AUX crda-4.14-openssl-1.1.0-compatibility.patch 8821 BLAKE2B 3f679378829d2d39fcac69a111d1caa551cb1b5ee51c34aab48fa3a84847fcb98771126856bc95b6af4462539fed1987682a4528cbc47a17ab03a14b23a3b8fe SHA512 9203965c228bfc7f694380e727ceee0654b18b8da81d49c5d9d379d94087d8f6e972894034c2245086366832d181b7d69180bada5199baff1c90b2012248fc15
AUX crda-4.14-python-3.patch 3022 BLAKE2B b6d78c1a09ec0f848654139e0ba778f5d65d814b9d7c84df3013aec43baf55f9c23367b15454218e39d3a0959355b4fd030dd4584b7420f6835a8ef421dd72c9 SHA512 b953be9da2ed770d89c905257c2e3f04451ce9ee2a61ee9cc18285b3d8209f8665f5f0a2a4ffb8a5211445cb45fe66dc4e3d302e90c4c0030c293c978dd443c6
@@ -8,8 +7,6 @@ AUX crda-libreg-link.patch 908 BLAKE2B 60d9307ba43235cbce089835ae7406313b9f68a90
AUX crda-libressl.patch 410 BLAKE2B c341e349348eb7ce1ca3979865a2a984e44e62786508fe4d93c461abdded1f1169a87a72d90ce4518e3aed1307a4624857e6a563868b303e297a56e6fbf92211 SHA512 205f06886ea5a43f870bc38f3a548ee0f2e10ebc461c3748262bfda521c6145f625ee261089256d3c5dc5d791d1688d072a3f4299ca8af89f311c3f9a74ecc69
AUX crda-no-ldconfig.patch 748 BLAKE2B 1ef8aff911a5f4af14fb321782cfb40abc8a946dc80af95ec2c2d50e509f318d84be36190c5b899c882b6173617746600b04bf6d0c282a59c568c44e2f255d16 SHA512 faea7d4bfc0b1a4a674cb6c285975805985dc4211c43ca47da38102cb79a1d6d770aa6267e85d811998f9a13799335cfb6116f272ed40c4ecd6b3f813ca93a28
AUX crda-no-werror.patch 916 BLAKE2B 2e7c79e14ae0ab05cbf032f104747eeea0df165197ba1ff8039fb14de43880894b03e59e14fe2d906b7f99c8d910cef701c1abcb68d9558cfd37d4455ce03501 SHA512 ab521bbc47826bb9356c8b96bee24f6e6d7f03a98036398627e840b89e7245329115664fc740d2b3c0d3a497ef638e3be3fa9d1e991a7e03a0753e078c8019e9
-DIST crda-3.18.tar.xz 61516 BLAKE2B 76feac7fcf85b03b39bfe78de444515f54cd513041f81f7588cd7866e5bf072d000ad0c8df181ccacde7fc8125ed04ece00d5d9d3013df759b5f9fd05f8cfd56 SHA512 57ae6309159f396448f052c127f401c2f63d47f4193e87dca231c4b7bbbd7e69b5e5666f356fc76dfc8a6ae58ffa55c3794428d6eb34d9937df77c4276036588
DIST crda-4.14.tar.gz 72753 BLAKE2B 79e96bc41103eb221d841c74081c2abf507c46ae7790d5d8201dbc49260bc833630b95f74da5500817e07f1b4108713867071bd82ecc4c46d202d1e0ea865675 SHA512 0d52cf62589ec2debfd66de95b82b03a1c15048d8425cf5ef43c3e1f51ce1311a6d898fd5f69badcceb3181d35c836db197c6f070654dab351b01e96a1dd1053
-EBUILD crda-3.18-r3.ebuild 2143 BLAKE2B 9c7273d7d3d5bfa600074deb6183bfcc1a21b243423e2e42b16f9c8c02c37977a78d3a7c921b3c44b8e2cab5ac0ad6a816ed315a8a1f4ee11c43a394848c62ca SHA512 f084c4912c6e030d48882c1cb56cacae17854b28fcc29ba7783cdf614683a08ce99533b54b0f50fc83bf97f2bd14ed0d0c8387b0e236d43a07fd4fc2eb657159
EBUILD crda-4.14.ebuild 2214 BLAKE2B d20a6d56b0e33aa7d1dc8390c968a961080521a0537cf2d5601a7c1d70d0580aa5b8a94117e0e2cc1a4f5416c9d1d97fc9d110da225423fa0105d2fc14dac6a9 SHA512 175c24222615c1f73719bf97d3687628d41dbd3fb23f2ebbbf48b160062b9112d275681b7c300d605b3eb0459c88b4675b7747346a5d23842cdeed790f9a3681
MISC metadata.xml 341 BLAKE2B 3164318aaf0c333f739b8c863660b2b77844b0aa7cdca818358f566dd6cfbf585e1b6661373e58e6c1116771cb4f23c962e27b24bf325cd415ee23a035d5d8a2 SHA512 ca1f9e4b85c7921ab86bf2b5c6be5c8ad07ec900ec23e0c602cc63e815c4e0036fc3ab03470debf645b4f3d444d986f16f9a120af56193d902150e15156f9d59
diff --git a/net-wireless/crda/crda-3.18-r3.ebuild b/net-wireless/crda/crda-3.18-r3.ebuild
deleted file mode 100644
index a121648be719..000000000000
--- a/net-wireless/crda/crda-3.18-r3.ebuild
+++ /dev/null
@@ -1,83 +0,0 @@
-# Copyright 2008-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-inherit toolchain-funcs python-any-r1 udev
-
-DESCRIPTION="Central Regulatory Domain Agent for wireless networks"
-HOMEPAGE="https://wireless.wiki.kernel.org/en/developers/regulatory/crda"
-SRC_URI="http://linuxwireless.org/download/crda/${P}.tar.xz
- https://www.kernel.org/pub/software/network/crda/${P}.tar.xz"
-
-LICENSE="ISC"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~mips ppc ppc64 sparc x86"
-IUSE="gcrypt libressl"
-
-RDEPEND="!gcrypt? (
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- )
- gcrypt? ( dev-libs/libgcrypt:0= )
- dev-libs/libnl:3
- net-wireless/wireless-regdb"
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep 'dev-python/m2crypto[${PYTHON_USEDEP}]')
- virtual/pkgconfig"
-
-python_check_deps() {
- has_version --host-root "dev-python/m2crypto[${PYTHON_USEDEP}]"
-}
-
-PATCHES=(
- "${FILESDIR}"/${PN}-no-ldconfig.patch
- "${FILESDIR}"/${PN}-no-werror.patch
- "${FILESDIR}"/${PN}-cflags.patch
- "${FILESDIR}"/${PN}-libreg-link.patch #542436
- "${FILESDIR}"/${PN}-3.18-openssl-1.1.0-compatibility.patch #652428
- "${FILESDIR}"/${PN}-libressl.patch
- "${FILESDIR}"/${PN}-ldflags.patch
-)
-
-src_prepare() {
- default
- sed -i \
- -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
- Makefile || die
-}
-
-_emake() {
- # The source hardcodes /usr/lib/crda/ paths (ignoring all make vars
- # that look like it should change it). We want to use /usr/lib/
- # anyways as this file is not ABI specific and we want to share it
- # among all ABIs rather than pointlessly duplicate it.
- #
- # The trailing slash on SBINDIR is required by the source.
- emake \
- PREFIX="${EPREFIX}/usr" \
- SBINDIR='$(PREFIX)/sbin/' \
- LIBDIR='$(PREFIX)/'"$(get_libdir)" \
- UDEV_RULE_DIR="$(get_udevdir)/rules.d" \
- REG_BIN="${SYSROOT}"/usr/lib/crda/regulatory.bin \
- USE_OPENSSL=$(usex gcrypt 0 1) \
- CC="$(tc-getCC)" \
- V=1 \
- WERROR= \
- "$@"
-}
-
-src_compile() {
- _emake all_noverify
-}
-
-src_test() {
- _emake verify
-}
-
-src_install() {
- _emake DESTDIR="${D}" install
- keepdir /etc/wireless-regdb/pubkeys
-}
diff --git a/net-wireless/crda/files/crda-3.18-openssl-1.1.0-compatibility.patch b/net-wireless/crda/files/crda-3.18-openssl-1.1.0-compatibility.patch
deleted file mode 100644
index 00a9b5570d2d..000000000000
--- a/net-wireless/crda/files/crda-3.18-openssl-1.1.0-compatibility.patch
+++ /dev/null
@@ -1,315 +0,0 @@
-From 338637ac08c19708eb35523894b44bbe3c726cfa Mon Sep 17 00:00:00 2001
-From: quentin <quentin@minster.io>
-Date: Mon, 2 Apr 2018 18:07:50 +0200
-Subject: [PATCH] crda: Fix for OpenSSL 1.1.0: BIGNUM now opaque
-
-OpenSSL 1.1.0 makes most of OpenSSL's structures opaque, and provides
-functions to manipulate them. This means it's no longer possible to
-construct an OpenSSL BIGNUM directly from scratch, as was done in
-keys-ssl.c.
-
-Use BN_bin2bn() (available since OpenSSL 0.9.8) to build the bignum from
-its big-endian representation as a byte array.
-
-This also allows factoring the code in utils/key2pub.py as it's now the
-same mechanism as with libgcrypt.
-
-This was tested with OpenSSL 1.1.0g.
-
-Signed-off-by: Quentin Minster <quentin@minster.io>
----
- Makefile | 12 +++----
- reglib.c | 44 +++++++++++++++++------
- utils/key2pub.py | 107 ++++++-------------------------------------------------
- 3 files changed, 49 insertions(+), 114 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index a3ead30..a4e7373 100644
---- a/Makefile
-+++ b/Makefile
-@@ -38,18 +38,16 @@ all: all_noverify verify
-
- all_noverify: $(LIBREG) crda intersect regdbdump db2rd optimize
-
-+$(LIBREG): keys.c
-+
- ifeq ($(USE_OPENSSL),1)
- CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl`
- LDLIBS += `pkg-config --libs openssl`
-
--$(LIBREG): keys-ssl.c
--
- else
- CFLAGS += -DUSE_GCRYPT
- LDLIBS += -lgcrypt
-
--$(LIBREG): keys-gcrypt.c
--
- endif
- MKDIR ?= mkdir -p
- INSTALL ?= install
-@@ -109,10 +107,10 @@ $(REG_BIN):
- $(NQ)
- $(Q) exit 1
-
--keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem)
-+keys.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem)
- $(NQ) ' GEN ' $@
- $(NQ) ' Trusted pubkeys:' $(wildcard $(PUBKEY_DIR)/*.pem)
-- $(Q)./utils/key2pub.py --$* $(wildcard $(PUBKEY_DIR)/*.pem) $@
-+ $(Q)./utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem) $@
-
- $(LIBREG): regdb.h reglib.h reglib.c
- $(NQ) ' CC ' $@
-@@ -187,5 +185,5 @@ install: install-libreg install-libreg-headers crda crda.8.gz regdbdump.8.gz
-
- clean:
- $(Q)rm -f $(LIBREG) crda regdbdump intersect db2rd optimize \
-- *.o *~ *.pyc keys-*.c *.gz \
-+ *.o *~ *.pyc keys.c *.gz \
- udev/$(UDEV_LEVEL)regulatory.rules udev/regulatory.rules.parsed
-diff --git a/reglib.c b/reglib.c
-index e00e9b8..00f7f56 100644
---- a/reglib.c
-+++ b/reglib.c
-@@ -22,6 +22,7 @@
- #include <openssl/rsa.h>
- #include <openssl/sha.h>
- #include <openssl/pem.h>
-+#include <openssl/bn.h>
- #endif
-
- #ifdef USE_GCRYPT
-@@ -30,12 +31,8 @@
-
- #include "reglib.h"
-
--#ifdef USE_OPENSSL
--#include "keys-ssl.c"
--#endif
--
--#ifdef USE_GCRYPT
--#include "keys-gcrypt.c"
-+#if defined(USE_OPENSSL) || defined(USE_GCRYPT)
-+#include "keys.c"
- #endif
-
- int debug = 0;
-@@ -81,7 +78,8 @@ reglib_array_len(size_t baselen, unsigned int elemcount, size_t elemlen)
- #ifdef USE_OPENSSL
- int reglib_verify_db_signature(uint8_t *db, size_t dblen, size_t siglen)
- {
-- RSA *rsa;
-+ RSA *rsa = NULL;
-+ BIGNUM *rsa_e = NULL, *rsa_n = NULL;
- uint8_t hash[SHA_DIGEST_LENGTH];
- unsigned int i;
- int ok = 0;
-@@ -102,15 +100,35 @@ int reglib_verify_db_signature(uint8_t *db, size_t dblen, size_t siglen)
- goto out;
- }
-
-- rsa->e = &keys[i].e;
-- rsa->n = &keys[i].n;
-+ rsa_e = BN_bin2bn(keys[i].e, keys[i].len_e, NULL);
-+ if (!rsa_e) {
-+ fprintf(stderr, "Failed to convert value for RSA e.\n");
-+ goto out;
-+ }
-+ rsa_n = BN_bin2bn(keys[i].n, keys[i].len_n, NULL);
-+ if (!rsa_n) {
-+ fprintf(stderr, "Failed to convert value for RSA n.\n");
-+ goto out;
-+ }
-+
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+ rsa->e = rsa_e;
-+ rsa->n = rsa_n;
-+#else
-+ if (RSA_set0_key(rsa, rsa_n, rsa_e, NULL) != 1) {
-+ fprintf(stderr, "Failed to set RSA key.\n");
-+ goto out;
-+ }
-+#endif
-+ /* BIGNUMs now owned by the RSA object */
-+ rsa_e = NULL;
-+ rsa_n = NULL;
-
- ok = RSA_verify(NID_sha1, hash, SHA_DIGEST_LENGTH,
- db + dblen, siglen, rsa) == 1;
-
-- rsa->e = NULL;
-- rsa->n = NULL;
- RSA_free(rsa);
-+ rsa = NULL;
- }
- if (!ok && (pubkey_dir = opendir(PUBKEY_DIR))) {
- while (!ok && (nextfile = readdir(pubkey_dir))) {
-@@ -123,6 +141,7 @@ int reglib_verify_db_signature(uint8_t *db, size_t dblen, size_t siglen)
- ok = RSA_verify(NID_sha1, hash, SHA_DIGEST_LENGTH,
- db + dblen, siglen, rsa) == 1;
- RSA_free(rsa);
-+ rsa = NULL;
- fclose(keyfile);
- }
- }
-@@ -133,6 +152,9 @@ int reglib_verify_db_signature(uint8_t *db, size_t dblen, size_t siglen)
- fprintf(stderr, "Database signature verification failed.\n");
-
- out:
-+ RSA_free(rsa);
-+ BN_free(rsa_e);
-+ BN_free(rsa_n);
- return ok;
- }
- #endif /* USE_OPENSSL */
-diff --git a/utils/key2pub.py b/utils/key2pub.py
-index 9bb04cd..1919270 100755
---- a/utils/key2pub.py
-+++ b/utils/key2pub.py
-@@ -9,84 +9,7 @@ except ImportError, e:
- sys.stderr.write('On Debian GNU/Linux the package is called "python-m2crypto".\n')
- sys.exit(1)
-
--def print_ssl_64(output, name, val):
-- while val[0] == '\0':
-- val = val[1:]
-- while len(val) % 8:
-- val = '\0' + val
-- vnew = []
-- while len(val):
-- vnew.append((val[0], val[1], val[2], val[3], val[4], val[5], val[6], val[7]))
-- val = val[8:]
-- vnew.reverse()
-- output.write('static BN_ULONG %s[%d] = {\n' % (name, len(vnew)))
-- idx = 0
-- for v1, v2, v3, v4, v5, v6, v7, v8 in vnew:
-- if not idx:
-- output.write('\t')
-- output.write('0x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x, ' % (ord(v1), ord(v2), ord(v3), ord(v4), ord(v5), ord(v6), ord(v7), ord(v8)))
-- idx += 1
-- if idx == 2:
-- idx = 0
-- output.write('\n')
-- if idx:
-- output.write('\n')
-- output.write('};\n\n')
--
--def print_ssl_32(output, name, val):
-- while val[0] == '\0':
-- val = val[1:]
-- while len(val) % 4:
-- val = '\0' + val
-- vnew = []
-- while len(val):
-- vnew.append((val[0], val[1], val[2], val[3], ))
-- val = val[4:]
-- vnew.reverse()
-- output.write('static BN_ULONG %s[%d] = {\n' % (name, len(vnew)))
-- idx = 0
-- for v1, v2, v3, v4 in vnew:
-- if not idx:
-- output.write('\t')
-- output.write('0x%.2x%.2x%.2x%.2x, ' % (ord(v1), ord(v2), ord(v3), ord(v4)))
-- idx += 1
-- if idx == 4:
-- idx = 0
-- output.write('\n')
-- if idx:
-- output.write('\n')
-- output.write('};\n\n')
--
--def print_ssl(output, name, val):
-- import struct
-- output.write('#include <stdint.h>\n')
-- if len(struct.pack('@L', 0)) == 8:
-- return print_ssl_64(output, name, val)
-- else:
-- return print_ssl_32(output, name, val)
--
--def print_ssl_keys(output, n):
-- output.write(r'''
--struct pubkey {
-- struct bignum_st e, n;
--};
--
--#define KEY(data) { \
-- .d = data, \
-- .top = sizeof(data)/sizeof(data[0]), \
--}
--
--#define KEYS(e,n) { KEY(e), KEY(n), }
--
--static struct pubkey keys[] = {
--''')
-- for n in xrange(n + 1):
-- output.write(' KEYS(e_%d, n_%d),\n' % (n, n))
-- output.write('};\n')
-- pass
--
--def print_gcrypt(output, name, val):
-- output.write('#include <stdint.h>\n')
-+def print_bignum(output, name, val):
- while val[0] == '\0':
- val = val[1:]
- output.write('static const uint8_t %s[%d] = {\n' % (name, len(val)))
-@@ -103,11 +26,11 @@ def print_gcrypt(output, name, val):
- output.write('\n')
- output.write('};\n\n')
-
--def print_gcrypt_keys(output, n):
-+def print_keys(output, n):
- output.write(r'''
- struct key_params {
- const uint8_t *e, *n;
-- uint32_t len_e, len_n;
-+ const uint32_t len_e, len_n;
- };
-
- #define KEYS(_e, _n) { \
-@@ -120,25 +43,17 @@ static const struct key_params __attribute__ ((unused)) keys[] = {
- for n in xrange(n + 1):
- output.write(' KEYS(e_%d, n_%d),\n' % (n, n))
- output.write('};\n')
--
-
--modes = {
-- '--ssl': (print_ssl, print_ssl_keys),
-- '--gcrypt': (print_gcrypt, print_gcrypt_keys),
--}
-
--try:
-- mode = sys.argv[1]
-- files = sys.argv[2:-1]
-- outfile = sys.argv[-1]
--except IndexError:
-- mode = None
-+files = sys.argv[1:-1]
-+outfile = sys.argv[-1]
-
--if not mode in modes:
-- print 'Usage: %s [%s] input-file... output-file' % (sys.argv[0], '|'.join(modes.keys()))
-+if len(files) == 0:
-+ print 'Usage: %s input-file... output-file' % (sys.argv[0], )
- sys.exit(2)
-
- output = open(outfile, 'w')
-+output.write('#include <stdint.h>\n\n\n')
-
- # load key
- idx = 0
-@@ -148,8 +63,8 @@ for f in files:
- except RSA.RSAError:
- key = RSA.load_key(f)
-
-- modes[mode][0](output, 'e_%d' % idx, key.e[4:])
-- modes[mode][0](output, 'n_%d' % idx, key.n[4:])
-+ print_bignum(output, 'e_%d' % idx, key.e[4:])
-+ print_bignum(output, 'n_%d' % idx, key.n[4:])
- idx += 1
-
--modes[mode][1](output, idx - 1)
-+print_keys(output, idx - 1)
---
-2.16.2
-