SSL Cert path computation fix
This commit is contained in:
parent
2ba9ccac5c
commit
cd098c85ba
10
src/bip.c
10
src/bip.c
@ -703,16 +703,14 @@ int fireup(FILE *conf)
|
|||||||
#ifdef HAVE_LIBSSL
|
#ifdef HAVE_LIBSSL
|
||||||
conf_ssl_certfile = NULL; /* Make into a config option */
|
conf_ssl_certfile = NULL; /* Make into a config option */
|
||||||
if (!conf_ssl_certfile) {
|
if (!conf_ssl_certfile) {
|
||||||
char *home = getenv("HOME");
|
char *ap = "/bip.pem";
|
||||||
char *ap = "/.bip/bip.pem";
|
|
||||||
if (!home)
|
|
||||||
fatal("no $HOME !, do you live in a trailer ?");
|
|
||||||
if (conf_ssl_certfile) {
|
if (conf_ssl_certfile) {
|
||||||
free(conf_ssl_certfile);
|
free(conf_ssl_certfile);
|
||||||
conf_ssl_certfile = NULL;
|
conf_ssl_certfile = NULL;
|
||||||
}
|
}
|
||||||
conf_ssl_certfile = malloc(strlen(home) + strlen(ap) + 1);
|
conf_ssl_certfile = malloc(strlen(conf_biphome) +
|
||||||
strcpy(conf_ssl_certfile, home);
|
strlen(ap) + 1);
|
||||||
|
strcpy(conf_ssl_certfile, conf_biphome);
|
||||||
strcat(conf_ssl_certfile, ap);
|
strcat(conf_ssl_certfile, ap);
|
||||||
mylog(LOG_INFO, "Default SSL certificate file: %s",
|
mylog(LOG_INFO, "Default SSL certificate file: %s",
|
||||||
conf_ssl_certfile);
|
conf_ssl_certfile);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user