BIO *bio_out = NULL;
BIO *bio_err = NULL;
-static void apps_startup()
+static int apps_startup()
{
#ifdef SIGPIPE
signal(SIGPIPE, SIG_IGN);
CRYPTO_malloc_init();
ERR_load_crypto_strings();
ERR_load_SSL_strings();
- OpenSSL_add_all_algorithms();
- OpenSSL_add_ssl_algorithms();
+
OPENSSL_load_builtin_modules();
- setup_ui_method();
- /*SSL_library_init();*/
#ifndef OPENSSL_NO_ENGINE
ENGINE_load_builtin_engines();
#endif
+ if (!app_load_modules(NULL)) {
+ ERR_print_errors(bio_err);
+ BIO_printf(bio_err, "Error loading default configuration\n");
+ return 0;
+ }
+
+ OpenSSL_add_all_algorithms();
+ OpenSSL_add_ssl_algorithms();
+ setup_ui_method();
+ /*SSL_library_init();*/
+ return 1;
}
static void apps_shutdown()
size_t len;
char *p;
- if ((t = getenv("OPENSSL_CONF")) != NULL
- || (t = getenv("SSLEAY_CONF")) != NULL)
+ if ((t = getenv("OPENSSL_CONF")) != NULL)
return BUF_strdup(t);
t = X509_get_default_cert_area();
#endif
}
- apps_startup();
+ if (!apps_startup())
+ goto end;
- /*
- * If first argument is a colon, skip it. Because in "interactive"
- * mode our prompt is a colon and we can cut/paste whole lines
- * by doing this hack.
- */
- if (argv[1] && strcmp(argv[1], ":") == 0) {
- argv[1] = argv[0];
- argc--;
- argv++;
- }
prog = prog_init();
pname = opt_progname(argv[0]);
ret = 0;
/* Read a line, continue reading if line ends with \ */
for (p = buf, n = sizeof buf, i = 0, first = 1; n > 0; first = 0) {
- prompt = first ? "openssl : " : "> ";
+ prompt = first ? "OpenSSL> " : "> ";
p[0] = '\0';
#ifndef READLINE
fputs(prompt, stdout);
{
char *prog;
HELPLIST_CHOICE o;
+ int done = 0;
prog = opt_init(argc, argv, list_options);
while ((o = opt_next()) != OPT_EOF) {
switch (o) {
- case OPT_EOF:
+ case OPT_EOF: /* Never hit, but suppresses warning */
case OPT_ERR:
BIO_printf(bio_err, "%s: Use -help for summary.\n", prog);
return 1;
list_disabled();
break;
}
+ done = 1;
+ }
+
+ if (!done) {
+ BIO_printf(bio_err, "%s: Use -help for summary.\n", prog);
+ return 1;
}
return 0;
#ifdef OPENSSL_NO_CAST
BIO_puts(bio_out, "CAST\n");
#endif
+#ifdef OPENSSL_NO_CMAC
+ BIO_puts(bio_out, "CMAC\n");
+#endif
#ifdef OPENSSL_NO_CMS
BIO_puts(bio_out, "CMS\n");
#endif
#ifdef OPENSSL_NO_GOST
BIO_puts(bio_out, "GOST\n");
#endif
+#ifdef OPENSSL_NO_HMAC
+ BIO_puts(bio_out, "HMAC\n");
+#endif
#ifdef OPENSSL_NO_IDEA
BIO_puts(bio_out, "IDEA\n");
#endif
#ifdef OPENSSL_NO_MDC2
BIO_puts(bio_out, "MDC2\n");
#endif
-#ifdef OPENSSL_NO_MD_GHOST94
- BIO_puts(bio_out, "MD_GHOST94\n");
-#endif
#ifdef OPENSSL_NO_OCB
BIO_puts(bio_out, "OCB\n");
#endif