* NT threaded server code by
* Chas Woodfield, Fretwell Downing Informatics.
*
- * $Id: statserv.c,v 1.6 2004-04-29 21:27:22 adam Exp $
+ * $Id: statserv.c,v 1.8 2004-05-10 10:47:04 adam Exp $
*/
#include <stdio.h>
#endif /* WIN32 */
0, /* SOAP handlers */
"", /* PID fname */
- 0 /* background daemon */
+ 0, /* background daemon */
+ "" /* SSL certificate filename */
};
static int max_sessions = 0;
yaz_log(LOG_FATAL, "Failed to listen on %s", where);
return -1;
}
+ if (*control_block.cert_fname)
+ cs_set_ssl_certificate_file(l, control_block.cert_fname);
+
if (cs_bind(l, ap, CS_SERVER) < 0)
{
yaz_log(LOG_FATAL|LOG_ERRNO, "Failed to bind to %s", where);
int ret = 0, r;
char *arg;
- while ((ret = options("1a:iszSTl:v:u:c:w:t:k:d:A:p:D", argv, argc, &arg)) != -2)
+ while ((ret = options("1a:iszSTl:v:u:c:w:t:k:d:A:p:DC:",
+ argv, argc, &arg)) != -2)
{
switch (ret)
{
case 'c':
strcpy(control_block.configname, arg ? arg : "");
break;
+ case 'C':
+ strcpy(control_block.cert_fname, arg ? arg : "");
+ break;
case 'd':
strcpy(control_block.daemon_name, arg ? arg : "");
break;
default:
fprintf(stderr, "Usage: %s [ -a <pdufile> -v <loglevel>"
" -l <logfile> -u <user> -c <config> -t <minutes>"
- " -k <kilobytes> -d <daemon> -p <pidfile>"
+ " -k <kilobytes> -d <daemon> -p <pidfile> -C certfile"
" -ziDST1 -w <directory> <listener-addr>... ]\n", me);
return 1;
}