/*
- * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
# include <openssl/engine.h>
#endif
#include <openssl/err.h>
-#ifdef OPENSSL_FIPS
-# include <openssl/fips.h>
-#endif
#define USE_SOCKETS /* needed for the _O_BINARY defs in the MS world */
#include "s_apps.h"
/* Needed to get the other O_xxx flags. */
static void list_disabled(void);
char *default_config_file = NULL;
-static CONF *config = NULL;
BIO *bio_in = NULL;
BIO *bio_out = NULL;
BIO *bio_err = NULL;
CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
if (getenv("OPENSSL_FIPS")) {
-#ifdef OPENSSL_FIPS
- if (!FIPS_mode_set(1)) {
- ERR_print_errors(bio_err);
- return 1;
- }
-#else
BIO_printf(bio_err, "FIPS mode not supported.\n");
return 1;
-#endif
}
- if (!apps_startup())
+ if (!apps_startup()) {
+ BIO_printf(bio_err,
+ "FATAL: Startup failure (dev note: apps_startup() failed)\n");
+ ERR_print_errors(bio_err);
+ ret = 1;
goto end;
+ }
prog = prog_init();
pname = opt_progname(argv[0]);
end:
OPENSSL_free(copied_argv);
OPENSSL_free(default_config_file);
- NCONF_free(config);
- config = NULL;
lh_FUNCTION_free(prog);
OPENSSL_free(arg.argv);
static void list_cipher_fn(const EVP_CIPHER *c,
const char *from, const char *to, void *arg)
{
- if (c)
+ if (c != NULL) {
BIO_printf(arg, "%s\n", EVP_CIPHER_name(c));
- else {
- if (!from)
+ } else {
+ if (from == NULL)
from = "<undefined>";
- if (!to)
+ if (to == NULL)
to = "<undefined>";
BIO_printf(arg, "%s => %s\n", from, to);
}
static void list_md_fn(const EVP_MD *m,
const char *from, const char *to, void *arg)
{
- if (m)
+ if (m != NULL) {
BIO_printf(arg, "%s\n", EVP_MD_name(m));
- else {
- if (!from)
+ } else {
+ if (from == NULL)
from = "<undefined>";
- if (!to)
+ if (to == NULL)
to = "<undefined>";
BIO_printf((BIO *)arg, "%s => %s\n", from, to);
}
static void list_disabled(void)
{
BIO_puts(bio_out, "Disabled algorithms:\n");
+#ifdef OPENSSL_NO_ARIA
+ BIO_puts(bio_out, "ARIA\n");
+#endif
#ifdef OPENSSL_NO_BF
BIO_puts(bio_out, "BF\n");
#endif
-#ifndef OPENSSL_NO_BLAKE2
+#ifdef OPENSSL_NO_BLAKE2
BIO_puts(bio_out, "BLAKE2\n");
#endif
#ifdef OPENSSL_NO_CAMELLIA