219 |
|
|
220 |
} |
} |
221 |
|
|
|
/** |
|
|
* Are we using SSL and is it correctly installed? |
|
|
*/ |
|
|
void use_ssl() { |
|
|
|
|
|
if(! have_ssl()) { |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if(Run.httpdssl) { |
|
|
|
|
|
/* If Run.httpdssl is TRUE and we don't have a PEM file something |
|
|
went wrong -> ASSERT! */ |
|
|
|
|
|
ASSERT(Run.httpsslpem); |
|
|
|
|
|
if(!check_file(Run.httpsslpem, "SSL server PEM file", S_IRWXU)) { |
|
|
|
|
|
exit(1); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if(Run.httpdssl && Run.clientssl) { |
|
|
|
|
|
/* If Run.clientssl is TRUE and we don't have a client PEM file |
|
|
something went wrong -> ASSERT! */ |
|
|
|
|
|
ASSERT(Run.httpsslclientpem); |
|
|
|
|
|
if(!check_file(Run.httpsslclientpem, "SSL client PEM file", |
|
|
S_IRWXU | S_IRGRP | S_IROTH)) { |
|
|
|
|
|
exit(1); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|