218 |
Run.Env.user= xstrdup(pw->pw_name); |
Run.Env.user= xstrdup(pw->pw_name); |
219 |
|
|
220 |
} |
} |
221 |
|
|
222 |
|
/** |
223 |
|
* Are we using SSL and is it correctly installed? |
224 |
|
*/ |
225 |
|
void use_ssl() { |
226 |
|
|
227 |
|
if(! have_ssl()) { |
228 |
|
|
229 |
|
return; |
230 |
|
|
231 |
|
} |
232 |
|
|
233 |
|
if(Run.httpdssl) { |
234 |
|
|
235 |
|
/* If Run.httpdssl is TRUE and we don't have a PEM file something |
236 |
|
went wrong -> ASSERT! */ |
237 |
|
|
238 |
|
ASSERT(Run.httpsslpem); |
239 |
|
|
240 |
|
if(!check_file(Run.httpsslpem, "SSL server PEM file", S_IRWXU)) { |
241 |
|
|
242 |
|
exit(1); |
243 |
|
|
244 |
|
} |
245 |
|
|
246 |
|
} |
247 |
|
|
248 |
|
if(Run.httpdssl && Run.clientssl) { |
249 |
|
|
250 |
|
/* If Run.clientssl is TRUE and we don't have a client PEM file |
251 |
|
something went wrong -> ASSERT! */ |
252 |
|
|
253 |
|
ASSERT(Run.httpsslclientpem); |
254 |
|
|
255 |
|
if(!check_file(Run.httpsslclientpem, "SSL client PEM file", |
256 |
|
S_IRWXU | S_IRGRP | S_IROTH)) { |
257 |
|
|
258 |
|
exit(1); |
259 |
|
|
260 |
|
} |
261 |
|
|
262 |
|
} |
263 |
|
|
264 |
|
} |