Skip to content

Commit

Permalink
Remove cipher & md subsystem init from crypto_init
Browse files Browse the repository at this point in the history
Remove cipher_init_subsystem() and md_init_subsystem() from
crypto_init().  Both of these subsystems are not necessarily needed
by programs utilizing crypto; for example, mungekey will need
md_init_subsystem(), but not cipher_init_subsystem().

Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
  • Loading branch information
dun committed May 4, 2019
1 parent be3c38a commit 0ea27b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/common/crypto.c
Expand Up @@ -35,8 +35,6 @@
#include <pthread.h>
#include <stdlib.h>
#include "crypto.h"
#include "cipher.h"
#include "md.h"
#include "log.h"


Expand Down Expand Up @@ -97,8 +95,6 @@ crypto_init (void)
log_err (EMUNGE_SNAFU, LOG_ERR,
"Failed to initialize Libgcrypt: %s", gcry_strerror (e));
}
cipher_init_subsystem ();
md_init_subsystem ();
return;
}

Expand Down Expand Up @@ -256,8 +252,6 @@ crypto_init (void)
#endif /* HAVE_ERR_LOAD_CRYPTO_STRINGS */

_openssl_thread_setup ();
cipher_init_subsystem ();
md_init_subsystem ();

return;
}
Expand Down
4 changes: 4 additions & 0 deletions src/munged/munged.c
Expand Up @@ -48,6 +48,7 @@
#include <sys/un.h>
#include <unistd.h>
#include "auth_recv.h"
#include "cipher.h"
#include "common.h"
#include "conf.h"
#include "crypto.h"
Expand All @@ -56,6 +57,7 @@
#include "job.h"
#include "lock.h"
#include "log.h"
#include "md.h"
#include "missing.h"
#include "munge_defs.h"
#include "path.h"
Expand Down Expand Up @@ -130,6 +132,8 @@ main (int argc, char *argv[])
lock_memory ();
}
crypto_init ();
cipher_init_subsystem ();
md_init_subsystem ();
if (random_init (conf->seed_name) < 0) {
if (conf->seed_name) {
free (conf->seed_name);
Expand Down

0 comments on commit 0ea27b7

Please sign in to comment.