diff options
Diffstat (limited to 'include/openssl/ui.h')
-rw-r--r-- | include/openssl/ui.h | 73 |
1 files changed, 56 insertions, 17 deletions
diff --git a/include/openssl/ui.h b/include/openssl/ui.h index 9c6cf50ec0..c0c85c37a5 100644 --- a/include/openssl/ui.h +++ b/include/openssl/ui.h @@ -1,27 +1,38 @@ /*
- * Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved.
+ * WARNING: do not edit!
+ * Generated by makefile from W:\test\openssl\include\openssl\ui.h.in
*
- * Licensed under the OpenSSL license (the "License"). You may not use
+ * Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_UI_H
-# define HEADER_UI_H
+
+
+#ifndef OPENSSL_UI_H
+# define OPENSSL_UI_H
+# pragma once
+
+# include <openssl/macros.h>
+# ifndef OPENSSL_NO_DEPRECATED_3_0
+# define HEADER_UI_H
+# endif
# include <openssl/opensslconf.h>
-# if OPENSSL_API_COMPAT < 0x10100000L
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
# include <openssl/crypto.h>
# endif
# include <openssl/safestack.h>
# include <openssl/pem.h>
-# include <openssl/ossl_typ.h>
+# include <openssl/types.h>
# include <openssl/uierr.h>
/* For compatibility reasons, the macro OPENSSL_NO_UI is currently retained */
-# if OPENSSL_API_COMPAT < 0x10200000L
+# ifndef OPENSSL_NO_DEPRECATED_3_0
# ifdef OPENSSL_NO_UI_CONSOLE
# define OPENSSL_NO_UI
# endif
@@ -132,25 +143,26 @@ int UI_dup_error_string(UI *ui, const char *text); # define UI_INPUT_FLAG_USER_BASE 16
/*-
- * The following function helps construct a prompt. object_desc is a
- * textual short description of the object, for example "pass phrase",
- * and object_name is the name of the object (might be a card name or
- * a file name.
+ * The following function helps construct a prompt.
+ * phrase_desc is a textual short description of the phrase to enter,
+ * for example "pass phrase", and
+ * object_name is the name of the object
+ * (which might be a card name or a file name) or NULL.
* The returned string shall always be allocated on the heap with
* OPENSSL_malloc(), and need to be free'd with OPENSSL_free().
*
* If the ui_method doesn't contain a pointer to a user-defined prompt
* constructor, a default string is built, looking like this:
*
- * "Enter {object_desc} for {object_name}:"
+ * "Enter {phrase_desc} for {object_name}:"
*
- * So, if object_desc has the value "pass phrase" and object_name has
+ * So, if phrase_desc has the value "pass phrase" and object_name has
* the value "foo.key", the resulting string is:
*
* "Enter pass phrase for foo.key:"
*/
char *UI_construct_prompt(UI *ui_method,
- const char *object_desc, const char *object_name);
+ const char *phrase_desc, const char *object_name);
/*
* The following function is used to store a pointer to user-specific data.
@@ -208,7 +220,7 @@ int UI_ctrl(UI *ui, int cmd, long i, void *p, void (*f) (void)); # define UI_get_ex_new_index(l, p, newf, dupf, freef) \
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_UI, l, p, newf, dupf, freef)
int UI_set_ex_data(UI *r, int idx, void *arg);
-void *UI_get_ex_data(UI *r, int idx);
+void *UI_get_ex_data(const UI *r, int idx);
/* Use specific methods instead of the built-in one */
void UI_set_default_method(const UI_METHOD *meth);
@@ -277,7 +289,34 @@ const UI_METHOD *UI_null(void); * about a string or a prompt, including test data for a verification prompt.
*/
typedef struct ui_string_st UI_STRING;
-DEFINE_STACK_OF(UI_STRING)
+
+SKM_DEFINE_STACK_OF_INTERNAL(UI_STRING, UI_STRING, UI_STRING)
+#define sk_UI_STRING_num(sk) OPENSSL_sk_num(ossl_check_const_UI_STRING_sk_type(sk))
+#define sk_UI_STRING_value(sk, idx) ((UI_STRING *)OPENSSL_sk_value(ossl_check_const_UI_STRING_sk_type(sk), (idx)))
+#define sk_UI_STRING_new(cmp) ((STACK_OF(UI_STRING) *)OPENSSL_sk_new(ossl_check_UI_STRING_compfunc_type(cmp)))
+#define sk_UI_STRING_new_null() ((STACK_OF(UI_STRING) *)OPENSSL_sk_new_null())
+#define sk_UI_STRING_new_reserve(cmp, n) ((STACK_OF(UI_STRING) *)OPENSSL_sk_new_reserve(ossl_check_UI_STRING_compfunc_type(cmp), (n)))
+#define sk_UI_STRING_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_UI_STRING_sk_type(sk), (n))
+#define sk_UI_STRING_free(sk) OPENSSL_sk_free(ossl_check_UI_STRING_sk_type(sk))
+#define sk_UI_STRING_zero(sk) OPENSSL_sk_zero(ossl_check_UI_STRING_sk_type(sk))
+#define sk_UI_STRING_delete(sk, i) ((UI_STRING *)OPENSSL_sk_delete(ossl_check_UI_STRING_sk_type(sk), (i)))
+#define sk_UI_STRING_delete_ptr(sk, ptr) ((UI_STRING *)OPENSSL_sk_delete_ptr(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_type(ptr)))
+#define sk_UI_STRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_type(ptr))
+#define sk_UI_STRING_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_type(ptr))
+#define sk_UI_STRING_pop(sk) ((UI_STRING *)OPENSSL_sk_pop(ossl_check_UI_STRING_sk_type(sk)))
+#define sk_UI_STRING_shift(sk) ((UI_STRING *)OPENSSL_sk_shift(ossl_check_UI_STRING_sk_type(sk)))
+#define sk_UI_STRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_UI_STRING_sk_type(sk),ossl_check_UI_STRING_freefunc_type(freefunc))
+#define sk_UI_STRING_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_type(ptr), (idx))
+#define sk_UI_STRING_set(sk, idx, ptr) ((UI_STRING *)OPENSSL_sk_set(ossl_check_UI_STRING_sk_type(sk), (idx), ossl_check_UI_STRING_type(ptr)))
+#define sk_UI_STRING_find(sk, ptr) OPENSSL_sk_find(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_type(ptr))
+#define sk_UI_STRING_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_type(ptr))
+#define sk_UI_STRING_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_type(ptr), pnum)
+#define sk_UI_STRING_sort(sk) OPENSSL_sk_sort(ossl_check_UI_STRING_sk_type(sk))
+#define sk_UI_STRING_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_UI_STRING_sk_type(sk))
+#define sk_UI_STRING_dup(sk) ((STACK_OF(UI_STRING) *)OPENSSL_sk_dup(ossl_check_const_UI_STRING_sk_type(sk)))
+#define sk_UI_STRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(UI_STRING) *)OPENSSL_sk_deep_copy(ossl_check_const_UI_STRING_sk_type(sk), ossl_check_UI_STRING_copyfunc_type(copyfunc), ossl_check_UI_STRING_freefunc_type(freefunc)))
+#define sk_UI_STRING_set_cmp_func(sk, cmp) ((sk_UI_STRING_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_compfunc_type(cmp)))
+
/*
* The different types of strings that are currently supported. This is only
@@ -308,7 +347,7 @@ int UI_method_set_data_duplicator(UI_METHOD *method, int UI_method_set_prompt_constructor(UI_METHOD *method,
char *(*prompt_constructor) (UI *ui,
const char
- *object_desc,
+ *phrase_desc,
const char
*object_name));
int UI_method_set_ex_data(UI_METHOD *method, int idx, void *data);
|