int opt_verify(int i, X509_VERIFY_PARAM *vpm);
int opt_rand(int i);
int opt_provider(int i);
+int opt_provider_option_given(void);
char **opt_rest(void);
int opt_num_rest(void);
+/* Returns non-zero if legacy paths are still available */
+int opt_legacy_okay(void);
+
+
#endif /* OSSL_APPS_OPT_H */
#include <openssl/provider.h>
#include <openssl/safestack.h>
+/* Non-zero if any of the provider options have been seen */
+static int provider_option_given = 0;
+
DEFINE_STACK_OF(OSSL_PROVIDER)
/*
int opt_provider(int opt)
{
+ const int given = provider_option_given;
+
+ provider_option_given = 1;
switch ((enum prov_range)opt) {
case OPT_PROV__FIRST:
case OPT_PROV__LAST:
case OPT_PROV_PROPQUERY:
return app_set_propq(opt_arg());
}
+ /* Should never get here but if we do, undo what we did earlier */
+ provider_option_given = given;
return 0;
}
+
+int opt_provider_option_given(void)
+{
+ return provider_option_given;
+}