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