summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/apps.h
diff options
context:
space:
mode:
authorbcook <>2015-09-13 12:41:01 +0000
committerbcook <>2015-09-13 12:41:01 +0000
commite2751f37728059d10cda50d45e3365a1110f26ff (patch)
treea928062f329b4a2f81c6d2b9910fde8181243c7a /src/usr.bin/openssl/apps.h
parent2555ca7b86c3ba095a21111d3f7d00e279de8e4d (diff)
downloadopenbsd-e2751f37728059d10cda50d45e3365a1110f26ff.tar.gz
openbsd-e2751f37728059d10cda50d45e3365a1110f26ff.tar.bz2
openbsd-e2751f37728059d10cda50d45e3365a1110f26ff.zip
Factor out setup_up / destroy_ui functions.
This pulls out and renames setup_ui/destroy_ui so we have something that can be replaced as-needed, moving the the console setup code for Windows to app_win.c in -portable, instead of needing a local patch to enable binary console mode ui_read/write are also simplified.
Diffstat (limited to 'src/usr.bin/openssl/apps.h')
-rw-r--r--src/usr.bin/openssl/apps.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/usr.bin/openssl/apps.h b/src/usr.bin/openssl/apps.h
index f63079179d..bb9fd0dd7a 100644
--- a/src/usr.bin/openssl/apps.h
+++ b/src/usr.bin/openssl/apps.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: apps.h,v 1.15 2015/09/11 14:30:23 bcook Exp $ */ 1/* $OpenBSD: apps.h,v 1.16 2015/09/13 12:41:01 bcook Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -120,6 +120,7 @@
120#include <openssl/ossl_typ.h> 120#include <openssl/ossl_typ.h>
121#include <openssl/txt_db.h> 121#include <openssl/txt_db.h>
122#include <openssl/x509.h> 122#include <openssl/x509.h>
123#include <openssl/ui.h>
123 124
124#ifndef OPENSSL_NO_OCSP 125#ifndef OPENSSL_NO_OCSP
125#include <openssl/ocsp.h> 126#include <openssl/ocsp.h>
@@ -142,8 +143,14 @@ typedef struct pw_cb_data {
142 143
143int password_callback(char *buf, int bufsiz, int verify, void *cb_data); 144int password_callback(char *buf, int bufsiz, int verify, void *cb_data);
144 145
145int setup_ui_method(void); 146int setup_ui(void);
146void destroy_ui_method(void); 147void destroy_ui(void);
148
149extern UI_METHOD *ui_method;
150int ui_open(UI *ui);
151int ui_read(UI *ui, UI_STRING *uis);
152int ui_write(UI *ui, UI_STRING *uis);
153int ui_close(UI *ui);
147 154
148int should_retry(int i); 155int should_retry(int i);
149int args_from_file(char *file, int *argc, char **argv[]); 156int args_from_file(char *file, int *argc, char **argv[]);