/** print usage. */ static void usage() { const char** m; const char *evnm="event", *evsys="", *evmethod=""; printf("usage: unbound [options]\n"); printf(" start unbound daemon DNS resolver.\n"); printf("-h this help\n"); printf("-c file config file to read instead of %s\n", CONFIGFILE); printf(" file format is described in unbound.conf(5).\n"); printf("-d do not fork into the background.\n"); printf("-v verbose (more times to increase verbosity)\n"); #ifdef UB_ON_WINDOWS printf("-w opt windows option: \n"); printf(" install, remove - manage the services entry\n"); printf(" service - used to start from services control panel\n"); #endif printf("Version %s\n", PACKAGE_VERSION); get_event_sys(&evnm, &evsys, &evmethod); printf("linked libs: %s %s (it uses %s), ldns %s, %s\n", evnm, evsys, evmethod, ldns_version(), #ifdef HAVE_SSL SSLeay_version(SSLEAY_VERSION) #elif defined(HAVE_NSS) NSS_GetVersion() #endif ); printf("linked modules:"); for(m = module_list_avail(); *m; m++) printf(" %s", *m); printf("\n"); printf("configured for %s on %s with options:%s\n", CONFIGURE_TARGET, CONFIGURE_DATE, CONFIGURE_BUILD_WITH); printf("BSD licensed, see LICENSE in source package for details.\n"); printf("Report bugs to %s\n", PACKAGE_BUGREPORT); }
/** print usage. */ static void usage(void) { const char** m; const char *evnm="event", *evsys="", *evmethod=""; time_t t; struct timeval now; struct ub_event_base* base; printf("usage: unbound [options]\n"); printf(" start unbound daemon DNS resolver.\n"); printf("-h this help\n"); printf("-c file config file to read instead of %s\n", CONFIGFILE); printf(" file format is described in unbound.conf(5).\n"); printf("-d do not fork into the background.\n"); printf("-p do not create a pidfile.\n"); printf("-v verbose (more times to increase verbosity)\n"); #ifdef UB_ON_WINDOWS printf("-w opt windows option: \n"); printf(" install, remove - manage the services entry\n"); printf(" service - used to start from services control panel\n"); #endif printf("Version %s\n", PACKAGE_VERSION); base = ub_default_event_base(0,&t,&now); ub_get_event_sys(base, &evnm, &evsys, &evmethod); printf("linked libs: %s %s (it uses %s), %s\n", evnm, evsys, evmethod, #ifdef HAVE_SSL # ifdef SSLEAY_VERSION SSLeay_version(SSLEAY_VERSION) # else OpenSSL_version(OPENSSL_VERSION) # endif #elif defined(HAVE_NSS) NSS_GetVersion() #elif defined(HAVE_NETTLE) "nettle" #endif ); printf("linked modules:"); for(m = module_list_avail(); *m; m++) printf(" %s", *m); printf("\n"); #ifdef USE_DNSCRYPT printf("DNSCrypt feature available\n"); #endif printf("BSD licensed, see LICENSE in source package for details.\n"); printf("Report bugs to %s\n", PACKAGE_BUGREPORT); ub_event_base_free(base); }
void sxi_report_crypto(sxc_client_t *sx) { sxi_info(sx, "NSS: %s", NSS_GetVersion()); }
int sxi_crypto_check_ver(struct sxi_logger *l) { const char *compile_ver = NSS_VERSION; if (NSS_NoDB_Init("/") != SECSuccess) { sxi_log_msg(l, "sxi_crypto_check_ver", SX_LOG_CRIT, "Failed to initialize NSS: %d", PR_GetError()); return -1; } if(!NSS_VersionCheck(compile_ver)) { sxi_log_msg(l, "crypto_check_ver", SX_LOG_CRIT, "NSS library version mismatch: compiled: %s, runtime: %s", compile_ver, NSS_GetVersion()); return -1; } return 0; }