Commit fc00df0f authored by Ben Hutchings's avatar Ben Hutchings

Un-apply do_not_embed_pubkeys.patch

Changes in patches should not themselves be committed (for now).
parent fd04bd9c
......@@ -33,12 +33,7 @@ ifeq ($(USE_OPENSSL),1)
CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl`
LDLIBS += `pkg-config --libs openssl`
ifeq ($(RUNTIME_PUBKEY_ONLY),1)
CFLAGS += -DRUNTIME_PUBKEY_ONLY
else
CFLAGS += -DHAVE_KEYS_SSL
reglib.o: keys-ssl.c
endif
else
CFLAGS += -DUSE_GCRYPT
......
......@@ -18,7 +18,7 @@
#include "reglib.h"
#if defined(USE_OPENSSL) && defined(HAVE_KEYS_SSL)
#ifdef USE_OPENSSL
#include "keys-ssl.c"
#endif
......@@ -49,6 +49,7 @@ int crda_verify_db_signature(__u8 *db, int dblen, int siglen)
#ifdef USE_OPENSSL
RSA *rsa;
__u8 hash[SHA_DIGEST_LENGTH];
unsigned int i;
int ok = 0;
DIR *pubkey_dir;
struct dirent *nextfile;
......@@ -60,8 +61,6 @@ int crda_verify_db_signature(__u8 *db, int dblen, int siglen)
goto out;
}
#ifdef HAVE_KEYS_SSL
unsigned int i;
for (i = 0; (i < sizeof(keys)/sizeof(keys[0])) && (!ok); i++) {
rsa = RSA_new();
if (!rsa) {
......@@ -79,7 +78,6 @@ int crda_verify_db_signature(__u8 *db, int dblen, int siglen)
rsa->n = NULL;
RSA_free(rsa);
}
#endif
if (!ok && (pubkey_dir = opendir(PUBKEY_DIR))) {
while (!ok && (nextfile = readdir(pubkey_dir))) {
snprintf(filename, PATH_MAX, "%s/%s", PUBKEY_DIR,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment