1 /* 2 * Copyright 2018-2020 The OpenSSL Project Authors. All Rights Reserved. 3 * 4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 * this file except in compliance with the License. You can obtain a copy 6 * in the file LICENSE in the source distribution or at 7 * https://www.openssl.org/source/license.html 8 */ 9 10 #ifndef OSSL_APPS_UI_H 11 #define OSSL_APPS_UI_H 12 13 #define PW_MIN_LENGTH 4 14 typedef struct pw_cb_data { 15 const void *password; 16 const char *prompt_info; 17 } PW_CB_DATA; 18 19 int password_callback(char *buf, int bufsiz, int verify, PW_CB_DATA *cb_data); 20 21 int setup_ui_method(void); 22 void destroy_ui_method(void); 23 int set_base_ui_method(const UI_METHOD *ui_method); 24 const UI_METHOD *get_ui_method(void); 25 26 extern BIO *bio_err; 27 28 #endif 29