[pkg-wpa-devel] r1500 - in /crda/trunk: Makefile debian/README.source reglib.c

kelmo-guest at users.alioth.debian.org kelmo-guest at users.alioth.debian.org
Mon Mar 1 14:59:23 UTC 2010


Author: kelmo-guest
Date: Mon Mar  1 14:59:22 2010
New Revision: 1500

URL: http://svn.debian.org/wsvn/pkg-wpa/?sc=1&rev=1500
Log:
debian/README.source not needed with 3.0 (quilt)

Removed:
    crda/trunk/debian/README.source
Modified:
    crda/trunk/Makefile
    crda/trunk/reglib.c

Modified: crda/trunk/Makefile
URL: http://svn.debian.org/wsvn/pkg-wpa/crda/trunk/Makefile?rev=1500&op=diff
==============================================================================
--- crda/trunk/Makefile (original)
+++ crda/trunk/Makefile Mon Mar  1 14:59:22 2010
@@ -16,13 +16,6 @@
 # a different location.
 UDEV_RULE_DIR?=/lib/udev/rules.d/
 
-# If your distribution requires a custom pubkeys dir
-# you must update this variable to reflect where the
-# keys are put when building. For example you can run
-# with make PUBKEY_DIR=/usr/lib/crda/pubkeys
-PUBKEY_DIR?=pubkeys
-RUNTIME_PUBKEY_DIR?=/etc/wireless-regdb/pubkeys
-
 CFLAGS += -Wall -g
 
 all: all_noverify verify
@@ -30,12 +23,12 @@
 all_noverify: crda intersect regdbdump
 
 ifeq ($(USE_OPENSSL),1)
-CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl`
+PUBKEY_DIR?=$(PREFIX)/lib/crda/pubkeys
+CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(PUBKEY_DIR)\" `pkg-config --cflags openssl`
 LDLIBS += `pkg-config --libs openssl`
 
-reglib.o: keys-ssl.c
-
 else
+PUBKEY_DIR?=pubkeys
 CFLAGS += -DUSE_GCRYPT
 LDLIBS += -lgcrypt
 
@@ -82,7 +75,13 @@
 	$(NQ) $(REG_GIT)
 	$(NQ)
 	$(NQ) "Once cloned (no need to build) cp regulatory.bin to $(REG_BIN)"
-	$(NQ) "Use \"make noverify\" to disable verification"
+	$(NQ)
+	$(NQ) "If your distribution requires a custom pubkeys dir you must set"
+	$(NQ) "PUBKEY_DIR to path where the keys are installed by wireless-regdb."
+	$(NQ) "For example:"
+	$(NQ) "    make PUBKEY_DIR=/usr/lib/crda/pubkeys"
+	$(NQ)
+	$(NQ) "Use \"make all_noverify\" to disable verification"
 	$(NQ)
 	$(Q) exit 1
 

Modified: crda/trunk/reglib.c
URL: http://svn.debian.org/wsvn/pkg-wpa/crda/trunk/reglib.c?rev=1500&op=diff
==============================================================================
--- crda/trunk/reglib.c (original)
+++ crda/trunk/reglib.c Mon Mar  1 14:59:22 2010
@@ -17,10 +17,6 @@
 #endif
 
 #include "reglib.h"
-
-#ifdef USE_OPENSSL
-#include "keys-ssl.c"
-#endif
 
 #ifdef USE_GCRYPT
 #include "keys-gcrypt.c"
@@ -49,7 +45,6 @@
 #ifdef USE_OPENSSL
 	RSA *rsa;
 	__u8 hash[SHA_DIGEST_LENGTH];
-	unsigned int i;
 	int ok = 0;
 	DIR *pubkey_dir;
 	struct dirent *nextfile;
@@ -61,24 +56,7 @@
 		goto out;
 	}
 
-	for (i = 0; (i < sizeof(keys)/sizeof(keys[0])) && (!ok); i++) {
-		rsa = RSA_new();
-		if (!rsa) {
-			fprintf(stderr, "Failed to create RSA key.\n");
-			goto out;
-		}
-
-		rsa->e = &keys[i].e;
-		rsa->n = &keys[i].n;
-
-		ok = RSA_verify(NID_sha1, hash, SHA_DIGEST_LENGTH,
-				db + dblen, siglen, rsa) == 1;
-
-		rsa->e = NULL;
-		rsa->n = NULL;
-		RSA_free(rsa);
-	}
-	if (!ok && (pubkey_dir = opendir(PUBKEY_DIR))) {
+	if ((pubkey_dir = opendir(PUBKEY_DIR))) {
 		while (!ok && (nextfile = readdir(pubkey_dir))) {
 			snprintf(filename, PATH_MAX, "%s/%s", PUBKEY_DIR,
 				nextfile->d_name);




More information about the Pkg-wpa-devel mailing list