57d0d048a8
There are cases when, if you pass a NULL UI_METHOD, the called function will use an internal default. This is well and good, but there may be cases when this is undesirable and one would rather send in a UI that does absolutely nothing (sort of a /dev/null). UI_null() is the UI_METHOD for this purpose. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2744)
26 lines
757 B
C
26 lines
757 B
C
/*
|
|
* Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
|
|
*
|
|
* Licensed under the OpenSSL license (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
|
|
*/
|
|
|
|
#include "ui_locl.h"
|
|
|
|
static const UI_METHOD ui_null = {
|
|
"OpenSSL NULL UI",
|
|
NULL, /* opener */
|
|
NULL, /* writer */
|
|
NULL, /* flusher */
|
|
NULL, /* reader */
|
|
NULL, /* closer */
|
|
NULL
|
|
};
|
|
|
|
/* The method with all the built-in thingies */
|
|
const UI_METHOD *UI_null(void)
|
|
{
|
|
return &ui_null;
|
|
}
|