diff options
author | Luis R. Rodriguez | 2013-05-30 05:41:35 -0500 |
---|---|---|
committer | Luis R. Rodriguez | 2013-05-30 20:54:52 -0500 |
commit | 1699b5275ea8f653c384d002185323263a37e213 (patch) | |
tree | ea6e944b81b2f25b19db0afd437f60eddce15024 | |
parent | 7c6945248d35d20fd304b4a00bb60b3dfa89bd53 (diff) | |
download | crda-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.c | 12 | ||||
-rw-r--r-- | reglib.h | 2 |
2 files changed, 7 insertions, 7 deletions
@@ -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 |
62 | int crda_verify_db_signature(uint8_t *db, int dblen, int siglen) | 62 | int 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 |
121 | int crda_verify_db_signature(uint8_t *db, int dblen, int siglen) | 121 | int 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) |
183 | int crda_verify_db_signature(uint8_t *db, int dblen, int siglen) | 183 | int 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); |
@@ -71,7 +71,7 @@ static inline uint32_t min(uint32_t a, uint32_t b) | |||
71 | } | 71 | } |
72 | 72 | ||
73 | void *reglib_get_file_ptr(uint8_t *db, int dblen, int structlen, uint32_t ptr); | 73 | void *reglib_get_file_ptr(uint8_t *db, int dblen, int structlen, uint32_t ptr); |
74 | int crda_verify_db_signature(uint8_t *db, int dblen, int siglen); | 74 | int reglib_verify_db_signature(uint8_t *db, int dblen, int siglen); |
75 | 75 | ||
76 | const struct ieee80211_regdomain * | 76 | const struct ieee80211_regdomain * |
77 | reglib_get_rd_idx(unsigned int idx, const char *file); | 77 | reglib_get_rd_idx(unsigned int idx, const char *file); |