aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez2013-05-30 05:41:35 -0500
committerLuis R. Rodriguez2013-05-30 20:54:52 -0500
commit1699b5275ea8f653c384d002185323263a37e213 (patch)
treeea6e944b81b2f25b19db0afd437f60eddce15024
parent7c6945248d35d20fd304b4a00bb60b3dfa89bd53 (diff)
downloadcrda-1699b5275ea8f653c384d002185323263a37e213.tar.gz
crda-1699b5275ea8f653c384d002185323263a37e213.tar.xz
crda-1699b5275ea8f653c384d002185323263a37e213.zip
crda: rename crda_verify_db_signature() to reglib_verify_db_signature()
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
-rw-r--r--reglib.c12
-rw-r--r--reglib.h2
2 files changed, 7 insertions, 7 deletions
diff --git a/reglib.c b/reglib.c
index a957f0e..316e201 100644
--- a/reglib.c
+++ b/reglib.c
@@ -50,7 +50,7 @@ void *reglib_get_file_ptr(uint8_t *db, int dblen, int structlen, uint32_t ptr)
50} 50}
51 51
52/* 52/*
53 * crda_verify_db_signature(): 53 * reglib_verify_db_signature():
54 * 54 *
55 * Checks the validity of the signature found on the regulatory 55 * Checks the validity of the signature found on the regulatory
56 * database against the array 'keys'. Returns 1 if there exists 56 * database against the array 'keys'. Returns 1 if there exists
@@ -59,7 +59,7 @@ void *reglib_get_file_ptr(uint8_t *db, int dblen, int structlen, uint32_t ptr)
59 */ 59 */
60 60
61#ifdef USE_OPENSSL 61#ifdef USE_OPENSSL
62int crda_verify_db_signature(uint8_t *db, int dblen, int siglen) 62int reglib_verify_db_signature(uint8_t *db, int dblen, int siglen)
63{ 63{
64 RSA *rsa; 64 RSA *rsa;
65 uint8_t hash[SHA_DIGEST_LENGTH]; 65 uint8_t hash[SHA_DIGEST_LENGTH];
@@ -118,7 +118,7 @@ out:
118#endif /* USE_OPENSSL */ 118#endif /* USE_OPENSSL */
119 119
120#ifdef USE_GCRYPT 120#ifdef USE_GCRYPT
121int crda_verify_db_signature(uint8_t *db, int dblen, int siglen) 121int reglib_verify_db_signature(uint8_t *db, int dblen, int siglen)
122{ 122{
123 gcry_mpi_t mpi_e, mpi_n; 123 gcry_mpi_t mpi_e, mpi_n;
124 gcry_sexp_t rsa, signature, data; 124 gcry_sexp_t rsa, signature, data;
@@ -180,7 +180,7 @@ out:
180#endif /* USE_GCRYPT */ 180#endif /* USE_GCRYPT */
181 181
182#if !defined(USE_OPENSSL) && !defined(USE_GCRYPT) 182#if !defined(USE_OPENSSL) && !defined(USE_GCRYPT)
183int crda_verify_db_signature(uint8_t *db, int dblen, int siglen) 183int reglib_verify_db_signature(uint8_t *db, int dblen, int siglen)
184{ 184{
185 return 1; 185 return 1;
186} 186}
@@ -295,7 +295,7 @@ reglib_get_rd_idx(unsigned int idx, const char *file)
295 goto out; 295 goto out;
296 296
297 /* verify signature */ 297 /* verify signature */
298 if (!crda_verify_db_signature(db, dblen, siglen)) 298 if (!reglib_verify_db_signature(db, dblen, siglen))
299 goto out; 299 goto out;
300 300
301 num_countries = ntohl(header->reg_country_num); 301 num_countries = ntohl(header->reg_country_num);
@@ -366,7 +366,7 @@ reglib_get_rd_alpha2(const char *alpha2, const char *file)
366 goto out; 366 goto out;
367 367
368 /* verify signature */ 368 /* verify signature */
369 if (!crda_verify_db_signature(db, dblen, siglen)) 369 if (!reglib_verify_db_signature(db, dblen, siglen))
370 goto out; 370 goto out;
371 371
372 num_countries = ntohl(header->reg_country_num); 372 num_countries = ntohl(header->reg_country_num);
diff --git a/reglib.h b/reglib.h
index 3510889..2f49a32 100644
--- a/reglib.h
+++ b/reglib.h
@@ -71,7 +71,7 @@ static inline uint32_t min(uint32_t a, uint32_t b)
71} 71}
72 72
73void *reglib_get_file_ptr(uint8_t *db, int dblen, int structlen, uint32_t ptr); 73void *reglib_get_file_ptr(uint8_t *db, int dblen, int structlen, uint32_t ptr);
74int crda_verify_db_signature(uint8_t *db, int dblen, int siglen); 74int reglib_verify_db_signature(uint8_t *db, int dblen, int siglen);
75 75
76const struct ieee80211_regdomain * 76const struct ieee80211_regdomain *
77reglib_get_rd_idx(unsigned int idx, const char *file); 77reglib_get_rd_idx(unsigned int idx, const char *file);