starter: Only create self-signed certificate if scepclient is built.
This commit is contained in:
@@ -46,6 +46,10 @@ if USE_LOAD_WARNING
|
||||
AM_CFLAGS += -DLOAD_WARNING
|
||||
endif
|
||||
|
||||
if USE_TOOLS
|
||||
AM_CFLAGS += -DGENERATE_SELFCERT
|
||||
endif
|
||||
|
||||
keywords.c: $(srcdir)/keywords.txt $(srcdir)/keywords.h
|
||||
$(GPERF) -m 10 -C -G -D -t < $(srcdir)/keywords.txt > $@
|
||||
|
||||
|
||||
@@ -161,6 +161,7 @@ static void fsig(int signal)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef GENERATE_SELFCERT
|
||||
static void generate_selfcert()
|
||||
{
|
||||
struct stat stb;
|
||||
@@ -216,6 +217,7 @@ static void generate_selfcert()
|
||||
umask(oldmask);
|
||||
}
|
||||
}
|
||||
#endif /* GENERATE_SELFCERT */
|
||||
|
||||
static bool check_pid(char *pid_file)
|
||||
{
|
||||
@@ -414,7 +416,9 @@ int main (int argc, char **argv)
|
||||
exit(LSB_RC_SUCCESS);
|
||||
}
|
||||
|
||||
#ifdef GENERATE_SELFCERT
|
||||
generate_selfcert();
|
||||
#endif
|
||||
|
||||
/* fork if we're not debugging stuff */
|
||||
if (!no_fork)
|
||||
|
||||
Reference in New Issue
Block a user