int opt_num_rest(void);
int opt_check_rest_arg(const char *expected);
-/* Returns non-zero if legacy paths are still available */
-int opt_legacy_okay(void);
-
#endif /* OSSL_APPS_OPT_H */
return res;
}
-/*
- * Return non-zero if the legacy path is still an option.
- * This decision is based on the global command line operations and the
- * behaviour thus far.
- */
-int opt_legacy_okay(void)
-{
- int provider_options = opt_provider_option_given();
- int libctx = app_get0_libctx() != NULL || app_get0_propq() != NULL;
-
- /*
- * Having a provider option specified or a custom library context or
- * property query, is a sure sign we're not using legacy.
- */
- if (provider_options || libctx)
- return 0;
- return 1;
-}
-
#define MAX_KEY_SIZE 2048 /* Hope nobody needs mac key longer than 2048 bytes */
/*
ERR_set_mark();
if ((c = EVP_CIPHER_fetch(app_get0_libctx(), name,
- app_get0_propq())) != NULL
- || (opt_legacy_okay()
- && (c = (EVP_CIPHER *)EVP_get_cipherbyname(name)) != NULL)) {
+ app_get0_propq())) != NULL) {
ERR_pop_to_mark();
if (cipherp != NULL) {
EVP_CIPHER_free(*cipherp);
EVP_MD *md;
ERR_set_mark();
- if ((md = EVP_MD_fetch(app_get0_libctx(), name, app_get0_propq())) != NULL
- || (opt_legacy_okay()
- && (md = (EVP_MD *)EVP_get_digestbyname(name)) != NULL)) {
+ if ((md = EVP_MD_fetch(app_get0_libctx(), name, app_get0_propq())) != NULL) {
ERR_pop_to_mark();
if (mdp != NULL) {
EVP_MD_free(*mdp);
opt_cipher_any, opt_cipher_silent, opt_md,
opt_int, opt_int_arg, opt_long, opt_ulong, opt_intmax, opt_uintmax,
opt_format, opt_isdir, opt_string, opt_pair,
-opt_num_rest, opt_rest, opt_legacy_okay
+opt_num_rest, opt_rest
- Option parsing for commands and tests
=head1 SYNOPSIS
int opt_num_rest(void);
char **opt_rest(void);
- int opt_legacy_okay(void);
-
=head1 DESCRIPTION
The functions on this page provide a common set of option-parsing for
If there were no parameters, it will point to the NULL that is
at the end of the standard I<argv> array.
-The opt_legacy_okay() function returns true if no options have been
-specified that would preclude using legacy code paths. Currently,
-the various provider options preclude legacy operation. This means,
-for example, that specifying both B<-provider> and B<-engine> in the
-same command line will not work as expected.
-
=head2 Common Options
There are a few groups of options that are common to many OpenSSL programs.
return vp;
}
-/* shim to prevent sucking in too much from apps */
-
-int opt_legacy_okay(void)
-{
- return 1;
-}
-
/*
* These three functions are defined here so that they don't need to come from
* the apps source code and pull in a lot of additional things.