Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- miniconda3/envs/active_proaction/include/ncursesw/curses.h +0 -0
- miniconda3/envs/active_proaction/include/ncursesw/cursesapp.h +191 -0
- miniconda3/envs/active_proaction/include/ncursesw/cursesf.h +968 -0
- miniconda3/envs/active_proaction/include/ncursesw/cursesm.h +674 -0
- miniconda3/envs/active_proaction/include/ncursesw/cursesp.h +271 -0
- miniconda3/envs/active_proaction/include/ncursesw/cursesw.h +1581 -0
- miniconda3/envs/active_proaction/include/ncursesw/cursslk.h +240 -0
- miniconda3/envs/active_proaction/include/ncursesw/eti.h +55 -0
- miniconda3/envs/active_proaction/include/ncursesw/etip.h +406 -0
- miniconda3/envs/active_proaction/include/ncursesw/form.h +460 -0
- miniconda3/envs/active_proaction/include/ncursesw/menu.h +281 -0
- miniconda3/envs/active_proaction/include/ncursesw/ncurses.h +0 -0
- miniconda3/envs/active_proaction/include/ncursesw/ncurses_dll.h +103 -0
- miniconda3/envs/active_proaction/include/ncursesw/panel.h +100 -0
- miniconda3/envs/active_proaction/include/ncursesw/term.h +890 -0
- miniconda3/envs/active_proaction/include/ncursesw/term_entry.h +220 -0
- miniconda3/envs/active_proaction/include/ncursesw/termcap.h +73 -0
- miniconda3/envs/active_proaction/include/ncursesw/unctrl.h +68 -0
- miniconda3/envs/active_proaction/include/openssl/aes.h +109 -0
- miniconda3/envs/active_proaction/include/openssl/asn1.h +1125 -0
- miniconda3/envs/active_proaction/include/openssl/asn1err.h +140 -0
- miniconda3/envs/active_proaction/include/openssl/asn1t.h +935 -0
- miniconda3/envs/active_proaction/include/openssl/async.h +102 -0
- miniconda3/envs/active_proaction/include/openssl/asyncerr.h +27 -0
- miniconda3/envs/active_proaction/include/openssl/bio.h +1028 -0
- miniconda3/envs/active_proaction/include/openssl/bioerr.h +70 -0
- miniconda3/envs/active_proaction/include/openssl/blowfish.h +78 -0
- miniconda3/envs/active_proaction/include/openssl/bn.h +588 -0
- miniconda3/envs/active_proaction/include/openssl/bnerr.h +45 -0
- miniconda3/envs/active_proaction/include/openssl/buffer.h +60 -0
- miniconda3/envs/active_proaction/include/openssl/buffererr.h +23 -0
- miniconda3/envs/active_proaction/include/openssl/byteorder.h +339 -0
- miniconda3/envs/active_proaction/include/openssl/camellia.h +117 -0
- miniconda3/envs/active_proaction/include/openssl/cast.h +71 -0
- miniconda3/envs/active_proaction/include/openssl/cmac.h +52 -0
- miniconda3/envs/active_proaction/include/openssl/cmp.h +739 -0
- miniconda3/envs/active_proaction/include/openssl/cmp_util.h +56 -0
- miniconda3/envs/active_proaction/include/openssl/cmperr.h +132 -0
- miniconda3/envs/active_proaction/include/openssl/cms.h +515 -0
- miniconda3/envs/active_proaction/include/openssl/cmserr.h +125 -0
- miniconda3/envs/active_proaction/include/openssl/comp.h +101 -0
- miniconda3/envs/active_proaction/include/openssl/comperr.h +36 -0
- miniconda3/envs/active_proaction/include/openssl/conf.h +219 -0
- miniconda3/envs/active_proaction/include/openssl/conf_api.h +46 -0
- miniconda3/envs/active_proaction/include/openssl/conferr.h +50 -0
- miniconda3/envs/active_proaction/include/openssl/configuration.h +199 -0
- miniconda3/envs/active_proaction/include/openssl/conftypes.h +44 -0
- miniconda3/envs/active_proaction/include/openssl/core.h +235 -0
- miniconda3/envs/active_proaction/include/openssl/core_dispatch.h +1054 -0
- miniconda3/envs/active_proaction/include/openssl/core_names.h +579 -0
miniconda3/envs/active_proaction/include/ncursesw/curses.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
miniconda3/envs/active_proaction/include/ncursesw/cursesapp.h
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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|
+
* Copyright 2019-2020,2021 Thomas E. Dickey *
|
| 4 |
+
* Copyright 1998-2005,2011 Free Software Foundation, Inc. *
|
| 5 |
+
* *
|
| 6 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 7 |
+
* copy of this software and associated documentation files (the *
|
| 8 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 9 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 10 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 11 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 12 |
+
* furnished to do so, subject to the following conditions: *
|
| 13 |
+
* *
|
| 14 |
+
* The above copyright notice and this permission notice shall be included *
|
| 15 |
+
* in all copies or substantial portions of the Software. *
|
| 16 |
+
* *
|
| 17 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 18 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 19 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 20 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 21 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 22 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 23 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 24 |
+
* *
|
| 25 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 26 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 27 |
+
* sale, use or other dealings in this Software without prior written *
|
| 28 |
+
* authorization. *
|
| 29 |
+
****************************************************************************/
|
| 30 |
+
|
| 31 |
+
/****************************************************************************
|
| 32 |
+
* Author: Juergen Pfeifer, 1997 *
|
| 33 |
+
****************************************************************************/
|
| 34 |
+
|
| 35 |
+
// $Id: cursesapp.h,v 1.18 2021/06/17 21:26:02 tom Exp $
|
| 36 |
+
|
| 37 |
+
#ifndef NCURSES_CURSESAPP_H_incl
|
| 38 |
+
#define NCURSES_CURSESAPP_H_incl
|
| 39 |
+
|
| 40 |
+
#include <ncursesw/cursslk.h>
|
| 41 |
+
|
| 42 |
+
#if (defined(_WIN32) || defined(_WIN64))
|
| 43 |
+
# define NCURSES_CXX_MAIN_NAME cursespp_main
|
| 44 |
+
# define NCURSES_CXX_MAIN \
|
| 45 |
+
int main(int argc, char *argv[]) { \
|
| 46 |
+
return NCURSES_CXX_MAIN_NAME(argc, argv); \
|
| 47 |
+
}
|
| 48 |
+
#else
|
| 49 |
+
# define NCURSES_CXX_MAIN_NAME main
|
| 50 |
+
#endif
|
| 51 |
+
NCURSES_CXX_IMPEXP int NCURSES_CXX_MAIN_NAME(int argc, char *argv[]);
|
| 52 |
+
|
| 53 |
+
class NCURSES_CXX_IMPEXP NCursesApplication {
|
| 54 |
+
public:
|
| 55 |
+
typedef struct _slk_link { // This structure is used to maintain
|
| 56 |
+
struct _slk_link* prev; // a stack of SLKs
|
| 57 |
+
Soft_Label_Key_Set* SLKs;
|
| 58 |
+
} SLK_Link;
|
| 59 |
+
private:
|
| 60 |
+
static int rinit(NCursesWindow& w); // Internal Init function for title
|
| 61 |
+
static NCursesApplication* theApp; // Global ref. to the application
|
| 62 |
+
|
| 63 |
+
static SLK_Link* slk_stack;
|
| 64 |
+
|
| 65 |
+
protected:
|
| 66 |
+
static NCursesWindow* titleWindow; // The Title Window (if any)
|
| 67 |
+
|
| 68 |
+
bool b_Colors; // Is this a color application?
|
| 69 |
+
NCursesWindow* Root_Window; // This is the stdscr equiv.
|
| 70 |
+
|
| 71 |
+
// Initialization of attributes;
|
| 72 |
+
// Rewrite this in your derived class if you prefer other settings
|
| 73 |
+
virtual void init(bool bColors);
|
| 74 |
+
|
| 75 |
+
// The number of lines for the title window. Default is no title window
|
| 76 |
+
// You may rewrite this in your derived class
|
| 77 |
+
virtual int titlesize() const {
|
| 78 |
+
return 0;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
// This method is called to put something into the title window initially
|
| 82 |
+
// You may rewrite this in your derived class
|
| 83 |
+
virtual void title() {
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
// The layout used for the Soft Label Keys. Default is to have no SLKs.
|
| 87 |
+
// You may rewrite this in your derived class
|
| 88 |
+
virtual Soft_Label_Key_Set::Label_Layout useSLKs() const {
|
| 89 |
+
return Soft_Label_Key_Set::None;
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
// This method is called to initialize the SLKs. Default is nothing.
|
| 93 |
+
// You may rewrite this in your derived class
|
| 94 |
+
virtual void init_labels(Soft_Label_Key_Set& S) const {
|
| 95 |
+
(void) S;
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
// Your derived class must implement this method. The return value must
|
| 99 |
+
// be the exit value of your application.
|
| 100 |
+
virtual int run() = 0;
|
| 101 |
+
|
| 102 |
+
// The constructor is protected, so you may use it in your derived
|
| 103 |
+
// class constructor. The argument tells whether or not you want colors.
|
| 104 |
+
NCursesApplication(bool wantColors = FALSE);
|
| 105 |
+
|
| 106 |
+
NCursesApplication& operator=(const NCursesApplication& rhs)
|
| 107 |
+
{
|
| 108 |
+
if (this != &rhs) {
|
| 109 |
+
*this = rhs;
|
| 110 |
+
}
|
| 111 |
+
return *this;
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
NCursesApplication(const NCursesApplication& rhs)
|
| 115 |
+
: b_Colors(rhs.b_Colors),
|
| 116 |
+
Root_Window(rhs.Root_Window)
|
| 117 |
+
{
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
static NCursesWindow *&getTitleWindow();
|
| 121 |
+
|
| 122 |
+
public:
|
| 123 |
+
virtual ~NCursesApplication() THROWS(NCursesException);
|
| 124 |
+
|
| 125 |
+
// Get a pointer to the current application object
|
| 126 |
+
static NCursesApplication* getApplication();
|
| 127 |
+
|
| 128 |
+
// This method runs the application and returns its exit value
|
| 129 |
+
int operator()(void);
|
| 130 |
+
|
| 131 |
+
// Process the commandline arguments. The default implementation simply
|
| 132 |
+
// ignores them. Your derived class may rewrite this.
|
| 133 |
+
virtual void handleArgs(int argc, char* argv[]) {
|
| 134 |
+
(void) argc;
|
| 135 |
+
(void) argv;
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
// Does this application use colors?
|
| 139 |
+
inline bool useColors() const {
|
| 140 |
+
return b_Colors;
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
// Push the Key Set S onto the SLK Stack. S then becomes the current set
|
| 144 |
+
// of Soft Labelled Keys.
|
| 145 |
+
void push(Soft_Label_Key_Set& S);
|
| 146 |
+
|
| 147 |
+
// Throw away the current set of SLKs and make the previous one the
|
| 148 |
+
// new current set.
|
| 149 |
+
bool pop();
|
| 150 |
+
|
| 151 |
+
// Retrieve the current set of Soft Labelled Keys.
|
| 152 |
+
Soft_Label_Key_Set* top() const;
|
| 153 |
+
|
| 154 |
+
// Attributes to use for menu and forms foregrounds
|
| 155 |
+
virtual chtype foregrounds() const {
|
| 156 |
+
return b_Colors ? static_cast<chtype>(COLOR_PAIR(1)) : A_BOLD;
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
// Attributes to use for menu and forms backgrounds
|
| 160 |
+
virtual chtype backgrounds() const {
|
| 161 |
+
return b_Colors ? static_cast<chtype>(COLOR_PAIR(2)) : A_NORMAL;
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
// Attributes to use for inactive (menu) elements
|
| 165 |
+
virtual chtype inactives() const {
|
| 166 |
+
return b_Colors ? static_cast<chtype>(COLOR_PAIR(3)|A_DIM) : A_DIM;
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
// Attributes to use for (form) labels and SLKs
|
| 170 |
+
virtual chtype labels() const {
|
| 171 |
+
return b_Colors ? static_cast<chtype>(COLOR_PAIR(4)) : A_NORMAL;
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
// Attributes to use for form backgrounds
|
| 175 |
+
virtual chtype dialog_backgrounds() const {
|
| 176 |
+
return b_Colors ? static_cast<chtype>(COLOR_PAIR(4)) : A_NORMAL;
|
| 177 |
+
}
|
| 178 |
+
|
| 179 |
+
// Attributes to use as default for (form) window backgrounds
|
| 180 |
+
virtual chtype window_backgrounds() const {
|
| 181 |
+
return b_Colors ? static_cast<chtype>(COLOR_PAIR(5)) : A_NORMAL;
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
// Attributes to use for the title window
|
| 185 |
+
virtual chtype screen_titles() const {
|
| 186 |
+
return b_Colors ? static_cast<chtype>(COLOR_PAIR(6)) : A_BOLD;
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
};
|
| 190 |
+
|
| 191 |
+
#endif /* NCURSES_CURSESAPP_H_incl */
|
miniconda3/envs/active_proaction/include/ncursesw/cursesf.h
ADDED
|
@@ -0,0 +1,968 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// * This makes emacs happy -*-Mode: C++;-*-
|
| 2 |
+
// vile:cppmode
|
| 3 |
+
/****************************************************************************
|
| 4 |
+
* Copyright 2019-2021,2022 Thomas E. Dickey *
|
| 5 |
+
* Copyright 1998-2012,2014 Free Software Foundation, Inc. *
|
| 6 |
+
* *
|
| 7 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 8 |
+
* copy of this software and associated documentation files (the *
|
| 9 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 10 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 11 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 12 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 13 |
+
* furnished to do so, subject to the following conditions: *
|
| 14 |
+
* *
|
| 15 |
+
* The above copyright notice and this permission notice shall be included *
|
| 16 |
+
* in all copies or substantial portions of the Software. *
|
| 17 |
+
* *
|
| 18 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 19 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 20 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 21 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 22 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 23 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 24 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 25 |
+
* *
|
| 26 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 27 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 28 |
+
* sale, use or other dealings in this Software without prior written *
|
| 29 |
+
* authorization. *
|
| 30 |
+
****************************************************************************/
|
| 31 |
+
|
| 32 |
+
/****************************************************************************
|
| 33 |
+
* Author: Juergen Pfeifer, 1997 *
|
| 34 |
+
****************************************************************************/
|
| 35 |
+
|
| 36 |
+
// $Id: cursesf.h,v 1.39 2022/08/20 20:52:15 tom Exp $
|
| 37 |
+
|
| 38 |
+
#ifndef NCURSES_CURSESF_H_incl
|
| 39 |
+
#define NCURSES_CURSESF_H_incl 1
|
| 40 |
+
|
| 41 |
+
#include <ncursesw/cursesp.h>
|
| 42 |
+
|
| 43 |
+
#ifndef __EXT_QNX
|
| 44 |
+
#include <string.h>
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
extern "C" {
|
| 48 |
+
# include <ncursesw/form.h>
|
| 49 |
+
}
|
| 50 |
+
//
|
| 51 |
+
// -------------------------------------------------------------------------
|
| 52 |
+
// The abstract base class for builtin and user defined Fieldtypes.
|
| 53 |
+
// -------------------------------------------------------------------------
|
| 54 |
+
//
|
| 55 |
+
class NCURSES_CXX_IMPEXP NCursesFormField; // forward declaration
|
| 56 |
+
|
| 57 |
+
// Class to represent builtin field types as well as C++ written new
|
| 58 |
+
// fieldtypes (see classes UserDefineFieldType...
|
| 59 |
+
class NCURSES_CXX_IMPEXP NCursesFieldType
|
| 60 |
+
{
|
| 61 |
+
friend class NCursesFormField;
|
| 62 |
+
|
| 63 |
+
protected:
|
| 64 |
+
FIELDTYPE* fieldtype;
|
| 65 |
+
|
| 66 |
+
inline void OnError(int err) const THROW2(NCursesException const, NCursesFormException) {
|
| 67 |
+
if (err!=E_OK)
|
| 68 |
+
THROW(new NCursesFormException (err));
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
NCursesFieldType(FIELDTYPE *f) : fieldtype(f) {
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
virtual ~NCursesFieldType() {}
|
| 75 |
+
|
| 76 |
+
// Set the fields f fieldtype to this one.
|
| 77 |
+
virtual void set(NCursesFormField& f) = 0;
|
| 78 |
+
|
| 79 |
+
public:
|
| 80 |
+
NCursesFieldType()
|
| 81 |
+
: fieldtype(STATIC_CAST(FIELDTYPE*)(0))
|
| 82 |
+
{
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
NCursesFieldType& operator=(const NCursesFieldType& rhs)
|
| 86 |
+
{
|
| 87 |
+
if (this != &rhs) {
|
| 88 |
+
*this = rhs;
|
| 89 |
+
}
|
| 90 |
+
return *this;
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
NCursesFieldType(const NCursesFieldType& rhs)
|
| 94 |
+
: fieldtype(rhs.fieldtype)
|
| 95 |
+
{
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
};
|
| 99 |
+
|
| 100 |
+
//
|
| 101 |
+
// -------------------------------------------------------------------------
|
| 102 |
+
// The class representing a forms field, wrapping the lowlevel FIELD struct
|
| 103 |
+
// -------------------------------------------------------------------------
|
| 104 |
+
//
|
| 105 |
+
class NCURSES_CXX_IMPEXP NCursesFormField
|
| 106 |
+
{
|
| 107 |
+
friend class NCursesForm;
|
| 108 |
+
|
| 109 |
+
protected:
|
| 110 |
+
FIELD *field; // lowlevel structure
|
| 111 |
+
NCursesFieldType* ftype; // Associated field type
|
| 112 |
+
|
| 113 |
+
// Error handler
|
| 114 |
+
inline void OnError (int err) const THROW2(NCursesException const, NCursesFormException) {
|
| 115 |
+
if (err != E_OK)
|
| 116 |
+
THROW(new NCursesFormException (err));
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
public:
|
| 120 |
+
// Create a 'Null' field. Can be used to delimit a field list
|
| 121 |
+
NCursesFormField()
|
| 122 |
+
: field(STATIC_CAST(FIELD*)(0)),
|
| 123 |
+
ftype(STATIC_CAST(NCursesFieldType*)(0))
|
| 124 |
+
{
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
// Create a new field
|
| 128 |
+
NCursesFormField (int rows,
|
| 129 |
+
int ncols,
|
| 130 |
+
int first_row = 0,
|
| 131 |
+
int first_col = 0,
|
| 132 |
+
int offscreen_rows = 0,
|
| 133 |
+
int additional_buffers = 0)
|
| 134 |
+
: field(0),
|
| 135 |
+
ftype(STATIC_CAST(NCursesFieldType*)(0))
|
| 136 |
+
{
|
| 137 |
+
field = ::new_field(rows, ncols, first_row, first_col,
|
| 138 |
+
offscreen_rows, additional_buffers);
|
| 139 |
+
if (!field)
|
| 140 |
+
OnError(errno);
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
NCursesFormField& operator=(const NCursesFormField& rhs)
|
| 144 |
+
{
|
| 145 |
+
if (this != &rhs) {
|
| 146 |
+
*this = rhs;
|
| 147 |
+
}
|
| 148 |
+
return *this;
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
NCursesFormField(const NCursesFormField& rhs)
|
| 152 |
+
: field(rhs.field), ftype(rhs.ftype)
|
| 153 |
+
{
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
virtual ~NCursesFormField () THROWS(NCursesException);
|
| 157 |
+
|
| 158 |
+
// Duplicate the field at a new position
|
| 159 |
+
inline NCursesFormField* dup(int first_row, int first_col)
|
| 160 |
+
{
|
| 161 |
+
NCursesFormField* f = new NCursesFormField();
|
| 162 |
+
if (!f)
|
| 163 |
+
OnError(E_SYSTEM_ERROR);
|
| 164 |
+
else {
|
| 165 |
+
f->ftype = ftype;
|
| 166 |
+
f->field = ::dup_field(field,first_row,first_col);
|
| 167 |
+
if (!f->field)
|
| 168 |
+
OnError(errno);
|
| 169 |
+
}
|
| 170 |
+
return f;
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
// Link the field to a new location
|
| 174 |
+
inline NCursesFormField* link(int first_row, int first_col) {
|
| 175 |
+
NCursesFormField* f = new NCursesFormField();
|
| 176 |
+
if (!f)
|
| 177 |
+
OnError(E_SYSTEM_ERROR);
|
| 178 |
+
else {
|
| 179 |
+
f->ftype = ftype;
|
| 180 |
+
f->field = ::link_field(field,first_row,first_col);
|
| 181 |
+
if (!f->field)
|
| 182 |
+
OnError(errno);
|
| 183 |
+
}
|
| 184 |
+
return f;
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
// Get the lowlevel field representation
|
| 188 |
+
inline FIELD* get_field() const {
|
| 189 |
+
return field;
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
// Retrieve info about the field
|
| 193 |
+
inline void info(int& rows, int& ncols,
|
| 194 |
+
int& first_row, int& first_col,
|
| 195 |
+
int& offscreen_rows, int& additional_buffers) const {
|
| 196 |
+
OnError(::field_info(field, &rows, &ncols,
|
| 197 |
+
&first_row, &first_col,
|
| 198 |
+
&offscreen_rows, &additional_buffers));
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
// Retrieve info about the fields dynamic properties.
|
| 202 |
+
inline void dynamic_info(int& dynamic_rows, int& dynamic_cols,
|
| 203 |
+
int& max_growth) const {
|
| 204 |
+
OnError(::dynamic_field_info(field, &dynamic_rows, &dynamic_cols,
|
| 205 |
+
&max_growth));
|
| 206 |
+
}
|
| 207 |
+
|
| 208 |
+
// For a dynamic field you may set the maximum growth limit.
|
| 209 |
+
// A zero means unlimited growth.
|
| 210 |
+
inline void set_maximum_growth(int growth = 0) {
|
| 211 |
+
OnError(::set_max_field(field,growth));
|
| 212 |
+
}
|
| 213 |
+
|
| 214 |
+
// Move the field to a new position
|
| 215 |
+
inline void move(int row, int col) {
|
| 216 |
+
OnError(::move_field(field,row,col));
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
// Mark the field to start a new page
|
| 220 |
+
inline void new_page(bool pageFlag = FALSE) {
|
| 221 |
+
OnError(::set_new_page(field,pageFlag));
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
// Retrieve whether or not the field starts a new page.
|
| 225 |
+
inline bool is_new_page() const {
|
| 226 |
+
return ::new_page(field);
|
| 227 |
+
}
|
| 228 |
+
|
| 229 |
+
// Set the justification for the field
|
| 230 |
+
inline void set_justification(int just) {
|
| 231 |
+
OnError(::set_field_just(field,just));
|
| 232 |
+
}
|
| 233 |
+
|
| 234 |
+
// Retrieve the fields justification
|
| 235 |
+
inline int justification() const {
|
| 236 |
+
return ::field_just(field);
|
| 237 |
+
}
|
| 238 |
+
// Set the foreground attribute for the field
|
| 239 |
+
inline void set_foreground(chtype foreground) {
|
| 240 |
+
OnError(::set_field_fore(field,foreground));
|
| 241 |
+
}
|
| 242 |
+
|
| 243 |
+
// Retrieve the fields foreground attribute
|
| 244 |
+
inline chtype fore() const {
|
| 245 |
+
return ::field_fore(field);
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
+
// Set the background attribute for the field
|
| 249 |
+
inline void set_background(chtype background) {
|
| 250 |
+
OnError(::set_field_back(field,background));
|
| 251 |
+
}
|
| 252 |
+
|
| 253 |
+
// Retrieve the fields background attribute
|
| 254 |
+
inline chtype back() const {
|
| 255 |
+
return ::field_back(field);
|
| 256 |
+
}
|
| 257 |
+
|
| 258 |
+
// Set the padding character for the field
|
| 259 |
+
inline void set_pad_character(int padding) {
|
| 260 |
+
OnError(::set_field_pad(field, padding));
|
| 261 |
+
}
|
| 262 |
+
|
| 263 |
+
// Retrieve the fields padding character
|
| 264 |
+
inline int pad() const {
|
| 265 |
+
return ::field_pad(field);
|
| 266 |
+
}
|
| 267 |
+
|
| 268 |
+
// Switch on the fields options
|
| 269 |
+
inline void options_on (Field_Options opts) {
|
| 270 |
+
OnError (::field_opts_on (field, opts));
|
| 271 |
+
}
|
| 272 |
+
|
| 273 |
+
// Switch off the fields options
|
| 274 |
+
inline void options_off (Field_Options opts) {
|
| 275 |
+
OnError (::field_opts_off (field, opts));
|
| 276 |
+
}
|
| 277 |
+
|
| 278 |
+
// Retrieve the fields options
|
| 279 |
+
inline Field_Options options () const {
|
| 280 |
+
return ::field_opts (field);
|
| 281 |
+
}
|
| 282 |
+
|
| 283 |
+
// Set the fields options
|
| 284 |
+
inline void set_options (Field_Options opts) {
|
| 285 |
+
OnError (::set_field_opts (field, opts));
|
| 286 |
+
}
|
| 287 |
+
|
| 288 |
+
// Mark the field as changed
|
| 289 |
+
inline void set_changed(bool changeFlag = TRUE) {
|
| 290 |
+
OnError(::set_field_status(field,changeFlag));
|
| 291 |
+
}
|
| 292 |
+
|
| 293 |
+
// Test whether or not the field is marked as changed
|
| 294 |
+
inline bool changed() const {
|
| 295 |
+
return ::field_status(field);
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
+
// Return the index of the field in the field array of a form
|
| 299 |
+
// or -1 if the field is not associated to a form
|
| 300 |
+
inline int (index)() const {
|
| 301 |
+
return ::field_index(field);
|
| 302 |
+
}
|
| 303 |
+
|
| 304 |
+
// Store a value in a fields buffer. The default buffer is nr. 0
|
| 305 |
+
inline void set_value(const char *val, int buffer = 0) {
|
| 306 |
+
OnError(::set_field_buffer(field,buffer,val));
|
| 307 |
+
}
|
| 308 |
+
|
| 309 |
+
// Retrieve the value of a fields buffer. The default buffer is nr. 0
|
| 310 |
+
inline char* value(int buffer = 0) const {
|
| 311 |
+
return ::field_buffer(field,buffer);
|
| 312 |
+
}
|
| 313 |
+
|
| 314 |
+
// Set the validation type of the field.
|
| 315 |
+
inline void set_fieldtype(NCursesFieldType& f) {
|
| 316 |
+
ftype = &f;
|
| 317 |
+
f.set(*this); // A good friend may do that...
|
| 318 |
+
}
|
| 319 |
+
|
| 320 |
+
// Retrieve the validation type of the field.
|
| 321 |
+
inline NCursesFieldType* fieldtype() const {
|
| 322 |
+
return ftype;
|
| 323 |
+
}
|
| 324 |
+
|
| 325 |
+
};
|
| 326 |
+
|
| 327 |
+
// This are the built-in hook functions in this C++ binding. In C++ we use
|
| 328 |
+
// virtual member functions (see below On_..._Init and On_..._Termination)
|
| 329 |
+
// to provide this functionality in an object oriented manner.
|
| 330 |
+
extern "C" {
|
| 331 |
+
void _nc_xx_frm_init(FORM *);
|
| 332 |
+
void _nc_xx_frm_term(FORM *);
|
| 333 |
+
void _nc_xx_fld_init(FORM *);
|
| 334 |
+
void _nc_xx_fld_term(FORM *);
|
| 335 |
+
}
|
| 336 |
+
|
| 337 |
+
//
|
| 338 |
+
// -------------------------------------------------------------------------
|
| 339 |
+
// The class representing a form, wrapping the lowlevel FORM struct
|
| 340 |
+
// -------------------------------------------------------------------------
|
| 341 |
+
//
|
| 342 |
+
class NCURSES_CXX_IMPEXP NCursesForm : public NCursesPanel
|
| 343 |
+
{
|
| 344 |
+
protected:
|
| 345 |
+
FORM* form; // the lowlevel structure
|
| 346 |
+
|
| 347 |
+
private:
|
| 348 |
+
NCursesWindow* sub; // the subwindow object
|
| 349 |
+
bool b_sub_owner; // is this our own subwindow?
|
| 350 |
+
bool b_framed; // has the form a border?
|
| 351 |
+
bool b_autoDelete; // Delete fields when deleting form?
|
| 352 |
+
|
| 353 |
+
NCursesFormField** my_fields; // The array of fields for this form
|
| 354 |
+
|
| 355 |
+
// This structure is used for the form's user data field to link the
|
| 356 |
+
// FORM* to the C++ object and to provide extra space for a user pointer.
|
| 357 |
+
typedef struct {
|
| 358 |
+
void* m_user; // the pointer for the user's data
|
| 359 |
+
const NCursesForm* m_back; // backward pointer to C++ object
|
| 360 |
+
const FORM* m_owner;
|
| 361 |
+
} UserHook;
|
| 362 |
+
|
| 363 |
+
// Get the backward pointer to the C++ object from a FORM
|
| 364 |
+
static inline NCursesForm* getHook(const FORM *f) {
|
| 365 |
+
UserHook* hook = reinterpret_cast<UserHook*>(::form_userptr(f));
|
| 366 |
+
assert(hook != 0 && hook->m_owner==f);
|
| 367 |
+
return const_cast<NCursesForm*>(hook->m_back);
|
| 368 |
+
}
|
| 369 |
+
|
| 370 |
+
friend void _nc_xx_frm_init(FORM *);
|
| 371 |
+
friend void _nc_xx_frm_term(FORM *);
|
| 372 |
+
friend void _nc_xx_fld_init(FORM *);
|
| 373 |
+
friend void _nc_xx_fld_term(FORM *);
|
| 374 |
+
|
| 375 |
+
// Calculate FIELD* array for the menu
|
| 376 |
+
FIELD** mapFields(NCursesFormField* nfields[]);
|
| 377 |
+
|
| 378 |
+
protected:
|
| 379 |
+
// internal routines
|
| 380 |
+
inline void set_user(void *user) {
|
| 381 |
+
UserHook* uptr = reinterpret_cast<UserHook*>(::form_userptr (form));
|
| 382 |
+
assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==form);
|
| 383 |
+
uptr->m_user = user;
|
| 384 |
+
}
|
| 385 |
+
|
| 386 |
+
inline void *get_user() {
|
| 387 |
+
UserHook* uptr = reinterpret_cast<UserHook*>(::form_userptr (form));
|
| 388 |
+
assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==form);
|
| 389 |
+
return uptr->m_user;
|
| 390 |
+
}
|
| 391 |
+
|
| 392 |
+
void InitForm (NCursesFormField* Fields[],
|
| 393 |
+
bool with_frame,
|
| 394 |
+
bool autoDeleteFields);
|
| 395 |
+
|
| 396 |
+
inline void OnError (int err) const THROW2(NCursesException const, NCursesFormException) {
|
| 397 |
+
if (err != E_OK)
|
| 398 |
+
THROW(new NCursesFormException (err));
|
| 399 |
+
}
|
| 400 |
+
|
| 401 |
+
// this wraps the form_driver call.
|
| 402 |
+
virtual int driver (int c) ;
|
| 403 |
+
|
| 404 |
+
// 'Internal' constructor, builds an object without association to a
|
| 405 |
+
// field array.
|
| 406 |
+
NCursesForm( int nlines,
|
| 407 |
+
int ncols,
|
| 408 |
+
int begin_y = 0,
|
| 409 |
+
int begin_x = 0)
|
| 410 |
+
: NCursesPanel(nlines, ncols, begin_y, begin_x),
|
| 411 |
+
form (STATIC_CAST(FORM*)(0)),
|
| 412 |
+
sub(0),
|
| 413 |
+
b_sub_owner(0),
|
| 414 |
+
b_framed(0),
|
| 415 |
+
b_autoDelete(0),
|
| 416 |
+
my_fields(0)
|
| 417 |
+
{
|
| 418 |
+
}
|
| 419 |
+
|
| 420 |
+
public:
|
| 421 |
+
// Create form for the default panel.
|
| 422 |
+
NCursesForm (NCursesFormField* Fields[],
|
| 423 |
+
bool with_frame=FALSE, // reserve space for a frame?
|
| 424 |
+
bool autoDelete_Fields=FALSE) // do automatic cleanup?
|
| 425 |
+
: NCursesPanel(),
|
| 426 |
+
form(0),
|
| 427 |
+
sub(0),
|
| 428 |
+
b_sub_owner(0),
|
| 429 |
+
b_framed(0),
|
| 430 |
+
b_autoDelete(0),
|
| 431 |
+
my_fields(0)
|
| 432 |
+
{
|
| 433 |
+
InitForm(Fields, with_frame, autoDelete_Fields);
|
| 434 |
+
}
|
| 435 |
+
|
| 436 |
+
// Create a form in a panel with the given position and size.
|
| 437 |
+
NCursesForm (NCursesFormField* Fields[],
|
| 438 |
+
int nlines,
|
| 439 |
+
int ncols,
|
| 440 |
+
int begin_y,
|
| 441 |
+
int begin_x,
|
| 442 |
+
bool with_frame=FALSE, // reserve space for a frame?
|
| 443 |
+
bool autoDelete_Fields=FALSE) // do automatic cleanup?
|
| 444 |
+
: NCursesPanel(nlines, ncols, begin_y, begin_x),
|
| 445 |
+
form(0),
|
| 446 |
+
sub(0),
|
| 447 |
+
b_sub_owner(0),
|
| 448 |
+
b_framed(0),
|
| 449 |
+
b_autoDelete(0),
|
| 450 |
+
my_fields(0)
|
| 451 |
+
{
|
| 452 |
+
InitForm(Fields, with_frame, autoDelete_Fields);
|
| 453 |
+
}
|
| 454 |
+
|
| 455 |
+
NCursesForm& operator=(const NCursesForm& rhs)
|
| 456 |
+
{
|
| 457 |
+
if (this != &rhs) {
|
| 458 |
+
*this = rhs;
|
| 459 |
+
NCursesPanel::operator=(rhs);
|
| 460 |
+
}
|
| 461 |
+
return *this;
|
| 462 |
+
}
|
| 463 |
+
|
| 464 |
+
NCursesForm(const NCursesForm& rhs)
|
| 465 |
+
: NCursesPanel(rhs),
|
| 466 |
+
form(rhs.form),
|
| 467 |
+
sub(rhs.sub),
|
| 468 |
+
b_sub_owner(rhs.b_sub_owner),
|
| 469 |
+
b_framed(rhs.b_framed),
|
| 470 |
+
b_autoDelete(rhs.b_autoDelete),
|
| 471 |
+
my_fields(rhs.my_fields)
|
| 472 |
+
{
|
| 473 |
+
}
|
| 474 |
+
|
| 475 |
+
virtual ~NCursesForm() THROWS(NCursesException);
|
| 476 |
+
|
| 477 |
+
// Set the default attributes for the form
|
| 478 |
+
virtual void setDefaultAttributes();
|
| 479 |
+
|
| 480 |
+
// Retrieve current field of the form.
|
| 481 |
+
inline NCursesFormField* current_field() const {
|
| 482 |
+
return my_fields[::field_index(::current_field(form))];
|
| 483 |
+
}
|
| 484 |
+
|
| 485 |
+
// Set the forms subwindow
|
| 486 |
+
void setSubWindow(NCursesWindow& sub);
|
| 487 |
+
|
| 488 |
+
// Set these fields for the form
|
| 489 |
+
inline void setFields(NCursesFormField* Fields[]) {
|
| 490 |
+
OnError(::set_form_fields(form,mapFields(Fields)));
|
| 491 |
+
}
|
| 492 |
+
|
| 493 |
+
// Remove the form from the screen
|
| 494 |
+
inline void unpost (void) {
|
| 495 |
+
OnError (::unpost_form (form));
|
| 496 |
+
}
|
| 497 |
+
|
| 498 |
+
// Post the form to the screen if flag is true, unpost it otherwise
|
| 499 |
+
inline void post(bool flag = TRUE) {
|
| 500 |
+
OnError (flag ? ::post_form(form) : ::unpost_form (form));
|
| 501 |
+
}
|
| 502 |
+
|
| 503 |
+
// Decorations
|
| 504 |
+
inline void frame(const char *title=NULL, const char* btitle=NULL) NCURSES_OVERRIDE {
|
| 505 |
+
if (b_framed)
|
| 506 |
+
NCursesPanel::frame(title,btitle);
|
| 507 |
+
else
|
| 508 |
+
OnError(E_SYSTEM_ERROR);
|
| 509 |
+
}
|
| 510 |
+
|
| 511 |
+
inline void boldframe(const char *title=NULL, const char* btitle=NULL) NCURSES_OVERRIDE {
|
| 512 |
+
if (b_framed)
|
| 513 |
+
NCursesPanel::boldframe(title,btitle);
|
| 514 |
+
else
|
| 515 |
+
OnError(E_SYSTEM_ERROR);
|
| 516 |
+
}
|
| 517 |
+
|
| 518 |
+
inline void label(const char *topLabel, const char *bottomLabel) NCURSES_OVERRIDE {
|
| 519 |
+
if (b_framed)
|
| 520 |
+
NCursesPanel::label(topLabel,bottomLabel);
|
| 521 |
+
else
|
| 522 |
+
OnError(E_SYSTEM_ERROR);
|
| 523 |
+
}
|
| 524 |
+
|
| 525 |
+
// -----
|
| 526 |
+
// Hooks
|
| 527 |
+
// -----
|
| 528 |
+
|
| 529 |
+
// Called after the form gets repositioned in its window.
|
| 530 |
+
// This is especially true if the form is posted.
|
| 531 |
+
virtual void On_Form_Init();
|
| 532 |
+
|
| 533 |
+
// Called before the form gets repositioned in its window.
|
| 534 |
+
// This is especially true if the form is unposted.
|
| 535 |
+
virtual void On_Form_Termination();
|
| 536 |
+
|
| 537 |
+
// Called after the field became the current field
|
| 538 |
+
virtual void On_Field_Init(NCursesFormField& field);
|
| 539 |
+
|
| 540 |
+
// Called before this field is left as current field.
|
| 541 |
+
virtual void On_Field_Termination(NCursesFormField& field);
|
| 542 |
+
|
| 543 |
+
// Calculate required window size for the form.
|
| 544 |
+
void scale(int& rows, int& ncols) const {
|
| 545 |
+
OnError(::scale_form(form,&rows,&ncols));
|
| 546 |
+
}
|
| 547 |
+
|
| 548 |
+
// Retrieve number of fields in the form.
|
| 549 |
+
int count() const {
|
| 550 |
+
return ::field_count(form);
|
| 551 |
+
}
|
| 552 |
+
|
| 553 |
+
// Make the page the current page of the form.
|
| 554 |
+
void set_page(int pageNum) {
|
| 555 |
+
OnError(::set_form_page(form, pageNum));
|
| 556 |
+
}
|
| 557 |
+
|
| 558 |
+
// Retrieve current page number
|
| 559 |
+
int page() const {
|
| 560 |
+
return ::form_page(form);
|
| 561 |
+
}
|
| 562 |
+
|
| 563 |
+
// Switch on the forms options
|
| 564 |
+
inline void options_on (Form_Options opts) {
|
| 565 |
+
OnError (::form_opts_on (form, opts));
|
| 566 |
+
}
|
| 567 |
+
|
| 568 |
+
// Switch off the forms options
|
| 569 |
+
inline void options_off (Form_Options opts) {
|
| 570 |
+
OnError (::form_opts_off (form, opts));
|
| 571 |
+
}
|
| 572 |
+
|
| 573 |
+
// Retrieve the forms options
|
| 574 |
+
inline Form_Options options () const {
|
| 575 |
+
return ::form_opts (form);
|
| 576 |
+
}
|
| 577 |
+
|
| 578 |
+
// Set the forms options
|
| 579 |
+
inline void set_options (Form_Options opts) {
|
| 580 |
+
OnError (::set_form_opts (form, opts));
|
| 581 |
+
}
|
| 582 |
+
|
| 583 |
+
// Are there more data in the current field after the data shown
|
| 584 |
+
inline bool data_ahead() const {
|
| 585 |
+
return ::data_ahead(form);
|
| 586 |
+
}
|
| 587 |
+
|
| 588 |
+
// Are there more data in the current field before the data shown
|
| 589 |
+
inline bool data_behind() const {
|
| 590 |
+
return ::data_behind(form);
|
| 591 |
+
}
|
| 592 |
+
|
| 593 |
+
// Position the cursor to the current field
|
| 594 |
+
inline void position_cursor () {
|
| 595 |
+
OnError (::pos_form_cursor (form));
|
| 596 |
+
}
|
| 597 |
+
// Set the current field
|
| 598 |
+
inline void set_current(NCursesFormField& F) {
|
| 599 |
+
OnError (::set_current_field(form, F.field));
|
| 600 |
+
}
|
| 601 |
+
|
| 602 |
+
// Provide a default key virtualization. Translate the keyboard
|
| 603 |
+
// code c into a form request code.
|
| 604 |
+
// The default implementation provides a hopefully straightforward
|
| 605 |
+
// mapping for the most common keystrokes and form requests.
|
| 606 |
+
virtual int virtualize(int c);
|
| 607 |
+
|
| 608 |
+
// Operators
|
| 609 |
+
inline NCursesFormField* operator[](int i) const {
|
| 610 |
+
if ( (i < 0) || (i >= ::field_count (form)) )
|
| 611 |
+
OnError (E_BAD_ARGUMENT);
|
| 612 |
+
return my_fields[i];
|
| 613 |
+
}
|
| 614 |
+
|
| 615 |
+
// Perform the menu's operation
|
| 616 |
+
// Return the field where you left the form.
|
| 617 |
+
virtual NCursesFormField* operator()(void);
|
| 618 |
+
|
| 619 |
+
// Exception handlers. The default is a Beep.
|
| 620 |
+
virtual void On_Request_Denied(int c) const;
|
| 621 |
+
virtual void On_Invalid_Field(int c) const;
|
| 622 |
+
virtual void On_Unknown_Command(int c) const;
|
| 623 |
+
|
| 624 |
+
};
|
| 625 |
+
|
| 626 |
+
//
|
| 627 |
+
// -------------------------------------------------------------------------
|
| 628 |
+
// This is the typical C++ typesafe way to allow to attach
|
| 629 |
+
// user data to a field of a form. Its assumed that the user
|
| 630 |
+
// data belongs to some class T. Use T as template argument
|
| 631 |
+
// to create a UserField.
|
| 632 |
+
// -------------------------------------------------------------------------
|
| 633 |
+
template<class T> class NCURSES_CXX_IMPEXP NCursesUserField : public NCursesFormField
|
| 634 |
+
{
|
| 635 |
+
public:
|
| 636 |
+
NCursesUserField (int rows,
|
| 637 |
+
int ncols,
|
| 638 |
+
int first_row = 0,
|
| 639 |
+
int first_col = 0,
|
| 640 |
+
const T* p_UserData = STATIC_CAST(T*)(0),
|
| 641 |
+
int offscreen_rows = 0,
|
| 642 |
+
int additional_buffers = 0)
|
| 643 |
+
: NCursesFormField (rows, ncols,
|
| 644 |
+
first_row, first_col,
|
| 645 |
+
offscreen_rows, additional_buffers) {
|
| 646 |
+
if (field)
|
| 647 |
+
OnError(::set_field_userptr(field, STATIC_CAST(void *)(p_UserData)));
|
| 648 |
+
}
|
| 649 |
+
|
| 650 |
+
virtual ~NCursesUserField() THROWS(NCursesException) {};
|
| 651 |
+
|
| 652 |
+
inline const T* UserData (void) const {
|
| 653 |
+
return reinterpret_cast<const T*>(::field_userptr (field));
|
| 654 |
+
}
|
| 655 |
+
|
| 656 |
+
inline virtual void setUserData(const T* p_UserData) {
|
| 657 |
+
if (field)
|
| 658 |
+
OnError (::set_field_userptr (field, STATIC_CAST(void *)(p_UserData)));
|
| 659 |
+
}
|
| 660 |
+
};
|
| 661 |
+
//
|
| 662 |
+
// -------------------------------------------------------------------------
|
| 663 |
+
// The same mechanism is used to attach user data to a form
|
| 664 |
+
// -------------------------------------------------------------------------
|
| 665 |
+
//
|
| 666 |
+
template<class T> class NCURSES_CXX_IMPEXP NCursesUserForm : public NCursesForm
|
| 667 |
+
{
|
| 668 |
+
protected:
|
| 669 |
+
// 'Internal' constructor, builds an object without association to a
|
| 670 |
+
// field array.
|
| 671 |
+
NCursesUserForm( int nlines,
|
| 672 |
+
int ncols,
|
| 673 |
+
int begin_y = 0,
|
| 674 |
+
int begin_x = 0,
|
| 675 |
+
const T* p_UserData = STATIC_CAST(T*)(0))
|
| 676 |
+
: NCursesForm(nlines,ncols,begin_y,begin_x) {
|
| 677 |
+
if (form)
|
| 678 |
+
set_user (const_cast<void *>(reinterpret_cast<const void*>
|
| 679 |
+
(p_UserData)));
|
| 680 |
+
}
|
| 681 |
+
|
| 682 |
+
public:
|
| 683 |
+
NCursesUserForm (NCursesFormField* Fields[],
|
| 684 |
+
const T* p_UserData = STATIC_CAST(T*)(0),
|
| 685 |
+
bool with_frame=FALSE,
|
| 686 |
+
bool autoDelete_Fields=FALSE)
|
| 687 |
+
: NCursesForm (&Fields, with_frame, autoDelete_Fields) {
|
| 688 |
+
if (form)
|
| 689 |
+
set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
|
| 690 |
+
};
|
| 691 |
+
|
| 692 |
+
NCursesUserForm (NCursesFormField* Fields[],
|
| 693 |
+
int nlines,
|
| 694 |
+
int ncols,
|
| 695 |
+
int begin_y = 0,
|
| 696 |
+
int begin_x = 0,
|
| 697 |
+
const T* p_UserData = STATIC_CAST(T*)(0),
|
| 698 |
+
bool with_frame=FALSE,
|
| 699 |
+
bool autoDelete_Fields=FALSE)
|
| 700 |
+
: NCursesForm (&Fields, nlines, ncols, begin_y, begin_x,
|
| 701 |
+
with_frame, autoDelete_Fields) {
|
| 702 |
+
if (form)
|
| 703 |
+
set_user (const_cast<void *>(reinterpret_cast<const void*>
|
| 704 |
+
(p_UserData)));
|
| 705 |
+
};
|
| 706 |
+
|
| 707 |
+
virtual ~NCursesUserForm() THROWS(NCursesException) {
|
| 708 |
+
};
|
| 709 |
+
|
| 710 |
+
inline T* UserData (void) {
|
| 711 |
+
return reinterpret_cast<T*>(get_user ());
|
| 712 |
+
};
|
| 713 |
+
|
| 714 |
+
inline virtual void setUserData (const T* p_UserData) {
|
| 715 |
+
if (form)
|
| 716 |
+
set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
|
| 717 |
+
}
|
| 718 |
+
|
| 719 |
+
};
|
| 720 |
+
//
|
| 721 |
+
// -------------------------------------------------------------------------
|
| 722 |
+
// Builtin Fieldtypes
|
| 723 |
+
// -------------------------------------------------------------------------
|
| 724 |
+
//
|
| 725 |
+
class NCURSES_CXX_IMPEXP Alpha_Field : public NCursesFieldType
|
| 726 |
+
{
|
| 727 |
+
private:
|
| 728 |
+
int min_field_width;
|
| 729 |
+
|
| 730 |
+
void set(NCursesFormField& f) NCURSES_OVERRIDE {
|
| 731 |
+
OnError(::set_field_type(f.get_field(),fieldtype,min_field_width));
|
| 732 |
+
}
|
| 733 |
+
|
| 734 |
+
public:
|
| 735 |
+
explicit Alpha_Field(int width)
|
| 736 |
+
: NCursesFieldType(TYPE_ALPHA),
|
| 737 |
+
min_field_width(width) {
|
| 738 |
+
}
|
| 739 |
+
};
|
| 740 |
+
|
| 741 |
+
class NCURSES_CXX_IMPEXP Alphanumeric_Field : public NCursesFieldType
|
| 742 |
+
{
|
| 743 |
+
private:
|
| 744 |
+
int min_field_width;
|
| 745 |
+
|
| 746 |
+
void set(NCursesFormField& f) NCURSES_OVERRIDE {
|
| 747 |
+
OnError(::set_field_type(f.get_field(),fieldtype,min_field_width));
|
| 748 |
+
}
|
| 749 |
+
|
| 750 |
+
public:
|
| 751 |
+
explicit Alphanumeric_Field(int width)
|
| 752 |
+
: NCursesFieldType(TYPE_ALNUM),
|
| 753 |
+
min_field_width(width) {
|
| 754 |
+
}
|
| 755 |
+
};
|
| 756 |
+
|
| 757 |
+
class NCURSES_CXX_IMPEXP Integer_Field : public NCursesFieldType
|
| 758 |
+
{
|
| 759 |
+
private:
|
| 760 |
+
int precision;
|
| 761 |
+
long lower_limit, upper_limit;
|
| 762 |
+
|
| 763 |
+
void set(NCursesFormField& f) NCURSES_OVERRIDE {
|
| 764 |
+
OnError(::set_field_type(f.get_field(),fieldtype,
|
| 765 |
+
precision,lower_limit,upper_limit));
|
| 766 |
+
}
|
| 767 |
+
|
| 768 |
+
public:
|
| 769 |
+
Integer_Field(int prec, long low=0L, long high=0L)
|
| 770 |
+
: NCursesFieldType(TYPE_INTEGER),
|
| 771 |
+
precision(prec), lower_limit(low), upper_limit(high) {
|
| 772 |
+
}
|
| 773 |
+
};
|
| 774 |
+
|
| 775 |
+
class NCURSES_CXX_IMPEXP Numeric_Field : public NCursesFieldType
|
| 776 |
+
{
|
| 777 |
+
private:
|
| 778 |
+
int precision;
|
| 779 |
+
double lower_limit, upper_limit;
|
| 780 |
+
|
| 781 |
+
void set(NCursesFormField& f) NCURSES_OVERRIDE {
|
| 782 |
+
OnError(::set_field_type(f.get_field(),fieldtype,
|
| 783 |
+
precision,lower_limit,upper_limit));
|
| 784 |
+
}
|
| 785 |
+
|
| 786 |
+
public:
|
| 787 |
+
Numeric_Field(int prec, double low=0.0, double high=0.0)
|
| 788 |
+
: NCursesFieldType(TYPE_NUMERIC),
|
| 789 |
+
precision(prec), lower_limit(low), upper_limit(high) {
|
| 790 |
+
}
|
| 791 |
+
};
|
| 792 |
+
|
| 793 |
+
class NCURSES_CXX_IMPEXP Regular_Expression_Field : public NCursesFieldType
|
| 794 |
+
{
|
| 795 |
+
private:
|
| 796 |
+
char* regex;
|
| 797 |
+
|
| 798 |
+
void set(NCursesFormField& f) NCURSES_OVERRIDE {
|
| 799 |
+
OnError(::set_field_type(f.get_field(),fieldtype,regex));
|
| 800 |
+
}
|
| 801 |
+
|
| 802 |
+
void copy_regex(const char *source)
|
| 803 |
+
{
|
| 804 |
+
regex = new char[1 + ::strlen(source)];
|
| 805 |
+
(::strcpy)(regex, source);
|
| 806 |
+
}
|
| 807 |
+
|
| 808 |
+
public:
|
| 809 |
+
explicit Regular_Expression_Field(const char *expr)
|
| 810 |
+
: NCursesFieldType(TYPE_REGEXP),
|
| 811 |
+
regex(NULL)
|
| 812 |
+
{
|
| 813 |
+
copy_regex(expr);
|
| 814 |
+
}
|
| 815 |
+
|
| 816 |
+
Regular_Expression_Field& operator=(const Regular_Expression_Field& rhs)
|
| 817 |
+
{
|
| 818 |
+
if (this != &rhs) {
|
| 819 |
+
*this = rhs;
|
| 820 |
+
copy_regex(rhs.regex);
|
| 821 |
+
NCursesFieldType::operator=(rhs);
|
| 822 |
+
}
|
| 823 |
+
return *this;
|
| 824 |
+
}
|
| 825 |
+
|
| 826 |
+
Regular_Expression_Field(const Regular_Expression_Field& rhs)
|
| 827 |
+
: NCursesFieldType(rhs),
|
| 828 |
+
regex(NULL)
|
| 829 |
+
{
|
| 830 |
+
copy_regex(rhs.regex);
|
| 831 |
+
}
|
| 832 |
+
|
| 833 |
+
~Regular_Expression_Field() {
|
| 834 |
+
delete[] regex;
|
| 835 |
+
}
|
| 836 |
+
};
|
| 837 |
+
|
| 838 |
+
class NCURSES_CXX_IMPEXP Enumeration_Field : public NCursesFieldType
|
| 839 |
+
{
|
| 840 |
+
private:
|
| 841 |
+
const char** list;
|
| 842 |
+
int case_sensitive;
|
| 843 |
+
int non_unique_matches;
|
| 844 |
+
|
| 845 |
+
void set(NCursesFormField& f) NCURSES_OVERRIDE {
|
| 846 |
+
OnError(::set_field_type(f.get_field(),fieldtype,
|
| 847 |
+
list,case_sensitive,non_unique_matches));
|
| 848 |
+
}
|
| 849 |
+
public:
|
| 850 |
+
Enumeration_Field(const char* enums[],
|
| 851 |
+
bool case_sens=FALSE,
|
| 852 |
+
bool non_unique=FALSE)
|
| 853 |
+
: NCursesFieldType(TYPE_ENUM),
|
| 854 |
+
list(enums),
|
| 855 |
+
case_sensitive(case_sens ? -1 : 0),
|
| 856 |
+
non_unique_matches(non_unique ? -1 : 0) {
|
| 857 |
+
}
|
| 858 |
+
|
| 859 |
+
Enumeration_Field& operator=(const Enumeration_Field& rhs)
|
| 860 |
+
{
|
| 861 |
+
if (this != &rhs) {
|
| 862 |
+
*this = rhs;
|
| 863 |
+
NCursesFieldType::operator=(rhs);
|
| 864 |
+
}
|
| 865 |
+
return *this;
|
| 866 |
+
}
|
| 867 |
+
|
| 868 |
+
Enumeration_Field(const Enumeration_Field& rhs)
|
| 869 |
+
: NCursesFieldType(rhs),
|
| 870 |
+
list(rhs.list),
|
| 871 |
+
case_sensitive(rhs.case_sensitive),
|
| 872 |
+
non_unique_matches(rhs.non_unique_matches)
|
| 873 |
+
{
|
| 874 |
+
}
|
| 875 |
+
};
|
| 876 |
+
|
| 877 |
+
class NCURSES_CXX_IMPEXP IPV4_Address_Field : public NCursesFieldType
|
| 878 |
+
{
|
| 879 |
+
private:
|
| 880 |
+
void set(NCursesFormField& f) NCURSES_OVERRIDE {
|
| 881 |
+
OnError(::set_field_type(f.get_field(),fieldtype));
|
| 882 |
+
}
|
| 883 |
+
|
| 884 |
+
public:
|
| 885 |
+
IPV4_Address_Field() : NCursesFieldType(TYPE_IPV4) {
|
| 886 |
+
}
|
| 887 |
+
};
|
| 888 |
+
|
| 889 |
+
extern "C" {
|
| 890 |
+
bool _nc_xx_fld_fcheck(FIELD *, const void*);
|
| 891 |
+
bool _nc_xx_fld_ccheck(int c, const void *);
|
| 892 |
+
void* _nc_xx_fld_makearg(va_list*);
|
| 893 |
+
}
|
| 894 |
+
|
| 895 |
+
//
|
| 896 |
+
// -------------------------------------------------------------------------
|
| 897 |
+
// Abstract base class for User-Defined Fieldtypes
|
| 898 |
+
// -------------------------------------------------------------------------
|
| 899 |
+
//
|
| 900 |
+
class NCURSES_CXX_IMPEXP UserDefinedFieldType : public NCursesFieldType
|
| 901 |
+
{
|
| 902 |
+
friend class UDF_Init; // Internal helper to set up statics
|
| 903 |
+
private:
|
| 904 |
+
// For all C++ defined fieldtypes we need only one generic lowlevel
|
| 905 |
+
// FIELDTYPE* element.
|
| 906 |
+
static FIELDTYPE* generic_fieldtype;
|
| 907 |
+
|
| 908 |
+
protected:
|
| 909 |
+
// This are the functions required by the low level libforms functions
|
| 910 |
+
// to construct a fieldtype.
|
| 911 |
+
friend bool _nc_xx_fld_fcheck(FIELD *, const void*);
|
| 912 |
+
friend bool _nc_xx_fld_ccheck(int c, const void *);
|
| 913 |
+
friend void* _nc_xx_fld_makearg(va_list*);
|
| 914 |
+
|
| 915 |
+
void set(NCursesFormField& f) NCURSES_OVERRIDE {
|
| 916 |
+
OnError(::set_field_type(f.get_field(),fieldtype,&f));
|
| 917 |
+
}
|
| 918 |
+
|
| 919 |
+
protected:
|
| 920 |
+
// Redefine this function to do a field validation. The argument
|
| 921 |
+
// is a reference to the field you should validate.
|
| 922 |
+
virtual bool field_check(NCursesFormField& f) = 0;
|
| 923 |
+
|
| 924 |
+
// Redefine this function to do a character validation. The argument
|
| 925 |
+
// is the character to be validated.
|
| 926 |
+
virtual bool char_check (int c) = 0;
|
| 927 |
+
|
| 928 |
+
public:
|
| 929 |
+
UserDefinedFieldType();
|
| 930 |
+
};
|
| 931 |
+
|
| 932 |
+
extern "C" {
|
| 933 |
+
bool _nc_xx_next_choice(FIELD*, const void *);
|
| 934 |
+
bool _nc_xx_prev_choice(FIELD*, const void *);
|
| 935 |
+
}
|
| 936 |
+
|
| 937 |
+
//
|
| 938 |
+
// -------------------------------------------------------------------------
|
| 939 |
+
// Abstract base class for User-Defined Fieldtypes with Choice functions
|
| 940 |
+
// -------------------------------------------------------------------------
|
| 941 |
+
//
|
| 942 |
+
class NCURSES_CXX_IMPEXP UserDefinedFieldType_With_Choice : public UserDefinedFieldType
|
| 943 |
+
{
|
| 944 |
+
friend class UDF_Init; // Internal helper to set up statics
|
| 945 |
+
private:
|
| 946 |
+
// For all C++ defined fieldtypes with choice functions we need only one
|
| 947 |
+
// generic lowlevel FIELDTYPE* element.
|
| 948 |
+
static FIELDTYPE* generic_fieldtype_with_choice;
|
| 949 |
+
|
| 950 |
+
// This are the functions required by the low level libforms functions
|
| 951 |
+
// to construct a fieldtype with choice functions.
|
| 952 |
+
friend bool _nc_xx_next_choice(FIELD*, const void *);
|
| 953 |
+
friend bool _nc_xx_prev_choice(FIELD*, const void *);
|
| 954 |
+
|
| 955 |
+
protected:
|
| 956 |
+
// Redefine this function to do the retrieval of the next choice value.
|
| 957 |
+
// The argument is a reference to the field tobe examined.
|
| 958 |
+
virtual bool next (NCursesFormField& f) = 0;
|
| 959 |
+
|
| 960 |
+
// Redefine this function to do the retrieval of the previous choice value.
|
| 961 |
+
// The argument is a reference to the field tobe examined.
|
| 962 |
+
virtual bool previous(NCursesFormField& f) = 0;
|
| 963 |
+
|
| 964 |
+
public:
|
| 965 |
+
UserDefinedFieldType_With_Choice();
|
| 966 |
+
};
|
| 967 |
+
|
| 968 |
+
#endif /* NCURSES_CURSESF_H_incl */
|
miniconda3/envs/active_proaction/include/ncursesw/cursesm.h
ADDED
|
@@ -0,0 +1,674 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// * This makes emacs happy -*-Mode: C++;-*-
|
| 2 |
+
/****************************************************************************
|
| 3 |
+
* Copyright 2019-2020,2022 Thomas E. Dickey *
|
| 4 |
+
* Copyright 1998-2012,2014 Free Software Foundation, Inc. *
|
| 5 |
+
* *
|
| 6 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 7 |
+
* copy of this software and associated documentation files (the *
|
| 8 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 9 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 10 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 11 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 12 |
+
* furnished to do so, subject to the following conditions: *
|
| 13 |
+
* *
|
| 14 |
+
* The above copyright notice and this permission notice shall be included *
|
| 15 |
+
* in all copies or substantial portions of the Software. *
|
| 16 |
+
* *
|
| 17 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 18 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 19 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 20 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 21 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 22 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 23 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 24 |
+
* *
|
| 25 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 26 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 27 |
+
* sale, use or other dealings in this Software without prior written *
|
| 28 |
+
* authorization. *
|
| 29 |
+
****************************************************************************/
|
| 30 |
+
|
| 31 |
+
/****************************************************************************
|
| 32 |
+
* Author: Juergen Pfeifer, 1997 *
|
| 33 |
+
****************************************************************************/
|
| 34 |
+
|
| 35 |
+
// $Id: cursesm.h,v 1.35 2022/08/20 20:52:15 tom Exp $
|
| 36 |
+
|
| 37 |
+
#ifndef NCURSES_CURSESM_H_incl
|
| 38 |
+
#define NCURSES_CURSESM_H_incl 1
|
| 39 |
+
|
| 40 |
+
#include <ncursesw/cursesp.h>
|
| 41 |
+
|
| 42 |
+
extern "C" {
|
| 43 |
+
# include <ncursesw/menu.h>
|
| 44 |
+
}
|
| 45 |
+
//
|
| 46 |
+
// -------------------------------------------------------------------------
|
| 47 |
+
// This wraps the ITEM type of <ncursesw/menu.h>
|
| 48 |
+
// -------------------------------------------------------------------------
|
| 49 |
+
//
|
| 50 |
+
class NCURSES_CXX_IMPEXP NCursesMenuItem
|
| 51 |
+
{
|
| 52 |
+
friend class NCursesMenu;
|
| 53 |
+
|
| 54 |
+
protected:
|
| 55 |
+
ITEM *item;
|
| 56 |
+
|
| 57 |
+
inline void OnError (int err) const THROW2(NCursesException const, NCursesMenuException) {
|
| 58 |
+
if (err != E_OK)
|
| 59 |
+
THROW(new NCursesMenuException (err));
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
public:
|
| 63 |
+
NCursesMenuItem (const char* p_name = NULL,
|
| 64 |
+
const char* p_descript = NULL)
|
| 65 |
+
: item(0)
|
| 66 |
+
{
|
| 67 |
+
item = p_name ? ::new_item (p_name, p_descript) : STATIC_CAST(ITEM*)(0);
|
| 68 |
+
if (p_name && !item)
|
| 69 |
+
OnError (E_SYSTEM_ERROR);
|
| 70 |
+
}
|
| 71 |
+
// Create an item. If you pass both parameters as NULL, a delimiting
|
| 72 |
+
// item is constructed which can be used to terminate a list of
|
| 73 |
+
// NCursesMenu objects.
|
| 74 |
+
|
| 75 |
+
NCursesMenuItem& operator=(const NCursesMenuItem& rhs)
|
| 76 |
+
{
|
| 77 |
+
if (this != &rhs) {
|
| 78 |
+
*this = rhs;
|
| 79 |
+
}
|
| 80 |
+
return *this;
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
NCursesMenuItem(const NCursesMenuItem& rhs)
|
| 84 |
+
: item(0)
|
| 85 |
+
{
|
| 86 |
+
(void) rhs;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
virtual ~NCursesMenuItem () THROWS(NCursesException);
|
| 90 |
+
// Release the items memory
|
| 91 |
+
|
| 92 |
+
inline const char* name () const {
|
| 93 |
+
return ::item_name (item);
|
| 94 |
+
}
|
| 95 |
+
// Name of the item
|
| 96 |
+
|
| 97 |
+
inline const char* description () const {
|
| 98 |
+
return ::item_description (item);
|
| 99 |
+
}
|
| 100 |
+
// Description of the item
|
| 101 |
+
|
| 102 |
+
inline int (index) (void) const {
|
| 103 |
+
return ::item_index (item);
|
| 104 |
+
}
|
| 105 |
+
// Index of the item in an item array (or -1)
|
| 106 |
+
|
| 107 |
+
inline void options_on (Item_Options opts) {
|
| 108 |
+
OnError (::item_opts_on (item, opts));
|
| 109 |
+
}
|
| 110 |
+
// Switch on the items options
|
| 111 |
+
|
| 112 |
+
inline void options_off (Item_Options opts) {
|
| 113 |
+
OnError (::item_opts_off (item, opts));
|
| 114 |
+
}
|
| 115 |
+
// Switch off the item's option
|
| 116 |
+
|
| 117 |
+
inline Item_Options options () const {
|
| 118 |
+
return ::item_opts (item);
|
| 119 |
+
}
|
| 120 |
+
// Retrieve the items options
|
| 121 |
+
|
| 122 |
+
inline void set_options (Item_Options opts) {
|
| 123 |
+
OnError (::set_item_opts (item, opts));
|
| 124 |
+
}
|
| 125 |
+
// Set the items options
|
| 126 |
+
|
| 127 |
+
inline void set_value (bool f) {
|
| 128 |
+
OnError (::set_item_value (item,f));
|
| 129 |
+
}
|
| 130 |
+
// Set/Reset the items selection state
|
| 131 |
+
|
| 132 |
+
inline bool value () const {
|
| 133 |
+
return ::item_value (item);
|
| 134 |
+
}
|
| 135 |
+
// Retrieve the items selection state
|
| 136 |
+
|
| 137 |
+
inline bool visible () const {
|
| 138 |
+
return ::item_visible (item);
|
| 139 |
+
}
|
| 140 |
+
// Retrieve visibility of the item
|
| 141 |
+
|
| 142 |
+
virtual bool action();
|
| 143 |
+
// Perform an action associated with this item; you may use this in an
|
| 144 |
+
// user supplied driver for a menu; you may derive from this class and
|
| 145 |
+
// overload action() to supply items with different actions.
|
| 146 |
+
// If an action returns true, the menu will be exited. The default action
|
| 147 |
+
// is to do nothing.
|
| 148 |
+
};
|
| 149 |
+
|
| 150 |
+
// Prototype for an items callback function.
|
| 151 |
+
typedef bool ITEMCALLBACK(NCursesMenuItem&);
|
| 152 |
+
|
| 153 |
+
// If you don't like to create a child class for individual items to
|
| 154 |
+
// overload action(), you may use this class and provide a callback
|
| 155 |
+
// function pointer for items.
|
| 156 |
+
class NCURSES_CXX_IMPEXP NCursesMenuCallbackItem : public NCursesMenuItem
|
| 157 |
+
{
|
| 158 |
+
private:
|
| 159 |
+
ITEMCALLBACK* p_fct;
|
| 160 |
+
|
| 161 |
+
public:
|
| 162 |
+
NCursesMenuCallbackItem(ITEMCALLBACK* fct = NULL,
|
| 163 |
+
const char* p_name = NULL,
|
| 164 |
+
const char* p_descript = NULL )
|
| 165 |
+
: NCursesMenuItem (p_name, p_descript),
|
| 166 |
+
p_fct (fct) {
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
NCursesMenuCallbackItem& operator=(const NCursesMenuCallbackItem& rhs)
|
| 170 |
+
{
|
| 171 |
+
if (this != &rhs) {
|
| 172 |
+
*this = rhs;
|
| 173 |
+
}
|
| 174 |
+
return *this;
|
| 175 |
+
}
|
| 176 |
+
|
| 177 |
+
NCursesMenuCallbackItem(const NCursesMenuCallbackItem& rhs)
|
| 178 |
+
: NCursesMenuItem(rhs),
|
| 179 |
+
p_fct(0)
|
| 180 |
+
{
|
| 181 |
+
}
|
| 182 |
+
|
| 183 |
+
virtual ~NCursesMenuCallbackItem() THROWS(NCursesException);
|
| 184 |
+
|
| 185 |
+
bool action() NCURSES_OVERRIDE;
|
| 186 |
+
};
|
| 187 |
+
|
| 188 |
+
// This are the built-in hook functions in this C++ binding. In C++ we use
|
| 189 |
+
// virtual member functions (see below On_..._Init and On_..._Termination)
|
| 190 |
+
// to provide this functionality in an object oriented manner.
|
| 191 |
+
extern "C" {
|
| 192 |
+
void _nc_xx_mnu_init(MENU *);
|
| 193 |
+
void _nc_xx_mnu_term(MENU *);
|
| 194 |
+
void _nc_xx_itm_init(MENU *);
|
| 195 |
+
void _nc_xx_itm_term(MENU *);
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
//
|
| 199 |
+
// -------------------------------------------------------------------------
|
| 200 |
+
// This wraps the MENU type of <ncursesw/menu.h>
|
| 201 |
+
// -------------------------------------------------------------------------
|
| 202 |
+
//
|
| 203 |
+
class NCURSES_CXX_IMPEXP NCursesMenu : public NCursesPanel
|
| 204 |
+
{
|
| 205 |
+
protected:
|
| 206 |
+
MENU *menu;
|
| 207 |
+
|
| 208 |
+
private:
|
| 209 |
+
NCursesWindow* sub; // the subwindow object
|
| 210 |
+
bool b_sub_owner; // is this our own subwindow?
|
| 211 |
+
bool b_framed; // has the menu a border?
|
| 212 |
+
bool b_autoDelete; // Delete items when deleting menu?
|
| 213 |
+
|
| 214 |
+
NCursesMenuItem** my_items; // The array of items for this menu
|
| 215 |
+
|
| 216 |
+
// This structure is used for the menu's user data field to link the
|
| 217 |
+
// MENU* to the C++ object and to provide extra space for a user pointer.
|
| 218 |
+
typedef struct {
|
| 219 |
+
void* m_user; // the pointer for the user's data
|
| 220 |
+
const NCursesMenu* m_back; // backward pointer to C++ object
|
| 221 |
+
const MENU* m_owner;
|
| 222 |
+
} UserHook;
|
| 223 |
+
|
| 224 |
+
// Get the backward pointer to the C++ object from a MENU
|
| 225 |
+
static inline NCursesMenu* getHook(const MENU *m) {
|
| 226 |
+
UserHook* hook = STATIC_CAST(UserHook*)(::menu_userptr(m));
|
| 227 |
+
assert(hook != 0 && hook->m_owner==m);
|
| 228 |
+
return const_cast<NCursesMenu*>(hook->m_back);
|
| 229 |
+
}
|
| 230 |
+
|
| 231 |
+
friend void _nc_xx_mnu_init(MENU *);
|
| 232 |
+
friend void _nc_xx_mnu_term(MENU *);
|
| 233 |
+
friend void _nc_xx_itm_init(MENU *);
|
| 234 |
+
friend void _nc_xx_itm_term(MENU *);
|
| 235 |
+
|
| 236 |
+
// Calculate ITEM* array for the menu
|
| 237 |
+
ITEM** mapItems(NCursesMenuItem* nitems[]);
|
| 238 |
+
|
| 239 |
+
protected:
|
| 240 |
+
// internal routines
|
| 241 |
+
inline void set_user(void *user) {
|
| 242 |
+
UserHook* uptr = STATIC_CAST(UserHook*)(::menu_userptr (menu));
|
| 243 |
+
assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==menu);
|
| 244 |
+
uptr->m_user = user;
|
| 245 |
+
}
|
| 246 |
+
|
| 247 |
+
inline void *get_user() {
|
| 248 |
+
UserHook* uptr = STATIC_CAST(UserHook*)(::menu_userptr (menu));
|
| 249 |
+
assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==menu);
|
| 250 |
+
return uptr->m_user;
|
| 251 |
+
}
|
| 252 |
+
|
| 253 |
+
void InitMenu (NCursesMenuItem* menu[],
|
| 254 |
+
bool with_frame,
|
| 255 |
+
bool autoDeleteItems);
|
| 256 |
+
|
| 257 |
+
inline void OnError (int err) const THROW2(NCursesException const, NCursesMenuException) {
|
| 258 |
+
if (err != E_OK)
|
| 259 |
+
THROW(new NCursesMenuException (this, err));
|
| 260 |
+
}
|
| 261 |
+
|
| 262 |
+
// this wraps the menu_driver call.
|
| 263 |
+
virtual int driver (int c) ;
|
| 264 |
+
|
| 265 |
+
// 'Internal' constructor to create a menu without association to
|
| 266 |
+
// an array of items.
|
| 267 |
+
NCursesMenu( int nlines,
|
| 268 |
+
int ncols,
|
| 269 |
+
int begin_y = 0,
|
| 270 |
+
int begin_x = 0)
|
| 271 |
+
: NCursesPanel(nlines,ncols,begin_y,begin_x),
|
| 272 |
+
menu (STATIC_CAST(MENU*)(0)),
|
| 273 |
+
sub(0),
|
| 274 |
+
b_sub_owner(0),
|
| 275 |
+
b_framed(0),
|
| 276 |
+
b_autoDelete(0),
|
| 277 |
+
my_items(0)
|
| 278 |
+
{
|
| 279 |
+
}
|
| 280 |
+
|
| 281 |
+
public:
|
| 282 |
+
// Make a full window size menu
|
| 283 |
+
NCursesMenu (NCursesMenuItem* Items[],
|
| 284 |
+
bool with_frame=FALSE, // Reserve space for a frame?
|
| 285 |
+
bool autoDelete_Items=FALSE) // Autocleanup of Items?
|
| 286 |
+
: NCursesPanel(),
|
| 287 |
+
menu(0),
|
| 288 |
+
sub(0),
|
| 289 |
+
b_sub_owner(0),
|
| 290 |
+
b_framed(0),
|
| 291 |
+
b_autoDelete(0),
|
| 292 |
+
my_items(0)
|
| 293 |
+
{
|
| 294 |
+
InitMenu(Items, with_frame, autoDelete_Items);
|
| 295 |
+
}
|
| 296 |
+
|
| 297 |
+
// Make a menu with a window of this size.
|
| 298 |
+
NCursesMenu (NCursesMenuItem* Items[],
|
| 299 |
+
int nlines,
|
| 300 |
+
int ncols,
|
| 301 |
+
int begin_y = 0,
|
| 302 |
+
int begin_x = 0,
|
| 303 |
+
bool with_frame=FALSE, // Reserve space for a frame?
|
| 304 |
+
bool autoDelete_Items=FALSE) // Autocleanup of Items?
|
| 305 |
+
: NCursesPanel(nlines, ncols, begin_y, begin_x),
|
| 306 |
+
menu(0),
|
| 307 |
+
sub(0),
|
| 308 |
+
b_sub_owner(0),
|
| 309 |
+
b_framed(0),
|
| 310 |
+
b_autoDelete(0),
|
| 311 |
+
my_items(0)
|
| 312 |
+
{
|
| 313 |
+
InitMenu(Items, with_frame, autoDelete_Items);
|
| 314 |
+
}
|
| 315 |
+
|
| 316 |
+
NCursesMenu& operator=(const NCursesMenu& rhs)
|
| 317 |
+
{
|
| 318 |
+
if (this != &rhs) {
|
| 319 |
+
*this = rhs;
|
| 320 |
+
NCursesPanel::operator=(rhs);
|
| 321 |
+
}
|
| 322 |
+
return *this;
|
| 323 |
+
}
|
| 324 |
+
|
| 325 |
+
NCursesMenu(const NCursesMenu& rhs)
|
| 326 |
+
: NCursesPanel(rhs),
|
| 327 |
+
menu(rhs.menu),
|
| 328 |
+
sub(rhs.sub),
|
| 329 |
+
b_sub_owner(rhs.b_sub_owner),
|
| 330 |
+
b_framed(rhs.b_framed),
|
| 331 |
+
b_autoDelete(rhs.b_autoDelete),
|
| 332 |
+
my_items(rhs.my_items)
|
| 333 |
+
{
|
| 334 |
+
}
|
| 335 |
+
|
| 336 |
+
virtual ~NCursesMenu () THROWS(NCursesException);
|
| 337 |
+
|
| 338 |
+
// Retrieve the menus subwindow
|
| 339 |
+
inline NCursesWindow& subWindow() const {
|
| 340 |
+
assert(sub!=NULL);
|
| 341 |
+
return *sub;
|
| 342 |
+
}
|
| 343 |
+
|
| 344 |
+
// Set the menus subwindow
|
| 345 |
+
void setSubWindow(NCursesWindow& sub);
|
| 346 |
+
|
| 347 |
+
// Set these items for the menu
|
| 348 |
+
inline void setItems(NCursesMenuItem* Items[]) {
|
| 349 |
+
OnError(::set_menu_items(menu,mapItems(Items)));
|
| 350 |
+
}
|
| 351 |
+
|
| 352 |
+
// Remove the menu from the screen
|
| 353 |
+
inline void unpost (void) {
|
| 354 |
+
OnError (::unpost_menu (menu));
|
| 355 |
+
}
|
| 356 |
+
|
| 357 |
+
// Post the menu to the screen if flag is true, unpost it otherwise
|
| 358 |
+
inline void post(bool flag = TRUE) {
|
| 359 |
+
flag ? OnError (::post_menu(menu)) : OnError (::unpost_menu (menu));
|
| 360 |
+
}
|
| 361 |
+
|
| 362 |
+
// Get the number of rows and columns for this menu
|
| 363 |
+
inline void scale (int& mrows, int& mcols) const {
|
| 364 |
+
OnError (::scale_menu (menu, &mrows, &mcols));
|
| 365 |
+
}
|
| 366 |
+
|
| 367 |
+
// Set the format of this menu
|
| 368 |
+
inline void set_format(int mrows, int mcols) {
|
| 369 |
+
OnError (::set_menu_format(menu, mrows, mcols));
|
| 370 |
+
}
|
| 371 |
+
|
| 372 |
+
// Get the format of this menu
|
| 373 |
+
inline void menu_format(int& rows,int& ncols) {
|
| 374 |
+
::menu_format(menu,&rows,&ncols);
|
| 375 |
+
}
|
| 376 |
+
|
| 377 |
+
// Items of the menu
|
| 378 |
+
inline NCursesMenuItem* items() const {
|
| 379 |
+
return *my_items;
|
| 380 |
+
}
|
| 381 |
+
|
| 382 |
+
// Get the number of items in this menu
|
| 383 |
+
inline int count() const {
|
| 384 |
+
return ::item_count(menu);
|
| 385 |
+
}
|
| 386 |
+
|
| 387 |
+
// Get the current item (i.e. the one the cursor is located)
|
| 388 |
+
inline NCursesMenuItem* current_item() const {
|
| 389 |
+
return my_items[::item_index(::current_item(menu))];
|
| 390 |
+
}
|
| 391 |
+
|
| 392 |
+
// Get the marker string
|
| 393 |
+
inline const char* mark() const {
|
| 394 |
+
return ::menu_mark(menu);
|
| 395 |
+
}
|
| 396 |
+
|
| 397 |
+
// Set the marker string
|
| 398 |
+
inline void set_mark(const char *marker) {
|
| 399 |
+
OnError (::set_menu_mark (menu, marker));
|
| 400 |
+
}
|
| 401 |
+
|
| 402 |
+
// Get the name of the request code c
|
| 403 |
+
inline static const char* request_name(int c) {
|
| 404 |
+
return ::menu_request_name(c);
|
| 405 |
+
}
|
| 406 |
+
|
| 407 |
+
// Get the current pattern
|
| 408 |
+
inline char* pattern() const {
|
| 409 |
+
return ::menu_pattern(menu);
|
| 410 |
+
}
|
| 411 |
+
|
| 412 |
+
// true if there is a pattern match, false otherwise.
|
| 413 |
+
bool set_pattern (const char *pat);
|
| 414 |
+
|
| 415 |
+
// set the default attributes for the menu
|
| 416 |
+
// i.e. set fore, back and grey attribute
|
| 417 |
+
virtual void setDefaultAttributes();
|
| 418 |
+
|
| 419 |
+
// Get the menus background attributes
|
| 420 |
+
inline chtype back() const {
|
| 421 |
+
return ::menu_back(menu);
|
| 422 |
+
}
|
| 423 |
+
|
| 424 |
+
// Get the menus foreground attributes
|
| 425 |
+
inline chtype fore() const {
|
| 426 |
+
return ::menu_fore(menu);
|
| 427 |
+
}
|
| 428 |
+
|
| 429 |
+
// Get the menus grey attributes (used for unselectable items)
|
| 430 |
+
inline chtype grey() const {
|
| 431 |
+
return ::menu_grey(menu);
|
| 432 |
+
}
|
| 433 |
+
|
| 434 |
+
// Set the menus background attributes
|
| 435 |
+
inline chtype set_background(chtype a) {
|
| 436 |
+
return ::set_menu_back(menu,a);
|
| 437 |
+
}
|
| 438 |
+
|
| 439 |
+
// Set the menus foreground attributes
|
| 440 |
+
inline chtype set_foreground(chtype a) {
|
| 441 |
+
return ::set_menu_fore(menu,a);
|
| 442 |
+
}
|
| 443 |
+
|
| 444 |
+
// Set the menus grey attributes (used for unselectable items)
|
| 445 |
+
inline chtype set_grey(chtype a) {
|
| 446 |
+
return ::set_menu_grey(menu,a);
|
| 447 |
+
}
|
| 448 |
+
|
| 449 |
+
inline void options_on (Menu_Options opts) {
|
| 450 |
+
OnError (::menu_opts_on (menu,opts));
|
| 451 |
+
}
|
| 452 |
+
|
| 453 |
+
inline void options_off(Menu_Options opts) {
|
| 454 |
+
OnError (::menu_opts_off(menu,opts));
|
| 455 |
+
}
|
| 456 |
+
|
| 457 |
+
inline Menu_Options options() const {
|
| 458 |
+
return ::menu_opts(menu);
|
| 459 |
+
}
|
| 460 |
+
|
| 461 |
+
inline void set_options (Menu_Options opts) {
|
| 462 |
+
OnError (::set_menu_opts (menu,opts));
|
| 463 |
+
}
|
| 464 |
+
|
| 465 |
+
inline int pad() const {
|
| 466 |
+
return ::menu_pad(menu);
|
| 467 |
+
}
|
| 468 |
+
|
| 469 |
+
inline void set_pad (int padch) {
|
| 470 |
+
OnError (::set_menu_pad (menu, padch));
|
| 471 |
+
}
|
| 472 |
+
|
| 473 |
+
// Position the cursor to the current item
|
| 474 |
+
inline void position_cursor () const {
|
| 475 |
+
OnError (::pos_menu_cursor (menu));
|
| 476 |
+
}
|
| 477 |
+
|
| 478 |
+
// Set the current item
|
| 479 |
+
inline void set_current(NCursesMenuItem& I) {
|
| 480 |
+
OnError (::set_current_item(menu, I.item));
|
| 481 |
+
}
|
| 482 |
+
|
| 483 |
+
// Get the current top row of the menu
|
| 484 |
+
inline int top_row (void) const {
|
| 485 |
+
return ::top_row (menu);
|
| 486 |
+
}
|
| 487 |
+
|
| 488 |
+
// Set the current top row of the menu
|
| 489 |
+
inline void set_top_row (int row) {
|
| 490 |
+
OnError (::set_top_row (menu, row));
|
| 491 |
+
}
|
| 492 |
+
|
| 493 |
+
// spacing control
|
| 494 |
+
// Set the spacing for the menu
|
| 495 |
+
inline void setSpacing(int spc_description,
|
| 496 |
+
int spc_rows,
|
| 497 |
+
int spc_columns) {
|
| 498 |
+
OnError(::set_menu_spacing(menu,
|
| 499 |
+
spc_description,
|
| 500 |
+
spc_rows,
|
| 501 |
+
spc_columns));
|
| 502 |
+
}
|
| 503 |
+
|
| 504 |
+
// Get the spacing info for the menu
|
| 505 |
+
inline void Spacing(int& spc_description,
|
| 506 |
+
int& spc_rows,
|
| 507 |
+
int& spc_columns) const {
|
| 508 |
+
OnError(::menu_spacing(menu,
|
| 509 |
+
&spc_description,
|
| 510 |
+
&spc_rows,
|
| 511 |
+
&spc_columns));
|
| 512 |
+
}
|
| 513 |
+
|
| 514 |
+
// Decorations
|
| 515 |
+
inline void frame(const char *title=NULL, const char* btitle=NULL) NCURSES_OVERRIDE {
|
| 516 |
+
if (b_framed)
|
| 517 |
+
NCursesPanel::frame(title,btitle);
|
| 518 |
+
else
|
| 519 |
+
OnError(E_SYSTEM_ERROR);
|
| 520 |
+
}
|
| 521 |
+
|
| 522 |
+
inline void boldframe(const char *title=NULL, const char* btitle=NULL) NCURSES_OVERRIDE {
|
| 523 |
+
if (b_framed)
|
| 524 |
+
NCursesPanel::boldframe(title,btitle);
|
| 525 |
+
else
|
| 526 |
+
OnError(E_SYSTEM_ERROR);
|
| 527 |
+
}
|
| 528 |
+
|
| 529 |
+
inline void label(const char *topLabel, const char *bottomLabel) NCURSES_OVERRIDE {
|
| 530 |
+
if (b_framed)
|
| 531 |
+
NCursesPanel::label(topLabel,bottomLabel);
|
| 532 |
+
else
|
| 533 |
+
OnError(E_SYSTEM_ERROR);
|
| 534 |
+
}
|
| 535 |
+
|
| 536 |
+
// -----
|
| 537 |
+
// Hooks
|
| 538 |
+
// -----
|
| 539 |
+
|
| 540 |
+
// Called after the menu gets repositioned in its window.
|
| 541 |
+
// This is especially true if the menu is posted.
|
| 542 |
+
virtual void On_Menu_Init();
|
| 543 |
+
|
| 544 |
+
// Called before the menu gets repositioned in its window.
|
| 545 |
+
// This is especially true if the menu is unposted.
|
| 546 |
+
virtual void On_Menu_Termination();
|
| 547 |
+
|
| 548 |
+
// Called after the item became the current item
|
| 549 |
+
virtual void On_Item_Init(NCursesMenuItem& item);
|
| 550 |
+
|
| 551 |
+
// Called before this item is left as current item.
|
| 552 |
+
virtual void On_Item_Termination(NCursesMenuItem& item);
|
| 553 |
+
|
| 554 |
+
// Provide a default key virtualization. Translate the keyboard
|
| 555 |
+
// code c into a menu request code.
|
| 556 |
+
// The default implementation provides a hopefully straightforward
|
| 557 |
+
// mapping for the most common keystrokes and menu requests.
|
| 558 |
+
virtual int virtualize(int c);
|
| 559 |
+
|
| 560 |
+
|
| 561 |
+
// Operators
|
| 562 |
+
inline NCursesMenuItem* operator[](int i) const {
|
| 563 |
+
if ( (i < 0) || (i >= ::item_count (menu)) )
|
| 564 |
+
OnError (E_BAD_ARGUMENT);
|
| 565 |
+
return (my_items[i]);
|
| 566 |
+
}
|
| 567 |
+
|
| 568 |
+
// Perform the menu's operation
|
| 569 |
+
// Return the item where you left the selection mark for a single
|
| 570 |
+
// selection menu, or NULL for a multivalued menu.
|
| 571 |
+
virtual NCursesMenuItem* operator()(void);
|
| 572 |
+
|
| 573 |
+
// --------------------
|
| 574 |
+
// Exception handlers
|
| 575 |
+
// Called by operator()
|
| 576 |
+
// --------------------
|
| 577 |
+
|
| 578 |
+
// Called if the request is denied
|
| 579 |
+
virtual void On_Request_Denied(int c) const;
|
| 580 |
+
|
| 581 |
+
// Called if the item is not selectable
|
| 582 |
+
virtual void On_Not_Selectable(int c) const;
|
| 583 |
+
|
| 584 |
+
// Called if pattern doesn't match
|
| 585 |
+
virtual void On_No_Match(int c) const;
|
| 586 |
+
|
| 587 |
+
// Called if the command is unknown
|
| 588 |
+
virtual void On_Unknown_Command(int c) const;
|
| 589 |
+
|
| 590 |
+
};
|
| 591 |
+
//
|
| 592 |
+
// -------------------------------------------------------------------------
|
| 593 |
+
// This is the typical C++ typesafe way to allow to attach
|
| 594 |
+
// user data to an item of a menu. Its assumed that the user
|
| 595 |
+
// data belongs to some class T. Use T as template argument
|
| 596 |
+
// to create a UserItem.
|
| 597 |
+
// -------------------------------------------------------------------------
|
| 598 |
+
//
|
| 599 |
+
template<class T> class NCURSES_CXX_IMPEXP NCursesUserItem : public NCursesMenuItem
|
| 600 |
+
{
|
| 601 |
+
public:
|
| 602 |
+
NCursesUserItem (const char* p_name,
|
| 603 |
+
const char* p_descript = NULL,
|
| 604 |
+
const T* p_UserData = STATIC_CAST(T*)(0))
|
| 605 |
+
: NCursesMenuItem (p_name, p_descript) {
|
| 606 |
+
if (item)
|
| 607 |
+
OnError (::set_item_userptr (item, const_cast<void *>(reinterpret_cast<const void*>(p_UserData))));
|
| 608 |
+
}
|
| 609 |
+
|
| 610 |
+
virtual ~NCursesUserItem() THROWS(NCursesException) {}
|
| 611 |
+
|
| 612 |
+
inline const T* UserData (void) const {
|
| 613 |
+
return reinterpret_cast<const T*>(::item_userptr (item));
|
| 614 |
+
};
|
| 615 |
+
|
| 616 |
+
inline virtual void setUserData(const T* p_UserData) {
|
| 617 |
+
if (item)
|
| 618 |
+
OnError (::set_item_userptr (item, const_cast<void *>(reinterpret_cast<const void *>(p_UserData))));
|
| 619 |
+
}
|
| 620 |
+
};
|
| 621 |
+
//
|
| 622 |
+
// -------------------------------------------------------------------------
|
| 623 |
+
// The same mechanism is used to attach user data to a menu
|
| 624 |
+
// -------------------------------------------------------------------------
|
| 625 |
+
//
|
| 626 |
+
template<class T> class NCURSES_CXX_IMPEXP NCursesUserMenu : public NCursesMenu
|
| 627 |
+
{
|
| 628 |
+
protected:
|
| 629 |
+
NCursesUserMenu( int nlines,
|
| 630 |
+
int ncols,
|
| 631 |
+
int begin_y = 0,
|
| 632 |
+
int begin_x = 0,
|
| 633 |
+
const T* p_UserData = STATIC_CAST(T*)(0))
|
| 634 |
+
: NCursesMenu(nlines,ncols,begin_y,begin_x) {
|
| 635 |
+
if (menu)
|
| 636 |
+
set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
|
| 637 |
+
}
|
| 638 |
+
|
| 639 |
+
public:
|
| 640 |
+
NCursesUserMenu (NCursesMenuItem* Items[],
|
| 641 |
+
const T* p_UserData = STATIC_CAST(T*)(0),
|
| 642 |
+
bool with_frame=FALSE,
|
| 643 |
+
bool autoDelete_Items=FALSE)
|
| 644 |
+
: NCursesMenu (&Items, with_frame, autoDelete_Items) {
|
| 645 |
+
if (menu)
|
| 646 |
+
set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
|
| 647 |
+
};
|
| 648 |
+
|
| 649 |
+
NCursesUserMenu (NCursesMenuItem* Items[],
|
| 650 |
+
int nlines,
|
| 651 |
+
int ncols,
|
| 652 |
+
int begin_y = 0,
|
| 653 |
+
int begin_x = 0,
|
| 654 |
+
const T* p_UserData = STATIC_CAST(T*)(0),
|
| 655 |
+
bool with_frame=FALSE)
|
| 656 |
+
: NCursesMenu (&Items, nlines, ncols, begin_y, begin_x, with_frame) {
|
| 657 |
+
if (menu)
|
| 658 |
+
set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
|
| 659 |
+
};
|
| 660 |
+
|
| 661 |
+
virtual ~NCursesUserMenu() THROWS(NCursesException) {
|
| 662 |
+
};
|
| 663 |
+
|
| 664 |
+
inline T* UserData (void) {
|
| 665 |
+
return reinterpret_cast<T*>(get_user ());
|
| 666 |
+
};
|
| 667 |
+
|
| 668 |
+
inline virtual void setUserData (const T* p_UserData) {
|
| 669 |
+
if (menu)
|
| 670 |
+
set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
|
| 671 |
+
}
|
| 672 |
+
};
|
| 673 |
+
|
| 674 |
+
#endif /* NCURSES_CURSESM_H_incl */
|
miniconda3/envs/active_proaction/include/ncursesw/cursesp.h
ADDED
|
@@ -0,0 +1,271 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// * This makes emacs happy -*-Mode: C++;-*-
|
| 2 |
+
// vile:cppmode
|
| 3 |
+
/****************************************************************************
|
| 4 |
+
* Copyright 2019-2021,2022 Thomas E. Dickey *
|
| 5 |
+
* Copyright 1998-2012,2014 Free Software Foundation, Inc. *
|
| 6 |
+
* *
|
| 7 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 8 |
+
* copy of this software and associated documentation files (the *
|
| 9 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 10 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 11 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 12 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 13 |
+
* furnished to do so, subject to the following conditions: *
|
| 14 |
+
* *
|
| 15 |
+
* The above copyright notice and this permission notice shall be included *
|
| 16 |
+
* in all copies or substantial portions of the Software. *
|
| 17 |
+
* *
|
| 18 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 19 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 20 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 21 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 22 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 23 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 24 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 25 |
+
* *
|
| 26 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 27 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 28 |
+
* sale, use or other dealings in this Software without prior written *
|
| 29 |
+
* authorization. *
|
| 30 |
+
****************************************************************************/
|
| 31 |
+
|
| 32 |
+
/****************************************************************************
|
| 33 |
+
* Author: Juergen Pfeifer, 1997 *
|
| 34 |
+
****************************************************************************/
|
| 35 |
+
|
| 36 |
+
#ifndef NCURSES_CURSESP_H_incl
|
| 37 |
+
#define NCURSES_CURSESP_H_incl 1
|
| 38 |
+
|
| 39 |
+
// $Id: cursesp.h,v 1.36 2022/08/20 20:52:15 tom Exp $
|
| 40 |
+
|
| 41 |
+
#include <ncursesw/cursesw.h>
|
| 42 |
+
|
| 43 |
+
extern "C" {
|
| 44 |
+
# include <ncursesw/panel.h>
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
class NCURSES_CXX_IMPEXP NCursesPanel
|
| 48 |
+
: public NCursesWindow
|
| 49 |
+
{
|
| 50 |
+
protected:
|
| 51 |
+
PANEL *p;
|
| 52 |
+
static NCursesPanel *dummy;
|
| 53 |
+
|
| 54 |
+
private:
|
| 55 |
+
// This structure is used for the panel's user data field to link the
|
| 56 |
+
// PANEL* to the C++ object and to provide extra space for a user pointer.
|
| 57 |
+
typedef struct {
|
| 58 |
+
void* m_user; // the pointer for the user's data
|
| 59 |
+
const NCursesPanel* m_back; // backward pointer to C++ object
|
| 60 |
+
const PANEL* m_owner; // the panel itself
|
| 61 |
+
} UserHook;
|
| 62 |
+
|
| 63 |
+
inline UserHook *UserPointer()
|
| 64 |
+
{
|
| 65 |
+
UserHook* uptr = reinterpret_cast<UserHook*>(
|
| 66 |
+
const_cast<void *>(::panel_userptr (p)));
|
| 67 |
+
return uptr;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
void init(); // Initialize the panel object
|
| 71 |
+
|
| 72 |
+
protected:
|
| 73 |
+
void set_user(void *user)
|
| 74 |
+
{
|
| 75 |
+
UserHook* uptr = UserPointer();
|
| 76 |
+
if (uptr != 0 && uptr->m_back==this && uptr->m_owner==p) {
|
| 77 |
+
uptr->m_user = user;
|
| 78 |
+
}
|
| 79 |
+
}
|
| 80 |
+
// Set the user pointer of the panel.
|
| 81 |
+
|
| 82 |
+
void *get_user()
|
| 83 |
+
{
|
| 84 |
+
UserHook* uptr = UserPointer();
|
| 85 |
+
void *result = 0;
|
| 86 |
+
if (uptr != 0 && uptr->m_back==this && uptr->m_owner==p)
|
| 87 |
+
result = uptr->m_user;
|
| 88 |
+
return result;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
void OnError (int err) const THROW2(NCursesException const, NCursesPanelException)
|
| 92 |
+
{
|
| 93 |
+
if (err==ERR)
|
| 94 |
+
THROW(new NCursesPanelException (this, err));
|
| 95 |
+
}
|
| 96 |
+
// If err is equal to the curses error indicator ERR, an error handler
|
| 97 |
+
// is called.
|
| 98 |
+
|
| 99 |
+
// Get a keystroke. Default implementation calls getch()
|
| 100 |
+
virtual int getKey(void);
|
| 101 |
+
|
| 102 |
+
public:
|
| 103 |
+
NCursesPanel(int nlines,
|
| 104 |
+
int ncols,
|
| 105 |
+
int begin_y = 0,
|
| 106 |
+
int begin_x = 0)
|
| 107 |
+
: NCursesWindow(nlines,ncols,begin_y,begin_x), p(0)
|
| 108 |
+
{
|
| 109 |
+
init();
|
| 110 |
+
}
|
| 111 |
+
// Create a panel with this size starting at the requested position.
|
| 112 |
+
|
| 113 |
+
NCursesPanel()
|
| 114 |
+
: NCursesWindow(::stdscr), p(0)
|
| 115 |
+
{
|
| 116 |
+
init();
|
| 117 |
+
}
|
| 118 |
+
// This constructor creates the default Panel associated with the
|
| 119 |
+
// ::stdscr window
|
| 120 |
+
|
| 121 |
+
NCursesPanel& operator=(const NCursesPanel& rhs)
|
| 122 |
+
{
|
| 123 |
+
if (this != &rhs) {
|
| 124 |
+
*this = rhs;
|
| 125 |
+
NCursesWindow::operator=(rhs);
|
| 126 |
+
}
|
| 127 |
+
return *this;
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
NCursesPanel(const NCursesPanel& rhs)
|
| 131 |
+
: NCursesWindow(rhs),
|
| 132 |
+
p(rhs.p)
|
| 133 |
+
{
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
virtual ~NCursesPanel() THROWS(NCursesException);
|
| 137 |
+
|
| 138 |
+
// basic manipulation
|
| 139 |
+
inline void hide()
|
| 140 |
+
{
|
| 141 |
+
OnError (::hide_panel(p));
|
| 142 |
+
}
|
| 143 |
+
// Hide the panel. It stays in the stack but becomes invisible.
|
| 144 |
+
|
| 145 |
+
inline void show()
|
| 146 |
+
{
|
| 147 |
+
OnError (::show_panel(p));
|
| 148 |
+
}
|
| 149 |
+
// Show the panel, i.e. make it visible.
|
| 150 |
+
|
| 151 |
+
inline void top()
|
| 152 |
+
{
|
| 153 |
+
OnError (::top_panel(p));
|
| 154 |
+
}
|
| 155 |
+
// Make this panel the top panel in the stack.
|
| 156 |
+
|
| 157 |
+
inline void bottom()
|
| 158 |
+
{
|
| 159 |
+
OnError (::bottom_panel(p));
|
| 160 |
+
}
|
| 161 |
+
// Make this panel the bottom panel in the stack.
|
| 162 |
+
// N.B.: The panel associated with ::stdscr is always on the bottom. So
|
| 163 |
+
// actually bottom() makes the panel the first above ::stdscr.
|
| 164 |
+
|
| 165 |
+
virtual int mvwin(int y, int x) NCURSES_OVERRIDE
|
| 166 |
+
{
|
| 167 |
+
OnError(::move_panel(p, y, x));
|
| 168 |
+
return OK;
|
| 169 |
+
}
|
| 170 |
+
|
| 171 |
+
inline bool hidden() const
|
| 172 |
+
{
|
| 173 |
+
return (::panel_hidden (p) ? TRUE : FALSE);
|
| 174 |
+
}
|
| 175 |
+
// Return TRUE if the panel is hidden, FALSE otherwise.
|
| 176 |
+
|
| 177 |
+
/* The functions panel_above() and panel_below() are not reflected in
|
| 178 |
+
the NCursesPanel class. The reason for this is, that we cannot
|
| 179 |
+
assume that a panel retrieved by those operations is one wrapped
|
| 180 |
+
by a C++ class. Although this situation might be handled, we also
|
| 181 |
+
need a reverse mapping from PANEL to NCursesPanel which needs some
|
| 182 |
+
redesign of the low level stuff. At the moment, we define them in the
|
| 183 |
+
interface but they will always produce an error. */
|
| 184 |
+
inline NCursesPanel& above() const
|
| 185 |
+
{
|
| 186 |
+
OnError(ERR);
|
| 187 |
+
return *dummy;
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
inline NCursesPanel& below() const
|
| 191 |
+
{
|
| 192 |
+
OnError(ERR);
|
| 193 |
+
return *dummy;
|
| 194 |
+
}
|
| 195 |
+
|
| 196 |
+
// Those two are rewrites of the corresponding virtual members of
|
| 197 |
+
// NCursesWindow
|
| 198 |
+
virtual int refresh() NCURSES_OVERRIDE;
|
| 199 |
+
// Propagate all panel changes to the virtual screen and update the
|
| 200 |
+
// physical screen.
|
| 201 |
+
|
| 202 |
+
virtual int noutrefresh() NCURSES_OVERRIDE;
|
| 203 |
+
// Propagate all panel changes to the virtual screen.
|
| 204 |
+
|
| 205 |
+
static void redraw();
|
| 206 |
+
// Redraw all panels.
|
| 207 |
+
|
| 208 |
+
// decorations
|
| 209 |
+
virtual void frame(const char* title=NULL,
|
| 210 |
+
const char* btitle=NULL);
|
| 211 |
+
// Put a frame around the panel and put the title centered in the top line
|
| 212 |
+
// and btitle in the bottom line.
|
| 213 |
+
|
| 214 |
+
virtual void boldframe(const char* title=NULL,
|
| 215 |
+
const char* btitle=NULL);
|
| 216 |
+
// Same as frame(), but use highlighted attributes.
|
| 217 |
+
|
| 218 |
+
virtual void label(const char* topLabel,
|
| 219 |
+
const char* bottomLabel);
|
| 220 |
+
// Put the title centered in the top line and btitle in the bottom line.
|
| 221 |
+
|
| 222 |
+
virtual void centertext(int row,const char* label);
|
| 223 |
+
// Put the label text centered in the specified row.
|
| 224 |
+
};
|
| 225 |
+
|
| 226 |
+
/* We use templates to provide a typesafe mechanism to associate
|
| 227 |
+
* user data with a panel. A NCursesUserPanel<T> is a panel
|
| 228 |
+
* associated with some user data of type T.
|
| 229 |
+
*/
|
| 230 |
+
template<class T> class NCursesUserPanel : public NCursesPanel
|
| 231 |
+
{
|
| 232 |
+
public:
|
| 233 |
+
NCursesUserPanel (int nlines,
|
| 234 |
+
int ncols,
|
| 235 |
+
int begin_y = 0,
|
| 236 |
+
int begin_x = 0,
|
| 237 |
+
const T* p_UserData = STATIC_CAST(T*)(0))
|
| 238 |
+
: NCursesPanel (nlines, ncols, begin_y, begin_x)
|
| 239 |
+
{
|
| 240 |
+
if (p)
|
| 241 |
+
set_user (const_cast<void *>(reinterpret_cast<const void*>
|
| 242 |
+
(p_UserData)));
|
| 243 |
+
};
|
| 244 |
+
// This creates an user panel of the requested size with associated
|
| 245 |
+
// user data pointed to by p_UserData.
|
| 246 |
+
|
| 247 |
+
explicit NCursesUserPanel(const T* p_UserData = STATIC_CAST(T*)(0)) : NCursesPanel()
|
| 248 |
+
{
|
| 249 |
+
if (p)
|
| 250 |
+
set_user(const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
|
| 251 |
+
};
|
| 252 |
+
// This creates an user panel associated with the ::stdscr and user data
|
| 253 |
+
// pointed to by p_UserData.
|
| 254 |
+
|
| 255 |
+
virtual ~NCursesUserPanel() THROWS(NCursesException) {};
|
| 256 |
+
|
| 257 |
+
T* UserData (void)
|
| 258 |
+
{
|
| 259 |
+
return reinterpret_cast<T*>(get_user ());
|
| 260 |
+
};
|
| 261 |
+
// Retrieve the user data associated with the panel.
|
| 262 |
+
|
| 263 |
+
virtual void setUserData (const T* p_UserData)
|
| 264 |
+
{
|
| 265 |
+
if (p)
|
| 266 |
+
set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
|
| 267 |
+
}
|
| 268 |
+
// Associate the user panel with the user data pointed to by p_UserData.
|
| 269 |
+
};
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// * This makes emacs happy -*-Mode: C++;-*-
|
| 2 |
+
// vile:cppmode
|
| 3 |
+
/****************************************************************************
|
| 4 |
+
* Copyright 2019-2021,2022 Thomas E. Dickey *
|
| 5 |
+
* Copyright 1998-2014,2017 Free Software Foundation, Inc. *
|
| 6 |
+
* *
|
| 7 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 8 |
+
* copy of this software and associated documentation files (the *
|
| 9 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 10 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 11 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 12 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 13 |
+
* furnished to do so, subject to the following conditions: *
|
| 14 |
+
* *
|
| 15 |
+
* The above copyright notice and this permission notice shall be included *
|
| 16 |
+
* in all copies or substantial portions of the Software. *
|
| 17 |
+
* *
|
| 18 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 19 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 20 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 21 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 22 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 23 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 24 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 25 |
+
* *
|
| 26 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 27 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 28 |
+
* sale, use or other dealings in this Software without prior written *
|
| 29 |
+
* authorization. *
|
| 30 |
+
****************************************************************************/
|
| 31 |
+
|
| 32 |
+
#ifndef NCURSES_CURSESW_H_incl
|
| 33 |
+
#define NCURSES_CURSESW_H_incl 1
|
| 34 |
+
|
| 35 |
+
// $Id: cursesw.h,v 1.59 2022/08/20 20:52:15 tom Exp $
|
| 36 |
+
|
| 37 |
+
extern "C" {
|
| 38 |
+
# include <ncursesw/curses.h>
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
#if defined(BUILDING_NCURSES_CXX)
|
| 42 |
+
# define NCURSES_CXX_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
|
| 43 |
+
#else
|
| 44 |
+
# define NCURSES_CXX_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
#define NCURSES_CXX_WRAPPED_VAR(type,name) extern NCURSES_CXX_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
|
| 48 |
+
|
| 49 |
+
#define NCURSES_CXX_EXPORT(type) NCURSES_CXX_IMPEXP type NCURSES_API
|
| 50 |
+
#define NCURSES_CXX_EXPORT_VAR(type) NCURSES_CXX_IMPEXP type
|
| 51 |
+
|
| 52 |
+
#include <ncursesw/etip.h>
|
| 53 |
+
|
| 54 |
+
/* SCO 3.2v4 curses.h includes term.h, which defines lines as a macro.
|
| 55 |
+
Undefine it here, because NCursesWindow uses lines as a method. */
|
| 56 |
+
#undef lines
|
| 57 |
+
|
| 58 |
+
/* "Convert" macros to inlines. We'll define it as another symbol to avoid
|
| 59 |
+
* conflict with library symbols.
|
| 60 |
+
*/
|
| 61 |
+
#undef UNDEF
|
| 62 |
+
#define UNDEF(name) CUR_ ##name
|
| 63 |
+
|
| 64 |
+
#ifdef addch
|
| 65 |
+
inline int UNDEF(addch)(chtype ch) { return addch(ch); }
|
| 66 |
+
#undef addch
|
| 67 |
+
#define addch UNDEF(addch)
|
| 68 |
+
#endif
|
| 69 |
+
|
| 70 |
+
#ifdef addchstr
|
| 71 |
+
inline int UNDEF(addchstr)(chtype *at) { return addchstr(at); }
|
| 72 |
+
#undef addchstr
|
| 73 |
+
#define addchstr UNDEF(addchstr)
|
| 74 |
+
#endif
|
| 75 |
+
|
| 76 |
+
#ifdef addnstr
|
| 77 |
+
inline int UNDEF(addnstr)(const char *str, int n)
|
| 78 |
+
{ return addnstr(str, n); }
|
| 79 |
+
#undef addnstr
|
| 80 |
+
#define addnstr UNDEF(addnstr)
|
| 81 |
+
#endif
|
| 82 |
+
|
| 83 |
+
#ifdef addstr
|
| 84 |
+
inline int UNDEF(addstr)(const char * str) { return addstr(str); }
|
| 85 |
+
#undef addstr
|
| 86 |
+
#define addstr UNDEF(addstr)
|
| 87 |
+
#endif
|
| 88 |
+
|
| 89 |
+
#ifdef attroff
|
| 90 |
+
inline int UNDEF(attroff)(chtype at) { return attroff(at); }
|
| 91 |
+
#undef attroff
|
| 92 |
+
#define attroff UNDEF(attroff)
|
| 93 |
+
#endif
|
| 94 |
+
|
| 95 |
+
#ifdef attron
|
| 96 |
+
inline int UNDEF(attron)(chtype at) { return attron(at); }
|
| 97 |
+
#undef attron
|
| 98 |
+
#define attron UNDEF(attron)
|
| 99 |
+
#endif
|
| 100 |
+
|
| 101 |
+
#ifdef attrset
|
| 102 |
+
inline chtype UNDEF(attrset)(chtype at) { return attrset(at); }
|
| 103 |
+
#undef attrset
|
| 104 |
+
#define attrset UNDEF(attrset)
|
| 105 |
+
#endif
|
| 106 |
+
|
| 107 |
+
#ifdef bkgd
|
| 108 |
+
inline int UNDEF(bkgd)(chtype ch) { return bkgd(ch); }
|
| 109 |
+
#undef bkgd
|
| 110 |
+
#define bkgd UNDEF(bkgd)
|
| 111 |
+
#endif
|
| 112 |
+
|
| 113 |
+
#ifdef bkgdset
|
| 114 |
+
inline void UNDEF(bkgdset)(chtype ch) { bkgdset(ch); }
|
| 115 |
+
#undef bkgdset
|
| 116 |
+
#define bkgdset UNDEF(bkgdset)
|
| 117 |
+
#endif
|
| 118 |
+
|
| 119 |
+
#ifdef border
|
| 120 |
+
inline int UNDEF(border)(chtype ls, chtype rs, chtype ts, chtype bs, chtype tl, chtype tr, chtype bl, chtype br)
|
| 121 |
+
{ return border(ls, rs, ts, bs, tl, tr, bl, br); }
|
| 122 |
+
#undef border
|
| 123 |
+
#define border UNDEF(border)
|
| 124 |
+
#endif
|
| 125 |
+
|
| 126 |
+
#ifdef box
|
| 127 |
+
inline int UNDEF(box)(WINDOW *win, int v, int h) { return box(win, v, h); }
|
| 128 |
+
#undef box
|
| 129 |
+
#define box UNDEF(box)
|
| 130 |
+
#endif
|
| 131 |
+
|
| 132 |
+
#ifdef chgat
|
| 133 |
+
inline int UNDEF(chgat)(int n, attr_t attr, NCURSES_PAIRS_T color, const void *opts) {
|
| 134 |
+
return chgat(n, attr, color, opts); }
|
| 135 |
+
#undef chgat
|
| 136 |
+
#define chgat UNDEF(chgat)
|
| 137 |
+
#endif
|
| 138 |
+
|
| 139 |
+
#ifdef clear
|
| 140 |
+
inline int UNDEF(clear)() { return clear(); }
|
| 141 |
+
#undef clear
|
| 142 |
+
#define clear UNDEF(clear)
|
| 143 |
+
#endif
|
| 144 |
+
|
| 145 |
+
#ifdef clearok
|
| 146 |
+
inline int UNDEF(clearok)(WINDOW* win, bool bf) { return clearok(win, bf); }
|
| 147 |
+
#undef clearok
|
| 148 |
+
#define clearok UNDEF(clearok)
|
| 149 |
+
#else
|
| 150 |
+
extern "C" NCURSES_IMPEXP int NCURSES_API clearok(WINDOW*, bool);
|
| 151 |
+
#endif
|
| 152 |
+
|
| 153 |
+
#ifdef clrtobot
|
| 154 |
+
inline int UNDEF(clrtobot)() { return clrtobot(); }
|
| 155 |
+
#undef clrtobot
|
| 156 |
+
#define clrtobot UNDEF(clrtobot)
|
| 157 |
+
#endif
|
| 158 |
+
|
| 159 |
+
#ifdef clrtoeol
|
| 160 |
+
inline int UNDEF(clrtoeol)() { return clrtoeol(); }
|
| 161 |
+
#undef clrtoeol
|
| 162 |
+
#define clrtoeol UNDEF(clrtoeol)
|
| 163 |
+
#endif
|
| 164 |
+
|
| 165 |
+
#ifdef color_set
|
| 166 |
+
inline chtype UNDEF(color_set)(NCURSES_PAIRS_T p, void* opts) { return color_set(p, opts); }
|
| 167 |
+
#undef color_set
|
| 168 |
+
#define color_set UNDEF(color_set)
|
| 169 |
+
#endif
|
| 170 |
+
|
| 171 |
+
#ifdef crmode
|
| 172 |
+
inline int UNDEF(crmode)(void) { return crmode(); }
|
| 173 |
+
#undef crmode
|
| 174 |
+
#define crmode UNDEF(crmode)
|
| 175 |
+
#endif
|
| 176 |
+
|
| 177 |
+
#ifdef delch
|
| 178 |
+
inline int UNDEF(delch)() { return delch(); }
|
| 179 |
+
#undef delch
|
| 180 |
+
#define delch UNDEF(delch)
|
| 181 |
+
#endif
|
| 182 |
+
|
| 183 |
+
#ifdef deleteln
|
| 184 |
+
inline int UNDEF(deleteln)() { return deleteln(); }
|
| 185 |
+
#undef deleteln
|
| 186 |
+
#define deleteln UNDEF(deleteln)
|
| 187 |
+
#endif
|
| 188 |
+
|
| 189 |
+
#ifdef echochar
|
| 190 |
+
inline int UNDEF(echochar)(chtype ch) { return echochar(ch); }
|
| 191 |
+
#undef echochar
|
| 192 |
+
#define echochar UNDEF(echochar)
|
| 193 |
+
#endif
|
| 194 |
+
|
| 195 |
+
#ifdef erase
|
| 196 |
+
inline int UNDEF(erase)() { return erase(); }
|
| 197 |
+
#undef erase
|
| 198 |
+
#define erase UNDEF(erase)
|
| 199 |
+
#endif
|
| 200 |
+
|
| 201 |
+
#ifdef fixterm
|
| 202 |
+
inline int UNDEF(fixterm)(void) { return fixterm(); }
|
| 203 |
+
#undef fixterm
|
| 204 |
+
#define fixterm UNDEF(fixterm)
|
| 205 |
+
#endif
|
| 206 |
+
|
| 207 |
+
#ifdef flushok
|
| 208 |
+
inline int UNDEF(flushok)(WINDOW* _win, bool _bf) {
|
| 209 |
+
return flushok(_win, _bf); }
|
| 210 |
+
#undef flushok
|
| 211 |
+
#define flushok UNDEF(flushok)
|
| 212 |
+
#else
|
| 213 |
+
#define _no_flushok
|
| 214 |
+
#endif
|
| 215 |
+
|
| 216 |
+
#ifdef getattrs
|
| 217 |
+
inline int UNDEF(getattrs)(WINDOW *win) { return getattrs(win); }
|
| 218 |
+
#undef getattrs
|
| 219 |
+
#define getattrs UNDEF(getattrs)
|
| 220 |
+
#endif
|
| 221 |
+
|
| 222 |
+
#ifdef getbegyx
|
| 223 |
+
inline void UNDEF(getbegyx)(WINDOW* win, int& y, int& x) { getbegyx(win, y, x); }
|
| 224 |
+
#undef getbegyx
|
| 225 |
+
#define getbegyx UNDEF(getbegyx)
|
| 226 |
+
#endif
|
| 227 |
+
|
| 228 |
+
#ifdef getbkgd
|
| 229 |
+
inline chtype UNDEF(getbkgd)(const WINDOW *win) { return getbkgd(win); }
|
| 230 |
+
#undef getbkgd
|
| 231 |
+
#define getbkgd UNDEF(getbkgd)
|
| 232 |
+
#endif
|
| 233 |
+
|
| 234 |
+
#ifdef getch
|
| 235 |
+
inline int UNDEF(getch)() { return getch(); }
|
| 236 |
+
#undef getch
|
| 237 |
+
#define getch UNDEF(getch)
|
| 238 |
+
#endif
|
| 239 |
+
|
| 240 |
+
#ifdef getmaxyx
|
| 241 |
+
inline void UNDEF(getmaxyx)(WINDOW* win, int& y, int& x) { getmaxyx(win, y, x); }
|
| 242 |
+
#undef getmaxyx
|
| 243 |
+
#define getmaxyx UNDEF(getmaxyx)
|
| 244 |
+
#endif
|
| 245 |
+
|
| 246 |
+
#ifdef getnstr
|
| 247 |
+
inline int UNDEF(getnstr)(char *_str, int n) { return getnstr(_str, n); }
|
| 248 |
+
#undef getnstr
|
| 249 |
+
#define getnstr UNDEF(getnstr)
|
| 250 |
+
#endif
|
| 251 |
+
|
| 252 |
+
#ifdef getparyx
|
| 253 |
+
inline void UNDEF(getparyx)(WINDOW* win, int& y, int& x) { getparyx(win, y, x); }
|
| 254 |
+
#undef getparyx
|
| 255 |
+
#define getparyx UNDEF(getparyx)
|
| 256 |
+
#endif
|
| 257 |
+
|
| 258 |
+
#ifdef getstr
|
| 259 |
+
inline int UNDEF(getstr)(char *_str) { return getstr(_str); }
|
| 260 |
+
#undef getstr
|
| 261 |
+
#define getstr UNDEF(getstr)
|
| 262 |
+
#endif
|
| 263 |
+
|
| 264 |
+
#ifdef getyx
|
| 265 |
+
inline void UNDEF(getyx)(const WINDOW* win, int& y, int& x) {
|
| 266 |
+
getyx(win, y, x); }
|
| 267 |
+
#undef getyx
|
| 268 |
+
#define getyx UNDEF(getyx)
|
| 269 |
+
#endif
|
| 270 |
+
|
| 271 |
+
#ifdef hline
|
| 272 |
+
inline int UNDEF(hline)(chtype ch, int n) { return hline(ch, n); }
|
| 273 |
+
#undef hline
|
| 274 |
+
#define hline UNDEF(hline)
|
| 275 |
+
#endif
|
| 276 |
+
|
| 277 |
+
#ifdef inch
|
| 278 |
+
inline chtype UNDEF(inch)() { return inch(); }
|
| 279 |
+
#undef inch
|
| 280 |
+
#define inch UNDEF(inch)
|
| 281 |
+
#endif
|
| 282 |
+
|
| 283 |
+
#ifdef inchstr
|
| 284 |
+
inline int UNDEF(inchstr)(chtype *str) { return inchstr(str); }
|
| 285 |
+
#undef inchstr
|
| 286 |
+
#define inchstr UNDEF(inchstr)
|
| 287 |
+
#endif
|
| 288 |
+
|
| 289 |
+
#ifdef innstr
|
| 290 |
+
inline int UNDEF(innstr)(char *_str, int n) { return innstr(_str, n); }
|
| 291 |
+
#undef innstr
|
| 292 |
+
#define innstr UNDEF(innstr)
|
| 293 |
+
#endif
|
| 294 |
+
|
| 295 |
+
#ifdef insch
|
| 296 |
+
inline int UNDEF(insch)(chtype c) { return insch(c); }
|
| 297 |
+
#undef insch
|
| 298 |
+
#define insch UNDEF(insch)
|
| 299 |
+
#endif
|
| 300 |
+
|
| 301 |
+
#ifdef insdelln
|
| 302 |
+
inline int UNDEF(insdelln)(int n) { return insdelln(n); }
|
| 303 |
+
#undef insdelln
|
| 304 |
+
#define insdelln UNDEF(insdelln)
|
| 305 |
+
#endif
|
| 306 |
+
|
| 307 |
+
#ifdef insertln
|
| 308 |
+
inline int UNDEF(insertln)() { return insertln(); }
|
| 309 |
+
#undef insertln
|
| 310 |
+
#define insertln UNDEF(insertln)
|
| 311 |
+
#endif
|
| 312 |
+
|
| 313 |
+
#ifdef insnstr
|
| 314 |
+
inline int UNDEF(insnstr)(const char *_str, int n) {
|
| 315 |
+
return insnstr(_str, n); }
|
| 316 |
+
#undef insnstr
|
| 317 |
+
#define insnstr UNDEF(insnstr)
|
| 318 |
+
#endif
|
| 319 |
+
|
| 320 |
+
#ifdef insstr
|
| 321 |
+
inline int UNDEF(insstr)(const char *_str) {
|
| 322 |
+
return insstr(_str); }
|
| 323 |
+
#undef insstr
|
| 324 |
+
#define insstr UNDEF(insstr)
|
| 325 |
+
#endif
|
| 326 |
+
|
| 327 |
+
#ifdef instr
|
| 328 |
+
inline int UNDEF(instr)(char *_str) { return instr(_str); }
|
| 329 |
+
#undef instr
|
| 330 |
+
#define instr UNDEF(instr)
|
| 331 |
+
#endif
|
| 332 |
+
|
| 333 |
+
#ifdef intrflush
|
| 334 |
+
inline void UNDEF(intrflush)(WINDOW *win, bool bf) { intrflush(); }
|
| 335 |
+
#undef intrflush
|
| 336 |
+
#define intrflush UNDEF(intrflush)
|
| 337 |
+
#endif
|
| 338 |
+
|
| 339 |
+
#ifdef is_linetouched
|
| 340 |
+
inline int UNDEF(is_linetouched)(WINDOW *w, int l) { return is_linetouched(w,l); }
|
| 341 |
+
#undef is_linetouched
|
| 342 |
+
#define is_linetouched UNDEF(is_linetouched)
|
| 343 |
+
#endif
|
| 344 |
+
|
| 345 |
+
#ifdef leaveok
|
| 346 |
+
inline int UNDEF(leaveok)(WINDOW* win, bool bf) { return leaveok(win, bf); }
|
| 347 |
+
#undef leaveok
|
| 348 |
+
#define leaveok UNDEF(leaveok)
|
| 349 |
+
#else
|
| 350 |
+
extern "C" NCURSES_IMPEXP int NCURSES_API leaveok(WINDOW* win, bool bf);
|
| 351 |
+
#endif
|
| 352 |
+
|
| 353 |
+
#ifdef move
|
| 354 |
+
inline int UNDEF(move)(int x, int y) { return move(x, y); }
|
| 355 |
+
#undef move
|
| 356 |
+
#define move UNDEF(move)
|
| 357 |
+
#endif
|
| 358 |
+
|
| 359 |
+
#ifdef mvaddch
|
| 360 |
+
inline int UNDEF(mvaddch)(int y, int x, chtype ch)
|
| 361 |
+
{ return mvaddch(y, x, ch); }
|
| 362 |
+
#undef mvaddch
|
| 363 |
+
#define mvaddch UNDEF(mvaddch)
|
| 364 |
+
#endif
|
| 365 |
+
|
| 366 |
+
#ifdef mvaddnstr
|
| 367 |
+
inline int UNDEF(mvaddnstr)(int y, int x, const char *str, int n)
|
| 368 |
+
{ return mvaddnstr(y, x, str, n); }
|
| 369 |
+
#undef mvaddnstr
|
| 370 |
+
#define mvaddnstr UNDEF(mvaddnstr)
|
| 371 |
+
#endif
|
| 372 |
+
|
| 373 |
+
#ifdef mvaddstr
|
| 374 |
+
inline int UNDEF(mvaddstr)(int y, int x, const char * str)
|
| 375 |
+
{ return mvaddstr(y, x, str); }
|
| 376 |
+
#undef mvaddstr
|
| 377 |
+
#define mvaddstr UNDEF(mvaddstr)
|
| 378 |
+
#endif
|
| 379 |
+
|
| 380 |
+
#ifdef mvchgat
|
| 381 |
+
inline int UNDEF(mvchgat)(int y, int x, int n,
|
| 382 |
+
attr_t attr, NCURSES_PAIRS_T color, const void *opts) {
|
| 383 |
+
return mvchgat(y, x, n, attr, color, opts); }
|
| 384 |
+
#undef mvchgat
|
| 385 |
+
#define mvchgat UNDEF(mvchgat)
|
| 386 |
+
#endif
|
| 387 |
+
|
| 388 |
+
#ifdef mvdelch
|
| 389 |
+
inline int UNDEF(mvdelch)(int y, int x) { return mvdelch(y, x);}
|
| 390 |
+
#undef mvdelch
|
| 391 |
+
#define mvdelch UNDEF(mvdelch)
|
| 392 |
+
#endif
|
| 393 |
+
|
| 394 |
+
#ifdef mvgetch
|
| 395 |
+
inline int UNDEF(mvgetch)(int y, int x) { return mvgetch(y, x);}
|
| 396 |
+
#undef mvgetch
|
| 397 |
+
#define mvgetch UNDEF(mvgetch)
|
| 398 |
+
#endif
|
| 399 |
+
|
| 400 |
+
#ifdef mvgetnstr
|
| 401 |
+
inline int UNDEF(mvgetnstr)(int y, int x, char *str, int n) {
|
| 402 |
+
return mvgetnstr(y, x, str, n);}
|
| 403 |
+
#undef mvgetnstr
|
| 404 |
+
#define mvgetnstr UNDEF(mvgetnstr)
|
| 405 |
+
#endif
|
| 406 |
+
|
| 407 |
+
#ifdef mvgetstr
|
| 408 |
+
inline int UNDEF(mvgetstr)(int y, int x, char *str) {return mvgetstr(y, x, str);}
|
| 409 |
+
#undef mvgetstr
|
| 410 |
+
#define mvgetstr UNDEF(mvgetstr)
|
| 411 |
+
#endif
|
| 412 |
+
|
| 413 |
+
#ifdef mvinch
|
| 414 |
+
inline chtype UNDEF(mvinch)(int y, int x) { return mvinch(y, x);}
|
| 415 |
+
#undef mvinch
|
| 416 |
+
#define mvinch UNDEF(mvinch)
|
| 417 |
+
#endif
|
| 418 |
+
|
| 419 |
+
#ifdef mvinnstr
|
| 420 |
+
inline int UNDEF(mvinnstr)(int y, int x, char *_str, int n) {
|
| 421 |
+
return mvinnstr(y, x, _str, n); }
|
| 422 |
+
#undef mvinnstr
|
| 423 |
+
#define mvinnstr UNDEF(mvinnstr)
|
| 424 |
+
#endif
|
| 425 |
+
|
| 426 |
+
#ifdef mvinsch
|
| 427 |
+
inline int UNDEF(mvinsch)(int y, int x, chtype c)
|
| 428 |
+
{ return mvinsch(y, x, c); }
|
| 429 |
+
#undef mvinsch
|
| 430 |
+
#define mvinsch UNDEF(mvinsch)
|
| 431 |
+
#endif
|
| 432 |
+
|
| 433 |
+
#ifdef mvinsnstr
|
| 434 |
+
inline int UNDEF(mvinsnstr)(int y, int x, const char *_str, int n) {
|
| 435 |
+
return mvinsnstr(y, x, _str, n); }
|
| 436 |
+
#undef mvinsnstr
|
| 437 |
+
#define mvinsnstr UNDEF(mvinsnstr)
|
| 438 |
+
#endif
|
| 439 |
+
|
| 440 |
+
#ifdef mvinsstr
|
| 441 |
+
inline int UNDEF(mvinsstr)(int y, int x, const char *_str) {
|
| 442 |
+
return mvinsstr(y, x, _str); }
|
| 443 |
+
#undef mvinsstr
|
| 444 |
+
#define mvinsstr UNDEF(mvinsstr)
|
| 445 |
+
#endif
|
| 446 |
+
|
| 447 |
+
#ifdef mvwaddch
|
| 448 |
+
inline int UNDEF(mvwaddch)(WINDOW *win, int y, int x, const chtype ch)
|
| 449 |
+
{ return mvwaddch(win, y, x, ch); }
|
| 450 |
+
#undef mvwaddch
|
| 451 |
+
#define mvwaddch UNDEF(mvwaddch)
|
| 452 |
+
#endif
|
| 453 |
+
|
| 454 |
+
#ifdef mvwaddchnstr
|
| 455 |
+
inline int UNDEF(mvwaddchnstr)(WINDOW *win, int y, int x, const chtype *str, int n)
|
| 456 |
+
{ return mvwaddchnstr(win, y, x, str, n); }
|
| 457 |
+
#undef mvwaddchnstr
|
| 458 |
+
#define mvwaddchnstr UNDEF(mvwaddchnstr)
|
| 459 |
+
#endif
|
| 460 |
+
|
| 461 |
+
#ifdef mvwaddchstr
|
| 462 |
+
inline int UNDEF(mvwaddchstr)(WINDOW *win, int y, int x, const chtype *str)
|
| 463 |
+
{ return mvwaddchstr(win, y, x, str); }
|
| 464 |
+
#undef mvwaddchstr
|
| 465 |
+
#define mvwaddchstr UNDEF(mvwaddchstr)
|
| 466 |
+
#endif
|
| 467 |
+
|
| 468 |
+
#ifdef mvwaddnstr
|
| 469 |
+
inline int UNDEF(mvwaddnstr)(WINDOW *win, int y, int x, const char *str, int n)
|
| 470 |
+
{ return mvwaddnstr(win, y, x, str, n); }
|
| 471 |
+
#undef mvwaddnstr
|
| 472 |
+
#define mvwaddnstr UNDEF(mvwaddnstr)
|
| 473 |
+
#endif
|
| 474 |
+
|
| 475 |
+
#ifdef mvwaddstr
|
| 476 |
+
inline int UNDEF(mvwaddstr)(WINDOW *win, int y, int x, const char * str)
|
| 477 |
+
{ return mvwaddstr(win, y, x, str); }
|
| 478 |
+
#undef mvwaddstr
|
| 479 |
+
#define mvwaddstr UNDEF(mvwaddstr)
|
| 480 |
+
#endif
|
| 481 |
+
|
| 482 |
+
#ifdef mvwchgat
|
| 483 |
+
inline int UNDEF(mvwchgat)(WINDOW *win, int y, int x, int n,
|
| 484 |
+
attr_t attr, NCURSES_PAIRS_T color, const void *opts) {
|
| 485 |
+
return mvwchgat(win, y, x, n, attr, color, opts); }
|
| 486 |
+
#undef mvwchgat
|
| 487 |
+
#define mvwchgat UNDEF(mvwchgat)
|
| 488 |
+
#endif
|
| 489 |
+
|
| 490 |
+
#ifdef mvwdelch
|
| 491 |
+
inline int UNDEF(mvwdelch)(WINDOW *win, int y, int x)
|
| 492 |
+
{ return mvwdelch(win, y, x); }
|
| 493 |
+
#undef mvwdelch
|
| 494 |
+
#define mvwdelch UNDEF(mvwdelch)
|
| 495 |
+
#endif
|
| 496 |
+
|
| 497 |
+
#ifdef mvwgetch
|
| 498 |
+
inline int UNDEF(mvwgetch)(WINDOW *win, int y, int x) { return mvwgetch(win, y, x);}
|
| 499 |
+
#undef mvwgetch
|
| 500 |
+
#define mvwgetch UNDEF(mvwgetch)
|
| 501 |
+
#endif
|
| 502 |
+
|
| 503 |
+
#ifdef mvwgetnstr
|
| 504 |
+
inline int UNDEF(mvwgetnstr)(WINDOW *win, int y, int x, char *str, int n)
|
| 505 |
+
{return mvwgetnstr(win, y, x, str, n);}
|
| 506 |
+
#undef mvwgetnstr
|
| 507 |
+
#define mvwgetnstr UNDEF(mvwgetnstr)
|
| 508 |
+
#endif
|
| 509 |
+
|
| 510 |
+
#ifdef mvwgetstr
|
| 511 |
+
inline int UNDEF(mvwgetstr)(WINDOW *win, int y, int x, char *str)
|
| 512 |
+
{return mvwgetstr(win, y, x, str);}
|
| 513 |
+
#undef mvwgetstr
|
| 514 |
+
#define mvwgetstr UNDEF(mvwgetstr)
|
| 515 |
+
#endif
|
| 516 |
+
|
| 517 |
+
#ifdef mvwhline
|
| 518 |
+
inline int UNDEF(mvwhline)(WINDOW *win, int y, int x, chtype c, int n) {
|
| 519 |
+
return mvwhline(win, y, x, c, n); }
|
| 520 |
+
#undef mvwhline
|
| 521 |
+
#define mvwhline UNDEF(mvwhline)
|
| 522 |
+
#endif
|
| 523 |
+
|
| 524 |
+
#ifdef mvwinch
|
| 525 |
+
inline chtype UNDEF(mvwinch)(WINDOW *win, int y, int x) {
|
| 526 |
+
return mvwinch(win, y, x);}
|
| 527 |
+
#undef mvwinch
|
| 528 |
+
#define mvwinch UNDEF(mvwinch)
|
| 529 |
+
#endif
|
| 530 |
+
|
| 531 |
+
#ifdef mvwinchnstr
|
| 532 |
+
inline int UNDEF(mvwinchnstr)(WINDOW *win, int y, int x, chtype *str, int n) { return mvwinchnstr(win, y, x, str, n); }
|
| 533 |
+
#undef mvwinchnstr
|
| 534 |
+
#define mvwinchnstr UNDEF(mvwinchnstr)
|
| 535 |
+
#endif
|
| 536 |
+
|
| 537 |
+
#ifdef mvwinchstr
|
| 538 |
+
inline int UNDEF(mvwinchstr)(WINDOW *win, int y, int x, chtype *str) { return mvwinchstr(win, y, x, str); }
|
| 539 |
+
#undef mvwinchstr
|
| 540 |
+
#define mvwinchstr UNDEF(mvwinchstr)
|
| 541 |
+
#endif
|
| 542 |
+
|
| 543 |
+
#ifdef mvwinnstr
|
| 544 |
+
inline int UNDEF(mvwinnstr)(WINDOW *win, int y, int x, char *_str, int n) {
|
| 545 |
+
return mvwinnstr(win, y, x, _str, n); }
|
| 546 |
+
#undef mvwinnstr
|
| 547 |
+
#define mvwinnstr UNDEF(mvwinnstr)
|
| 548 |
+
#endif
|
| 549 |
+
|
| 550 |
+
#ifdef mvwinsch
|
| 551 |
+
inline int UNDEF(mvwinsch)(WINDOW *win, int y, int x, chtype c)
|
| 552 |
+
{ return mvwinsch(win, y, x, c); }
|
| 553 |
+
#undef mvwinsch
|
| 554 |
+
#define mvwinsch UNDEF(mvwinsch)
|
| 555 |
+
#endif
|
| 556 |
+
|
| 557 |
+
#ifdef mvwinsnstr
|
| 558 |
+
inline int UNDEF(mvwinsnstr)(WINDOW *w, int y, int x, const char *_str, int n) {
|
| 559 |
+
return mvwinsnstr(w, y, x, _str, n); }
|
| 560 |
+
#undef mvwinsnstr
|
| 561 |
+
#define mvwinsnstr UNDEF(mvwinsnstr)
|
| 562 |
+
#endif
|
| 563 |
+
|
| 564 |
+
#ifdef mvwinsstr
|
| 565 |
+
inline int UNDEF(mvwinsstr)(WINDOW *w, int y, int x, const char *_str) {
|
| 566 |
+
return mvwinsstr(w, y, x, _str); }
|
| 567 |
+
#undef mvwinsstr
|
| 568 |
+
#define mvwinsstr UNDEF(mvwinsstr)
|
| 569 |
+
#endif
|
| 570 |
+
|
| 571 |
+
#ifdef mvwvline
|
| 572 |
+
inline int UNDEF(mvwvline)(WINDOW *win, int y, int x, chtype c, int n) {
|
| 573 |
+
return mvwvline(win, y, x, c, n); }
|
| 574 |
+
#undef mvwvline
|
| 575 |
+
#define mvwvline UNDEF(mvwvline)
|
| 576 |
+
#endif
|
| 577 |
+
|
| 578 |
+
#ifdef napms
|
| 579 |
+
inline void UNDEF(napms)(unsigned long x) { napms(x); }
|
| 580 |
+
#undef napms
|
| 581 |
+
#define napms UNDEF(napms)
|
| 582 |
+
#endif
|
| 583 |
+
|
| 584 |
+
#ifdef nocrmode
|
| 585 |
+
inline int UNDEF(nocrmode)(void) { return nocrmode(); }
|
| 586 |
+
#undef nocrmode
|
| 587 |
+
#define nocrmode UNDEF(nocrmode)
|
| 588 |
+
#endif
|
| 589 |
+
|
| 590 |
+
#ifdef nodelay
|
| 591 |
+
inline void UNDEF(nodelay)() { nodelay(); }
|
| 592 |
+
#undef nodelay
|
| 593 |
+
#define nodelay UNDEF(nodelay)
|
| 594 |
+
#endif
|
| 595 |
+
|
| 596 |
+
#ifdef redrawwin
|
| 597 |
+
inline int UNDEF(redrawwin)(WINDOW *win) { return redrawwin(win); }
|
| 598 |
+
#undef redrawwin
|
| 599 |
+
#define redrawwin UNDEF(redrawwin)
|
| 600 |
+
#endif
|
| 601 |
+
|
| 602 |
+
#ifdef refresh
|
| 603 |
+
inline int UNDEF(refresh)() { return refresh(); }
|
| 604 |
+
#undef refresh
|
| 605 |
+
#define refresh UNDEF(refresh)
|
| 606 |
+
#endif
|
| 607 |
+
|
| 608 |
+
#ifdef resetterm
|
| 609 |
+
inline int UNDEF(resetterm)(void) { return resetterm(); }
|
| 610 |
+
#undef resetterm
|
| 611 |
+
#define resetterm UNDEF(resetterm)
|
| 612 |
+
#endif
|
| 613 |
+
|
| 614 |
+
#ifdef saveterm
|
| 615 |
+
inline int UNDEF(saveterm)(void) { return saveterm(); }
|
| 616 |
+
#undef saveterm
|
| 617 |
+
#define saveterm UNDEF(saveterm)
|
| 618 |
+
#endif
|
| 619 |
+
|
| 620 |
+
#ifdef scrl
|
| 621 |
+
inline int UNDEF(scrl)(int l) { return scrl(l); }
|
| 622 |
+
#undef scrl
|
| 623 |
+
#define scrl UNDEF(scrl)
|
| 624 |
+
#endif
|
| 625 |
+
|
| 626 |
+
#ifdef scroll
|
| 627 |
+
inline int UNDEF(scroll)(WINDOW *win) { return scroll(win); }
|
| 628 |
+
#undef scroll
|
| 629 |
+
#define scroll UNDEF(scroll)
|
| 630 |
+
#endif
|
| 631 |
+
|
| 632 |
+
#ifdef scrollok
|
| 633 |
+
inline int UNDEF(scrollok)(WINDOW* win, bool bf) { return scrollok(win, bf); }
|
| 634 |
+
#undef scrollok
|
| 635 |
+
#define scrollok UNDEF(scrollok)
|
| 636 |
+
#else
|
| 637 |
+
#if defined(__NCURSES_H)
|
| 638 |
+
extern "C" NCURSES_IMPEXP int NCURSES_API scrollok(WINDOW*, bool);
|
| 639 |
+
#else
|
| 640 |
+
extern "C" NCURSES_IMPEXP int NCURSES_API scrollok(WINDOW*, char);
|
| 641 |
+
#endif
|
| 642 |
+
#endif
|
| 643 |
+
|
| 644 |
+
#ifdef setscrreg
|
| 645 |
+
inline int UNDEF(setscrreg)(int t, int b) { return setscrreg(t, b); }
|
| 646 |
+
#undef setscrreg
|
| 647 |
+
#define setscrreg UNDEF(setscrreg)
|
| 648 |
+
#endif
|
| 649 |
+
|
| 650 |
+
#ifdef standend
|
| 651 |
+
inline int UNDEF(standend)() { return standend(); }
|
| 652 |
+
#undef standend
|
| 653 |
+
#define standend UNDEF(standend)
|
| 654 |
+
#endif
|
| 655 |
+
|
| 656 |
+
#ifdef standout
|
| 657 |
+
inline int UNDEF(standout)() { return standout(); }
|
| 658 |
+
#undef standout
|
| 659 |
+
#define standout UNDEF(standout)
|
| 660 |
+
#endif
|
| 661 |
+
|
| 662 |
+
#ifdef subpad
|
| 663 |
+
inline WINDOW *UNDEF(subpad)(WINDOW *p, int l, int c, int y, int x)
|
| 664 |
+
{ return derwin(p, l, c, y, x); }
|
| 665 |
+
#undef subpad
|
| 666 |
+
#define subpad UNDEF(subpad)
|
| 667 |
+
#endif
|
| 668 |
+
|
| 669 |
+
#ifdef timeout
|
| 670 |
+
inline void UNDEF(timeout)(int delay) { timeout(delay); }
|
| 671 |
+
#undef timeout
|
| 672 |
+
#define timeout UNDEF(timeout)
|
| 673 |
+
#endif
|
| 674 |
+
|
| 675 |
+
#ifdef touchline
|
| 676 |
+
inline int UNDEF(touchline)(WINDOW *win, int s, int c)
|
| 677 |
+
{ return touchline(win, s, c); }
|
| 678 |
+
#undef touchline
|
| 679 |
+
#define touchline UNDEF(touchline)
|
| 680 |
+
#endif
|
| 681 |
+
|
| 682 |
+
#ifdef touchwin
|
| 683 |
+
inline int UNDEF(touchwin)(WINDOW *win) { return touchwin(win); }
|
| 684 |
+
#undef touchwin
|
| 685 |
+
#define touchwin UNDEF(touchwin)
|
| 686 |
+
#endif
|
| 687 |
+
|
| 688 |
+
#ifdef untouchwin
|
| 689 |
+
inline int UNDEF(untouchwin)(WINDOW *win) { return untouchwin(win); }
|
| 690 |
+
#undef untouchwin
|
| 691 |
+
#define untouchwin UNDEF(untouchwin)
|
| 692 |
+
#endif
|
| 693 |
+
|
| 694 |
+
#ifdef vline
|
| 695 |
+
inline int UNDEF(vline)(chtype ch, int n) { return vline(ch, n); }
|
| 696 |
+
#undef vline
|
| 697 |
+
#define vline UNDEF(vline)
|
| 698 |
+
#endif
|
| 699 |
+
|
| 700 |
+
#ifdef waddchstr
|
| 701 |
+
inline int UNDEF(waddchstr)(WINDOW *win, chtype *at) { return waddchstr(win, at); }
|
| 702 |
+
#undef waddchstr
|
| 703 |
+
#define waddchstr UNDEF(waddchstr)
|
| 704 |
+
#endif
|
| 705 |
+
|
| 706 |
+
#ifdef waddstr
|
| 707 |
+
inline int UNDEF(waddstr)(WINDOW *win, char *str) { return waddstr(win, str); }
|
| 708 |
+
#undef waddstr
|
| 709 |
+
#define waddstr UNDEF(waddstr)
|
| 710 |
+
#endif
|
| 711 |
+
|
| 712 |
+
#ifdef wattroff
|
| 713 |
+
inline int UNDEF(wattroff)(WINDOW *win, int att) { return wattroff(win, att); }
|
| 714 |
+
#undef wattroff
|
| 715 |
+
#define wattroff UNDEF(wattroff)
|
| 716 |
+
#endif
|
| 717 |
+
|
| 718 |
+
#ifdef wattrset
|
| 719 |
+
inline int UNDEF(wattrset)(WINDOW *win, int att) { return wattrset(win, att); }
|
| 720 |
+
#undef wattrset
|
| 721 |
+
#define wattrset UNDEF(wattrset)
|
| 722 |
+
#endif
|
| 723 |
+
|
| 724 |
+
#ifdef winch
|
| 725 |
+
inline chtype UNDEF(winch)(const WINDOW* win) { return winch(win); }
|
| 726 |
+
#undef winch
|
| 727 |
+
#define winch UNDEF(winch)
|
| 728 |
+
#endif
|
| 729 |
+
|
| 730 |
+
#ifdef winchnstr
|
| 731 |
+
inline int UNDEF(winchnstr)(WINDOW *win, chtype *str, int n) { return winchnstr(win, str, n); }
|
| 732 |
+
#undef winchnstr
|
| 733 |
+
#define winchnstr UNDEF(winchnstr)
|
| 734 |
+
#endif
|
| 735 |
+
|
| 736 |
+
#ifdef winchstr
|
| 737 |
+
inline int UNDEF(winchstr)(WINDOW *win, chtype *str) { return winchstr(win, str); }
|
| 738 |
+
#undef winchstr
|
| 739 |
+
#define winchstr UNDEF(winchstr)
|
| 740 |
+
#endif
|
| 741 |
+
|
| 742 |
+
#ifdef winsstr
|
| 743 |
+
inline int UNDEF(winsstr)(WINDOW *w, const char *_str) {
|
| 744 |
+
return winsstr(w, _str); }
|
| 745 |
+
#undef winsstr
|
| 746 |
+
#define winsstr UNDEF(winsstr)
|
| 747 |
+
#endif
|
| 748 |
+
|
| 749 |
+
#ifdef wstandend
|
| 750 |
+
inline int UNDEF(wstandend)(WINDOW *win) { return wstandend(win); }
|
| 751 |
+
#undef wstandend
|
| 752 |
+
#define wstandend UNDEF(wstandend)
|
| 753 |
+
#endif
|
| 754 |
+
|
| 755 |
+
#ifdef wstandout
|
| 756 |
+
inline int UNDEF(wstandout)(WINDOW *win) { return wstandout(win); }
|
| 757 |
+
#undef wstandout
|
| 758 |
+
#define wstandout UNDEF(wstandout)
|
| 759 |
+
#endif
|
| 760 |
+
|
| 761 |
+
/*
|
| 762 |
+
*
|
| 763 |
+
* C++ class for windows.
|
| 764 |
+
*
|
| 765 |
+
*/
|
| 766 |
+
|
| 767 |
+
extern "C" int _nc_ripoffline(int, int (*init)(WINDOW*, int));
|
| 768 |
+
extern "C" int _nc_xx_ripoff_init(WINDOW *, int);
|
| 769 |
+
extern "C" int _nc_has_mouse(void);
|
| 770 |
+
|
| 771 |
+
class NCURSES_CXX_IMPEXP NCursesWindow
|
| 772 |
+
{
|
| 773 |
+
friend class NCursesMenu;
|
| 774 |
+
friend class NCursesForm;
|
| 775 |
+
|
| 776 |
+
private:
|
| 777 |
+
static bool b_initialized;
|
| 778 |
+
static void initialize();
|
| 779 |
+
void constructing();
|
| 780 |
+
friend int _nc_xx_ripoff_init(WINDOW *, int);
|
| 781 |
+
|
| 782 |
+
void set_keyboard();
|
| 783 |
+
|
| 784 |
+
NCURSES_COLOR_T getcolor(int getback) const;
|
| 785 |
+
NCURSES_PAIRS_T getPair() const;
|
| 786 |
+
|
| 787 |
+
static int setpalette(NCURSES_COLOR_T fore, NCURSES_COLOR_T back, NCURSES_PAIRS_T pair);
|
| 788 |
+
static int colorInitialized;
|
| 789 |
+
|
| 790 |
+
// This private constructor is only used during the initialization
|
| 791 |
+
// of windows generated by ripoffline() calls.
|
| 792 |
+
NCursesWindow(WINDOW* win, int ncols);
|
| 793 |
+
|
| 794 |
+
protected:
|
| 795 |
+
virtual void err_handler(const char *) const THROWS(NCursesException);
|
| 796 |
+
// Signal an error with the given message text.
|
| 797 |
+
|
| 798 |
+
static long count; // count of all active windows:
|
| 799 |
+
// We rely on the c++ promise that
|
| 800 |
+
// all otherwise uninitialized
|
| 801 |
+
// static class vars are set to 0
|
| 802 |
+
|
| 803 |
+
WINDOW* w; // the curses WINDOW
|
| 804 |
+
|
| 805 |
+
bool alloced; // TRUE if we own the WINDOW
|
| 806 |
+
|
| 807 |
+
NCursesWindow* par; // parent, if subwindow
|
| 808 |
+
NCursesWindow* subwins; // head of subwindows list
|
| 809 |
+
NCursesWindow* sib; // next subwindow of parent
|
| 810 |
+
|
| 811 |
+
void kill_subwindows(); // disable all subwindows
|
| 812 |
+
// Destroy all subwindows.
|
| 813 |
+
|
| 814 |
+
/* Only for use by derived classes. They are then in charge to
|
| 815 |
+
fill the member variables correctly. */
|
| 816 |
+
NCursesWindow();
|
| 817 |
+
|
| 818 |
+
public:
|
| 819 |
+
explicit NCursesWindow(WINDOW* window); // useful only for stdscr
|
| 820 |
+
|
| 821 |
+
NCursesWindow(int nlines, // number of lines
|
| 822 |
+
int ncols, // number of columns
|
| 823 |
+
int begin_y, // line origin
|
| 824 |
+
int begin_x); // col origin
|
| 825 |
+
|
| 826 |
+
NCursesWindow(NCursesWindow& par,// parent window
|
| 827 |
+
int nlines, // number of lines
|
| 828 |
+
int ncols, // number of columns
|
| 829 |
+
int begin_y, // absolute or relative
|
| 830 |
+
int begin_x, // origins:
|
| 831 |
+
char absrel = 'a');// if `a', begin_y & begin_x are
|
| 832 |
+
// absolute screen pos, else if `r', they are relative to par origin
|
| 833 |
+
|
| 834 |
+
NCursesWindow(NCursesWindow& par,// parent window
|
| 835 |
+
bool do_box = TRUE);
|
| 836 |
+
// this is the very common case that we want to create the subwindow that
|
| 837 |
+
// is two lines and two columns smaller and begins at (1,1).
|
| 838 |
+
// We may automatically request the box around it.
|
| 839 |
+
|
| 840 |
+
NCursesWindow& operator=(const NCursesWindow& rhs)
|
| 841 |
+
{
|
| 842 |
+
if (this != &rhs)
|
| 843 |
+
*this = rhs;
|
| 844 |
+
return *this;
|
| 845 |
+
}
|
| 846 |
+
|
| 847 |
+
NCursesWindow(const NCursesWindow& rhs)
|
| 848 |
+
: w(rhs.w), alloced(rhs.alloced), par(rhs.par), subwins(rhs.subwins), sib(rhs.sib)
|
| 849 |
+
{
|
| 850 |
+
}
|
| 851 |
+
|
| 852 |
+
virtual ~NCursesWindow() THROWS(NCursesException);
|
| 853 |
+
|
| 854 |
+
NCursesWindow Clone();
|
| 855 |
+
// Make an exact copy of the window.
|
| 856 |
+
|
| 857 |
+
// Initialization.
|
| 858 |
+
static void useColors(void);
|
| 859 |
+
// Call this routine very early if you want to have colors.
|
| 860 |
+
|
| 861 |
+
static int ripoffline(int ripoff_lines,
|
| 862 |
+
int (*init)(NCursesWindow& win));
|
| 863 |
+
// This function is used to generate a window of ripped-of lines.
|
| 864 |
+
// If the argument is positive, lines are removed from the top, if it
|
| 865 |
+
// is negative lines are removed from the bottom. This enhances the
|
| 866 |
+
// lowlevel ripoffline() function because it uses the internal
|
| 867 |
+
// implementation that allows to remove more than just a single line.
|
| 868 |
+
// This function must be called before any other ncurses function. The
|
| 869 |
+
// creation of the window is deferred until ncurses gets initialized.
|
| 870 |
+
// The initialization function is then called.
|
| 871 |
+
|
| 872 |
+
// -------------------------------------------------------------------------
|
| 873 |
+
// terminal status
|
| 874 |
+
// -------------------------------------------------------------------------
|
| 875 |
+
int lines() const { initialize(); return LINES; }
|
| 876 |
+
// Number of lines on terminal, *not* window
|
| 877 |
+
|
| 878 |
+
int cols() const { initialize(); return COLS; }
|
| 879 |
+
// Number of cols on terminal, *not* window
|
| 880 |
+
|
| 881 |
+
int tabsize() const { initialize(); return TABSIZE; }
|
| 882 |
+
// Size of a tab on terminal, *not* window
|
| 883 |
+
|
| 884 |
+
static int NumberOfColors();
|
| 885 |
+
// Number of available colors
|
| 886 |
+
|
| 887 |
+
int colors() const { return NumberOfColors(); }
|
| 888 |
+
// Number of available colors
|
| 889 |
+
|
| 890 |
+
// -------------------------------------------------------------------------
|
| 891 |
+
// window status
|
| 892 |
+
// -------------------------------------------------------------------------
|
| 893 |
+
int height() const { return maxy() + 1; }
|
| 894 |
+
// Number of lines in this window
|
| 895 |
+
|
| 896 |
+
int width() const { return maxx() + 1; }
|
| 897 |
+
// Number of columns in this window
|
| 898 |
+
|
| 899 |
+
int begx() const { return getbegx(w); }
|
| 900 |
+
// Column of top left corner relative to stdscr
|
| 901 |
+
|
| 902 |
+
int begy() const { return getbegy(w); }
|
| 903 |
+
// Line of top left corner relative to stdscr
|
| 904 |
+
|
| 905 |
+
int curx() const { return getcurx(w); }
|
| 906 |
+
// Column of top left corner relative to stdscr
|
| 907 |
+
|
| 908 |
+
int cury() const { return getcury(w); }
|
| 909 |
+
// Line of top left corner relative to stdscr
|
| 910 |
+
|
| 911 |
+
int maxx() const { return getmaxx(w) == ERR ? ERR : getmaxx(w)-1; }
|
| 912 |
+
// Largest x coord in window
|
| 913 |
+
|
| 914 |
+
int maxy() const { return getmaxy(w) == ERR ? ERR : getmaxy(w)-1; }
|
| 915 |
+
// Largest y coord in window
|
| 916 |
+
|
| 917 |
+
NCURSES_PAIRS_T getcolor() const;
|
| 918 |
+
// Actual color pair
|
| 919 |
+
|
| 920 |
+
NCURSES_COLOR_T foreground() const { return getcolor(0); }
|
| 921 |
+
// Actual foreground color
|
| 922 |
+
|
| 923 |
+
NCURSES_COLOR_T background() const { return getcolor(1); }
|
| 924 |
+
// Actual background color
|
| 925 |
+
|
| 926 |
+
int setpalette(NCURSES_COLOR_T fore, NCURSES_COLOR_T back);
|
| 927 |
+
// Set color palette entry
|
| 928 |
+
|
| 929 |
+
int setcolor(NCURSES_PAIRS_T pair);
|
| 930 |
+
// Set actually used palette entry
|
| 931 |
+
|
| 932 |
+
// -------------------------------------------------------------------------
|
| 933 |
+
// window positioning
|
| 934 |
+
// -------------------------------------------------------------------------
|
| 935 |
+
virtual int mvwin(int begin_y, int begin_x) {
|
| 936 |
+
return ::mvwin(w, begin_y, begin_x); }
|
| 937 |
+
// Move window to new position with the new position as top left corner.
|
| 938 |
+
// This is virtual because it is redefined in NCursesPanel.
|
| 939 |
+
|
| 940 |
+
// -------------------------------------------------------------------------
|
| 941 |
+
// coordinate positioning
|
| 942 |
+
// -------------------------------------------------------------------------
|
| 943 |
+
int move(int y, int x) { return ::wmove(w, y, x); }
|
| 944 |
+
// Move cursor the this position
|
| 945 |
+
|
| 946 |
+
void getyx(int& y, int& x) const { ::getyx(w, y, x); }
|
| 947 |
+
// Get current position of the cursor
|
| 948 |
+
|
| 949 |
+
void getbegyx(int& y, int& x) const { ::getbegyx(w, y, x); }
|
| 950 |
+
// Get beginning of the window
|
| 951 |
+
|
| 952 |
+
void getmaxyx(int& y, int& x) const { ::getmaxyx(w, y, x); }
|
| 953 |
+
// Get size of the window
|
| 954 |
+
|
| 955 |
+
void getparyx(int& y, int& x) const { ::getparyx(w, y, x); }
|
| 956 |
+
// Get parent's beginning of the window
|
| 957 |
+
|
| 958 |
+
int mvcur(int oldrow, int oldcol, int newrow, int newcol) const {
|
| 959 |
+
return ::mvcur(oldrow, oldcol, newrow, newcol); }
|
| 960 |
+
// Perform lowlevel cursor motion that takes effect immediately.
|
| 961 |
+
|
| 962 |
+
// -------------------------------------------------------------------------
|
| 963 |
+
// input
|
| 964 |
+
// -------------------------------------------------------------------------
|
| 965 |
+
int getch() { return ::wgetch(w); }
|
| 966 |
+
// Get a keystroke from the window.
|
| 967 |
+
|
| 968 |
+
int getch(int y, int x) { return ::mvwgetch(w, y, x); }
|
| 969 |
+
// Move cursor to position and get a keystroke from the window
|
| 970 |
+
|
| 971 |
+
int getstr(char* str, int n=-1) {
|
| 972 |
+
return ::wgetnstr(w, str, n); }
|
| 973 |
+
// Read a series of characters into str until a newline or carriage return
|
| 974 |
+
// is received. Read at most n characters. If n is negative, the limit is
|
| 975 |
+
// ignored.
|
| 976 |
+
|
| 977 |
+
int getstr(int y, int x, char* str, int n=-1) {
|
| 978 |
+
return ::mvwgetnstr(w, y, x, str, n); }
|
| 979 |
+
// Move the cursor to the requested position and then perform the getstr()
|
| 980 |
+
// as described above.
|
| 981 |
+
|
| 982 |
+
int instr(char *s, int n=-1) { return ::winnstr(w, s, n); }
|
| 983 |
+
// Get a string of characters from the window into the buffer s. Retrieve
|
| 984 |
+
// at most n characters, if n is negative retrieve all characters up to the
|
| 985 |
+
// end of the current line. Attributes are stripped from the characters.
|
| 986 |
+
|
| 987 |
+
int instr(int y, int x, char *s, int n=-1) {
|
| 988 |
+
return ::mvwinnstr(w, y, x, s, n); }
|
| 989 |
+
// Move the cursor to the requested position and then perform the instr()
|
| 990 |
+
// as described above.
|
| 991 |
+
|
| 992 |
+
int scanw(const char* fmt, ...)
|
| 993 |
+
// Perform a scanw function from the window.
|
| 994 |
+
#if __GNUG__ >= 2
|
| 995 |
+
__attribute__ ((format (scanf, 2, 3)));
|
| 996 |
+
#else
|
| 997 |
+
;
|
| 998 |
+
#endif
|
| 999 |
+
|
| 1000 |
+
int scanw(const char*, va_list);
|
| 1001 |
+
// Perform a scanw function from the window.
|
| 1002 |
+
|
| 1003 |
+
int scanw(int y, int x, const char* fmt, ...)
|
| 1004 |
+
// Move the cursor to the requested position and then perform a scanw
|
| 1005 |
+
// from the window.
|
| 1006 |
+
#if __GNUG__ >= 2
|
| 1007 |
+
__attribute__ ((format (scanf, 4, 5)));
|
| 1008 |
+
#else
|
| 1009 |
+
;
|
| 1010 |
+
#endif
|
| 1011 |
+
|
| 1012 |
+
int scanw(int y, int x, const char* fmt, va_list);
|
| 1013 |
+
// Move the cursor to the requested position and then perform a scanw
|
| 1014 |
+
// from the window.
|
| 1015 |
+
|
| 1016 |
+
// -------------------------------------------------------------------------
|
| 1017 |
+
// output
|
| 1018 |
+
// -------------------------------------------------------------------------
|
| 1019 |
+
int addch(const chtype ch) { return ::waddch(w, ch); }
|
| 1020 |
+
// Put attributed character to the window.
|
| 1021 |
+
|
| 1022 |
+
int addch(int y, int x, const chtype ch) {
|
| 1023 |
+
return ::mvwaddch(w, y, x, ch); }
|
| 1024 |
+
// Move cursor to the requested position and then put attributed character
|
| 1025 |
+
// to the window.
|
| 1026 |
+
|
| 1027 |
+
int echochar(const chtype ch) { return ::wechochar(w, ch); }
|
| 1028 |
+
// Put attributed character to the window and refresh it immediately.
|
| 1029 |
+
|
| 1030 |
+
int addstr(const char* str, int n=-1) {
|
| 1031 |
+
return ::waddnstr(w, str, n); }
|
| 1032 |
+
// Write the string str to the window, stop writing if the terminating
|
| 1033 |
+
// NUL or the limit n is reached. If n is negative, it is ignored.
|
| 1034 |
+
|
| 1035 |
+
int addstr(int y, int x, const char * str, int n=-1) {
|
| 1036 |
+
return ::mvwaddnstr(w, y, x, str, n); }
|
| 1037 |
+
// Move the cursor to the requested position and then perform the addchstr
|
| 1038 |
+
// as described above.
|
| 1039 |
+
|
| 1040 |
+
int addchstr(const chtype* str, int n=-1) {
|
| 1041 |
+
return ::waddchnstr(w, str, n); }
|
| 1042 |
+
// Write the string str to the window, stop writing if the terminating
|
| 1043 |
+
// NUL or the limit n is reached. If n is negative, it is ignored.
|
| 1044 |
+
|
| 1045 |
+
int addchstr(int y, int x, const chtype * str, int n=-1) {
|
| 1046 |
+
return ::mvwaddchnstr(w, y, x, str, n); }
|
| 1047 |
+
// Move the cursor to the requested position and then perform the addchstr
|
| 1048 |
+
// as described above.
|
| 1049 |
+
|
| 1050 |
+
int printw(const char* fmt, ...)
|
| 1051 |
+
// Do a formatted print to the window.
|
| 1052 |
+
#if (__GNUG__ >= 2) && !defined(printf)
|
| 1053 |
+
__attribute__ ((format (printf, 2, 3)));
|
| 1054 |
+
#else
|
| 1055 |
+
;
|
| 1056 |
+
#endif
|
| 1057 |
+
|
| 1058 |
+
int printw(int y, int x, const char * fmt, ...)
|
| 1059 |
+
// Move the cursor and then do a formatted print to the window.
|
| 1060 |
+
#if (__GNUG__ >= 2) && !defined(printf)
|
| 1061 |
+
__attribute__ ((format (printf, 4, 5)));
|
| 1062 |
+
#else
|
| 1063 |
+
;
|
| 1064 |
+
#endif
|
| 1065 |
+
|
| 1066 |
+
int printw(const char* fmt, va_list args);
|
| 1067 |
+
// Do a formatted print to the window.
|
| 1068 |
+
|
| 1069 |
+
int printw(int y, int x, const char * fmt, va_list args);
|
| 1070 |
+
// Move the cursor and then do a formatted print to the window.
|
| 1071 |
+
|
| 1072 |
+
chtype inch() const { return ::winch(w); }
|
| 1073 |
+
// Retrieve attributed character under the current cursor position.
|
| 1074 |
+
|
| 1075 |
+
chtype inch(int y, int x) { return ::mvwinch(w, y, x); }
|
| 1076 |
+
// Move cursor to requested position and then retrieve attributed character
|
| 1077 |
+
// at this position.
|
| 1078 |
+
|
| 1079 |
+
int inchstr(chtype* str, int n=-1) {
|
| 1080 |
+
return ::winchnstr(w, str, n); }
|
| 1081 |
+
// Read the string str from the window, stop reading if the terminating
|
| 1082 |
+
// NUL or the limit n is reached. If n is negative, it is ignored.
|
| 1083 |
+
|
| 1084 |
+
int inchstr(int y, int x, chtype * str, int n=-1) {
|
| 1085 |
+
return ::mvwinchnstr(w, y, x, str, n); }
|
| 1086 |
+
// Move the cursor to the requested position and then perform the inchstr
|
| 1087 |
+
// as described above.
|
| 1088 |
+
|
| 1089 |
+
int insch(chtype ch) { return ::winsch(w, ch); }
|
| 1090 |
+
// Insert attributed character into the window before current cursor
|
| 1091 |
+
// position.
|
| 1092 |
+
|
| 1093 |
+
int insch(int y, int x, chtype ch) {
|
| 1094 |
+
return ::mvwinsch(w, y, x, ch); }
|
| 1095 |
+
// Move cursor to requested position and then insert the attributed
|
| 1096 |
+
// character before that position.
|
| 1097 |
+
|
| 1098 |
+
int insertln() { return ::winsdelln(w, 1); }
|
| 1099 |
+
// Insert an empty line above the current line.
|
| 1100 |
+
|
| 1101 |
+
int insdelln(int n=1) { return ::winsdelln(w, n); }
|
| 1102 |
+
// If n>0 insert that many lines above the current line. If n<0 delete
|
| 1103 |
+
// that many lines beginning with the current line.
|
| 1104 |
+
|
| 1105 |
+
int insstr(const char *s, int n=-1) {
|
| 1106 |
+
return ::winsnstr(w, s, n); }
|
| 1107 |
+
// Insert the string into the window before the current cursor position.
|
| 1108 |
+
// Insert stops at end of string or when the limit n is reached. If n is
|
| 1109 |
+
// negative, it is ignored.
|
| 1110 |
+
|
| 1111 |
+
int insstr(int y, int x, const char *s, int n=-1) {
|
| 1112 |
+
return ::mvwinsnstr(w, y, x, s, n); }
|
| 1113 |
+
// Move the cursor to the requested position and then perform the insstr()
|
| 1114 |
+
// as described above.
|
| 1115 |
+
|
| 1116 |
+
int attron (chtype at) { return ::wattron (w, at); }
|
| 1117 |
+
// Switch on the window attributes;
|
| 1118 |
+
|
| 1119 |
+
int attroff(chtype at) { return ::wattroff(w, static_cast<int>(at)); }
|
| 1120 |
+
// Switch off the window attributes;
|
| 1121 |
+
|
| 1122 |
+
int attrset(chtype at) { return ::wattrset(w, static_cast<int>(at)); }
|
| 1123 |
+
// Set the window attributes;
|
| 1124 |
+
|
| 1125 |
+
chtype attrget() { return ::getattrs(w); }
|
| 1126 |
+
// Get the window attributes;
|
| 1127 |
+
|
| 1128 |
+
int color_set(NCURSES_PAIRS_T color_pair_number, void* opts=NULL) {
|
| 1129 |
+
return ::wcolor_set(w, color_pair_number, opts); }
|
| 1130 |
+
// Set the window color attribute;
|
| 1131 |
+
|
| 1132 |
+
int chgat(int n, attr_t attr, NCURSES_PAIRS_T color, const void *opts=NULL) {
|
| 1133 |
+
return ::wchgat(w, n, attr, color, opts); }
|
| 1134 |
+
// Change the attributes of the next n characters in the current line. If
|
| 1135 |
+
// n is negative or greater than the number of remaining characters in the
|
| 1136 |
+
// line, the attributes will be changed up to the end of the line.
|
| 1137 |
+
|
| 1138 |
+
int chgat(int y, int x,
|
| 1139 |
+
int n, attr_t attr, NCURSES_PAIRS_T color, const void *opts=NULL) {
|
| 1140 |
+
return ::mvwchgat(w, y, x, n, attr, color, opts); }
|
| 1141 |
+
// Move the cursor to the requested position and then perform chgat() as
|
| 1142 |
+
// described above.
|
| 1143 |
+
|
| 1144 |
+
// -------------------------------------------------------------------------
|
| 1145 |
+
// background
|
| 1146 |
+
// -------------------------------------------------------------------------
|
| 1147 |
+
chtype getbkgd() const { return ::getbkgd(w); }
|
| 1148 |
+
// Get current background setting.
|
| 1149 |
+
|
| 1150 |
+
int bkgd(const chtype ch) { return ::wbkgd(w, ch); }
|
| 1151 |
+
// Set the background property and apply it to the window.
|
| 1152 |
+
|
| 1153 |
+
void bkgdset(chtype ch) { ::wbkgdset(w, ch); }
|
| 1154 |
+
// Set the background property.
|
| 1155 |
+
|
| 1156 |
+
// -------------------------------------------------------------------------
|
| 1157 |
+
// borders
|
| 1158 |
+
// -------------------------------------------------------------------------
|
| 1159 |
+
int box(chtype vert=0, chtype hor=0) {
|
| 1160 |
+
return ::wborder(w, vert, vert, hor, hor, 0, 0, 0, 0); }
|
| 1161 |
+
// Draw a box around the window with the given vertical and horizontal
|
| 1162 |
+
// drawing characters. If you specify a zero as character, curses will try
|
| 1163 |
+
// to find a "nice" character.
|
| 1164 |
+
|
| 1165 |
+
int border(chtype left=0, chtype right=0,
|
| 1166 |
+
chtype top =0, chtype bottom=0,
|
| 1167 |
+
chtype top_left =0, chtype top_right=0,
|
| 1168 |
+
chtype bottom_left =0, chtype bottom_right=0) {
|
| 1169 |
+
return ::wborder(w, left, right, top, bottom, top_left, top_right,
|
| 1170 |
+
bottom_left, bottom_right); }
|
| 1171 |
+
// Draw a border around the window with the given characters for the
|
| 1172 |
+
// various parts of the border. If you pass zero for a character, curses
|
| 1173 |
+
// will try to find "nice" characters.
|
| 1174 |
+
|
| 1175 |
+
// -------------------------------------------------------------------------
|
| 1176 |
+
// lines and boxes
|
| 1177 |
+
// -------------------------------------------------------------------------
|
| 1178 |
+
int hline(int len, chtype ch=0) { return ::whline(w, ch, len); }
|
| 1179 |
+
// Draw a horizontal line of len characters with the given character. If
|
| 1180 |
+
// you pass zero for the character, curses will try to find a "nice" one.
|
| 1181 |
+
|
| 1182 |
+
int hline(int y, int x, int len, chtype ch=0) {
|
| 1183 |
+
return ::mvwhline(w, y, x, ch, len); }
|
| 1184 |
+
// Move the cursor to the requested position and then draw a horizontal line.
|
| 1185 |
+
|
| 1186 |
+
int vline(int len, chtype ch=0) { return ::wvline(w, ch, len); }
|
| 1187 |
+
// Draw a vertical line of len characters with the given character. If
|
| 1188 |
+
// you pass zero for the character, curses will try to find a "nice" one.
|
| 1189 |
+
|
| 1190 |
+
int vline(int y, int x, int len, chtype ch=0) {
|
| 1191 |
+
return ::mvwvline(w, y, x, ch, len); }
|
| 1192 |
+
// Move the cursor to the requested position and then draw a vertical line.
|
| 1193 |
+
|
| 1194 |
+
// -------------------------------------------------------------------------
|
| 1195 |
+
// erasure
|
| 1196 |
+
// -------------------------------------------------------------------------
|
| 1197 |
+
int erase() { return ::werase(w); }
|
| 1198 |
+
// Erase the window.
|
| 1199 |
+
|
| 1200 |
+
int clear() { return ::wclear(w); }
|
| 1201 |
+
// Clear the window.
|
| 1202 |
+
|
| 1203 |
+
int clearok(bool bf) { return ::clearok(w, bf); }
|
| 1204 |
+
// Set/Reset the clear flag. If set, the next refresh() will clear the
|
| 1205 |
+
// screen.
|
| 1206 |
+
|
| 1207 |
+
int clrtobot() { return ::wclrtobot(w); }
|
| 1208 |
+
// Clear to the end of the window.
|
| 1209 |
+
|
| 1210 |
+
int clrtoeol() { return ::wclrtoeol(w); }
|
| 1211 |
+
// Clear to the end of the line.
|
| 1212 |
+
|
| 1213 |
+
int delch() { return ::wdelch(w); }
|
| 1214 |
+
// Delete character under the cursor.
|
| 1215 |
+
|
| 1216 |
+
int delch(int y, int x) { return ::mvwdelch(w, y, x); }
|
| 1217 |
+
// Move cursor to requested position and delete the character under the
|
| 1218 |
+
// cursor.
|
| 1219 |
+
|
| 1220 |
+
int deleteln() { return ::winsdelln(w, -1); }
|
| 1221 |
+
// Delete the current line.
|
| 1222 |
+
|
| 1223 |
+
// -------------------------------------------------------------------------
|
| 1224 |
+
// screen control
|
| 1225 |
+
// -------------------------------------------------------------------------
|
| 1226 |
+
int scroll(int amount=1) { return ::wscrl(w, amount); }
|
| 1227 |
+
// Scroll amount lines. If amount is positive, scroll up, otherwise
|
| 1228 |
+
// scroll down.
|
| 1229 |
+
|
| 1230 |
+
int scrollok(bool bf) { return ::scrollok(w, bf); }
|
| 1231 |
+
// If bf is TRUE, window scrolls if cursor is moved off the bottom
|
| 1232 |
+
// edge of the window or a scrolling region, otherwise the cursor is left
|
| 1233 |
+
// at the bottom line.
|
| 1234 |
+
|
| 1235 |
+
int setscrreg(int from, int to) {
|
| 1236 |
+
return ::wsetscrreg(w, from, to); }
|
| 1237 |
+
// Define a soft scrolling region.
|
| 1238 |
+
|
| 1239 |
+
int idlok(bool bf) { return ::idlok(w, bf); }
|
| 1240 |
+
// If bf is TRUE, use insert/delete line hardware support if possible.
|
| 1241 |
+
// Otherwise do it in software.
|
| 1242 |
+
|
| 1243 |
+
void idcok(bool bf) { ::idcok(w, bf); }
|
| 1244 |
+
// If bf is TRUE, use insert/delete character hardware support if possible.
|
| 1245 |
+
// Otherwise do it in software.
|
| 1246 |
+
|
| 1247 |
+
int touchline(int s, int c) { return ::touchline(w, s, c); }
|
| 1248 |
+
// Mark the given lines as modified.
|
| 1249 |
+
|
| 1250 |
+
int touchwin() { return ::wtouchln(w, 0, height(), 1); }
|
| 1251 |
+
// Mark the whole window as modified.
|
| 1252 |
+
|
| 1253 |
+
int untouchwin() { return ::wtouchln(w, 0, height(), 0); }
|
| 1254 |
+
// Mark the whole window as unmodified.
|
| 1255 |
+
|
| 1256 |
+
int touchln(int s, int cnt, bool changed=TRUE) {
|
| 1257 |
+
return ::wtouchln(w, s, cnt, static_cast<int>(changed ? 1 : 0)); }
|
| 1258 |
+
// Mark cnt lines beginning from line s as changed or unchanged, depending
|
| 1259 |
+
// on the value of the changed flag.
|
| 1260 |
+
|
| 1261 |
+
bool is_linetouched(int line) const {
|
| 1262 |
+
return (::is_linetouched(w, line) == TRUE ? TRUE:FALSE); }
|
| 1263 |
+
// Return TRUE if line is marked as changed, FALSE otherwise
|
| 1264 |
+
|
| 1265 |
+
bool is_wintouched() const {
|
| 1266 |
+
return (::is_wintouched(w) ? TRUE:FALSE); }
|
| 1267 |
+
// Return TRUE if window is marked as changed, FALSE otherwise
|
| 1268 |
+
|
| 1269 |
+
int leaveok(bool bf) { return ::leaveok(w, bf); }
|
| 1270 |
+
// If bf is TRUE, curses will leave the cursor after an update wherever
|
| 1271 |
+
// it is after the update.
|
| 1272 |
+
|
| 1273 |
+
int redrawln(int from, int n) { return ::wredrawln(w, from, n); }
|
| 1274 |
+
// Redraw n lines starting from the requested line
|
| 1275 |
+
|
| 1276 |
+
int redrawwin() { return ::wredrawln(w, 0, height()); }
|
| 1277 |
+
// Redraw the whole window
|
| 1278 |
+
|
| 1279 |
+
int doupdate() { return ::doupdate(); }
|
| 1280 |
+
// Do all outputs to make the physical screen looking like the virtual one
|
| 1281 |
+
|
| 1282 |
+
void syncdown() { ::wsyncdown(w); }
|
| 1283 |
+
// Propagate the changes down to all descendant windows
|
| 1284 |
+
|
| 1285 |
+
void syncup() { ::wsyncup(w); }
|
| 1286 |
+
// Propagate the changes up in the hierarchy
|
| 1287 |
+
|
| 1288 |
+
void cursyncup() { ::wcursyncup(w); }
|
| 1289 |
+
// Position the cursor in all ancestor windows corresponding to our setting
|
| 1290 |
+
|
| 1291 |
+
int syncok(bool bf) { return ::syncok(w, bf); }
|
| 1292 |
+
// If called with bf=TRUE, syncup() is called whenever the window is changed
|
| 1293 |
+
|
| 1294 |
+
#ifndef _no_flushok
|
| 1295 |
+
int flushok(bool bf) { return ::flushok(w, bf); }
|
| 1296 |
+
#endif
|
| 1297 |
+
|
| 1298 |
+
void immedok(bool bf) { ::immedok(w, bf); }
|
| 1299 |
+
// If called with bf=TRUE, any change in the window will cause an
|
| 1300 |
+
// automatic immediate refresh()
|
| 1301 |
+
|
| 1302 |
+
int intrflush(bool bf) { return ::intrflush(w, bf); }
|
| 1303 |
+
|
| 1304 |
+
int keypad(bool bf) { return ::keypad(w, bf); }
|
| 1305 |
+
// If called with bf=TRUE, the application will interpret function keys.
|
| 1306 |
+
|
| 1307 |
+
int nodelay(bool bf) { return ::nodelay(w, bf); }
|
| 1308 |
+
|
| 1309 |
+
int meta(bool bf) { return ::meta(w, bf); }
|
| 1310 |
+
// If called with bf=TRUE, keys may generate 8-Bit characters. Otherwise
|
| 1311 |
+
// 7-Bit characters are generated.
|
| 1312 |
+
|
| 1313 |
+
int standout() { return ::wstandout(w); }
|
| 1314 |
+
// Enable "standout" attributes
|
| 1315 |
+
|
| 1316 |
+
int standend() { return ::wstandend(w); }
|
| 1317 |
+
// Disable "standout" attributes
|
| 1318 |
+
|
| 1319 |
+
// -------------------------------------------------------------------------
|
| 1320 |
+
// The next two are virtual, because we redefine them in the
|
| 1321 |
+
// NCursesPanel class.
|
| 1322 |
+
// -------------------------------------------------------------------------
|
| 1323 |
+
virtual int refresh() { return ::wrefresh(w); }
|
| 1324 |
+
// Propagate the changes in this window to the virtual screen and call
|
| 1325 |
+
// doupdate(). This is redefined in NCursesPanel.
|
| 1326 |
+
|
| 1327 |
+
virtual int noutrefresh() { return ::wnoutrefresh(w); }
|
| 1328 |
+
// Propagate the changes in this window to the virtual screen. This is
|
| 1329 |
+
// redefined in NCursesPanel.
|
| 1330 |
+
|
| 1331 |
+
// -------------------------------------------------------------------------
|
| 1332 |
+
// multiple window control
|
| 1333 |
+
// -------------------------------------------------------------------------
|
| 1334 |
+
int overlay(NCursesWindow& win) {
|
| 1335 |
+
return ::overlay(w, win.w); }
|
| 1336 |
+
// Overlay this window over win.
|
| 1337 |
+
|
| 1338 |
+
int overwrite(NCursesWindow& win) {
|
| 1339 |
+
return ::overwrite(w, win.w); }
|
| 1340 |
+
// Overwrite win with this window.
|
| 1341 |
+
|
| 1342 |
+
int copywin(NCursesWindow& win,
|
| 1343 |
+
int sminrow, int smincol,
|
| 1344 |
+
int dminrow, int dmincol,
|
| 1345 |
+
int dmaxrow, int dmaxcol, bool overlaywin=TRUE) {
|
| 1346 |
+
return ::copywin(w, win.w, sminrow, smincol, dminrow, dmincol,
|
| 1347 |
+
dmaxrow, dmaxcol, static_cast<int>(overlaywin ? 1 : 0)); }
|
| 1348 |
+
// Overlay or overwrite the rectangle in win given by dminrow,dmincol,
|
| 1349 |
+
// dmaxrow,dmaxcol with the rectangle in this window beginning at
|
| 1350 |
+
// sminrow,smincol.
|
| 1351 |
+
|
| 1352 |
+
// -------------------------------------------------------------------------
|
| 1353 |
+
// Extended functions
|
| 1354 |
+
// -------------------------------------------------------------------------
|
| 1355 |
+
#if defined(NCURSES_EXT_FUNCS) && (NCURSES_EXT_FUNCS != 0)
|
| 1356 |
+
int wresize(int newLines, int newColumns) {
|
| 1357 |
+
return ::wresize(w, newLines, newColumns); }
|
| 1358 |
+
#endif
|
| 1359 |
+
|
| 1360 |
+
// -------------------------------------------------------------------------
|
| 1361 |
+
// Mouse related
|
| 1362 |
+
// -------------------------------------------------------------------------
|
| 1363 |
+
bool has_mouse() const;
|
| 1364 |
+
// Return TRUE if terminal supports a mouse, FALSE otherwise
|
| 1365 |
+
|
| 1366 |
+
// -------------------------------------------------------------------------
|
| 1367 |
+
// traversal support
|
| 1368 |
+
// -------------------------------------------------------------------------
|
| 1369 |
+
NCursesWindow* child() { return subwins; }
|
| 1370 |
+
// Get the first child window.
|
| 1371 |
+
|
| 1372 |
+
NCursesWindow* sibling() { return sib; }
|
| 1373 |
+
// Get the next child of my parent.
|
| 1374 |
+
|
| 1375 |
+
NCursesWindow* parent() { return par; }
|
| 1376 |
+
// Get my parent.
|
| 1377 |
+
|
| 1378 |
+
bool isDescendant(NCursesWindow& win);
|
| 1379 |
+
// Return TRUE if win is a descendant of this.
|
| 1380 |
+
};
|
| 1381 |
+
|
| 1382 |
+
// -------------------------------------------------------------------------
|
| 1383 |
+
// We leave this here for compatibility reasons.
|
| 1384 |
+
// -------------------------------------------------------------------------
|
| 1385 |
+
class NCURSES_CXX_IMPEXP NCursesColorWindow : public NCursesWindow
|
| 1386 |
+
{
|
| 1387 |
+
public:
|
| 1388 |
+
explicit NCursesColorWindow(WINDOW* &window) // useful only for stdscr
|
| 1389 |
+
: NCursesWindow(window) {
|
| 1390 |
+
useColors(); }
|
| 1391 |
+
|
| 1392 |
+
NCursesColorWindow(int nlines, // number of lines
|
| 1393 |
+
int ncols, // number of columns
|
| 1394 |
+
int begin_y, // line origin
|
| 1395 |
+
int begin_x) // col origin
|
| 1396 |
+
: NCursesWindow(nlines, ncols, begin_y, begin_x) {
|
| 1397 |
+
useColors(); }
|
| 1398 |
+
|
| 1399 |
+
NCursesColorWindow(NCursesWindow& parentWin,// parent window
|
| 1400 |
+
int nlines, // number of lines
|
| 1401 |
+
int ncols, // number of columns
|
| 1402 |
+
int begin_y, // absolute or relative
|
| 1403 |
+
int begin_x, // origins:
|
| 1404 |
+
char absrel = 'a') // if `a', by & bx are
|
| 1405 |
+
: NCursesWindow(parentWin,
|
| 1406 |
+
nlines, ncols, // absolute screen pos,
|
| 1407 |
+
begin_y, begin_x, // else if `r', they are
|
| 1408 |
+
absrel ) { // relative to par origin
|
| 1409 |
+
useColors(); }
|
| 1410 |
+
};
|
| 1411 |
+
|
| 1412 |
+
// These enum definitions really belong inside the NCursesPad class, but only
|
| 1413 |
+
// recent compilers support that feature.
|
| 1414 |
+
|
| 1415 |
+
typedef enum {
|
| 1416 |
+
REQ_PAD_REFRESH = KEY_MAX + 1,
|
| 1417 |
+
REQ_PAD_UP,
|
| 1418 |
+
REQ_PAD_DOWN,
|
| 1419 |
+
REQ_PAD_LEFT,
|
| 1420 |
+
REQ_PAD_RIGHT,
|
| 1421 |
+
REQ_PAD_EXIT
|
| 1422 |
+
} Pad_Request;
|
| 1423 |
+
|
| 1424 |
+
const Pad_Request PAD_LOW = REQ_PAD_REFRESH; // lowest op-code
|
| 1425 |
+
const Pad_Request PAD_HIGH = REQ_PAD_EXIT; // highest op-code
|
| 1426 |
+
|
| 1427 |
+
// -------------------------------------------------------------------------
|
| 1428 |
+
// Pad Support. We allow an association of a pad with a "real" window
|
| 1429 |
+
// through which the pad may be viewed.
|
| 1430 |
+
// -------------------------------------------------------------------------
|
| 1431 |
+
class NCURSES_CXX_IMPEXP NCursesPad : public NCursesWindow
|
| 1432 |
+
{
|
| 1433 |
+
private:
|
| 1434 |
+
NCursesWindow* viewWin; // the "viewport" window
|
| 1435 |
+
NCursesWindow* viewSub; // the "viewport" subwindow
|
| 1436 |
+
|
| 1437 |
+
int h_gridsize, v_gridsize;
|
| 1438 |
+
|
| 1439 |
+
protected:
|
| 1440 |
+
int min_row, min_col; // top left row/col of the pads display area
|
| 1441 |
+
|
| 1442 |
+
NCursesWindow* Win(void) const {
|
| 1443 |
+
// Get the window into which the pad should be copied (if any)
|
| 1444 |
+
return (viewSub?viewSub:(viewWin?viewWin:0));
|
| 1445 |
+
}
|
| 1446 |
+
|
| 1447 |
+
NCursesWindow* getWindow(void) const {
|
| 1448 |
+
return viewWin;
|
| 1449 |
+
}
|
| 1450 |
+
|
| 1451 |
+
NCursesWindow* getSubWindow(void) const {
|
| 1452 |
+
return viewSub;
|
| 1453 |
+
}
|
| 1454 |
+
|
| 1455 |
+
virtual int driver (int key); // Virtualize keystroke key
|
| 1456 |
+
// The driver translates the keystroke c into an Pad_Request
|
| 1457 |
+
|
| 1458 |
+
virtual void OnUnknownOperation(int pad_req) {
|
| 1459 |
+
(void) pad_req;
|
| 1460 |
+
::beep();
|
| 1461 |
+
}
|
| 1462 |
+
// This is called if the driver returns an unknown op-code
|
| 1463 |
+
|
| 1464 |
+
virtual void OnNavigationError(int pad_req) {
|
| 1465 |
+
(void) pad_req;
|
| 1466 |
+
::beep();
|
| 1467 |
+
}
|
| 1468 |
+
// This is called if a navigation request couldn't be satisfied
|
| 1469 |
+
|
| 1470 |
+
virtual void OnOperation(int pad_req) {
|
| 1471 |
+
(void) pad_req;
|
| 1472 |
+
};
|
| 1473 |
+
// OnOperation is called if a Pad_Operation was executed and just before
|
| 1474 |
+
// the refresh() operation is done.
|
| 1475 |
+
|
| 1476 |
+
public:
|
| 1477 |
+
NCursesPad(int nlines, int ncols);
|
| 1478 |
+
// create a pad with the given size
|
| 1479 |
+
|
| 1480 |
+
NCursesPad& operator=(const NCursesPad& rhs)
|
| 1481 |
+
{
|
| 1482 |
+
if (this != &rhs) {
|
| 1483 |
+
*this = rhs;
|
| 1484 |
+
NCursesWindow::operator=(rhs);
|
| 1485 |
+
}
|
| 1486 |
+
return *this;
|
| 1487 |
+
}
|
| 1488 |
+
|
| 1489 |
+
NCursesPad(const NCursesPad& rhs)
|
| 1490 |
+
: NCursesWindow(rhs),
|
| 1491 |
+
viewWin(rhs.viewWin),
|
| 1492 |
+
viewSub(rhs.viewSub),
|
| 1493 |
+
h_gridsize(rhs.h_gridsize),
|
| 1494 |
+
v_gridsize(rhs.v_gridsize),
|
| 1495 |
+
min_row(rhs.min_row),
|
| 1496 |
+
min_col(rhs.min_col)
|
| 1497 |
+
{
|
| 1498 |
+
}
|
| 1499 |
+
|
| 1500 |
+
virtual ~NCursesPad() THROWS(NCursesException) {}
|
| 1501 |
+
|
| 1502 |
+
int echochar(const chtype ch) { return ::pechochar(w, ch); }
|
| 1503 |
+
// Put the attributed character onto the pad and immediately do a
|
| 1504 |
+
// prefresh().
|
| 1505 |
+
|
| 1506 |
+
int refresh() NCURSES_OVERRIDE;
|
| 1507 |
+
// If a viewport is defined the pad is displayed in this window, otherwise
|
| 1508 |
+
// this is a noop.
|
| 1509 |
+
|
| 1510 |
+
int refresh(int pminrow, int pmincol,
|
| 1511 |
+
int sminrow, int smincol,
|
| 1512 |
+
int smaxrow, int smaxcol) {
|
| 1513 |
+
return ::prefresh(w, pminrow, pmincol,
|
| 1514 |
+
sminrow, smincol, smaxrow, smaxcol);
|
| 1515 |
+
}
|
| 1516 |
+
// The coordinates sminrow,smincol,smaxrow,smaxcol describe a rectangle
|
| 1517 |
+
// on the screen. <b>refresh</b> copies a rectangle of this size beginning
|
| 1518 |
+
// with top left corner pminrow,pmincol onto the screen and calls doupdate().
|
| 1519 |
+
|
| 1520 |
+
int noutrefresh() NCURSES_OVERRIDE;
|
| 1521 |
+
// If a viewport is defined the pad is displayed in this window, otherwise
|
| 1522 |
+
// this is a noop.
|
| 1523 |
+
|
| 1524 |
+
int noutrefresh(int pminrow, int pmincol,
|
| 1525 |
+
int sminrow, int smincol,
|
| 1526 |
+
int smaxrow, int smaxcol) {
|
| 1527 |
+
return ::pnoutrefresh(w, pminrow, pmincol,
|
| 1528 |
+
sminrow, smincol, smaxrow, smaxcol);
|
| 1529 |
+
}
|
| 1530 |
+
// Does the same as refresh() but without calling doupdate().
|
| 1531 |
+
|
| 1532 |
+
virtual void setWindow(NCursesWindow& view, int v_grid = 1, int h_grid = 1);
|
| 1533 |
+
// Add the window "view" as viewing window to the pad.
|
| 1534 |
+
|
| 1535 |
+
virtual void setSubWindow(NCursesWindow& sub);
|
| 1536 |
+
// Use the subwindow "sub" of the viewport window for the actual viewing.
|
| 1537 |
+
// The full viewport window is usually used to provide some decorations
|
| 1538 |
+
// like frames, titles etc.
|
| 1539 |
+
|
| 1540 |
+
virtual void operator() (void);
|
| 1541 |
+
// Perform Pad's operation
|
| 1542 |
+
};
|
| 1543 |
+
|
| 1544 |
+
// A FramedPad is constructed always with a viewport window. This viewport
|
| 1545 |
+
// will be framed (by a box() command) and the interior of the box is the
|
| 1546 |
+
// viewport subwindow. On the frame we display scrollbar sliders.
|
| 1547 |
+
class NCURSES_CXX_IMPEXP NCursesFramedPad : public NCursesPad
|
| 1548 |
+
{
|
| 1549 |
+
protected:
|
| 1550 |
+
virtual void OnOperation(int pad_req) NCURSES_OVERRIDE;
|
| 1551 |
+
|
| 1552 |
+
public:
|
| 1553 |
+
NCursesFramedPad(NCursesWindow& win, int nlines, int ncols,
|
| 1554 |
+
int v_grid = 1, int h_grid = 1)
|
| 1555 |
+
: NCursesPad(nlines, ncols) {
|
| 1556 |
+
NCursesPad::setWindow(win, v_grid, h_grid);
|
| 1557 |
+
NCursesPad::setSubWindow(*(new NCursesWindow(win)));
|
| 1558 |
+
}
|
| 1559 |
+
// Construct the FramedPad with the given Window win as viewport.
|
| 1560 |
+
|
| 1561 |
+
virtual ~NCursesFramedPad() THROWS(NCursesException) {
|
| 1562 |
+
delete getSubWindow();
|
| 1563 |
+
}
|
| 1564 |
+
|
| 1565 |
+
void setWindow(NCursesWindow& view, int v_grid = 1, int h_grid = 1) NCURSES_OVERRIDE {
|
| 1566 |
+
(void) view;
|
| 1567 |
+
(void) v_grid;
|
| 1568 |
+
(void) h_grid;
|
| 1569 |
+
err_handler("Operation not allowed");
|
| 1570 |
+
}
|
| 1571 |
+
// Disable this call; the viewport is already defined
|
| 1572 |
+
|
| 1573 |
+
void setSubWindow(NCursesWindow& sub) NCURSES_OVERRIDE {
|
| 1574 |
+
(void) sub;
|
| 1575 |
+
err_handler("Operation not allowed");
|
| 1576 |
+
}
|
| 1577 |
+
// Disable this call; the viewport subwindow is already defined
|
| 1578 |
+
|
| 1579 |
+
};
|
| 1580 |
+
|
| 1581 |
+
#endif /* NCURSES_CURSESW_H_incl */
|
miniconda3/envs/active_proaction/include/ncursesw/cursslk.h
ADDED
|
@@ -0,0 +1,240 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// * this is for making emacs happy: -*-Mode: C++;-*-
|
| 2 |
+
// vile:cppmode
|
| 3 |
+
/****************************************************************************
|
| 4 |
+
* Copyright 2019-2020,2021 Thomas E. Dickey *
|
| 5 |
+
* Copyright 1998-2003,2005 Free Software Foundation, Inc. *
|
| 6 |
+
* *
|
| 7 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 8 |
+
* copy of this software and associated documentation files (the *
|
| 9 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 10 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 11 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 12 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 13 |
+
* furnished to do so, subject to the following conditions: *
|
| 14 |
+
* *
|
| 15 |
+
* The above copyright notice and this permission notice shall be included *
|
| 16 |
+
* in all copies or substantial portions of the Software. *
|
| 17 |
+
* *
|
| 18 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 19 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 20 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 21 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 22 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 23 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 24 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 25 |
+
* *
|
| 26 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 27 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 28 |
+
* sale, use or other dealings in this Software without prior written *
|
| 29 |
+
* authorization. *
|
| 30 |
+
****************************************************************************/
|
| 31 |
+
|
| 32 |
+
/****************************************************************************
|
| 33 |
+
* Author: Juergen Pfeifer, 1997 *
|
| 34 |
+
****************************************************************************/
|
| 35 |
+
|
| 36 |
+
// $Id: cursslk.h,v 1.19 2021/04/17 18:11:08 tom Exp $
|
| 37 |
+
|
| 38 |
+
#ifndef NCURSES_CURSSLK_H_incl
|
| 39 |
+
#define NCURSES_CURSSLK_H_incl
|
| 40 |
+
|
| 41 |
+
#include <ncursesw/cursesw.h>
|
| 42 |
+
|
| 43 |
+
class NCURSES_CXX_IMPEXP Soft_Label_Key_Set {
|
| 44 |
+
public:
|
| 45 |
+
// This inner class represents the attributes of a Soft Label Key (SLK)
|
| 46 |
+
class NCURSES_CXX_IMPEXP Soft_Label_Key {
|
| 47 |
+
friend class Soft_Label_Key_Set;
|
| 48 |
+
public:
|
| 49 |
+
typedef enum { Left=0, Center=1, Right=2 } Justification;
|
| 50 |
+
|
| 51 |
+
private:
|
| 52 |
+
char *label; // The Text of the Label
|
| 53 |
+
Justification format; // The Justification
|
| 54 |
+
int num; // The number of the Label
|
| 55 |
+
|
| 56 |
+
Soft_Label_Key() : label(NULL), format(Left), num(-1) {
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
virtual ~Soft_Label_Key() {
|
| 60 |
+
delete[] label;
|
| 61 |
+
};
|
| 62 |
+
|
| 63 |
+
public:
|
| 64 |
+
// Set the text of the Label
|
| 65 |
+
Soft_Label_Key& operator=(char *text);
|
| 66 |
+
|
| 67 |
+
// Set the Justification of the Label
|
| 68 |
+
Soft_Label_Key& operator=(Justification just) {
|
| 69 |
+
format = just;
|
| 70 |
+
return *this;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
// Retrieve the text of the label
|
| 74 |
+
inline char* operator()(void) const {
|
| 75 |
+
return label;
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
Soft_Label_Key& operator=(const Soft_Label_Key& rhs)
|
| 79 |
+
{
|
| 80 |
+
if (this != &rhs) {
|
| 81 |
+
*this = rhs;
|
| 82 |
+
}
|
| 83 |
+
return *this;
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
Soft_Label_Key(const Soft_Label_Key& rhs)
|
| 87 |
+
: label(NULL),
|
| 88 |
+
format(rhs.format),
|
| 89 |
+
num(rhs.num)
|
| 90 |
+
{
|
| 91 |
+
*this = rhs.label;
|
| 92 |
+
}
|
| 93 |
+
};
|
| 94 |
+
|
| 95 |
+
public:
|
| 96 |
+
typedef enum {
|
| 97 |
+
None = -1,
|
| 98 |
+
Three_Two_Three = 0,
|
| 99 |
+
Four_Four = 1,
|
| 100 |
+
PC_Style = 2,
|
| 101 |
+
PC_Style_With_Index = 3
|
| 102 |
+
} Label_Layout;
|
| 103 |
+
|
| 104 |
+
private:
|
| 105 |
+
static long count; // Number of Key Sets
|
| 106 |
+
static Label_Layout format; // Layout of the Key Sets
|
| 107 |
+
static int num_labels; // Number Of Labels in Key Sets
|
| 108 |
+
bool b_attrInit; // Are attributes initialized
|
| 109 |
+
|
| 110 |
+
Soft_Label_Key *slk_array; // The array of SLK's
|
| 111 |
+
|
| 112 |
+
// Init the Key Set
|
| 113 |
+
void init();
|
| 114 |
+
|
| 115 |
+
// Activate or Deactivate Label# i, Label counting starts with 1!
|
| 116 |
+
void activate_label(int i, bool bf=TRUE);
|
| 117 |
+
|
| 118 |
+
// Activate of Deactivate all Labels
|
| 119 |
+
void activate_labels(bool bf);
|
| 120 |
+
|
| 121 |
+
protected:
|
| 122 |
+
inline void Error (const char* msg) const THROWS(NCursesException) {
|
| 123 |
+
THROW(new NCursesException (msg));
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
// Remove SLK's from screen
|
| 127 |
+
void clear() {
|
| 128 |
+
if (ERR==::slk_clear())
|
| 129 |
+
Error("slk_clear");
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
// Restore them
|
| 133 |
+
void restore() {
|
| 134 |
+
if (ERR==::slk_restore())
|
| 135 |
+
Error("slk_restore");
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
public:
|
| 139 |
+
|
| 140 |
+
// Construct a Key Set, use the most comfortable layout as default.
|
| 141 |
+
// You must create a Soft_Label_Key_Set before you create any object of
|
| 142 |
+
// the NCursesWindow, NCursesPanel or derived classes. (Actually before
|
| 143 |
+
// ::initscr() is called).
|
| 144 |
+
explicit Soft_Label_Key_Set(Label_Layout fmt);
|
| 145 |
+
|
| 146 |
+
// This constructor assumes, that you already constructed a Key Set
|
| 147 |
+
// with a layout by the constructor above. This layout will be reused.
|
| 148 |
+
Soft_Label_Key_Set();
|
| 149 |
+
|
| 150 |
+
Soft_Label_Key_Set& operator=(const Soft_Label_Key_Set& rhs)
|
| 151 |
+
{
|
| 152 |
+
if (this != &rhs) {
|
| 153 |
+
*this = rhs;
|
| 154 |
+
init(); // allocate a new slk_array[]
|
| 155 |
+
}
|
| 156 |
+
return *this;
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
Soft_Label_Key_Set(const Soft_Label_Key_Set& rhs)
|
| 160 |
+
: b_attrInit(rhs.b_attrInit),
|
| 161 |
+
slk_array(NULL)
|
| 162 |
+
{
|
| 163 |
+
init(); // allocate a new slk_array[]
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
virtual ~Soft_Label_Key_Set() THROWS(NCursesException);
|
| 167 |
+
|
| 168 |
+
// Get Label# i. Label counting starts with 1!
|
| 169 |
+
Soft_Label_Key& operator[](int i);
|
| 170 |
+
|
| 171 |
+
// Retrieve number of Labels
|
| 172 |
+
int labels() const;
|
| 173 |
+
|
| 174 |
+
// Refresh the SLK portion of the screen
|
| 175 |
+
inline void refresh() {
|
| 176 |
+
if (ERR==::slk_refresh())
|
| 177 |
+
Error("slk_refresh");
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
// Mark the SLK portion of the screen for refresh, defer actual refresh
|
| 181 |
+
// until next update call.
|
| 182 |
+
inline void noutrefresh() {
|
| 183 |
+
if (ERR==::slk_noutrefresh())
|
| 184 |
+
Error("slk_noutrefresh");
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
// Mark the whole SLK portion of the screen as modified
|
| 188 |
+
inline void touch() {
|
| 189 |
+
if (ERR==::slk_touch())
|
| 190 |
+
Error("slk_touch");
|
| 191 |
+
}
|
| 192 |
+
|
| 193 |
+
// Activate Label# i
|
| 194 |
+
inline void show(int i) {
|
| 195 |
+
activate_label(i,FALSE);
|
| 196 |
+
activate_label(i,TRUE);
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
// Hide Label# i
|
| 200 |
+
inline void hide(int i) {
|
| 201 |
+
activate_label(i,FALSE);
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
// Show all Labels
|
| 205 |
+
inline void show() {
|
| 206 |
+
activate_labels(FALSE);
|
| 207 |
+
activate_labels(TRUE);
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
// Hide all Labels
|
| 211 |
+
inline void hide() {
|
| 212 |
+
activate_labels(FALSE);
|
| 213 |
+
}
|
| 214 |
+
|
| 215 |
+
inline void attron(attr_t attrs) {
|
| 216 |
+
if (ERR==::slk_attron(attrs))
|
| 217 |
+
Error("slk_attron");
|
| 218 |
+
}
|
| 219 |
+
|
| 220 |
+
inline void attroff(attr_t attrs) {
|
| 221 |
+
if (ERR==::slk_attroff(attrs))
|
| 222 |
+
Error("slk_attroff");
|
| 223 |
+
}
|
| 224 |
+
|
| 225 |
+
inline void attrset(attr_t attrs) {
|
| 226 |
+
if (ERR==::slk_attrset(attrs))
|
| 227 |
+
Error("slk_attrset");
|
| 228 |
+
}
|
| 229 |
+
|
| 230 |
+
inline void color(short color_pair_number) {
|
| 231 |
+
if (ERR==::slk_color(color_pair_number))
|
| 232 |
+
Error("slk_color");
|
| 233 |
+
}
|
| 234 |
+
|
| 235 |
+
inline attr_t attr() const {
|
| 236 |
+
return ::slk_attr();
|
| 237 |
+
}
|
| 238 |
+
};
|
| 239 |
+
|
| 240 |
+
#endif /* NCURSES_CURSSLK_H_incl */
|
miniconda3/envs/active_proaction/include/ncursesw/eti.h
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/****************************************************************************
|
| 2 |
+
* Copyright 2020 Thomas E. Dickey *
|
| 3 |
+
* Copyright 1998-2002,2003 Free Software Foundation, Inc. *
|
| 4 |
+
* *
|
| 5 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 6 |
+
* copy of this software and associated documentation files (the *
|
| 7 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 8 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 9 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 10 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 11 |
+
* furnished to do so, subject to the following conditions: *
|
| 12 |
+
* *
|
| 13 |
+
* The above copyright notice and this permission notice shall be included *
|
| 14 |
+
* in all copies or substantial portions of the Software. *
|
| 15 |
+
* *
|
| 16 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 17 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 18 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 19 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 20 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 21 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 22 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 23 |
+
* *
|
| 24 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 25 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 26 |
+
* sale, use or other dealings in this Software without prior written *
|
| 27 |
+
* authorization. *
|
| 28 |
+
****************************************************************************/
|
| 29 |
+
|
| 30 |
+
/****************************************************************************
|
| 31 |
+
* Author: Juergen Pfeifer, 1995,1997 *
|
| 32 |
+
****************************************************************************/
|
| 33 |
+
|
| 34 |
+
/* $Id: eti.h,v 1.9 2020/02/02 23:34:34 tom Exp $ */
|
| 35 |
+
|
| 36 |
+
#ifndef NCURSES_ETI_H_incl
|
| 37 |
+
#define NCURSES_ETI_H_incl 1
|
| 38 |
+
|
| 39 |
+
#define E_OK (0)
|
| 40 |
+
#define E_SYSTEM_ERROR (-1)
|
| 41 |
+
#define E_BAD_ARGUMENT (-2)
|
| 42 |
+
#define E_POSTED (-3)
|
| 43 |
+
#define E_CONNECTED (-4)
|
| 44 |
+
#define E_BAD_STATE (-5)
|
| 45 |
+
#define E_NO_ROOM (-6)
|
| 46 |
+
#define E_NOT_POSTED (-7)
|
| 47 |
+
#define E_UNKNOWN_COMMAND (-8)
|
| 48 |
+
#define E_NO_MATCH (-9)
|
| 49 |
+
#define E_NOT_SELECTABLE (-10)
|
| 50 |
+
#define E_NOT_CONNECTED (-11)
|
| 51 |
+
#define E_REQUEST_DENIED (-12)
|
| 52 |
+
#define E_INVALID_FIELD (-13)
|
| 53 |
+
#define E_CURRENT (-14)
|
| 54 |
+
|
| 55 |
+
#endif
|
miniconda3/envs/active_proaction/include/ncursesw/etip.h
ADDED
|
@@ -0,0 +1,406 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// * This makes emacs happy -*-Mode: C++;-*-
|
| 2 |
+
/****************************************************************************
|
| 3 |
+
* Copyright 2018-2021,2022 Thomas E. Dickey *
|
| 4 |
+
* Copyright 1998-2012,2017 Free Software Foundation, Inc. *
|
| 5 |
+
* *
|
| 6 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 7 |
+
* copy of this software and associated documentation files (the *
|
| 8 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 9 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 10 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 11 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 12 |
+
* furnished to do so, subject to the following conditions: *
|
| 13 |
+
* *
|
| 14 |
+
* The above copyright notice and this permission notice shall be included *
|
| 15 |
+
* in all copies or substantial portions of the Software. *
|
| 16 |
+
* *
|
| 17 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 18 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 19 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 20 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 21 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 22 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 23 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 24 |
+
* *
|
| 25 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 26 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 27 |
+
* sale, use or other dealings in this Software without prior written *
|
| 28 |
+
* authorization. *
|
| 29 |
+
****************************************************************************/
|
| 30 |
+
|
| 31 |
+
/****************************************************************************
|
| 32 |
+
* Author: Juergen Pfeifer, 1997 *
|
| 33 |
+
****************************************************************************/
|
| 34 |
+
|
| 35 |
+
// $Id: etip.h.in,v 1.50 2022/08/20 20:50:00 tom Exp $
|
| 36 |
+
|
| 37 |
+
#ifndef NCURSES_ETIP_H_incl
|
| 38 |
+
#define NCURSES_ETIP_H_incl 1
|
| 39 |
+
|
| 40 |
+
// These are substituted at configure/build time
|
| 41 |
+
#ifndef HAVE_BUILTIN_H
|
| 42 |
+
#define HAVE_BUILTIN_H 0
|
| 43 |
+
#endif
|
| 44 |
+
|
| 45 |
+
#ifndef HAVE_GXX_BUILTIN_H
|
| 46 |
+
#define HAVE_GXX_BUILTIN_H 0
|
| 47 |
+
#endif
|
| 48 |
+
|
| 49 |
+
#ifndef HAVE_GPP_BUILTIN_H
|
| 50 |
+
#define HAVE_GPP_BUILTIN_H 0
|
| 51 |
+
#endif
|
| 52 |
+
|
| 53 |
+
#ifndef HAVE_IOSTREAM
|
| 54 |
+
#define HAVE_IOSTREAM 1
|
| 55 |
+
#endif
|
| 56 |
+
|
| 57 |
+
#ifndef HAVE_TYPEINFO
|
| 58 |
+
#define HAVE_TYPEINFO 1
|
| 59 |
+
#endif
|
| 60 |
+
|
| 61 |
+
#ifndef HAVE_VALUES_H
|
| 62 |
+
#define HAVE_VALUES_H 0
|
| 63 |
+
#endif
|
| 64 |
+
|
| 65 |
+
#ifndef ETIP_NEEDS_MATH_H
|
| 66 |
+
#define ETIP_NEEDS_MATH_H 0
|
| 67 |
+
#endif
|
| 68 |
+
|
| 69 |
+
#ifndef ETIP_NEEDS_MATH_EXCEPTION
|
| 70 |
+
#define ETIP_NEEDS_MATH_EXCEPTION 0
|
| 71 |
+
#endif
|
| 72 |
+
|
| 73 |
+
#ifndef CPP_HAS_OVERRIDE
|
| 74 |
+
#define CPP_HAS_OVERRIDE 0
|
| 75 |
+
#endif
|
| 76 |
+
|
| 77 |
+
#ifndef CPP_HAS_PARAM_INIT
|
| 78 |
+
#define CPP_HAS_PARAM_INIT 0
|
| 79 |
+
#endif
|
| 80 |
+
|
| 81 |
+
#ifndef CPP_HAS_STATIC_CAST
|
| 82 |
+
#define CPP_HAS_STATIC_CAST 1
|
| 83 |
+
#endif
|
| 84 |
+
|
| 85 |
+
#ifndef IOSTREAM_NAMESPACE
|
| 86 |
+
#define IOSTREAM_NAMESPACE 1
|
| 87 |
+
#endif
|
| 88 |
+
|
| 89 |
+
#ifdef __GNUG__
|
| 90 |
+
# if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8))
|
| 91 |
+
# if HAVE_TYPEINFO
|
| 92 |
+
# include <typeinfo>
|
| 93 |
+
# endif
|
| 94 |
+
# endif
|
| 95 |
+
#endif
|
| 96 |
+
|
| 97 |
+
#if defined(__GNUG__)
|
| 98 |
+
# if HAVE_BUILTIN_H || HAVE_GXX_BUILTIN_H || HAVE_GPP_BUILTIN_H
|
| 99 |
+
# if ETIP_NEEDS_MATH_H
|
| 100 |
+
# if ETIP_NEEDS_MATH_EXCEPTION
|
| 101 |
+
# undef exception
|
| 102 |
+
# define exception math_exception
|
| 103 |
+
# endif
|
| 104 |
+
# include <math.h>
|
| 105 |
+
# endif
|
| 106 |
+
# undef exception
|
| 107 |
+
# define exception builtin_exception
|
| 108 |
+
# if HAVE_GPP_BUILTIN_H
|
| 109 |
+
# include <gpp/builtin.h>
|
| 110 |
+
# elif HAVE_GXX_BUILTIN_H
|
| 111 |
+
# include <g++/builtin.h>
|
| 112 |
+
# else
|
| 113 |
+
# include <builtin.h>
|
| 114 |
+
# endif
|
| 115 |
+
# undef exception
|
| 116 |
+
# endif
|
| 117 |
+
#elif defined (__SUNPRO_CC)
|
| 118 |
+
# include <generic.h>
|
| 119 |
+
#endif
|
| 120 |
+
|
| 121 |
+
#include <ncursesw/curses.h>
|
| 122 |
+
|
| 123 |
+
extern "C" {
|
| 124 |
+
#if HAVE_VALUES_H
|
| 125 |
+
# include <values.h>
|
| 126 |
+
#endif
|
| 127 |
+
|
| 128 |
+
#include <assert.h>
|
| 129 |
+
#include <ncursesw/eti.h>
|
| 130 |
+
#include <errno.h>
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
// Language features
|
| 134 |
+
#if CPP_HAS_OVERRIDE
|
| 135 |
+
#define NCURSES_OVERRIDE override
|
| 136 |
+
#else
|
| 137 |
+
#define NCURSES_OVERRIDE /*nothing*/
|
| 138 |
+
#endif
|
| 139 |
+
|
| 140 |
+
#if CPP_HAS_PARAM_INIT
|
| 141 |
+
#define NCURSES_PARAM_INIT(value) = value
|
| 142 |
+
#else
|
| 143 |
+
#define NCURSES_PARAM_INIT(value) /*nothing*/
|
| 144 |
+
#endif
|
| 145 |
+
|
| 146 |
+
#if CPP_HAS_STATIC_CAST
|
| 147 |
+
#define STATIC_CAST(s) static_cast<s>
|
| 148 |
+
#else
|
| 149 |
+
#define STATIC_CAST(s) (s)
|
| 150 |
+
#endif
|
| 151 |
+
|
| 152 |
+
#ifndef NCURSES_CXX_IMPEXP
|
| 153 |
+
#define NCURSES_CXX_IMPEXP /* nothing */
|
| 154 |
+
#endif
|
| 155 |
+
|
| 156 |
+
// Forward Declarations
|
| 157 |
+
class NCURSES_CXX_IMPEXP NCursesPanel;
|
| 158 |
+
class NCURSES_CXX_IMPEXP NCursesMenu;
|
| 159 |
+
class NCURSES_CXX_IMPEXP NCursesForm;
|
| 160 |
+
|
| 161 |
+
class NCURSES_CXX_IMPEXP NCursesException
|
| 162 |
+
{
|
| 163 |
+
public:
|
| 164 |
+
const char *message;
|
| 165 |
+
int errorno;
|
| 166 |
+
|
| 167 |
+
NCursesException (const char* msg, int err)
|
| 168 |
+
: message(msg), errorno (err)
|
| 169 |
+
{};
|
| 170 |
+
|
| 171 |
+
explicit NCursesException (const char* msg)
|
| 172 |
+
: message(msg), errorno (E_SYSTEM_ERROR)
|
| 173 |
+
{};
|
| 174 |
+
|
| 175 |
+
NCursesException& operator=(const NCursesException& rhs)
|
| 176 |
+
{
|
| 177 |
+
message = rhs.message;
|
| 178 |
+
errorno = rhs.errorno;
|
| 179 |
+
return *this;
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
NCursesException(const NCursesException& rhs)
|
| 183 |
+
: message(rhs.message), errorno(rhs.errorno)
|
| 184 |
+
{
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
virtual const char *classname() const {
|
| 188 |
+
return "NCursesWindow";
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
virtual ~NCursesException()
|
| 192 |
+
{
|
| 193 |
+
}
|
| 194 |
+
};
|
| 195 |
+
|
| 196 |
+
class NCURSES_CXX_IMPEXP NCursesPanelException : public NCursesException
|
| 197 |
+
{
|
| 198 |
+
public:
|
| 199 |
+
const NCursesPanel* p;
|
| 200 |
+
|
| 201 |
+
NCursesPanelException (const char *msg, int err) :
|
| 202 |
+
NCursesException (msg, err),
|
| 203 |
+
p (0)
|
| 204 |
+
{};
|
| 205 |
+
|
| 206 |
+
NCursesPanelException (const NCursesPanel* panel,
|
| 207 |
+
const char *msg,
|
| 208 |
+
int err) :
|
| 209 |
+
NCursesException (msg, err),
|
| 210 |
+
p (panel)
|
| 211 |
+
{};
|
| 212 |
+
|
| 213 |
+
explicit NCursesPanelException (int err) :
|
| 214 |
+
NCursesException ("panel library error", err),
|
| 215 |
+
p (0)
|
| 216 |
+
{};
|
| 217 |
+
|
| 218 |
+
NCursesPanelException (const NCursesPanel* panel,
|
| 219 |
+
int err) :
|
| 220 |
+
NCursesException ("panel library error", err),
|
| 221 |
+
p (panel)
|
| 222 |
+
{};
|
| 223 |
+
|
| 224 |
+
NCursesPanelException& operator=(const NCursesPanelException& rhs)
|
| 225 |
+
{
|
| 226 |
+
if (this != &rhs) {
|
| 227 |
+
NCursesException::operator=(rhs);
|
| 228 |
+
p = rhs.p;
|
| 229 |
+
}
|
| 230 |
+
return *this;
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
NCursesPanelException(const NCursesPanelException& rhs)
|
| 234 |
+
: NCursesException(rhs), p(rhs.p)
|
| 235 |
+
{
|
| 236 |
+
}
|
| 237 |
+
|
| 238 |
+
virtual const char *classname() const NCURSES_OVERRIDE {
|
| 239 |
+
return "NCursesPanel";
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
virtual ~NCursesPanelException()
|
| 243 |
+
{
|
| 244 |
+
}
|
| 245 |
+
};
|
| 246 |
+
|
| 247 |
+
class NCURSES_CXX_IMPEXP NCursesMenuException : public NCursesException
|
| 248 |
+
{
|
| 249 |
+
public:
|
| 250 |
+
const NCursesMenu* m;
|
| 251 |
+
|
| 252 |
+
NCursesMenuException (const char *msg, int err) :
|
| 253 |
+
NCursesException (msg, err),
|
| 254 |
+
m (0)
|
| 255 |
+
{};
|
| 256 |
+
|
| 257 |
+
NCursesMenuException (const NCursesMenu* menu,
|
| 258 |
+
const char *msg,
|
| 259 |
+
int err) :
|
| 260 |
+
NCursesException (msg, err),
|
| 261 |
+
m (menu)
|
| 262 |
+
{};
|
| 263 |
+
|
| 264 |
+
explicit NCursesMenuException (int err) :
|
| 265 |
+
NCursesException ("menu library error", err),
|
| 266 |
+
m (0)
|
| 267 |
+
{};
|
| 268 |
+
|
| 269 |
+
NCursesMenuException (const NCursesMenu* menu,
|
| 270 |
+
int err) :
|
| 271 |
+
NCursesException ("menu library error", err),
|
| 272 |
+
m (menu)
|
| 273 |
+
{};
|
| 274 |
+
|
| 275 |
+
NCursesMenuException& operator=(const NCursesMenuException& rhs)
|
| 276 |
+
{
|
| 277 |
+
if (this != &rhs) {
|
| 278 |
+
NCursesException::operator=(rhs);
|
| 279 |
+
m = rhs.m;
|
| 280 |
+
}
|
| 281 |
+
return *this;
|
| 282 |
+
}
|
| 283 |
+
|
| 284 |
+
NCursesMenuException(const NCursesMenuException& rhs)
|
| 285 |
+
: NCursesException(rhs), m(rhs.m)
|
| 286 |
+
{
|
| 287 |
+
}
|
| 288 |
+
|
| 289 |
+
virtual const char *classname() const NCURSES_OVERRIDE {
|
| 290 |
+
return "NCursesMenu";
|
| 291 |
+
}
|
| 292 |
+
|
| 293 |
+
virtual ~NCursesMenuException()
|
| 294 |
+
{
|
| 295 |
+
}
|
| 296 |
+
};
|
| 297 |
+
|
| 298 |
+
class NCURSES_CXX_IMPEXP NCursesFormException : public NCursesException
|
| 299 |
+
{
|
| 300 |
+
public:
|
| 301 |
+
const NCursesForm* f;
|
| 302 |
+
|
| 303 |
+
NCursesFormException (const char *msg, int err) :
|
| 304 |
+
NCursesException (msg, err),
|
| 305 |
+
f (0)
|
| 306 |
+
{};
|
| 307 |
+
|
| 308 |
+
NCursesFormException (const NCursesForm* form,
|
| 309 |
+
const char *msg,
|
| 310 |
+
int err) :
|
| 311 |
+
NCursesException (msg, err),
|
| 312 |
+
f (form)
|
| 313 |
+
{};
|
| 314 |
+
|
| 315 |
+
explicit NCursesFormException (int err) :
|
| 316 |
+
NCursesException ("form library error", err),
|
| 317 |
+
f (0)
|
| 318 |
+
{};
|
| 319 |
+
|
| 320 |
+
NCursesFormException (const NCursesForm* form,
|
| 321 |
+
int err) :
|
| 322 |
+
NCursesException ("form library error", err),
|
| 323 |
+
f (form)
|
| 324 |
+
{};
|
| 325 |
+
|
| 326 |
+
NCursesFormException& operator=(const NCursesFormException& rhs)
|
| 327 |
+
{
|
| 328 |
+
if (this != &rhs) {
|
| 329 |
+
NCursesException::operator=(rhs);
|
| 330 |
+
f = rhs.f;
|
| 331 |
+
}
|
| 332 |
+
return *this;
|
| 333 |
+
}
|
| 334 |
+
|
| 335 |
+
NCursesFormException(const NCursesFormException& rhs)
|
| 336 |
+
: NCursesException(rhs), f(rhs.f)
|
| 337 |
+
{
|
| 338 |
+
}
|
| 339 |
+
|
| 340 |
+
virtual const char *classname() const NCURSES_OVERRIDE {
|
| 341 |
+
return "NCursesForm";
|
| 342 |
+
}
|
| 343 |
+
|
| 344 |
+
virtual ~NCursesFormException()
|
| 345 |
+
{
|
| 346 |
+
}
|
| 347 |
+
};
|
| 348 |
+
|
| 349 |
+
#if !((defined(__GNUG__) && defined(__EXCEPTIONS) && (__GNUG__ < 7)) || defined(__SUNPRO_CC))
|
| 350 |
+
# if HAVE_IOSTREAM
|
| 351 |
+
# include <iostream>
|
| 352 |
+
# if IOSTREAM_NAMESPACE
|
| 353 |
+
using std::cerr;
|
| 354 |
+
using std::endl;
|
| 355 |
+
# endif
|
| 356 |
+
# else
|
| 357 |
+
# include <iostream.h>
|
| 358 |
+
# endif
|
| 359 |
+
#endif
|
| 360 |
+
|
| 361 |
+
inline void THROW(const NCursesException *e) {
|
| 362 |
+
#if defined(__GNUG__) && defined(__EXCEPTIONS)
|
| 363 |
+
# if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8))
|
| 364 |
+
(*lib_error_handler)(e ? e->classname() : "", e ? e->message : "");
|
| 365 |
+
# elif (__GNUG__ >= 7)
|
| 366 |
+
// g++ 7.0 warns about deprecation, but lacks the predefined symbols
|
| 367 |
+
::endwin();
|
| 368 |
+
std::cerr << "Found a problem - goodbye" << std::endl;
|
| 369 |
+
exit(EXIT_FAILURE);
|
| 370 |
+
# else
|
| 371 |
+
# define CPP_HAS_TRY_CATCH 1
|
| 372 |
+
# endif
|
| 373 |
+
#elif defined(__SUNPRO_CC)
|
| 374 |
+
# if !defined(__SUNPRO_CC_COMPAT) || (__SUNPRO_CC_COMPAT < 5)
|
| 375 |
+
genericerror(1, ((e != 0) ? (char *)(e->message) : ""));
|
| 376 |
+
# else
|
| 377 |
+
# define CPP_HAS_TRY_CATCH 1
|
| 378 |
+
# endif
|
| 379 |
+
#else
|
| 380 |
+
if (e)
|
| 381 |
+
cerr << e->message << endl;
|
| 382 |
+
exit(0);
|
| 383 |
+
#endif
|
| 384 |
+
|
| 385 |
+
#ifndef CPP_HAS_TRY_CATCH
|
| 386 |
+
#define CPP_HAS_TRY_CATCH 0
|
| 387 |
+
#define NCURSES_CPP_TRY /* nothing */
|
| 388 |
+
#define NCURSES_CPP_CATCH(e) if (false)
|
| 389 |
+
#define THROWS(s) /* nothing */
|
| 390 |
+
#define THROW2(s,t) /* nothing */
|
| 391 |
+
#elif CPP_HAS_TRY_CATCH
|
| 392 |
+
throw *e;
|
| 393 |
+
#define NCURSES_CPP_TRY try
|
| 394 |
+
#define NCURSES_CPP_CATCH(e) catch(e)
|
| 395 |
+
#if defined(__cpp_noexcept_function_type) && (__cpp_noexcept_function_type >= 201510)
|
| 396 |
+
// C++17 deprecates the usage of throw().
|
| 397 |
+
#define THROWS(s) /* nothing */
|
| 398 |
+
#define THROW2(s,t) /* nothing */
|
| 399 |
+
#else
|
| 400 |
+
#define THROWS(s) throw(s)
|
| 401 |
+
#define THROW2(s,t) throw(s,t)
|
| 402 |
+
#endif
|
| 403 |
+
#endif
|
| 404 |
+
}
|
| 405 |
+
|
| 406 |
+
#endif /* NCURSES_ETIP_H_incl */
|
miniconda3/envs/active_proaction/include/ncursesw/form.h
ADDED
|
@@ -0,0 +1,460 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/****************************************************************************
|
| 2 |
+
* Copyright 2018-2019-2020,2021 Thomas E. Dickey *
|
| 3 |
+
* Copyright 1998-2016,2017 Free Software Foundation, Inc. *
|
| 4 |
+
* *
|
| 5 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 6 |
+
* copy of this software and associated documentation files (the *
|
| 7 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 8 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 9 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 10 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 11 |
+
* furnished to do so, subject to the following conditions: *
|
| 12 |
+
* *
|
| 13 |
+
* The above copyright notice and this permission notice shall be included *
|
| 14 |
+
* in all copies or substantial portions of the Software. *
|
| 15 |
+
* *
|
| 16 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 17 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 18 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 19 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 20 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 21 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 22 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 23 |
+
* *
|
| 24 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 25 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 26 |
+
* sale, use or other dealings in this Software without prior written *
|
| 27 |
+
* authorization. *
|
| 28 |
+
****************************************************************************/
|
| 29 |
+
|
| 30 |
+
/****************************************************************************
|
| 31 |
+
* Author: Juergen Pfeifer, 1995,1997 *
|
| 32 |
+
****************************************************************************/
|
| 33 |
+
|
| 34 |
+
/* $Id: form.h,v 0.32 2021/06/17 21:26:02 tom Exp $ */
|
| 35 |
+
|
| 36 |
+
#ifndef FORM_H
|
| 37 |
+
#define FORM_H
|
| 38 |
+
/* *INDENT-OFF*/
|
| 39 |
+
|
| 40 |
+
#include <ncursesw/curses.h>
|
| 41 |
+
#include <ncursesw/eti.h>
|
| 42 |
+
|
| 43 |
+
#ifdef __cplusplus
|
| 44 |
+
extern "C" {
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
#if defined(BUILDING_FORM)
|
| 48 |
+
# define FORM_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
|
| 49 |
+
#else
|
| 50 |
+
# define FORM_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
|
| 51 |
+
#endif
|
| 52 |
+
|
| 53 |
+
#define FORM_WRAPPED_VAR(type,name) extern FORM_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
|
| 54 |
+
|
| 55 |
+
#define FORM_EXPORT(type) FORM_IMPEXP type NCURSES_API
|
| 56 |
+
#define FORM_EXPORT_VAR(type) FORM_IMPEXP type
|
| 57 |
+
|
| 58 |
+
#ifndef FORM_PRIV_H
|
| 59 |
+
typedef void *FIELD_CELL;
|
| 60 |
+
#endif
|
| 61 |
+
|
| 62 |
+
#ifndef NCURSES_FIELD_INTERNALS
|
| 63 |
+
#define NCURSES_FIELD_INTERNALS /* nothing */
|
| 64 |
+
#endif
|
| 65 |
+
|
| 66 |
+
typedef int Form_Options;
|
| 67 |
+
typedef int Field_Options;
|
| 68 |
+
|
| 69 |
+
/**********
|
| 70 |
+
* _PAGE *
|
| 71 |
+
**********/
|
| 72 |
+
|
| 73 |
+
typedef struct pagenode
|
| 74 |
+
#if !NCURSES_OPAQUE_FORM
|
| 75 |
+
{
|
| 76 |
+
short pmin; /* index of first field on page */
|
| 77 |
+
short pmax; /* index of last field on page */
|
| 78 |
+
short smin; /* index of top leftmost field on page */
|
| 79 |
+
short smax; /* index of bottom rightmost field on page */
|
| 80 |
+
}
|
| 81 |
+
#endif /* !NCURSES_OPAQUE_FORM */
|
| 82 |
+
_PAGE;
|
| 83 |
+
|
| 84 |
+
/**********
|
| 85 |
+
* FIELD *
|
| 86 |
+
**********/
|
| 87 |
+
|
| 88 |
+
typedef struct fieldnode
|
| 89 |
+
#if 1 /* not yet: !NCURSES_OPAQUE_FORM */
|
| 90 |
+
{
|
| 91 |
+
unsigned short status; /* flags */
|
| 92 |
+
short rows; /* size in rows */
|
| 93 |
+
short cols; /* size in cols */
|
| 94 |
+
short frow; /* first row */
|
| 95 |
+
short fcol; /* first col */
|
| 96 |
+
int drows; /* dynamic rows */
|
| 97 |
+
int dcols; /* dynamic cols */
|
| 98 |
+
int maxgrow; /* maximum field growth */
|
| 99 |
+
int nrow; /* off-screen rows */
|
| 100 |
+
short nbuf; /* additional buffers */
|
| 101 |
+
short just; /* justification */
|
| 102 |
+
short page; /* page on form */
|
| 103 |
+
short index; /* into form -> field */
|
| 104 |
+
int pad; /* pad character */
|
| 105 |
+
chtype fore; /* foreground attribute */
|
| 106 |
+
chtype back; /* background attribute */
|
| 107 |
+
Field_Options opts; /* options */
|
| 108 |
+
struct fieldnode * snext; /* sorted order pointer */
|
| 109 |
+
struct fieldnode * sprev; /* sorted order pointer */
|
| 110 |
+
struct fieldnode * link; /* linked field chain */
|
| 111 |
+
struct formnode * form; /* containing form */
|
| 112 |
+
struct typenode * type; /* field type */
|
| 113 |
+
void * arg; /* argument for type */
|
| 114 |
+
FIELD_CELL * buf; /* field buffers */
|
| 115 |
+
void * usrptr; /* user pointer */
|
| 116 |
+
/*
|
| 117 |
+
* The wide-character configuration requires extra information. Because
|
| 118 |
+
* there are existing applications that manipulate the members of FIELD
|
| 119 |
+
* directly, we cannot make the struct opaque, except by changing the ABI.
|
| 120 |
+
* Offsets of members up to this point are the same in the narrow- and
|
| 121 |
+
* wide-character configuration. But note that the type of buf depends on
|
| 122 |
+
* the configuration, and is made opaque for that reason.
|
| 123 |
+
*/
|
| 124 |
+
NCURSES_FIELD_INTERNALS
|
| 125 |
+
}
|
| 126 |
+
#endif /* NCURSES_OPAQUE_FORM */
|
| 127 |
+
FIELD;
|
| 128 |
+
|
| 129 |
+
|
| 130 |
+
/*********
|
| 131 |
+
* FORM *
|
| 132 |
+
*********/
|
| 133 |
+
|
| 134 |
+
typedef struct formnode
|
| 135 |
+
#if 1 /* not yet: !NCURSES_OPAQUE_FORM */
|
| 136 |
+
{
|
| 137 |
+
unsigned short status; /* flags */
|
| 138 |
+
short rows; /* size in rows */
|
| 139 |
+
short cols; /* size in cols */
|
| 140 |
+
int currow; /* current row in field window */
|
| 141 |
+
int curcol; /* current col in field window */
|
| 142 |
+
int toprow; /* in scrollable field window */
|
| 143 |
+
int begincol; /* in horiz. scrollable field */
|
| 144 |
+
short maxfield; /* number of fields */
|
| 145 |
+
short maxpage; /* number of pages */
|
| 146 |
+
short curpage; /* index into page */
|
| 147 |
+
Form_Options opts; /* options */
|
| 148 |
+
WINDOW * win; /* window */
|
| 149 |
+
WINDOW * sub; /* subwindow */
|
| 150 |
+
WINDOW * w; /* window for current field */
|
| 151 |
+
FIELD ** field; /* field [maxfield] */
|
| 152 |
+
FIELD * current; /* current field */
|
| 153 |
+
_PAGE * page; /* page [maxpage] */
|
| 154 |
+
void * usrptr; /* user pointer */
|
| 155 |
+
|
| 156 |
+
void (*forminit)(struct formnode *);
|
| 157 |
+
void (*formterm)(struct formnode *);
|
| 158 |
+
void (*fieldinit)(struct formnode *);
|
| 159 |
+
void (*fieldterm)(struct formnode *);
|
| 160 |
+
|
| 161 |
+
}
|
| 162 |
+
#endif /* !NCURSES_OPAQUE_FORM */
|
| 163 |
+
FORM;
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
/**************
|
| 167 |
+
* FIELDTYPE *
|
| 168 |
+
**************/
|
| 169 |
+
|
| 170 |
+
typedef struct typenode
|
| 171 |
+
#if !NCURSES_OPAQUE_FORM
|
| 172 |
+
{
|
| 173 |
+
unsigned short status; /* flags */
|
| 174 |
+
long ref; /* reference count */
|
| 175 |
+
struct typenode * left; /* ptr to operand for | */
|
| 176 |
+
struct typenode * right; /* ptr to operand for | */
|
| 177 |
+
|
| 178 |
+
void* (*makearg)(va_list *); /* make fieldtype arg */
|
| 179 |
+
void* (*copyarg)(const void *); /* copy fieldtype arg */
|
| 180 |
+
void (*freearg)(void *); /* free fieldtype arg */
|
| 181 |
+
|
| 182 |
+
#if NCURSES_INTEROP_FUNCS
|
| 183 |
+
union {
|
| 184 |
+
bool (*ofcheck)(FIELD *,const void *); /* field validation */
|
| 185 |
+
bool (*gfcheck)(FORM*,FIELD *,const void*); /* generic field validation */
|
| 186 |
+
} fieldcheck;
|
| 187 |
+
union {
|
| 188 |
+
bool (*occheck)(int,const void *); /* character validation */
|
| 189 |
+
bool (*gccheck)(int,FORM*,
|
| 190 |
+
FIELD*,const void*); /* generic char validation */
|
| 191 |
+
} charcheck;
|
| 192 |
+
union {
|
| 193 |
+
bool (*onext)(FIELD *,const void *); /* enumerate next value */
|
| 194 |
+
bool (*gnext)(FORM*,FIELD*,const void*); /* generic enumerate next */
|
| 195 |
+
} enum_next;
|
| 196 |
+
union {
|
| 197 |
+
bool (*oprev)(FIELD *,const void *); /* enumerate prev value */
|
| 198 |
+
bool (*gprev)(FORM*,FIELD*,const void*); /* generic enumerate prev */
|
| 199 |
+
} enum_prev;
|
| 200 |
+
void* (*genericarg)(void*); /* Alternate Arg method */
|
| 201 |
+
#else
|
| 202 |
+
bool (*fcheck)(FIELD *,const void *); /* field validation */
|
| 203 |
+
bool (*ccheck)(int,const void *); /* character validation */
|
| 204 |
+
|
| 205 |
+
bool (*next)(FIELD *,const void *); /* enumerate next value */
|
| 206 |
+
bool (*prev)(FIELD *,const void *); /* enumerate prev value */
|
| 207 |
+
#endif
|
| 208 |
+
}
|
| 209 |
+
#endif /* !NCURSES_OPAQUE_FORM */
|
| 210 |
+
FIELDTYPE;
|
| 211 |
+
|
| 212 |
+
typedef void (*Form_Hook)(FORM *);
|
| 213 |
+
|
| 214 |
+
/***************************
|
| 215 |
+
* miscellaneous #defines *
|
| 216 |
+
***************************/
|
| 217 |
+
|
| 218 |
+
/* field justification */
|
| 219 |
+
#define NO_JUSTIFICATION (0)
|
| 220 |
+
#define JUSTIFY_LEFT (1)
|
| 221 |
+
#define JUSTIFY_CENTER (2)
|
| 222 |
+
#define JUSTIFY_RIGHT (3)
|
| 223 |
+
|
| 224 |
+
/* field options */
|
| 225 |
+
#define O_VISIBLE (0x0001U)
|
| 226 |
+
#define O_ACTIVE (0x0002U)
|
| 227 |
+
#define O_PUBLIC (0x0004U)
|
| 228 |
+
#define O_EDIT (0x0008U)
|
| 229 |
+
#define O_WRAP (0x0010U)
|
| 230 |
+
#define O_BLANK (0x0020U)
|
| 231 |
+
#define O_AUTOSKIP (0x0040U)
|
| 232 |
+
#define O_NULLOK (0x0080U)
|
| 233 |
+
#define O_PASSOK (0x0100U)
|
| 234 |
+
#define O_STATIC (0x0200U)
|
| 235 |
+
#define O_DYNAMIC_JUSTIFY (0x0400U) /* ncurses extension */
|
| 236 |
+
#define O_NO_LEFT_STRIP (0x0800U) /* ncurses extension */
|
| 237 |
+
#define O_EDGE_INSERT_STAY (0x1000U) /* ncurses extension */
|
| 238 |
+
#define O_INPUT_LIMIT (0x2000U) /* ncurses extension */
|
| 239 |
+
|
| 240 |
+
/* form options */
|
| 241 |
+
#define O_NL_OVERLOAD (0x0001U)
|
| 242 |
+
#define O_BS_OVERLOAD (0x0002U)
|
| 243 |
+
|
| 244 |
+
/* form driver commands */
|
| 245 |
+
#define REQ_NEXT_PAGE (KEY_MAX + 1) /* move to next page */
|
| 246 |
+
#define REQ_PREV_PAGE (KEY_MAX + 2) /* move to previous page */
|
| 247 |
+
#define REQ_FIRST_PAGE (KEY_MAX + 3) /* move to first page */
|
| 248 |
+
#define REQ_LAST_PAGE (KEY_MAX + 4) /* move to last page */
|
| 249 |
+
|
| 250 |
+
#define REQ_NEXT_FIELD (KEY_MAX + 5) /* move to next field */
|
| 251 |
+
#define REQ_PREV_FIELD (KEY_MAX + 6) /* move to previous field */
|
| 252 |
+
#define REQ_FIRST_FIELD (KEY_MAX + 7) /* move to first field */
|
| 253 |
+
#define REQ_LAST_FIELD (KEY_MAX + 8) /* move to last field */
|
| 254 |
+
#define REQ_SNEXT_FIELD (KEY_MAX + 9) /* move to sorted next field */
|
| 255 |
+
#define REQ_SPREV_FIELD (KEY_MAX + 10) /* move to sorted prev field */
|
| 256 |
+
#define REQ_SFIRST_FIELD (KEY_MAX + 11) /* move to sorted first field */
|
| 257 |
+
#define REQ_SLAST_FIELD (KEY_MAX + 12) /* move to sorted last field */
|
| 258 |
+
#define REQ_LEFT_FIELD (KEY_MAX + 13) /* move to left to field */
|
| 259 |
+
#define REQ_RIGHT_FIELD (KEY_MAX + 14) /* move to right to field */
|
| 260 |
+
#define REQ_UP_FIELD (KEY_MAX + 15) /* move to up to field */
|
| 261 |
+
#define REQ_DOWN_FIELD (KEY_MAX + 16) /* move to down to field */
|
| 262 |
+
|
| 263 |
+
#define REQ_NEXT_CHAR (KEY_MAX + 17) /* move to next char in field */
|
| 264 |
+
#define REQ_PREV_CHAR (KEY_MAX + 18) /* move to prev char in field */
|
| 265 |
+
#define REQ_NEXT_LINE (KEY_MAX + 19) /* move to next line in field */
|
| 266 |
+
#define REQ_PREV_LINE (KEY_MAX + 20) /* move to prev line in field */
|
| 267 |
+
#define REQ_NEXT_WORD (KEY_MAX + 21) /* move to next word in field */
|
| 268 |
+
#define REQ_PREV_WORD (KEY_MAX + 22) /* move to prev word in field */
|
| 269 |
+
#define REQ_BEG_FIELD (KEY_MAX + 23) /* move to first char in field */
|
| 270 |
+
#define REQ_END_FIELD (KEY_MAX + 24) /* move after last char in fld */
|
| 271 |
+
#define REQ_BEG_LINE (KEY_MAX + 25) /* move to beginning of line */
|
| 272 |
+
#define REQ_END_LINE (KEY_MAX + 26) /* move after last char in line */
|
| 273 |
+
#define REQ_LEFT_CHAR (KEY_MAX + 27) /* move left in field */
|
| 274 |
+
#define REQ_RIGHT_CHAR (KEY_MAX + 28) /* move right in field */
|
| 275 |
+
#define REQ_UP_CHAR (KEY_MAX + 29) /* move up in field */
|
| 276 |
+
#define REQ_DOWN_CHAR (KEY_MAX + 30) /* move down in field */
|
| 277 |
+
|
| 278 |
+
#define REQ_NEW_LINE (KEY_MAX + 31) /* insert/overlay new line */
|
| 279 |
+
#define REQ_INS_CHAR (KEY_MAX + 32) /* insert blank char at cursor */
|
| 280 |
+
#define REQ_INS_LINE (KEY_MAX + 33) /* insert blank line at cursor */
|
| 281 |
+
#define REQ_DEL_CHAR (KEY_MAX + 34) /* delete char at cursor */
|
| 282 |
+
#define REQ_DEL_PREV (KEY_MAX + 35) /* delete char before cursor */
|
| 283 |
+
#define REQ_DEL_LINE (KEY_MAX + 36) /* delete line at cursor */
|
| 284 |
+
#define REQ_DEL_WORD (KEY_MAX + 37) /* delete word at cursor */
|
| 285 |
+
#define REQ_CLR_EOL (KEY_MAX + 38) /* clear to end of line */
|
| 286 |
+
#define REQ_CLR_EOF (KEY_MAX + 39) /* clear to end of field */
|
| 287 |
+
#define REQ_CLR_FIELD (KEY_MAX + 40) /* clear entire field */
|
| 288 |
+
#define REQ_OVL_MODE (KEY_MAX + 41) /* begin overlay mode */
|
| 289 |
+
#define REQ_INS_MODE (KEY_MAX + 42) /* begin insert mode */
|
| 290 |
+
#define REQ_SCR_FLINE (KEY_MAX + 43) /* scroll field forward a line */
|
| 291 |
+
#define REQ_SCR_BLINE (KEY_MAX + 44) /* scroll field backward a line */
|
| 292 |
+
#define REQ_SCR_FPAGE (KEY_MAX + 45) /* scroll field forward a page */
|
| 293 |
+
#define REQ_SCR_BPAGE (KEY_MAX + 46) /* scroll field backward a page */
|
| 294 |
+
#define REQ_SCR_FHPAGE (KEY_MAX + 47) /* scroll field forward half page */
|
| 295 |
+
#define REQ_SCR_BHPAGE (KEY_MAX + 48) /* scroll field backward half page */
|
| 296 |
+
#define REQ_SCR_FCHAR (KEY_MAX + 49) /* horizontal scroll char */
|
| 297 |
+
#define REQ_SCR_BCHAR (KEY_MAX + 50) /* horizontal scroll char */
|
| 298 |
+
#define REQ_SCR_HFLINE (KEY_MAX + 51) /* horizontal scroll line */
|
| 299 |
+
#define REQ_SCR_HBLINE (KEY_MAX + 52) /* horizontal scroll line */
|
| 300 |
+
#define REQ_SCR_HFHALF (KEY_MAX + 53) /* horizontal scroll half line */
|
| 301 |
+
#define REQ_SCR_HBHALF (KEY_MAX + 54) /* horizontal scroll half line */
|
| 302 |
+
|
| 303 |
+
#define REQ_VALIDATION (KEY_MAX + 55) /* validate field */
|
| 304 |
+
#define REQ_NEXT_CHOICE (KEY_MAX + 56) /* display next field choice */
|
| 305 |
+
#define REQ_PREV_CHOICE (KEY_MAX + 57) /* display prev field choice */
|
| 306 |
+
|
| 307 |
+
#define MIN_FORM_COMMAND (KEY_MAX + 1) /* used by form_driver */
|
| 308 |
+
#define MAX_FORM_COMMAND (KEY_MAX + 57) /* used by form_driver */
|
| 309 |
+
|
| 310 |
+
#if defined(MAX_COMMAND)
|
| 311 |
+
# if (MAX_FORM_COMMAND > MAX_COMMAND)
|
| 312 |
+
# error Something is wrong -- MAX_FORM_COMMAND is greater than MAX_COMMAND
|
| 313 |
+
# elif (MAX_COMMAND != (KEY_MAX + 128))
|
| 314 |
+
# error Something is wrong -- MAX_COMMAND is already inconsistently defined.
|
| 315 |
+
# endif
|
| 316 |
+
#else
|
| 317 |
+
# define MAX_COMMAND (KEY_MAX + 128)
|
| 318 |
+
#endif
|
| 319 |
+
|
| 320 |
+
/*************************
|
| 321 |
+
* standard field types *
|
| 322 |
+
*************************/
|
| 323 |
+
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_ALPHA;
|
| 324 |
+
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_ALNUM;
|
| 325 |
+
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_ENUM;
|
| 326 |
+
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_INTEGER;
|
| 327 |
+
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_NUMERIC;
|
| 328 |
+
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_REGEXP;
|
| 329 |
+
|
| 330 |
+
/************************************
|
| 331 |
+
* built-in additional field types *
|
| 332 |
+
* They are not defined in SVr4 *
|
| 333 |
+
************************************/
|
| 334 |
+
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_IPV4; /* Internet IP Version 4 address */
|
| 335 |
+
|
| 336 |
+
/***********************
|
| 337 |
+
* FIELDTYPE routines *
|
| 338 |
+
***********************/
|
| 339 |
+
extern FORM_EXPORT(FIELDTYPE *) new_fieldtype (
|
| 340 |
+
bool (* const field_check)(FIELD *,const void *),
|
| 341 |
+
bool (* const char_check)(int,const void *));
|
| 342 |
+
extern FORM_EXPORT(FIELDTYPE *) link_fieldtype(
|
| 343 |
+
FIELDTYPE *, FIELDTYPE *);
|
| 344 |
+
|
| 345 |
+
extern FORM_EXPORT(int) free_fieldtype (FIELDTYPE *);
|
| 346 |
+
extern FORM_EXPORT(int) set_fieldtype_arg (FIELDTYPE *,
|
| 347 |
+
void * (* const make_arg)(va_list *),
|
| 348 |
+
void * (* const copy_arg)(const void *),
|
| 349 |
+
void (* const free_arg)(void *));
|
| 350 |
+
extern FORM_EXPORT(int) set_fieldtype_choice (FIELDTYPE *,
|
| 351 |
+
bool (* const next_choice)(FIELD *,const void *),
|
| 352 |
+
bool (* const prev_choice)(FIELD *,const void *));
|
| 353 |
+
|
| 354 |
+
/*******************
|
| 355 |
+
* FIELD routines *
|
| 356 |
+
*******************/
|
| 357 |
+
extern FORM_EXPORT(FIELD *) new_field (int,int,int,int,int,int);
|
| 358 |
+
extern FORM_EXPORT(FIELD *) dup_field (FIELD *,int,int);
|
| 359 |
+
extern FORM_EXPORT(FIELD *) link_field (FIELD *,int,int);
|
| 360 |
+
|
| 361 |
+
extern FORM_EXPORT(int) free_field (FIELD *);
|
| 362 |
+
extern FORM_EXPORT(int) field_info (const FIELD *,int *,int *,int *,int *,int *,int *);
|
| 363 |
+
extern FORM_EXPORT(int) dynamic_field_info (const FIELD *,int *,int *,int *);
|
| 364 |
+
extern FORM_EXPORT(int) set_max_field ( FIELD *,int);
|
| 365 |
+
extern FORM_EXPORT(int) move_field (FIELD *,int,int);
|
| 366 |
+
extern FORM_EXPORT(int) set_field_type (FIELD *,FIELDTYPE *,...);
|
| 367 |
+
extern FORM_EXPORT(int) set_new_page (FIELD *,bool);
|
| 368 |
+
extern FORM_EXPORT(int) set_field_just (FIELD *,int);
|
| 369 |
+
extern FORM_EXPORT(int) field_just (const FIELD *);
|
| 370 |
+
extern FORM_EXPORT(int) set_field_fore (FIELD *,chtype);
|
| 371 |
+
extern FORM_EXPORT(int) set_field_back (FIELD *,chtype);
|
| 372 |
+
extern FORM_EXPORT(int) set_field_pad (FIELD *,int);
|
| 373 |
+
extern FORM_EXPORT(int) field_pad (const FIELD *);
|
| 374 |
+
extern FORM_EXPORT(int) set_field_buffer (FIELD *,int,const char *);
|
| 375 |
+
extern FORM_EXPORT(int) set_field_status (FIELD *,bool);
|
| 376 |
+
extern FORM_EXPORT(int) set_field_userptr (FIELD *, void *);
|
| 377 |
+
extern FORM_EXPORT(int) set_field_opts (FIELD *,Field_Options);
|
| 378 |
+
extern FORM_EXPORT(int) field_opts_on (FIELD *,Field_Options);
|
| 379 |
+
extern FORM_EXPORT(int) field_opts_off (FIELD *,Field_Options);
|
| 380 |
+
|
| 381 |
+
extern FORM_EXPORT(chtype) field_fore (const FIELD *);
|
| 382 |
+
extern FORM_EXPORT(chtype) field_back (const FIELD *);
|
| 383 |
+
|
| 384 |
+
extern FORM_EXPORT(bool) new_page (const FIELD *);
|
| 385 |
+
extern FORM_EXPORT(bool) field_status (const FIELD *);
|
| 386 |
+
|
| 387 |
+
extern FORM_EXPORT(void *) field_arg (const FIELD *);
|
| 388 |
+
|
| 389 |
+
extern FORM_EXPORT(void *) field_userptr (const FIELD *);
|
| 390 |
+
|
| 391 |
+
extern FORM_EXPORT(FIELDTYPE *) field_type (const FIELD *);
|
| 392 |
+
|
| 393 |
+
extern FORM_EXPORT(char *) field_buffer (const FIELD *,int);
|
| 394 |
+
|
| 395 |
+
extern FORM_EXPORT(Field_Options) field_opts (const FIELD *);
|
| 396 |
+
|
| 397 |
+
/******************
|
| 398 |
+
* FORM routines *
|
| 399 |
+
******************/
|
| 400 |
+
|
| 401 |
+
extern FORM_EXPORT(FORM *) new_form (FIELD **);
|
| 402 |
+
|
| 403 |
+
extern FORM_EXPORT(FIELD **) form_fields (const FORM *);
|
| 404 |
+
extern FORM_EXPORT(FIELD *) current_field (const FORM *);
|
| 405 |
+
|
| 406 |
+
extern FORM_EXPORT(WINDOW *) form_win (const FORM *);
|
| 407 |
+
extern FORM_EXPORT(WINDOW *) form_sub (const FORM *);
|
| 408 |
+
|
| 409 |
+
extern FORM_EXPORT(Form_Hook) form_init (const FORM *);
|
| 410 |
+
extern FORM_EXPORT(Form_Hook) form_term (const FORM *);
|
| 411 |
+
extern FORM_EXPORT(Form_Hook) field_init (const FORM *);
|
| 412 |
+
extern FORM_EXPORT(Form_Hook) field_term (const FORM *);
|
| 413 |
+
|
| 414 |
+
extern FORM_EXPORT(int) free_form (FORM *);
|
| 415 |
+
extern FORM_EXPORT(int) set_form_fields (FORM *,FIELD **);
|
| 416 |
+
extern FORM_EXPORT(int) field_count (const FORM *);
|
| 417 |
+
extern FORM_EXPORT(int) set_form_win (FORM *,WINDOW *);
|
| 418 |
+
extern FORM_EXPORT(int) set_form_sub (FORM *,WINDOW *);
|
| 419 |
+
extern FORM_EXPORT(int) set_current_field (FORM *,FIELD *);
|
| 420 |
+
extern FORM_EXPORT(int) unfocus_current_field (FORM *);
|
| 421 |
+
extern FORM_EXPORT(int) field_index (const FIELD *);
|
| 422 |
+
extern FORM_EXPORT(int) set_form_page (FORM *,int);
|
| 423 |
+
extern FORM_EXPORT(int) form_page (const FORM *);
|
| 424 |
+
extern FORM_EXPORT(int) scale_form (const FORM *,int *,int *);
|
| 425 |
+
extern FORM_EXPORT(int) set_form_init (FORM *,Form_Hook);
|
| 426 |
+
extern FORM_EXPORT(int) set_form_term (FORM *,Form_Hook);
|
| 427 |
+
extern FORM_EXPORT(int) set_field_init (FORM *,Form_Hook);
|
| 428 |
+
extern FORM_EXPORT(int) set_field_term (FORM *,Form_Hook);
|
| 429 |
+
extern FORM_EXPORT(int) post_form (FORM *);
|
| 430 |
+
extern FORM_EXPORT(int) unpost_form (FORM *);
|
| 431 |
+
extern FORM_EXPORT(int) pos_form_cursor (FORM *);
|
| 432 |
+
extern FORM_EXPORT(int) form_driver (FORM *,int);
|
| 433 |
+
# if NCURSES_WIDECHAR
|
| 434 |
+
extern FORM_EXPORT(int) form_driver_w (FORM *,int,wchar_t);
|
| 435 |
+
# endif
|
| 436 |
+
extern FORM_EXPORT(int) set_form_userptr (FORM *,void *);
|
| 437 |
+
extern FORM_EXPORT(int) set_form_opts (FORM *,Form_Options);
|
| 438 |
+
extern FORM_EXPORT(int) form_opts_on (FORM *,Form_Options);
|
| 439 |
+
extern FORM_EXPORT(int) form_opts_off (FORM *,Form_Options);
|
| 440 |
+
extern FORM_EXPORT(int) form_request_by_name (const char *);
|
| 441 |
+
|
| 442 |
+
extern FORM_EXPORT(const char *) form_request_name (int);
|
| 443 |
+
|
| 444 |
+
extern FORM_EXPORT(void *) form_userptr (const FORM *);
|
| 445 |
+
|
| 446 |
+
extern FORM_EXPORT(Form_Options) form_opts (const FORM *);
|
| 447 |
+
|
| 448 |
+
extern FORM_EXPORT(bool) data_ahead (const FORM *);
|
| 449 |
+
extern FORM_EXPORT(bool) data_behind (const FORM *);
|
| 450 |
+
|
| 451 |
+
#if NCURSES_SP_FUNCS
|
| 452 |
+
extern FORM_EXPORT(FORM *) NCURSES_SP_NAME(new_form) (SCREEN*, FIELD **);
|
| 453 |
+
#endif
|
| 454 |
+
|
| 455 |
+
#ifdef __cplusplus
|
| 456 |
+
}
|
| 457 |
+
#endif
|
| 458 |
+
/* *INDENT-ON*/
|
| 459 |
+
|
| 460 |
+
#endif /* FORM_H */
|
miniconda3/envs/active_proaction/include/ncursesw/menu.h
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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+
* Copyright 2020 Thomas E. Dickey *
|
| 3 |
+
* Copyright 1998-2016,2017 Free Software Foundation, Inc. *
|
| 4 |
+
* *
|
| 5 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 6 |
+
* copy of this software and associated documentation files (the *
|
| 7 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 8 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 9 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 10 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 11 |
+
* furnished to do so, subject to the following conditions: *
|
| 12 |
+
* *
|
| 13 |
+
* The above copyright notice and this permission notice shall be included *
|
| 14 |
+
* in all copies or substantial portions of the Software. *
|
| 15 |
+
* *
|
| 16 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 17 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 18 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 19 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 20 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 21 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 22 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 23 |
+
* *
|
| 24 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 25 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 26 |
+
* sale, use or other dealings in this Software without prior written *
|
| 27 |
+
* authorization. *
|
| 28 |
+
****************************************************************************/
|
| 29 |
+
|
| 30 |
+
/****************************************************************************
|
| 31 |
+
* Author: Juergen Pfeifer, 1995,1997 *
|
| 32 |
+
****************************************************************************/
|
| 33 |
+
|
| 34 |
+
/* $Id: menu.h,v 1.26 2020/12/12 00:38:02 tom Exp $ */
|
| 35 |
+
|
| 36 |
+
#ifndef ETI_MENU
|
| 37 |
+
#define ETI_MENU
|
| 38 |
+
|
| 39 |
+
#ifdef AMIGA
|
| 40 |
+
#define TEXT TEXT_ncurses
|
| 41 |
+
#endif
|
| 42 |
+
|
| 43 |
+
#include <ncursesw/curses.h>
|
| 44 |
+
#include <ncursesw/eti.h>
|
| 45 |
+
|
| 46 |
+
#ifdef __cplusplus
|
| 47 |
+
extern "C"
|
| 48 |
+
{
|
| 49 |
+
#endif
|
| 50 |
+
|
| 51 |
+
#if defined(BUILDING_MENU)
|
| 52 |
+
# define MENU_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
|
| 53 |
+
#else
|
| 54 |
+
# define MENU_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
|
| 55 |
+
#endif
|
| 56 |
+
|
| 57 |
+
#define MENU_WRAPPED_VAR(type,name) extern MENU_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
|
| 58 |
+
|
| 59 |
+
#define MENU_EXPORT(type) MENU_IMPEXP type NCURSES_API
|
| 60 |
+
#define MENU_EXPORT_VAR(type) MENU_IMPEXP type
|
| 61 |
+
|
| 62 |
+
typedef int Menu_Options;
|
| 63 |
+
typedef int Item_Options;
|
| 64 |
+
|
| 65 |
+
/* Menu options: */
|
| 66 |
+
#define O_ONEVALUE (0x01)
|
| 67 |
+
#define O_SHOWDESC (0x02)
|
| 68 |
+
#define O_ROWMAJOR (0x04)
|
| 69 |
+
#define O_IGNORECASE (0x08)
|
| 70 |
+
#define O_SHOWMATCH (0x10)
|
| 71 |
+
#define O_NONCYCLIC (0x20)
|
| 72 |
+
#define O_MOUSE_MENU (0x40)
|
| 73 |
+
|
| 74 |
+
/* Item options: */
|
| 75 |
+
#define O_SELECTABLE (0x01)
|
| 76 |
+
|
| 77 |
+
#if !NCURSES_OPAQUE_MENU
|
| 78 |
+
typedef struct
|
| 79 |
+
{
|
| 80 |
+
const char *str;
|
| 81 |
+
unsigned short length;
|
| 82 |
+
}
|
| 83 |
+
TEXT;
|
| 84 |
+
#endif /* !NCURSES_OPAQUE_MENU */
|
| 85 |
+
|
| 86 |
+
struct tagMENU;
|
| 87 |
+
|
| 88 |
+
typedef struct tagITEM
|
| 89 |
+
#if !NCURSES_OPAQUE_MENU
|
| 90 |
+
{
|
| 91 |
+
TEXT name; /* name of menu item */
|
| 92 |
+
TEXT description; /* description of item, optional in display */
|
| 93 |
+
struct tagMENU *imenu; /* Pointer to parent menu */
|
| 94 |
+
void *userptr; /* Pointer to user defined per item data */
|
| 95 |
+
Item_Options opt; /* Item options */
|
| 96 |
+
short index; /* Item number if connected to a menu */
|
| 97 |
+
short y; /* y and x location of item in menu */
|
| 98 |
+
short x;
|
| 99 |
+
bool value; /* Selection value */
|
| 100 |
+
|
| 101 |
+
struct tagITEM *left; /* neighbor items */
|
| 102 |
+
struct tagITEM *right;
|
| 103 |
+
struct tagITEM *up;
|
| 104 |
+
struct tagITEM *down;
|
| 105 |
+
|
| 106 |
+
}
|
| 107 |
+
#endif /* !NCURSES_OPAQUE_MENU */
|
| 108 |
+
ITEM;
|
| 109 |
+
|
| 110 |
+
typedef void (*Menu_Hook) (struct tagMENU *);
|
| 111 |
+
|
| 112 |
+
typedef struct tagMENU
|
| 113 |
+
#if 1 /* not yet: !NCURSES_OPAQUE_MENU */
|
| 114 |
+
{
|
| 115 |
+
short height; /* Nr. of chars high */
|
| 116 |
+
short width; /* Nr. of chars wide */
|
| 117 |
+
short rows; /* Nr. of items high */
|
| 118 |
+
short cols; /* Nr. of items wide */
|
| 119 |
+
short frows; /* Nr. of formatted items high */
|
| 120 |
+
short fcols; /* Nr. of formatted items wide */
|
| 121 |
+
short arows; /* Nr. of items high (actual) */
|
| 122 |
+
short namelen; /* Max. name length */
|
| 123 |
+
short desclen; /* Max. description length */
|
| 124 |
+
short marklen; /* Length of mark, if any */
|
| 125 |
+
short itemlen; /* Length of one item */
|
| 126 |
+
short spc_desc; /* Spacing for descriptor */
|
| 127 |
+
short spc_cols; /* Spacing for columns */
|
| 128 |
+
short spc_rows; /* Spacing for rows */
|
| 129 |
+
char *pattern; /* Buffer to store match chars */
|
| 130 |
+
short pindex; /* Index into pattern buffer */
|
| 131 |
+
WINDOW *win; /* Window containing menu */
|
| 132 |
+
WINDOW *sub; /* Subwindow for menu display */
|
| 133 |
+
WINDOW *userwin; /* User's window */
|
| 134 |
+
WINDOW *usersub; /* User's subwindow */
|
| 135 |
+
ITEM **items; /* array of items */
|
| 136 |
+
short nitems; /* Nr. of items in menu */
|
| 137 |
+
ITEM *curitem; /* Current item */
|
| 138 |
+
short toprow; /* Top row of menu */
|
| 139 |
+
chtype fore; /* Selection attribute */
|
| 140 |
+
chtype back; /* Nonselection attribute */
|
| 141 |
+
chtype grey; /* Inactive attribute */
|
| 142 |
+
unsigned char pad; /* Pad character */
|
| 143 |
+
|
| 144 |
+
Menu_Hook menuinit; /* User hooks */
|
| 145 |
+
Menu_Hook menuterm;
|
| 146 |
+
Menu_Hook iteminit;
|
| 147 |
+
Menu_Hook itemterm;
|
| 148 |
+
|
| 149 |
+
void *userptr; /* Pointer to menus user data */
|
| 150 |
+
char *mark; /* Pointer to marker string */
|
| 151 |
+
|
| 152 |
+
Menu_Options opt; /* Menu options */
|
| 153 |
+
unsigned short status; /* Internal state of menu */
|
| 154 |
+
}
|
| 155 |
+
#endif /* !NCURSES_OPAQUE_MENU */
|
| 156 |
+
MENU;
|
| 157 |
+
|
| 158 |
+
/* Define keys */
|
| 159 |
+
|
| 160 |
+
#define REQ_LEFT_ITEM (KEY_MAX + 1)
|
| 161 |
+
#define REQ_RIGHT_ITEM (KEY_MAX + 2)
|
| 162 |
+
#define REQ_UP_ITEM (KEY_MAX + 3)
|
| 163 |
+
#define REQ_DOWN_ITEM (KEY_MAX + 4)
|
| 164 |
+
#define REQ_SCR_ULINE (KEY_MAX + 5)
|
| 165 |
+
#define REQ_SCR_DLINE (KEY_MAX + 6)
|
| 166 |
+
#define REQ_SCR_DPAGE (KEY_MAX + 7)
|
| 167 |
+
#define REQ_SCR_UPAGE (KEY_MAX + 8)
|
| 168 |
+
#define REQ_FIRST_ITEM (KEY_MAX + 9)
|
| 169 |
+
#define REQ_LAST_ITEM (KEY_MAX + 10)
|
| 170 |
+
#define REQ_NEXT_ITEM (KEY_MAX + 11)
|
| 171 |
+
#define REQ_PREV_ITEM (KEY_MAX + 12)
|
| 172 |
+
#define REQ_TOGGLE_ITEM (KEY_MAX + 13)
|
| 173 |
+
#define REQ_CLEAR_PATTERN (KEY_MAX + 14)
|
| 174 |
+
#define REQ_BACK_PATTERN (KEY_MAX + 15)
|
| 175 |
+
#define REQ_NEXT_MATCH (KEY_MAX + 16)
|
| 176 |
+
#define REQ_PREV_MATCH (KEY_MAX + 17)
|
| 177 |
+
|
| 178 |
+
#define MIN_MENU_COMMAND (KEY_MAX + 1)
|
| 179 |
+
#define MAX_MENU_COMMAND (KEY_MAX + 17)
|
| 180 |
+
|
| 181 |
+
/*
|
| 182 |
+
* Some AT&T code expects MAX_COMMAND to be out-of-band not
|
| 183 |
+
* just for menu commands but for forms ones as well.
|
| 184 |
+
*/
|
| 185 |
+
#if defined(MAX_COMMAND)
|
| 186 |
+
# if (MAX_MENU_COMMAND > MAX_COMMAND)
|
| 187 |
+
# error Something is wrong -- MAX_MENU_COMMAND is greater than MAX_COMMAND
|
| 188 |
+
# elif (MAX_COMMAND != (KEY_MAX + 128))
|
| 189 |
+
# error Something is wrong -- MAX_COMMAND is already inconsistently defined.
|
| 190 |
+
# endif
|
| 191 |
+
#else
|
| 192 |
+
# define MAX_COMMAND (KEY_MAX + 128)
|
| 193 |
+
#endif
|
| 194 |
+
|
| 195 |
+
/* --------- prototypes for libmenu functions ----------------------------- */
|
| 196 |
+
|
| 197 |
+
extern MENU_EXPORT(ITEM **) menu_items(const MENU *);
|
| 198 |
+
extern MENU_EXPORT(ITEM *) current_item(const MENU *);
|
| 199 |
+
extern MENU_EXPORT(ITEM *) new_item(const char *, const char *);
|
| 200 |
+
|
| 201 |
+
extern MENU_EXPORT(MENU *) new_menu(ITEM **);
|
| 202 |
+
|
| 203 |
+
extern MENU_EXPORT(Item_Options) item_opts(const ITEM *);
|
| 204 |
+
extern MENU_EXPORT(Menu_Options) menu_opts(const MENU *);
|
| 205 |
+
|
| 206 |
+
extern MENU_EXPORT(Menu_Hook) item_init(const MENU *);
|
| 207 |
+
extern MENU_EXPORT(Menu_Hook) item_term(const MENU *);
|
| 208 |
+
extern MENU_EXPORT(Menu_Hook) menu_init(const MENU *);
|
| 209 |
+
extern MENU_EXPORT(Menu_Hook) menu_term(const MENU *);
|
| 210 |
+
|
| 211 |
+
extern MENU_EXPORT(WINDOW *) menu_sub(const MENU *);
|
| 212 |
+
extern MENU_EXPORT(WINDOW *) menu_win(const MENU *);
|
| 213 |
+
|
| 214 |
+
extern MENU_EXPORT(const char *) item_description(const ITEM *);
|
| 215 |
+
extern MENU_EXPORT(const char *) item_name(const ITEM *);
|
| 216 |
+
extern MENU_EXPORT(const char *) menu_mark(const MENU *);
|
| 217 |
+
extern MENU_EXPORT(const char *) menu_request_name(int);
|
| 218 |
+
|
| 219 |
+
extern MENU_EXPORT(char *) menu_pattern(const MENU *);
|
| 220 |
+
|
| 221 |
+
extern MENU_EXPORT(void *) menu_userptr(const MENU *);
|
| 222 |
+
extern MENU_EXPORT(void *) item_userptr(const ITEM *);
|
| 223 |
+
|
| 224 |
+
extern MENU_EXPORT(chtype) menu_back(const MENU *);
|
| 225 |
+
extern MENU_EXPORT(chtype) menu_fore(const MENU *);
|
| 226 |
+
extern MENU_EXPORT(chtype) menu_grey(const MENU *);
|
| 227 |
+
|
| 228 |
+
extern MENU_EXPORT(int) free_item(ITEM *);
|
| 229 |
+
extern MENU_EXPORT(int) free_menu(MENU *);
|
| 230 |
+
extern MENU_EXPORT(int) item_count(const MENU *);
|
| 231 |
+
extern MENU_EXPORT(int) item_index(const ITEM *);
|
| 232 |
+
extern MENU_EXPORT(int) item_opts_off(ITEM *, Item_Options);
|
| 233 |
+
extern MENU_EXPORT(int) item_opts_on(ITEM *, Item_Options);
|
| 234 |
+
extern MENU_EXPORT(int) menu_driver(MENU *, int);
|
| 235 |
+
extern MENU_EXPORT(int) menu_opts_off(MENU *, Menu_Options);
|
| 236 |
+
extern MENU_EXPORT(int) menu_opts_on(MENU *, Menu_Options);
|
| 237 |
+
extern MENU_EXPORT(int) menu_pad(const MENU *);
|
| 238 |
+
extern MENU_EXPORT(int) pos_menu_cursor(const MENU *);
|
| 239 |
+
extern MENU_EXPORT(int) post_menu(MENU *);
|
| 240 |
+
extern MENU_EXPORT(int) scale_menu(const MENU *, int *, int *);
|
| 241 |
+
extern MENU_EXPORT(int) set_current_item(MENU *menu, ITEM *item);
|
| 242 |
+
extern MENU_EXPORT(int) set_item_init(MENU *, Menu_Hook);
|
| 243 |
+
extern MENU_EXPORT(int) set_item_opts(ITEM *, Item_Options);
|
| 244 |
+
extern MENU_EXPORT(int) set_item_term(MENU *, Menu_Hook);
|
| 245 |
+
extern MENU_EXPORT(int) set_item_userptr(ITEM *, void *);
|
| 246 |
+
extern MENU_EXPORT(int) set_item_value(ITEM *, bool);
|
| 247 |
+
extern MENU_EXPORT(int) set_menu_back(MENU *, chtype);
|
| 248 |
+
extern MENU_EXPORT(int) set_menu_fore(MENU *, chtype);
|
| 249 |
+
extern MENU_EXPORT(int) set_menu_format(MENU *, int, int);
|
| 250 |
+
extern MENU_EXPORT(int) set_menu_grey(MENU *, chtype);
|
| 251 |
+
extern MENU_EXPORT(int) set_menu_init(MENU *, Menu_Hook);
|
| 252 |
+
extern MENU_EXPORT(int) set_menu_items(MENU *, ITEM **);
|
| 253 |
+
extern MENU_EXPORT(int) set_menu_mark(MENU *, const char *);
|
| 254 |
+
extern MENU_EXPORT(int) set_menu_opts(MENU *, Menu_Options);
|
| 255 |
+
extern MENU_EXPORT(int) set_menu_pad(MENU *, int);
|
| 256 |
+
extern MENU_EXPORT(int) set_menu_pattern(MENU *, const char *);
|
| 257 |
+
extern MENU_EXPORT(int) set_menu_sub(MENU *, WINDOW *);
|
| 258 |
+
extern MENU_EXPORT(int) set_menu_term(MENU *, Menu_Hook);
|
| 259 |
+
extern MENU_EXPORT(int) set_menu_userptr(MENU *, void *);
|
| 260 |
+
extern MENU_EXPORT(int) set_menu_win(MENU *, WINDOW *);
|
| 261 |
+
extern MENU_EXPORT(int) set_top_row(MENU *, int);
|
| 262 |
+
extern MENU_EXPORT(int) top_row(const MENU *);
|
| 263 |
+
extern MENU_EXPORT(int) unpost_menu(MENU *);
|
| 264 |
+
extern MENU_EXPORT(int) menu_request_by_name(const char *);
|
| 265 |
+
extern MENU_EXPORT(int) set_menu_spacing(MENU *, int, int, int);
|
| 266 |
+
extern MENU_EXPORT(int) menu_spacing(const MENU *, int *, int *, int *);
|
| 267 |
+
|
| 268 |
+
extern MENU_EXPORT(bool) item_value(const ITEM *);
|
| 269 |
+
extern MENU_EXPORT(bool) item_visible(const ITEM *);
|
| 270 |
+
|
| 271 |
+
extern MENU_EXPORT(void) menu_format(const MENU *, int *, int *);
|
| 272 |
+
|
| 273 |
+
#if NCURSES_SP_FUNCS
|
| 274 |
+
extern MENU_EXPORT(MENU *) NCURSES_SP_NAME(new_menu) (SCREEN *, ITEM **);
|
| 275 |
+
#endif
|
| 276 |
+
|
| 277 |
+
#ifdef __cplusplus
|
| 278 |
+
}
|
| 279 |
+
#endif
|
| 280 |
+
|
| 281 |
+
#endif /* ETI_MENU */
|
miniconda3/envs/active_proaction/include/ncursesw/ncurses.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
miniconda3/envs/active_proaction/include/ncursesw/ncurses_dll.h
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/****************************************************************************
|
| 2 |
+
* Copyright 2018-2020,2023 Thomas E. Dickey *
|
| 3 |
+
* Copyright 2009,2014 Free Software Foundation, Inc. *
|
| 4 |
+
* *
|
| 5 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 6 |
+
* copy of this software and associated documentation files (the *
|
| 7 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 8 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 9 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 10 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 11 |
+
* furnished to do so, subject to the following conditions: *
|
| 12 |
+
* *
|
| 13 |
+
* The above copyright notice and this permission notice shall be included *
|
| 14 |
+
* in all copies or substantial portions of the Software. *
|
| 15 |
+
* *
|
| 16 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 17 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 18 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 19 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 20 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 21 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 22 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 23 |
+
* *
|
| 24 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 25 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 26 |
+
* sale, use or other dealings in this Software without prior written *
|
| 27 |
+
* authorization. *
|
| 28 |
+
****************************************************************************/
|
| 29 |
+
/* $Id: ncurses_dll.h.in,v 1.18 2023/05/06 20:12:43 tom Exp $ */
|
| 30 |
+
|
| 31 |
+
#ifndef NCURSES_DLL_H_incl
|
| 32 |
+
#define NCURSES_DLL_H_incl 1
|
| 33 |
+
|
| 34 |
+
/*
|
| 35 |
+
* MinGW gcc (unlike MSYS2 and Cygwin) should define _WIN32 and possibly _WIN64.
|
| 36 |
+
*/
|
| 37 |
+
#if defined(__MINGW64__)
|
| 38 |
+
|
| 39 |
+
#ifndef _WIN64
|
| 40 |
+
#define _WIN64 1
|
| 41 |
+
#endif
|
| 42 |
+
|
| 43 |
+
#elif defined(__MINGW32__)
|
| 44 |
+
|
| 45 |
+
#ifndef _WIN32
|
| 46 |
+
#define _WIN32 1
|
| 47 |
+
#endif
|
| 48 |
+
|
| 49 |
+
/* 2014-08-02 workaround for broken MinGW compiler.
|
| 50 |
+
* Oddly, only TRACE is mapped to trace - the other -D's are okay.
|
| 51 |
+
* suggest TDM as an alternative.
|
| 52 |
+
*/
|
| 53 |
+
#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
|
| 54 |
+
|
| 55 |
+
#ifdef trace
|
| 56 |
+
#undef trace
|
| 57 |
+
#define TRACE
|
| 58 |
+
#endif
|
| 59 |
+
|
| 60 |
+
#endif /* broken compiler */
|
| 61 |
+
|
| 62 |
+
#endif /* MingW */
|
| 63 |
+
|
| 64 |
+
/*
|
| 65 |
+
* For reentrant code, we map the various global variables into SCREEN by
|
| 66 |
+
* using functions to access them.
|
| 67 |
+
*/
|
| 68 |
+
#define NCURSES_PUBLIC_VAR(name) _nc_##name
|
| 69 |
+
|
| 70 |
+
#if defined(BUILDING_NCURSES)
|
| 71 |
+
# define NCURSES_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
|
| 72 |
+
#else
|
| 73 |
+
# define NCURSES_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
|
| 74 |
+
#endif
|
| 75 |
+
|
| 76 |
+
#define NCURSES_WRAPPED_VAR(type,name) extern NCURSES_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
|
| 77 |
+
|
| 78 |
+
#define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API
|
| 79 |
+
#define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
|
| 80 |
+
|
| 81 |
+
/*
|
| 82 |
+
* These symbols hide dllimport/dllexport, for compilers which care about it.
|
| 83 |
+
*/
|
| 84 |
+
#if defined(__CYGWIN__) || (defined(_WIN32) || defined(_WIN64))
|
| 85 |
+
# if defined(NCURSES_STATIC) /* "static" here only implies "not-a-DLL" */
|
| 86 |
+
# define NCURSES_EXPORT_GENERAL_IMPORT
|
| 87 |
+
# define NCURSES_EXPORT_GENERAL_EXPORT
|
| 88 |
+
# else
|
| 89 |
+
# define NCURSES_EXPORT_GENERAL_IMPORT __declspec(dllimport)
|
| 90 |
+
# define NCURSES_EXPORT_GENERAL_EXPORT __declspec(dllexport)
|
| 91 |
+
# endif
|
| 92 |
+
# define NCURSES_API __cdecl
|
| 93 |
+
#else
|
| 94 |
+
# define NCURSES_EXPORT_GENERAL_IMPORT
|
| 95 |
+
# if (__GNUC__ >= 4) && !defined(__cplusplus)
|
| 96 |
+
# define NCURSES_EXPORT_GENERAL_EXPORT __attribute__((visibility ("default")))
|
| 97 |
+
# else
|
| 98 |
+
# define NCURSES_EXPORT_GENERAL_EXPORT
|
| 99 |
+
# endif
|
| 100 |
+
# define NCURSES_API /* FIXME: __attribute__ ((cdecl)) is only available on x86 */
|
| 101 |
+
#endif
|
| 102 |
+
|
| 103 |
+
#endif /* NCURSES_DLL_H_incl */
|
miniconda3/envs/active_proaction/include/ncursesw/panel.h
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/****************************************************************************
|
| 2 |
+
* Copyright 2020 Thomas E. Dickey *
|
| 3 |
+
* Copyright 1998-2009,2017 Free Software Foundation, Inc. *
|
| 4 |
+
* *
|
| 5 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 6 |
+
* copy of this software and associated documentation files (the *
|
| 7 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 8 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 9 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 10 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 11 |
+
* furnished to do so, subject to the following conditions: *
|
| 12 |
+
* *
|
| 13 |
+
* The above copyright notice and this permission notice shall be included *
|
| 14 |
+
* in all copies or substantial portions of the Software. *
|
| 15 |
+
* *
|
| 16 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 17 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 18 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 19 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 20 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 21 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 22 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 23 |
+
* *
|
| 24 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 25 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 26 |
+
* sale, use or other dealings in this Software without prior written *
|
| 27 |
+
* authorization. *
|
| 28 |
+
****************************************************************************/
|
| 29 |
+
|
| 30 |
+
/****************************************************************************
|
| 31 |
+
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 *
|
| 32 |
+
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
|
| 33 |
+
* and: Juergen Pfeifer 1996-1999,2008 *
|
| 34 |
+
****************************************************************************/
|
| 35 |
+
|
| 36 |
+
/* $Id: panel.h,v 1.14 2020/07/04 20:38:43 tom Exp $ */
|
| 37 |
+
|
| 38 |
+
/* panel.h -- interface file for panels library */
|
| 39 |
+
|
| 40 |
+
#ifndef NCURSES_PANEL_H_incl
|
| 41 |
+
#define NCURSES_PANEL_H_incl 1
|
| 42 |
+
|
| 43 |
+
#include <ncursesw/curses.h>
|
| 44 |
+
|
| 45 |
+
typedef struct panel
|
| 46 |
+
#if !NCURSES_OPAQUE_PANEL
|
| 47 |
+
{
|
| 48 |
+
WINDOW *win;
|
| 49 |
+
struct panel *below;
|
| 50 |
+
struct panel *above;
|
| 51 |
+
NCURSES_CONST void *user;
|
| 52 |
+
}
|
| 53 |
+
#endif /* !NCURSES_OPAQUE_PANEL */
|
| 54 |
+
PANEL;
|
| 55 |
+
|
| 56 |
+
#if defined(__cplusplus)
|
| 57 |
+
extern "C" {
|
| 58 |
+
#endif
|
| 59 |
+
|
| 60 |
+
#if defined(BUILDING_PANEL)
|
| 61 |
+
# define PANEL_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
|
| 62 |
+
#else
|
| 63 |
+
# define PANEL_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
|
| 64 |
+
#endif
|
| 65 |
+
|
| 66 |
+
#define PANEL_WRAPPED_VAR(type,name) extern PANEL_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
|
| 67 |
+
|
| 68 |
+
#define PANEL_EXPORT(type) PANEL_IMPEXP type NCURSES_API
|
| 69 |
+
#define PANEL_EXPORT_VAR(type) PANEL_IMPEXP type
|
| 70 |
+
|
| 71 |
+
extern PANEL_EXPORT(WINDOW*) panel_window (const PANEL *);
|
| 72 |
+
extern PANEL_EXPORT(void) update_panels (void);
|
| 73 |
+
extern PANEL_EXPORT(int) hide_panel (PANEL *);
|
| 74 |
+
extern PANEL_EXPORT(int) show_panel (PANEL *);
|
| 75 |
+
extern PANEL_EXPORT(int) del_panel (PANEL *);
|
| 76 |
+
extern PANEL_EXPORT(int) top_panel (PANEL *);
|
| 77 |
+
extern PANEL_EXPORT(int) bottom_panel (PANEL *);
|
| 78 |
+
extern PANEL_EXPORT(PANEL*) new_panel (WINDOW *);
|
| 79 |
+
extern PANEL_EXPORT(PANEL*) panel_above (const PANEL *);
|
| 80 |
+
extern PANEL_EXPORT(PANEL*) panel_below (const PANEL *);
|
| 81 |
+
extern PANEL_EXPORT(int) set_panel_userptr (PANEL *, NCURSES_CONST void *);
|
| 82 |
+
extern PANEL_EXPORT(NCURSES_CONST void*) panel_userptr (const PANEL *);
|
| 83 |
+
extern PANEL_EXPORT(int) move_panel (PANEL *, int, int);
|
| 84 |
+
extern PANEL_EXPORT(int) replace_panel (PANEL *,WINDOW *);
|
| 85 |
+
extern PANEL_EXPORT(int) panel_hidden (const PANEL *);
|
| 86 |
+
|
| 87 |
+
#if NCURSES_SP_FUNCS
|
| 88 |
+
extern PANEL_EXPORT(PANEL *) ground_panel(SCREEN *);
|
| 89 |
+
extern PANEL_EXPORT(PANEL *) ceiling_panel(SCREEN *);
|
| 90 |
+
|
| 91 |
+
extern PANEL_EXPORT(void) NCURSES_SP_NAME(update_panels) (SCREEN*);
|
| 92 |
+
#endif
|
| 93 |
+
|
| 94 |
+
#if defined(__cplusplus)
|
| 95 |
+
}
|
| 96 |
+
#endif
|
| 97 |
+
|
| 98 |
+
#endif /* NCURSES_PANEL_H_incl */
|
| 99 |
+
|
| 100 |
+
/* end of panel.h */
|
miniconda3/envs/active_proaction/include/ncursesw/term.h
ADDED
|
@@ -0,0 +1,890 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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/****************************************************************************
|
| 2 |
+
* Copyright 2018-2021,2023 Thomas E. Dickey *
|
| 3 |
+
* Copyright 1998-2013,2017 Free Software Foundation, Inc. *
|
| 4 |
+
* *
|
| 5 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 6 |
+
* copy of this software and associated documentation files (the *
|
| 7 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 8 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 9 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 10 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 11 |
+
* furnished to do so, subject to the following conditions: *
|
| 12 |
+
* *
|
| 13 |
+
* The above copyright notice and this permission notice shall be included *
|
| 14 |
+
* in all copies or substantial portions of the Software. *
|
| 15 |
+
* *
|
| 16 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 17 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 18 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 19 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 20 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 21 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 22 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 23 |
+
* *
|
| 24 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 25 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 26 |
+
* sale, use or other dealings in this Software without prior written *
|
| 27 |
+
* authorization. *
|
| 28 |
+
****************************************************************************/
|
| 29 |
+
|
| 30 |
+
/****************************************************************************/
|
| 31 |
+
/* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 */
|
| 32 |
+
/* and: Eric S. Raymond <esr@snark.thyrsus.com> */
|
| 33 |
+
/* and: Thomas E. Dickey 1995-on */
|
| 34 |
+
/****************************************************************************/
|
| 35 |
+
|
| 36 |
+
/* $Id: MKterm.h.awk.in,v 1.85 2023/04/23 19:15:36 tom Exp $ */
|
| 37 |
+
|
| 38 |
+
/*
|
| 39 |
+
** term.h -- Definition of struct term
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
#ifndef NCURSES_TERM_H_incl
|
| 43 |
+
#define NCURSES_TERM_H_incl 1
|
| 44 |
+
|
| 45 |
+
#undef NCURSES_VERSION
|
| 46 |
+
#define NCURSES_VERSION "6.5"
|
| 47 |
+
|
| 48 |
+
#include <ncursesw/ncurses_dll.h>
|
| 49 |
+
|
| 50 |
+
#ifdef __cplusplus
|
| 51 |
+
extern "C" {
|
| 52 |
+
#endif
|
| 53 |
+
|
| 54 |
+
/* Make this file self-contained by providing defaults for the HAVE_TERMIO[S]_H
|
| 55 |
+
* definition (based on the system for which this was configured).
|
| 56 |
+
*/
|
| 57 |
+
|
| 58 |
+
#ifndef __NCURSES_H
|
| 59 |
+
|
| 60 |
+
typedef struct screen SCREEN;
|
| 61 |
+
|
| 62 |
+
#if 1
|
| 63 |
+
#undef NCURSES_SP_FUNCS
|
| 64 |
+
#define NCURSES_SP_FUNCS 20240427
|
| 65 |
+
#undef NCURSES_SP_NAME
|
| 66 |
+
#define NCURSES_SP_NAME(name) name##_sp
|
| 67 |
+
|
| 68 |
+
/* Define the sp-funcs helper function */
|
| 69 |
+
#undef NCURSES_SP_OUTC
|
| 70 |
+
#define NCURSES_SP_OUTC NCURSES_SP_NAME(NCURSES_OUTC)
|
| 71 |
+
typedef int (*NCURSES_SP_OUTC)(SCREEN*, int);
|
| 72 |
+
#endif
|
| 73 |
+
|
| 74 |
+
#endif /* __NCURSES_H */
|
| 75 |
+
|
| 76 |
+
#undef NCURSES_CONST
|
| 77 |
+
#define NCURSES_CONST const
|
| 78 |
+
|
| 79 |
+
#undef NCURSES_SBOOL
|
| 80 |
+
#define NCURSES_SBOOL char
|
| 81 |
+
|
| 82 |
+
#undef NCURSES_USE_DATABASE
|
| 83 |
+
#define NCURSES_USE_DATABASE 1
|
| 84 |
+
|
| 85 |
+
#undef NCURSES_USE_TERMCAP
|
| 86 |
+
#define NCURSES_USE_TERMCAP 1
|
| 87 |
+
|
| 88 |
+
#undef NCURSES_XNAMES
|
| 89 |
+
#define NCURSES_XNAMES 1
|
| 90 |
+
|
| 91 |
+
/* We will use these symbols to hide differences between
|
| 92 |
+
* termios/termio/sgttyb interfaces.
|
| 93 |
+
*/
|
| 94 |
+
#undef TTY
|
| 95 |
+
#undef SET_TTY
|
| 96 |
+
#undef GET_TTY
|
| 97 |
+
|
| 98 |
+
/* Assume POSIX termio if we have the header and function */
|
| 99 |
+
/* #if HAVE_TERMIOS_H && HAVE_TCGETATTR */
|
| 100 |
+
#if 1 && 1
|
| 101 |
+
|
| 102 |
+
#undef TERMIOS
|
| 103 |
+
#define TERMIOS 1
|
| 104 |
+
|
| 105 |
+
#include <termios.h>
|
| 106 |
+
#define TTY struct termios
|
| 107 |
+
|
| 108 |
+
#else /* !HAVE_TERMIOS_H */
|
| 109 |
+
|
| 110 |
+
/* #if HAVE_TERMIO_H */
|
| 111 |
+
#if 1
|
| 112 |
+
|
| 113 |
+
#undef TERMIOS
|
| 114 |
+
#define TERMIOS 1
|
| 115 |
+
|
| 116 |
+
#include <termio.h>
|
| 117 |
+
#define TTY struct termio
|
| 118 |
+
|
| 119 |
+
#else /* !HAVE_TERMIO_H */
|
| 120 |
+
|
| 121 |
+
#if (defined(_WIN32) || defined(_WIN64))
|
| 122 |
+
#if 0
|
| 123 |
+
#include <ncursesw/win32_curses.h>
|
| 124 |
+
#define TTY struct winconmode
|
| 125 |
+
#else
|
| 126 |
+
#include <ncursesw/ncurses_mingw.h>
|
| 127 |
+
#define TTY struct termios
|
| 128 |
+
#endif
|
| 129 |
+
#else
|
| 130 |
+
#undef TERMIOS
|
| 131 |
+
#include <sgtty.h>
|
| 132 |
+
#include <sys/ioctl.h>
|
| 133 |
+
#define TTY struct sgttyb
|
| 134 |
+
#endif /* MINGW32 */
|
| 135 |
+
#endif /* HAVE_TERMIO_H */
|
| 136 |
+
|
| 137 |
+
#endif /* HAVE_TERMIOS_H */
|
| 138 |
+
|
| 139 |
+
#ifdef TERMIOS
|
| 140 |
+
#define GET_TTY(fd, buf) tcgetattr(fd, buf)
|
| 141 |
+
#define SET_TTY(fd, buf) tcsetattr(fd, TCSADRAIN, buf)
|
| 142 |
+
#elif 0 && (defined(_WIN32) || defined(_WIN64))
|
| 143 |
+
#define GET_TTY(fd, buf) _nc_console_getmode(_nc_console_fd2handle(fd),buf)
|
| 144 |
+
#define SET_TTY(fd, buf) _nc_console_setmode(_nc_console_fd2handle(fd),buf)
|
| 145 |
+
#else
|
| 146 |
+
#define GET_TTY(fd, buf) gtty(fd, buf)
|
| 147 |
+
#define SET_TTY(fd, buf) stty(fd, buf)
|
| 148 |
+
#endif
|
| 149 |
+
|
| 150 |
+
#ifndef GCC_NORETURN
|
| 151 |
+
#define GCC_NORETURN /* nothing */
|
| 152 |
+
#endif
|
| 153 |
+
|
| 154 |
+
#define NAMESIZE 256
|
| 155 |
+
|
| 156 |
+
/* The cast works because TERMTYPE is the first data in TERMINAL */
|
| 157 |
+
#define CUR ((TERMTYPE *)(cur_term))->
|
| 158 |
+
|
| 159 |
+
#define auto_left_margin CUR Booleans[0]
|
| 160 |
+
#define auto_right_margin CUR Booleans[1]
|
| 161 |
+
#define no_esc_ctlc CUR Booleans[2]
|
| 162 |
+
#define ceol_standout_glitch CUR Booleans[3]
|
| 163 |
+
#define eat_newline_glitch CUR Booleans[4]
|
| 164 |
+
#define erase_overstrike CUR Booleans[5]
|
| 165 |
+
#define generic_type CUR Booleans[6]
|
| 166 |
+
#define hard_copy CUR Booleans[7]
|
| 167 |
+
#define has_meta_key CUR Booleans[8]
|
| 168 |
+
#define has_status_line CUR Booleans[9]
|
| 169 |
+
#define insert_null_glitch CUR Booleans[10]
|
| 170 |
+
#define memory_above CUR Booleans[11]
|
| 171 |
+
#define memory_below CUR Booleans[12]
|
| 172 |
+
#define move_insert_mode CUR Booleans[13]
|
| 173 |
+
#define move_standout_mode CUR Booleans[14]
|
| 174 |
+
#define over_strike CUR Booleans[15]
|
| 175 |
+
#define status_line_esc_ok CUR Booleans[16]
|
| 176 |
+
#define dest_tabs_magic_smso CUR Booleans[17]
|
| 177 |
+
#define tilde_glitch CUR Booleans[18]
|
| 178 |
+
#define transparent_underline CUR Booleans[19]
|
| 179 |
+
#define xon_xoff CUR Booleans[20]
|
| 180 |
+
#define needs_xon_xoff CUR Booleans[21]
|
| 181 |
+
#define prtr_silent CUR Booleans[22]
|
| 182 |
+
#define hard_cursor CUR Booleans[23]
|
| 183 |
+
#define non_rev_rmcup CUR Booleans[24]
|
| 184 |
+
#define no_pad_char CUR Booleans[25]
|
| 185 |
+
#define non_dest_scroll_region CUR Booleans[26]
|
| 186 |
+
#define can_change CUR Booleans[27]
|
| 187 |
+
#define back_color_erase CUR Booleans[28]
|
| 188 |
+
#define hue_lightness_saturation CUR Booleans[29]
|
| 189 |
+
#define col_addr_glitch CUR Booleans[30]
|
| 190 |
+
#define cr_cancels_micro_mode CUR Booleans[31]
|
| 191 |
+
#define has_print_wheel CUR Booleans[32]
|
| 192 |
+
#define row_addr_glitch CUR Booleans[33]
|
| 193 |
+
#define semi_auto_right_margin CUR Booleans[34]
|
| 194 |
+
#define cpi_changes_res CUR Booleans[35]
|
| 195 |
+
#define lpi_changes_res CUR Booleans[36]
|
| 196 |
+
#define columns CUR Numbers[0]
|
| 197 |
+
#define init_tabs CUR Numbers[1]
|
| 198 |
+
#define lines CUR Numbers[2]
|
| 199 |
+
#define lines_of_memory CUR Numbers[3]
|
| 200 |
+
#define magic_cookie_glitch CUR Numbers[4]
|
| 201 |
+
#define padding_baud_rate CUR Numbers[5]
|
| 202 |
+
#define virtual_terminal CUR Numbers[6]
|
| 203 |
+
#define width_status_line CUR Numbers[7]
|
| 204 |
+
#define num_labels CUR Numbers[8]
|
| 205 |
+
#define label_height CUR Numbers[9]
|
| 206 |
+
#define label_width CUR Numbers[10]
|
| 207 |
+
#define max_attributes CUR Numbers[11]
|
| 208 |
+
#define maximum_windows CUR Numbers[12]
|
| 209 |
+
#define max_colors CUR Numbers[13]
|
| 210 |
+
#define max_pairs CUR Numbers[14]
|
| 211 |
+
#define no_color_video CUR Numbers[15]
|
| 212 |
+
#define buffer_capacity CUR Numbers[16]
|
| 213 |
+
#define dot_vert_spacing CUR Numbers[17]
|
| 214 |
+
#define dot_horz_spacing CUR Numbers[18]
|
| 215 |
+
#define max_micro_address CUR Numbers[19]
|
| 216 |
+
#define max_micro_jump CUR Numbers[20]
|
| 217 |
+
#define micro_col_size CUR Numbers[21]
|
| 218 |
+
#define micro_line_size CUR Numbers[22]
|
| 219 |
+
#define number_of_pins CUR Numbers[23]
|
| 220 |
+
#define output_res_char CUR Numbers[24]
|
| 221 |
+
#define output_res_line CUR Numbers[25]
|
| 222 |
+
#define output_res_horz_inch CUR Numbers[26]
|
| 223 |
+
#define output_res_vert_inch CUR Numbers[27]
|
| 224 |
+
#define print_rate CUR Numbers[28]
|
| 225 |
+
#define wide_char_size CUR Numbers[29]
|
| 226 |
+
#define buttons CUR Numbers[30]
|
| 227 |
+
#define bit_image_entwining CUR Numbers[31]
|
| 228 |
+
#define bit_image_type CUR Numbers[32]
|
| 229 |
+
#define back_tab CUR Strings[0]
|
| 230 |
+
#define bell CUR Strings[1]
|
| 231 |
+
#define carriage_return CUR Strings[2]
|
| 232 |
+
#define change_scroll_region CUR Strings[3]
|
| 233 |
+
#define clear_all_tabs CUR Strings[4]
|
| 234 |
+
#define clear_screen CUR Strings[5]
|
| 235 |
+
#define clr_eol CUR Strings[6]
|
| 236 |
+
#define clr_eos CUR Strings[7]
|
| 237 |
+
#define column_address CUR Strings[8]
|
| 238 |
+
#define command_character CUR Strings[9]
|
| 239 |
+
#define cursor_address CUR Strings[10]
|
| 240 |
+
#define cursor_down CUR Strings[11]
|
| 241 |
+
#define cursor_home CUR Strings[12]
|
| 242 |
+
#define cursor_invisible CUR Strings[13]
|
| 243 |
+
#define cursor_left CUR Strings[14]
|
| 244 |
+
#define cursor_mem_address CUR Strings[15]
|
| 245 |
+
#define cursor_normal CUR Strings[16]
|
| 246 |
+
#define cursor_right CUR Strings[17]
|
| 247 |
+
#define cursor_to_ll CUR Strings[18]
|
| 248 |
+
#define cursor_up CUR Strings[19]
|
| 249 |
+
#define cursor_visible CUR Strings[20]
|
| 250 |
+
#define delete_character CUR Strings[21]
|
| 251 |
+
#define delete_line CUR Strings[22]
|
| 252 |
+
#define dis_status_line CUR Strings[23]
|
| 253 |
+
#define down_half_line CUR Strings[24]
|
| 254 |
+
#define enter_alt_charset_mode CUR Strings[25]
|
| 255 |
+
#define enter_blink_mode CUR Strings[26]
|
| 256 |
+
#define enter_bold_mode CUR Strings[27]
|
| 257 |
+
#define enter_ca_mode CUR Strings[28]
|
| 258 |
+
#define enter_delete_mode CUR Strings[29]
|
| 259 |
+
#define enter_dim_mode CUR Strings[30]
|
| 260 |
+
#define enter_insert_mode CUR Strings[31]
|
| 261 |
+
#define enter_secure_mode CUR Strings[32]
|
| 262 |
+
#define enter_protected_mode CUR Strings[33]
|
| 263 |
+
#define enter_reverse_mode CUR Strings[34]
|
| 264 |
+
#define enter_standout_mode CUR Strings[35]
|
| 265 |
+
#define enter_underline_mode CUR Strings[36]
|
| 266 |
+
#define erase_chars CUR Strings[37]
|
| 267 |
+
#define exit_alt_charset_mode CUR Strings[38]
|
| 268 |
+
#define exit_attribute_mode CUR Strings[39]
|
| 269 |
+
#define exit_ca_mode CUR Strings[40]
|
| 270 |
+
#define exit_delete_mode CUR Strings[41]
|
| 271 |
+
#define exit_insert_mode CUR Strings[42]
|
| 272 |
+
#define exit_standout_mode CUR Strings[43]
|
| 273 |
+
#define exit_underline_mode CUR Strings[44]
|
| 274 |
+
#define flash_screen CUR Strings[45]
|
| 275 |
+
#define form_feed CUR Strings[46]
|
| 276 |
+
#define from_status_line CUR Strings[47]
|
| 277 |
+
#define init_1string CUR Strings[48]
|
| 278 |
+
#define init_2string CUR Strings[49]
|
| 279 |
+
#define init_3string CUR Strings[50]
|
| 280 |
+
#define init_file CUR Strings[51]
|
| 281 |
+
#define insert_character CUR Strings[52]
|
| 282 |
+
#define insert_line CUR Strings[53]
|
| 283 |
+
#define insert_padding CUR Strings[54]
|
| 284 |
+
#define key_backspace CUR Strings[55]
|
| 285 |
+
#define key_catab CUR Strings[56]
|
| 286 |
+
#define key_clear CUR Strings[57]
|
| 287 |
+
#define key_ctab CUR Strings[58]
|
| 288 |
+
#define key_dc CUR Strings[59]
|
| 289 |
+
#define key_dl CUR Strings[60]
|
| 290 |
+
#define key_down CUR Strings[61]
|
| 291 |
+
#define key_eic CUR Strings[62]
|
| 292 |
+
#define key_eol CUR Strings[63]
|
| 293 |
+
#define key_eos CUR Strings[64]
|
| 294 |
+
#define key_f0 CUR Strings[65]
|
| 295 |
+
#define key_f1 CUR Strings[66]
|
| 296 |
+
#define key_f10 CUR Strings[67]
|
| 297 |
+
#define key_f2 CUR Strings[68]
|
| 298 |
+
#define key_f3 CUR Strings[69]
|
| 299 |
+
#define key_f4 CUR Strings[70]
|
| 300 |
+
#define key_f5 CUR Strings[71]
|
| 301 |
+
#define key_f6 CUR Strings[72]
|
| 302 |
+
#define key_f7 CUR Strings[73]
|
| 303 |
+
#define key_f8 CUR Strings[74]
|
| 304 |
+
#define key_f9 CUR Strings[75]
|
| 305 |
+
#define key_home CUR Strings[76]
|
| 306 |
+
#define key_ic CUR Strings[77]
|
| 307 |
+
#define key_il CUR Strings[78]
|
| 308 |
+
#define key_left CUR Strings[79]
|
| 309 |
+
#define key_ll CUR Strings[80]
|
| 310 |
+
#define key_npage CUR Strings[81]
|
| 311 |
+
#define key_ppage CUR Strings[82]
|
| 312 |
+
#define key_right CUR Strings[83]
|
| 313 |
+
#define key_sf CUR Strings[84]
|
| 314 |
+
#define key_sr CUR Strings[85]
|
| 315 |
+
#define key_stab CUR Strings[86]
|
| 316 |
+
#define key_up CUR Strings[87]
|
| 317 |
+
#define keypad_local CUR Strings[88]
|
| 318 |
+
#define keypad_xmit CUR Strings[89]
|
| 319 |
+
#define lab_f0 CUR Strings[90]
|
| 320 |
+
#define lab_f1 CUR Strings[91]
|
| 321 |
+
#define lab_f10 CUR Strings[92]
|
| 322 |
+
#define lab_f2 CUR Strings[93]
|
| 323 |
+
#define lab_f3 CUR Strings[94]
|
| 324 |
+
#define lab_f4 CUR Strings[95]
|
| 325 |
+
#define lab_f5 CUR Strings[96]
|
| 326 |
+
#define lab_f6 CUR Strings[97]
|
| 327 |
+
#define lab_f7 CUR Strings[98]
|
| 328 |
+
#define lab_f8 CUR Strings[99]
|
| 329 |
+
#define lab_f9 CUR Strings[100]
|
| 330 |
+
#define meta_off CUR Strings[101]
|
| 331 |
+
#define meta_on CUR Strings[102]
|
| 332 |
+
#define newline CUR Strings[103]
|
| 333 |
+
#define pad_char CUR Strings[104]
|
| 334 |
+
#define parm_dch CUR Strings[105]
|
| 335 |
+
#define parm_delete_line CUR Strings[106]
|
| 336 |
+
#define parm_down_cursor CUR Strings[107]
|
| 337 |
+
#define parm_ich CUR Strings[108]
|
| 338 |
+
#define parm_index CUR Strings[109]
|
| 339 |
+
#define parm_insert_line CUR Strings[110]
|
| 340 |
+
#define parm_left_cursor CUR Strings[111]
|
| 341 |
+
#define parm_right_cursor CUR Strings[112]
|
| 342 |
+
#define parm_rindex CUR Strings[113]
|
| 343 |
+
#define parm_up_cursor CUR Strings[114]
|
| 344 |
+
#define pkey_key CUR Strings[115]
|
| 345 |
+
#define pkey_local CUR Strings[116]
|
| 346 |
+
#define pkey_xmit CUR Strings[117]
|
| 347 |
+
#define print_screen CUR Strings[118]
|
| 348 |
+
#define prtr_off CUR Strings[119]
|
| 349 |
+
#define prtr_on CUR Strings[120]
|
| 350 |
+
#define repeat_char CUR Strings[121]
|
| 351 |
+
#define reset_1string CUR Strings[122]
|
| 352 |
+
#define reset_2string CUR Strings[123]
|
| 353 |
+
#define reset_3string CUR Strings[124]
|
| 354 |
+
#define reset_file CUR Strings[125]
|
| 355 |
+
#define restore_cursor CUR Strings[126]
|
| 356 |
+
#define row_address CUR Strings[127]
|
| 357 |
+
#define save_cursor CUR Strings[128]
|
| 358 |
+
#define scroll_forward CUR Strings[129]
|
| 359 |
+
#define scroll_reverse CUR Strings[130]
|
| 360 |
+
#define set_attributes CUR Strings[131]
|
| 361 |
+
#define set_tab CUR Strings[132]
|
| 362 |
+
#define set_window CUR Strings[133]
|
| 363 |
+
#define tab CUR Strings[134]
|
| 364 |
+
#define to_status_line CUR Strings[135]
|
| 365 |
+
#define underline_char CUR Strings[136]
|
| 366 |
+
#define up_half_line CUR Strings[137]
|
| 367 |
+
#define init_prog CUR Strings[138]
|
| 368 |
+
#define key_a1 CUR Strings[139]
|
| 369 |
+
#define key_a3 CUR Strings[140]
|
| 370 |
+
#define key_b2 CUR Strings[141]
|
| 371 |
+
#define key_c1 CUR Strings[142]
|
| 372 |
+
#define key_c3 CUR Strings[143]
|
| 373 |
+
#define prtr_non CUR Strings[144]
|
| 374 |
+
#define char_padding CUR Strings[145]
|
| 375 |
+
#define acs_chars CUR Strings[146]
|
| 376 |
+
#define plab_norm CUR Strings[147]
|
| 377 |
+
#define key_btab CUR Strings[148]
|
| 378 |
+
#define enter_xon_mode CUR Strings[149]
|
| 379 |
+
#define exit_xon_mode CUR Strings[150]
|
| 380 |
+
#define enter_am_mode CUR Strings[151]
|
| 381 |
+
#define exit_am_mode CUR Strings[152]
|
| 382 |
+
#define xon_character CUR Strings[153]
|
| 383 |
+
#define xoff_character CUR Strings[154]
|
| 384 |
+
#define ena_acs CUR Strings[155]
|
| 385 |
+
#define label_on CUR Strings[156]
|
| 386 |
+
#define label_off CUR Strings[157]
|
| 387 |
+
#define key_beg CUR Strings[158]
|
| 388 |
+
#define key_cancel CUR Strings[159]
|
| 389 |
+
#define key_close CUR Strings[160]
|
| 390 |
+
#define key_command CUR Strings[161]
|
| 391 |
+
#define key_copy CUR Strings[162]
|
| 392 |
+
#define key_create CUR Strings[163]
|
| 393 |
+
#define key_end CUR Strings[164]
|
| 394 |
+
#define key_enter CUR Strings[165]
|
| 395 |
+
#define key_exit CUR Strings[166]
|
| 396 |
+
#define key_find CUR Strings[167]
|
| 397 |
+
#define key_help CUR Strings[168]
|
| 398 |
+
#define key_mark CUR Strings[169]
|
| 399 |
+
#define key_message CUR Strings[170]
|
| 400 |
+
#define key_move CUR Strings[171]
|
| 401 |
+
#define key_next CUR Strings[172]
|
| 402 |
+
#define key_open CUR Strings[173]
|
| 403 |
+
#define key_options CUR Strings[174]
|
| 404 |
+
#define key_previous CUR Strings[175]
|
| 405 |
+
#define key_print CUR Strings[176]
|
| 406 |
+
#define key_redo CUR Strings[177]
|
| 407 |
+
#define key_reference CUR Strings[178]
|
| 408 |
+
#define key_refresh CUR Strings[179]
|
| 409 |
+
#define key_replace CUR Strings[180]
|
| 410 |
+
#define key_restart CUR Strings[181]
|
| 411 |
+
#define key_resume CUR Strings[182]
|
| 412 |
+
#define key_save CUR Strings[183]
|
| 413 |
+
#define key_suspend CUR Strings[184]
|
| 414 |
+
#define key_undo CUR Strings[185]
|
| 415 |
+
#define key_sbeg CUR Strings[186]
|
| 416 |
+
#define key_scancel CUR Strings[187]
|
| 417 |
+
#define key_scommand CUR Strings[188]
|
| 418 |
+
#define key_scopy CUR Strings[189]
|
| 419 |
+
#define key_screate CUR Strings[190]
|
| 420 |
+
#define key_sdc CUR Strings[191]
|
| 421 |
+
#define key_sdl CUR Strings[192]
|
| 422 |
+
#define key_select CUR Strings[193]
|
| 423 |
+
#define key_send CUR Strings[194]
|
| 424 |
+
#define key_seol CUR Strings[195]
|
| 425 |
+
#define key_sexit CUR Strings[196]
|
| 426 |
+
#define key_sfind CUR Strings[197]
|
| 427 |
+
#define key_shelp CUR Strings[198]
|
| 428 |
+
#define key_shome CUR Strings[199]
|
| 429 |
+
#define key_sic CUR Strings[200]
|
| 430 |
+
#define key_sleft CUR Strings[201]
|
| 431 |
+
#define key_smessage CUR Strings[202]
|
| 432 |
+
#define key_smove CUR Strings[203]
|
| 433 |
+
#define key_snext CUR Strings[204]
|
| 434 |
+
#define key_soptions CUR Strings[205]
|
| 435 |
+
#define key_sprevious CUR Strings[206]
|
| 436 |
+
#define key_sprint CUR Strings[207]
|
| 437 |
+
#define key_sredo CUR Strings[208]
|
| 438 |
+
#define key_sreplace CUR Strings[209]
|
| 439 |
+
#define key_sright CUR Strings[210]
|
| 440 |
+
#define key_srsume CUR Strings[211]
|
| 441 |
+
#define key_ssave CUR Strings[212]
|
| 442 |
+
#define key_ssuspend CUR Strings[213]
|
| 443 |
+
#define key_sundo CUR Strings[214]
|
| 444 |
+
#define req_for_input CUR Strings[215]
|
| 445 |
+
#define key_f11 CUR Strings[216]
|
| 446 |
+
#define key_f12 CUR Strings[217]
|
| 447 |
+
#define key_f13 CUR Strings[218]
|
| 448 |
+
#define key_f14 CUR Strings[219]
|
| 449 |
+
#define key_f15 CUR Strings[220]
|
| 450 |
+
#define key_f16 CUR Strings[221]
|
| 451 |
+
#define key_f17 CUR Strings[222]
|
| 452 |
+
#define key_f18 CUR Strings[223]
|
| 453 |
+
#define key_f19 CUR Strings[224]
|
| 454 |
+
#define key_f20 CUR Strings[225]
|
| 455 |
+
#define key_f21 CUR Strings[226]
|
| 456 |
+
#define key_f22 CUR Strings[227]
|
| 457 |
+
#define key_f23 CUR Strings[228]
|
| 458 |
+
#define key_f24 CUR Strings[229]
|
| 459 |
+
#define key_f25 CUR Strings[230]
|
| 460 |
+
#define key_f26 CUR Strings[231]
|
| 461 |
+
#define key_f27 CUR Strings[232]
|
| 462 |
+
#define key_f28 CUR Strings[233]
|
| 463 |
+
#define key_f29 CUR Strings[234]
|
| 464 |
+
#define key_f30 CUR Strings[235]
|
| 465 |
+
#define key_f31 CUR Strings[236]
|
| 466 |
+
#define key_f32 CUR Strings[237]
|
| 467 |
+
#define key_f33 CUR Strings[238]
|
| 468 |
+
#define key_f34 CUR Strings[239]
|
| 469 |
+
#define key_f35 CUR Strings[240]
|
| 470 |
+
#define key_f36 CUR Strings[241]
|
| 471 |
+
#define key_f37 CUR Strings[242]
|
| 472 |
+
#define key_f38 CUR Strings[243]
|
| 473 |
+
#define key_f39 CUR Strings[244]
|
| 474 |
+
#define key_f40 CUR Strings[245]
|
| 475 |
+
#define key_f41 CUR Strings[246]
|
| 476 |
+
#define key_f42 CUR Strings[247]
|
| 477 |
+
#define key_f43 CUR Strings[248]
|
| 478 |
+
#define key_f44 CUR Strings[249]
|
| 479 |
+
#define key_f45 CUR Strings[250]
|
| 480 |
+
#define key_f46 CUR Strings[251]
|
| 481 |
+
#define key_f47 CUR Strings[252]
|
| 482 |
+
#define key_f48 CUR Strings[253]
|
| 483 |
+
#define key_f49 CUR Strings[254]
|
| 484 |
+
#define key_f50 CUR Strings[255]
|
| 485 |
+
#define key_f51 CUR Strings[256]
|
| 486 |
+
#define key_f52 CUR Strings[257]
|
| 487 |
+
#define key_f53 CUR Strings[258]
|
| 488 |
+
#define key_f54 CUR Strings[259]
|
| 489 |
+
#define key_f55 CUR Strings[260]
|
| 490 |
+
#define key_f56 CUR Strings[261]
|
| 491 |
+
#define key_f57 CUR Strings[262]
|
| 492 |
+
#define key_f58 CUR Strings[263]
|
| 493 |
+
#define key_f59 CUR Strings[264]
|
| 494 |
+
#define key_f60 CUR Strings[265]
|
| 495 |
+
#define key_f61 CUR Strings[266]
|
| 496 |
+
#define key_f62 CUR Strings[267]
|
| 497 |
+
#define key_f63 CUR Strings[268]
|
| 498 |
+
#define clr_bol CUR Strings[269]
|
| 499 |
+
#define clear_margins CUR Strings[270]
|
| 500 |
+
#define set_left_margin CUR Strings[271]
|
| 501 |
+
#define set_right_margin CUR Strings[272]
|
| 502 |
+
#define label_format CUR Strings[273]
|
| 503 |
+
#define set_clock CUR Strings[274]
|
| 504 |
+
#define display_clock CUR Strings[275]
|
| 505 |
+
#define remove_clock CUR Strings[276]
|
| 506 |
+
#define create_window CUR Strings[277]
|
| 507 |
+
#define goto_window CUR Strings[278]
|
| 508 |
+
#define hangup CUR Strings[279]
|
| 509 |
+
#define dial_phone CUR Strings[280]
|
| 510 |
+
#define quick_dial CUR Strings[281]
|
| 511 |
+
#define tone CUR Strings[282]
|
| 512 |
+
#define pulse CUR Strings[283]
|
| 513 |
+
#define flash_hook CUR Strings[284]
|
| 514 |
+
#define fixed_pause CUR Strings[285]
|
| 515 |
+
#define wait_tone CUR Strings[286]
|
| 516 |
+
#define user0 CUR Strings[287]
|
| 517 |
+
#define user1 CUR Strings[288]
|
| 518 |
+
#define user2 CUR Strings[289]
|
| 519 |
+
#define user3 CUR Strings[290]
|
| 520 |
+
#define user4 CUR Strings[291]
|
| 521 |
+
#define user5 CUR Strings[292]
|
| 522 |
+
#define user6 CUR Strings[293]
|
| 523 |
+
#define user7 CUR Strings[294]
|
| 524 |
+
#define user8 CUR Strings[295]
|
| 525 |
+
#define user9 CUR Strings[296]
|
| 526 |
+
#define orig_pair CUR Strings[297]
|
| 527 |
+
#define orig_colors CUR Strings[298]
|
| 528 |
+
#define initialize_color CUR Strings[299]
|
| 529 |
+
#define initialize_pair CUR Strings[300]
|
| 530 |
+
#define set_color_pair CUR Strings[301]
|
| 531 |
+
#define set_foreground CUR Strings[302]
|
| 532 |
+
#define set_background CUR Strings[303]
|
| 533 |
+
#define change_char_pitch CUR Strings[304]
|
| 534 |
+
#define change_line_pitch CUR Strings[305]
|
| 535 |
+
#define change_res_horz CUR Strings[306]
|
| 536 |
+
#define change_res_vert CUR Strings[307]
|
| 537 |
+
#define define_char CUR Strings[308]
|
| 538 |
+
#define enter_doublewide_mode CUR Strings[309]
|
| 539 |
+
#define enter_draft_quality CUR Strings[310]
|
| 540 |
+
#define enter_italics_mode CUR Strings[311]
|
| 541 |
+
#define enter_leftward_mode CUR Strings[312]
|
| 542 |
+
#define enter_micro_mode CUR Strings[313]
|
| 543 |
+
#define enter_near_letter_quality CUR Strings[314]
|
| 544 |
+
#define enter_normal_quality CUR Strings[315]
|
| 545 |
+
#define enter_shadow_mode CUR Strings[316]
|
| 546 |
+
#define enter_subscript_mode CUR Strings[317]
|
| 547 |
+
#define enter_superscript_mode CUR Strings[318]
|
| 548 |
+
#define enter_upward_mode CUR Strings[319]
|
| 549 |
+
#define exit_doublewide_mode CUR Strings[320]
|
| 550 |
+
#define exit_italics_mode CUR Strings[321]
|
| 551 |
+
#define exit_leftward_mode CUR Strings[322]
|
| 552 |
+
#define exit_micro_mode CUR Strings[323]
|
| 553 |
+
#define exit_shadow_mode CUR Strings[324]
|
| 554 |
+
#define exit_subscript_mode CUR Strings[325]
|
| 555 |
+
#define exit_superscript_mode CUR Strings[326]
|
| 556 |
+
#define exit_upward_mode CUR Strings[327]
|
| 557 |
+
#define micro_column_address CUR Strings[328]
|
| 558 |
+
#define micro_down CUR Strings[329]
|
| 559 |
+
#define micro_left CUR Strings[330]
|
| 560 |
+
#define micro_right CUR Strings[331]
|
| 561 |
+
#define micro_row_address CUR Strings[332]
|
| 562 |
+
#define micro_up CUR Strings[333]
|
| 563 |
+
#define order_of_pins CUR Strings[334]
|
| 564 |
+
#define parm_down_micro CUR Strings[335]
|
| 565 |
+
#define parm_left_micro CUR Strings[336]
|
| 566 |
+
#define parm_right_micro CUR Strings[337]
|
| 567 |
+
#define parm_up_micro CUR Strings[338]
|
| 568 |
+
#define select_char_set CUR Strings[339]
|
| 569 |
+
#define set_bottom_margin CUR Strings[340]
|
| 570 |
+
#define set_bottom_margin_parm CUR Strings[341]
|
| 571 |
+
#define set_left_margin_parm CUR Strings[342]
|
| 572 |
+
#define set_right_margin_parm CUR Strings[343]
|
| 573 |
+
#define set_top_margin CUR Strings[344]
|
| 574 |
+
#define set_top_margin_parm CUR Strings[345]
|
| 575 |
+
#define start_bit_image CUR Strings[346]
|
| 576 |
+
#define start_char_set_def CUR Strings[347]
|
| 577 |
+
#define stop_bit_image CUR Strings[348]
|
| 578 |
+
#define stop_char_set_def CUR Strings[349]
|
| 579 |
+
#define subscript_characters CUR Strings[350]
|
| 580 |
+
#define superscript_characters CUR Strings[351]
|
| 581 |
+
#define these_cause_cr CUR Strings[352]
|
| 582 |
+
#define zero_motion CUR Strings[353]
|
| 583 |
+
#define char_set_names CUR Strings[354]
|
| 584 |
+
#define key_mouse CUR Strings[355]
|
| 585 |
+
#define mouse_info CUR Strings[356]
|
| 586 |
+
#define req_mouse_pos CUR Strings[357]
|
| 587 |
+
#define get_mouse CUR Strings[358]
|
| 588 |
+
#define set_a_foreground CUR Strings[359]
|
| 589 |
+
#define set_a_background CUR Strings[360]
|
| 590 |
+
#define pkey_plab CUR Strings[361]
|
| 591 |
+
#define device_type CUR Strings[362]
|
| 592 |
+
#define code_set_init CUR Strings[363]
|
| 593 |
+
#define set0_des_seq CUR Strings[364]
|
| 594 |
+
#define set1_des_seq CUR Strings[365]
|
| 595 |
+
#define set2_des_seq CUR Strings[366]
|
| 596 |
+
#define set3_des_seq CUR Strings[367]
|
| 597 |
+
#define set_lr_margin CUR Strings[368]
|
| 598 |
+
#define set_tb_margin CUR Strings[369]
|
| 599 |
+
#define bit_image_repeat CUR Strings[370]
|
| 600 |
+
#define bit_image_newline CUR Strings[371]
|
| 601 |
+
#define bit_image_carriage_return CUR Strings[372]
|
| 602 |
+
#define color_names CUR Strings[373]
|
| 603 |
+
#define define_bit_image_region CUR Strings[374]
|
| 604 |
+
#define end_bit_image_region CUR Strings[375]
|
| 605 |
+
#define set_color_band CUR Strings[376]
|
| 606 |
+
#define set_page_length CUR Strings[377]
|
| 607 |
+
#define display_pc_char CUR Strings[378]
|
| 608 |
+
#define enter_pc_charset_mode CUR Strings[379]
|
| 609 |
+
#define exit_pc_charset_mode CUR Strings[380]
|
| 610 |
+
#define enter_scancode_mode CUR Strings[381]
|
| 611 |
+
#define exit_scancode_mode CUR Strings[382]
|
| 612 |
+
#define pc_term_options CUR Strings[383]
|
| 613 |
+
#define scancode_escape CUR Strings[384]
|
| 614 |
+
#define alt_scancode_esc CUR Strings[385]
|
| 615 |
+
#define enter_horizontal_hl_mode CUR Strings[386]
|
| 616 |
+
#define enter_left_hl_mode CUR Strings[387]
|
| 617 |
+
#define enter_low_hl_mode CUR Strings[388]
|
| 618 |
+
#define enter_right_hl_mode CUR Strings[389]
|
| 619 |
+
#define enter_top_hl_mode CUR Strings[390]
|
| 620 |
+
#define enter_vertical_hl_mode CUR Strings[391]
|
| 621 |
+
#define set_a_attributes CUR Strings[392]
|
| 622 |
+
#define set_pglen_inch CUR Strings[393]
|
| 623 |
+
|
| 624 |
+
#define BOOLWRITE 37
|
| 625 |
+
#define NUMWRITE 33
|
| 626 |
+
#define STRWRITE 394
|
| 627 |
+
|
| 628 |
+
/* older synonyms for some capabilities */
|
| 629 |
+
#define beehive_glitch no_esc_ctlc
|
| 630 |
+
#define teleray_glitch dest_tabs_magic_smso
|
| 631 |
+
|
| 632 |
+
/* HPUX-11 uses this name rather than the standard one */
|
| 633 |
+
#ifndef micro_char_size
|
| 634 |
+
#define micro_char_size micro_col_size
|
| 635 |
+
#endif
|
| 636 |
+
|
| 637 |
+
#ifdef __INTERNAL_CAPS_VISIBLE
|
| 638 |
+
#define termcap_init2 CUR Strings[394]
|
| 639 |
+
#define termcap_reset CUR Strings[395]
|
| 640 |
+
#define magic_cookie_glitch_ul CUR Numbers[33]
|
| 641 |
+
#define backspaces_with_bs CUR Booleans[37]
|
| 642 |
+
#define crt_no_scrolling CUR Booleans[38]
|
| 643 |
+
#define no_correctly_working_cr CUR Booleans[39]
|
| 644 |
+
#define carriage_return_delay CUR Numbers[34]
|
| 645 |
+
#define new_line_delay CUR Numbers[35]
|
| 646 |
+
#define linefeed_if_not_lf CUR Strings[396]
|
| 647 |
+
#define backspace_if_not_bs CUR Strings[397]
|
| 648 |
+
#define gnu_has_meta_key CUR Booleans[40]
|
| 649 |
+
#define linefeed_is_newline CUR Booleans[41]
|
| 650 |
+
#define backspace_delay CUR Numbers[36]
|
| 651 |
+
#define horizontal_tab_delay CUR Numbers[37]
|
| 652 |
+
#define number_of_function_keys CUR Numbers[38]
|
| 653 |
+
#define other_non_function_keys CUR Strings[398]
|
| 654 |
+
#define arrow_key_map CUR Strings[399]
|
| 655 |
+
#define has_hardware_tabs CUR Booleans[42]
|
| 656 |
+
#define return_does_clr_eol CUR Booleans[43]
|
| 657 |
+
#define acs_ulcorner CUR Strings[400]
|
| 658 |
+
#define acs_llcorner CUR Strings[401]
|
| 659 |
+
#define acs_urcorner CUR Strings[402]
|
| 660 |
+
#define acs_lrcorner CUR Strings[403]
|
| 661 |
+
#define acs_ltee CUR Strings[404]
|
| 662 |
+
#define acs_rtee CUR Strings[405]
|
| 663 |
+
#define acs_btee CUR Strings[406]
|
| 664 |
+
#define acs_ttee CUR Strings[407]
|
| 665 |
+
#define acs_hline CUR Strings[408]
|
| 666 |
+
#define acs_vline CUR Strings[409]
|
| 667 |
+
#define acs_plus CUR Strings[410]
|
| 668 |
+
#define memory_lock CUR Strings[411]
|
| 669 |
+
#define memory_unlock CUR Strings[412]
|
| 670 |
+
#define box_chars_1 CUR Strings[413]
|
| 671 |
+
#endif /* __INTERNAL_CAPS_VISIBLE */
|
| 672 |
+
|
| 673 |
+
|
| 674 |
+
/*
|
| 675 |
+
* Predefined terminfo array sizes
|
| 676 |
+
*/
|
| 677 |
+
#define BOOLCOUNT 44
|
| 678 |
+
#define NUMCOUNT 39
|
| 679 |
+
#define STRCOUNT 414
|
| 680 |
+
|
| 681 |
+
/* used by code for comparing entries */
|
| 682 |
+
#define acs_chars_index 146
|
| 683 |
+
|
| 684 |
+
typedef struct termtype { /* in-core form of terminfo data */
|
| 685 |
+
char *term_names; /* str_table offset of term names */
|
| 686 |
+
char *str_table; /* pointer to string table */
|
| 687 |
+
NCURSES_SBOOL *Booleans; /* array of boolean values */
|
| 688 |
+
short *Numbers; /* array of integer values */
|
| 689 |
+
char **Strings; /* array of string offsets */
|
| 690 |
+
|
| 691 |
+
#if NCURSES_XNAMES
|
| 692 |
+
char *ext_str_table; /* pointer to extended string table */
|
| 693 |
+
char **ext_Names; /* corresponding names */
|
| 694 |
+
|
| 695 |
+
unsigned short num_Booleans;/* count total Booleans */
|
| 696 |
+
unsigned short num_Numbers; /* count total Numbers */
|
| 697 |
+
unsigned short num_Strings; /* count total Strings */
|
| 698 |
+
|
| 699 |
+
unsigned short ext_Booleans;/* count extensions to Booleans */
|
| 700 |
+
unsigned short ext_Numbers; /* count extensions to Numbers */
|
| 701 |
+
unsigned short ext_Strings; /* count extensions to Strings */
|
| 702 |
+
#endif /* NCURSES_XNAMES */
|
| 703 |
+
|
| 704 |
+
} TERMTYPE;
|
| 705 |
+
|
| 706 |
+
/*
|
| 707 |
+
* The only reason these structures are visible is for read-only use.
|
| 708 |
+
* Programs which modify the data are not, never were, portable across
|
| 709 |
+
* curses implementations.
|
| 710 |
+
*
|
| 711 |
+
* The first field in TERMINAL is used in macros.
|
| 712 |
+
* The remaining fields are private.
|
| 713 |
+
*/
|
| 714 |
+
#ifdef NCURSES_INTERNALS
|
| 715 |
+
|
| 716 |
+
#undef TERMINAL
|
| 717 |
+
#define TERMINAL struct term
|
| 718 |
+
TERMINAL;
|
| 719 |
+
|
| 720 |
+
typedef struct termtype2 { /* in-core form of terminfo data */
|
| 721 |
+
char *term_names; /* str_table offset of term names */
|
| 722 |
+
char *str_table; /* pointer to string table */
|
| 723 |
+
NCURSES_SBOOL *Booleans; /* array of boolean values */
|
| 724 |
+
int *Numbers; /* array of integer values */
|
| 725 |
+
char **Strings; /* array of string offsets */
|
| 726 |
+
|
| 727 |
+
#if NCURSES_XNAMES
|
| 728 |
+
char *ext_str_table; /* pointer to extended string table */
|
| 729 |
+
char **ext_Names; /* corresponding names */
|
| 730 |
+
|
| 731 |
+
unsigned short num_Booleans;/* count total Booleans */
|
| 732 |
+
unsigned short num_Numbers; /* count total Numbers */
|
| 733 |
+
unsigned short num_Strings; /* count total Strings */
|
| 734 |
+
|
| 735 |
+
unsigned short ext_Booleans;/* count extensions to Booleans */
|
| 736 |
+
unsigned short ext_Numbers; /* count extensions to Numbers */
|
| 737 |
+
unsigned short ext_Strings; /* count extensions to Strings */
|
| 738 |
+
#endif /* NCURSES_XNAMES */
|
| 739 |
+
|
| 740 |
+
} TERMTYPE2;
|
| 741 |
+
#else
|
| 742 |
+
|
| 743 |
+
typedef struct term { /* describe an actual terminal */
|
| 744 |
+
TERMTYPE type; /* terminal type description */
|
| 745 |
+
} TERMINAL;
|
| 746 |
+
|
| 747 |
+
#endif /* NCURSES_INTERNALS */
|
| 748 |
+
|
| 749 |
+
|
| 750 |
+
#if 0 && !0
|
| 751 |
+
extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;
|
| 752 |
+
#elif 0
|
| 753 |
+
NCURSES_WRAPPED_VAR(TERMINAL *, cur_term);
|
| 754 |
+
#define cur_term NCURSES_PUBLIC_VAR(cur_term())
|
| 755 |
+
#else
|
| 756 |
+
extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;
|
| 757 |
+
#endif
|
| 758 |
+
|
| 759 |
+
#if 0 || 0
|
| 760 |
+
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolnames);
|
| 761 |
+
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolcodes);
|
| 762 |
+
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolfnames);
|
| 763 |
+
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numnames);
|
| 764 |
+
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numcodes);
|
| 765 |
+
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numfnames);
|
| 766 |
+
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strnames);
|
| 767 |
+
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strcodes);
|
| 768 |
+
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strfnames);
|
| 769 |
+
|
| 770 |
+
#define boolnames NCURSES_PUBLIC_VAR(boolnames())
|
| 771 |
+
#define boolcodes NCURSES_PUBLIC_VAR(boolcodes())
|
| 772 |
+
#define boolfnames NCURSES_PUBLIC_VAR(boolfnames())
|
| 773 |
+
#define numnames NCURSES_PUBLIC_VAR(numnames())
|
| 774 |
+
#define numcodes NCURSES_PUBLIC_VAR(numcodes())
|
| 775 |
+
#define numfnames NCURSES_PUBLIC_VAR(numfnames())
|
| 776 |
+
#define strnames NCURSES_PUBLIC_VAR(strnames())
|
| 777 |
+
#define strcodes NCURSES_PUBLIC_VAR(strcodes())
|
| 778 |
+
#define strfnames NCURSES_PUBLIC_VAR(strfnames())
|
| 779 |
+
|
| 780 |
+
#else
|
| 781 |
+
|
| 782 |
+
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolnames[];
|
| 783 |
+
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[];
|
| 784 |
+
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolfnames[];
|
| 785 |
+
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numnames[];
|
| 786 |
+
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numcodes[];
|
| 787 |
+
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numfnames[];
|
| 788 |
+
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strnames[];
|
| 789 |
+
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strcodes[];
|
| 790 |
+
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strfnames[];
|
| 791 |
+
|
| 792 |
+
#endif
|
| 793 |
+
|
| 794 |
+
/*
|
| 795 |
+
* These entrypoints are used only by the ncurses utilities such as tic.
|
| 796 |
+
*/
|
| 797 |
+
#ifdef NCURSES_INTERNALS
|
| 798 |
+
|
| 799 |
+
extern NCURSES_EXPORT(int) _nc_set_tty_mode (TTY *buf);
|
| 800 |
+
extern NCURSES_EXPORT(int) _nc_read_entry2 (const char * const, char * const, TERMTYPE2 *const);
|
| 801 |
+
extern NCURSES_EXPORT(int) _nc_read_file_entry (const char *const, TERMTYPE2 *);
|
| 802 |
+
extern NCURSES_EXPORT(int) _nc_read_termtype (TERMTYPE2 *, char *, int);
|
| 803 |
+
extern NCURSES_EXPORT(char *) _nc_first_name (const char *const);
|
| 804 |
+
extern NCURSES_EXPORT(int) _nc_name_match (const char *const, const char *const, const char *const);
|
| 805 |
+
extern NCURSES_EXPORT(char *) _nc_tiparm(int, const char *, ...);
|
| 806 |
+
extern NCURSES_EXPORT(const TERMTYPE *) _nc_fallback (const char *);
|
| 807 |
+
extern NCURSES_EXPORT(int) _nc_read_entry (const char * const, char * const, TERMTYPE *const);
|
| 808 |
+
|
| 809 |
+
#endif /* NCURSES_INTERNALS */
|
| 810 |
+
|
| 811 |
+
/*
|
| 812 |
+
* Normal entry points
|
| 813 |
+
*/
|
| 814 |
+
extern NCURSES_EXPORT(TERMINAL *) set_curterm (TERMINAL *);
|
| 815 |
+
extern NCURSES_EXPORT(int) del_curterm (TERMINAL *);
|
| 816 |
+
|
| 817 |
+
/* miscellaneous entry points */
|
| 818 |
+
extern NCURSES_EXPORT(int) restartterm (NCURSES_CONST char *, int, int *);
|
| 819 |
+
extern NCURSES_EXPORT(int) setupterm (const char *,int,int *);
|
| 820 |
+
|
| 821 |
+
/* terminfo entry points, also declared in curses.h */
|
| 822 |
+
#if !defined(__NCURSES_H)
|
| 823 |
+
extern NCURSES_EXPORT(char *) tigetstr (const char *);
|
| 824 |
+
extern NCURSES_EXPORT_VAR(char) ttytype[];
|
| 825 |
+
extern NCURSES_EXPORT(int) putp (const char *);
|
| 826 |
+
extern NCURSES_EXPORT(int) tigetflag (const char *);
|
| 827 |
+
extern NCURSES_EXPORT(int) tigetnum (const char *);
|
| 828 |
+
|
| 829 |
+
#if 1 /* NCURSES_TPARM_VARARGS */
|
| 830 |
+
extern NCURSES_EXPORT(char *) tparm (const char *, ...); /* special */
|
| 831 |
+
#else
|
| 832 |
+
extern NCURSES_EXPORT(char *) tparm (const char *, long,long,long,long,long,long,long,long,long); /* special */
|
| 833 |
+
#endif
|
| 834 |
+
|
| 835 |
+
extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */
|
| 836 |
+
extern NCURSES_EXPORT(char *) tiparm_s (int, int, const char *, ...); /* special */
|
| 837 |
+
extern NCURSES_EXPORT(int) tiscan_s (int *, int *, const char *); /* special */
|
| 838 |
+
|
| 839 |
+
#endif /* __NCURSES_H */
|
| 840 |
+
|
| 841 |
+
/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */
|
| 842 |
+
#if !defined(NCURSES_TERMCAP_H_incl)
|
| 843 |
+
extern NCURSES_EXPORT(char *) tgetstr (const char *, char **);
|
| 844 |
+
extern NCURSES_EXPORT(char *) tgoto (const char *, int, int);
|
| 845 |
+
extern NCURSES_EXPORT(int) tgetent (char *, const char *);
|
| 846 |
+
extern NCURSES_EXPORT(int) tgetflag (const char *);
|
| 847 |
+
extern NCURSES_EXPORT(int) tgetnum (const char *);
|
| 848 |
+
extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int));
|
| 849 |
+
#endif /* NCURSES_TERMCAP_H_incl */
|
| 850 |
+
|
| 851 |
+
/*
|
| 852 |
+
* Include curses.h before term.h to enable these extensions.
|
| 853 |
+
*/
|
| 854 |
+
#if defined(NCURSES_SP_FUNCS) && (NCURSES_SP_FUNCS != 0)
|
| 855 |
+
|
| 856 |
+
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tigetstr) (SCREEN*, const char *);
|
| 857 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(putp) (SCREEN*, const char *);
|
| 858 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetflag) (SCREEN*, const char *);
|
| 859 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetnum) (SCREEN*, const char *);
|
| 860 |
+
|
| 861 |
+
#if 1 /* NCURSES_TPARM_VARARGS */
|
| 862 |
+
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, const char *, ...); /* special */
|
| 863 |
+
#else
|
| 864 |
+
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, const char *, long,long,long,long,long,long,long,long,long); /* special */
|
| 865 |
+
#endif
|
| 866 |
+
|
| 867 |
+
/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */
|
| 868 |
+
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgetstr) (SCREEN*, const char *, char **);
|
| 869 |
+
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgoto) (SCREEN*, const char *, int, int);
|
| 870 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetent) (SCREEN*, char *, const char *);
|
| 871 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetflag) (SCREEN*, const char *);
|
| 872 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetnum) (SCREEN*, const char *);
|
| 873 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tputs) (SCREEN*, const char *, int, NCURSES_SP_OUTC);
|
| 874 |
+
|
| 875 |
+
extern NCURSES_EXPORT(TERMINAL *) NCURSES_SP_NAME(set_curterm) (SCREEN*, TERMINAL *);
|
| 876 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(del_curterm) (SCREEN*, TERMINAL *);
|
| 877 |
+
|
| 878 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(restartterm) (SCREEN*, NCURSES_CONST char *, int, int *);
|
| 879 |
+
#endif /* NCURSES_SP_FUNCS */
|
| 880 |
+
|
| 881 |
+
/*
|
| 882 |
+
* Debugging features.
|
| 883 |
+
*/
|
| 884 |
+
extern GCC_NORETURN NCURSES_EXPORT(void) exit_terminfo(int);
|
| 885 |
+
|
| 886 |
+
#ifdef __cplusplus
|
| 887 |
+
}
|
| 888 |
+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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/****************************************************************************
|
| 2 |
+
* Copyright 2018-2022,2023 Thomas E. Dickey *
|
| 3 |
+
* Copyright 1998-2015,2017 Free Software Foundation, Inc. *
|
| 4 |
+
* *
|
| 5 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 6 |
+
* copy of this software and associated documentation files (the *
|
| 7 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 8 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 9 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 10 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 11 |
+
* furnished to do so, subject to the following conditions: *
|
| 12 |
+
* *
|
| 13 |
+
* The above copyright notice and this permission notice shall be included *
|
| 14 |
+
* in all copies or substantial portions of the Software. *
|
| 15 |
+
* *
|
| 16 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 17 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 18 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 19 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 20 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 21 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 22 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 23 |
+
* *
|
| 24 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 25 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 26 |
+
* sale, use or other dealings in this Software without prior written *
|
| 27 |
+
* authorization. *
|
| 28 |
+
****************************************************************************/
|
| 29 |
+
|
| 30 |
+
/****************************************************************************
|
| 31 |
+
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
|
| 32 |
+
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
|
| 33 |
+
* and: Thomas E. Dickey 1998-on *
|
| 34 |
+
****************************************************************************/
|
| 35 |
+
|
| 36 |
+
/* $Id: term_entry.h,v 1.64 2023/04/22 13:37:14 tom Exp $ */
|
| 37 |
+
|
| 38 |
+
/*
|
| 39 |
+
* term_entry.h -- interface to entry-manipulation code
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
#ifndef NCURSES_TERM_ENTRY_H_incl
|
| 43 |
+
#define NCURSES_TERM_ENTRY_H_incl 1
|
| 44 |
+
/* *INDENT-OFF* */
|
| 45 |
+
|
| 46 |
+
#ifdef __cplusplus
|
| 47 |
+
extern "C" {
|
| 48 |
+
#endif
|
| 49 |
+
|
| 50 |
+
#include <ncursesw/curses.h>
|
| 51 |
+
#include <ncursesw/term.h>
|
| 52 |
+
|
| 53 |
+
/*
|
| 54 |
+
* These macros may be used by programs that know about TERMTYPE:
|
| 55 |
+
*/
|
| 56 |
+
#if NCURSES_XNAMES
|
| 57 |
+
#define NUM_BOOLEANS(tp) (tp)->num_Booleans
|
| 58 |
+
#define NUM_NUMBERS(tp) (tp)->num_Numbers
|
| 59 |
+
#define NUM_STRINGS(tp) (tp)->num_Strings
|
| 60 |
+
#define EXT_NAMES(tp,i,limit,index,table) (i >= limit) ? tp->ext_Names[index] : table[i]
|
| 61 |
+
#else
|
| 62 |
+
#define NUM_BOOLEANS(tp) BOOLCOUNT
|
| 63 |
+
#define NUM_NUMBERS(tp) NUMCOUNT
|
| 64 |
+
#define NUM_STRINGS(tp) STRCOUNT
|
| 65 |
+
#define EXT_NAMES(tp,i,limit,index,table) table[i]
|
| 66 |
+
#endif
|
| 67 |
+
|
| 68 |
+
#define NUM_EXT_NAMES(tp) (unsigned) ((tp)->ext_Booleans + (tp)->ext_Numbers + (tp)->ext_Strings)
|
| 69 |
+
|
| 70 |
+
#define for_each_boolean(n,tp) for(n = 0; n < NUM_BOOLEANS(tp); n++)
|
| 71 |
+
#define for_each_number(n,tp) for(n = 0; n < NUM_NUMBERS(tp); n++)
|
| 72 |
+
#define for_each_string(n,tp) for(n = 0; n < NUM_STRINGS(tp); n++)
|
| 73 |
+
|
| 74 |
+
#if NCURSES_XNAMES
|
| 75 |
+
#define for_each_ext_boolean(n,tp) for(n = BOOLCOUNT; (int) n < (int) NUM_BOOLEANS(tp); n++)
|
| 76 |
+
#define for_each_ext_number(n,tp) for(n = NUMCOUNT; (int) n < (int) NUM_NUMBERS(tp); n++)
|
| 77 |
+
#define for_each_ext_string(n,tp) for(n = STRCOUNT; (int) n < (int) NUM_STRINGS(tp); n++)
|
| 78 |
+
#endif
|
| 79 |
+
|
| 80 |
+
#define ExtBoolname(tp,i,names) EXT_NAMES(tp, i, BOOLCOUNT, (i - (tp->num_Booleans - tp->ext_Booleans)), names)
|
| 81 |
+
#define ExtNumname(tp,i,names) EXT_NAMES(tp, i, NUMCOUNT, (i - (tp->num_Numbers - tp->ext_Numbers)) + tp->ext_Booleans, names)
|
| 82 |
+
#define ExtStrname(tp,i,names) EXT_NAMES(tp, i, STRCOUNT, (i - (tp->num_Strings - tp->ext_Strings)) + (tp->ext_Numbers + tp->ext_Booleans), names)
|
| 83 |
+
|
| 84 |
+
/*
|
| 85 |
+
* The remaining type-definitions and macros are used only internally by the
|
| 86 |
+
* ncurses utilities.
|
| 87 |
+
*/
|
| 88 |
+
#ifdef NCURSES_INTERNALS
|
| 89 |
+
|
| 90 |
+
/*
|
| 91 |
+
* see db_iterator.c - this enumeration lists the places searched for a
|
| 92 |
+
* terminal description and defines the order in which they are searched.
|
| 93 |
+
*/
|
| 94 |
+
typedef enum {
|
| 95 |
+
dbdTIC = 0, /* special, used by tic when writing entry */
|
| 96 |
+
#if NCURSES_USE_DATABASE
|
| 97 |
+
dbdEnvOnce, /* the $TERMINFO environment variable */
|
| 98 |
+
dbdHome, /* $HOME/.terminfo */
|
| 99 |
+
dbdEnvList, /* the $TERMINFO_DIRS environment variable */
|
| 100 |
+
dbdCfgList, /* the compiled-in TERMINFO_DIRS value */
|
| 101 |
+
dbdCfgOnce, /* the compiled-in TERMINFO value */
|
| 102 |
+
#endif
|
| 103 |
+
#if NCURSES_USE_TERMCAP
|
| 104 |
+
dbdEnvOnce2, /* the $TERMCAP environment variable */
|
| 105 |
+
dbdEnvList2, /* the $TERMPATH environment variable */
|
| 106 |
+
dbdCfgList2, /* the compiled-in TERMPATH */
|
| 107 |
+
#endif
|
| 108 |
+
dbdLAST
|
| 109 |
+
} DBDIRS;
|
| 110 |
+
|
| 111 |
+
#define MAX_USES 32
|
| 112 |
+
#define MAX_CROSSLINKS 16
|
| 113 |
+
|
| 114 |
+
typedef struct entry ENTRY;
|
| 115 |
+
|
| 116 |
+
typedef struct {
|
| 117 |
+
char *name;
|
| 118 |
+
ENTRY *link;
|
| 119 |
+
long line;
|
| 120 |
+
} ENTRY_USES;
|
| 121 |
+
|
| 122 |
+
struct entry {
|
| 123 |
+
TERMTYPE2 tterm;
|
| 124 |
+
unsigned nuses;
|
| 125 |
+
ENTRY_USES uses[MAX_USES];
|
| 126 |
+
int ncrosslinks;
|
| 127 |
+
ENTRY *crosslinks[MAX_CROSSLINKS];
|
| 128 |
+
long cstart;
|
| 129 |
+
long cend;
|
| 130 |
+
long startline;
|
| 131 |
+
ENTRY *next;
|
| 132 |
+
ENTRY *last;
|
| 133 |
+
};
|
| 134 |
+
|
| 135 |
+
extern NCURSES_EXPORT_VAR(ENTRY *) _nc_head;
|
| 136 |
+
extern NCURSES_EXPORT_VAR(ENTRY *) _nc_tail;
|
| 137 |
+
#define for_entry_list(qp) for (qp = _nc_head; qp; qp = qp->next)
|
| 138 |
+
#define for_entry_list2(qp,q0) for (qp = q0; qp; qp = qp->next)
|
| 139 |
+
|
| 140 |
+
#define MAX_LINE 132
|
| 141 |
+
|
| 142 |
+
#define NULLHOOK (bool(*)(ENTRY *))0
|
| 143 |
+
|
| 144 |
+
/*
|
| 145 |
+
* Note that WANTED and PRESENT are not simple inverses! If a capability
|
| 146 |
+
* has been explicitly cancelled, it is not considered WANTED.
|
| 147 |
+
*/
|
| 148 |
+
#define WANTED(s) ((s) == ABSENT_STRING)
|
| 149 |
+
#define PRESENT(s) (((s) != ABSENT_STRING) && ((s) != CANCELLED_STRING))
|
| 150 |
+
|
| 151 |
+
#define ANDMISSING(p,q) \
|
| 152 |
+
{ \
|
| 153 |
+
if (PRESENT(p) && !PRESENT(q)) \
|
| 154 |
+
_nc_warning(#p " but no " #q); \
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
#define PAIRED(p,q) \
|
| 158 |
+
{ \
|
| 159 |
+
if (PRESENT(q) && !PRESENT(p)) \
|
| 160 |
+
_nc_warning(#q " but no " #p); \
|
| 161 |
+
if (PRESENT(p) && !PRESENT(q)) \
|
| 162 |
+
_nc_warning(#p " but no " #q); \
|
| 163 |
+
}
|
| 164 |
+
|
| 165 |
+
/*
|
| 166 |
+
* These entrypoints are used only by the ncurses utilities such as tic.
|
| 167 |
+
*/
|
| 168 |
+
|
| 169 |
+
/* alloc_entry.c: elementary allocation code */
|
| 170 |
+
extern NCURSES_EXPORT(ENTRY *) _nc_copy_entry (ENTRY *oldp);
|
| 171 |
+
extern NCURSES_EXPORT(char *) _nc_save_str (const char *const);
|
| 172 |
+
extern NCURSES_EXPORT(void) _nc_init_entry (ENTRY *const);
|
| 173 |
+
extern NCURSES_EXPORT(void) _nc_merge_entry (ENTRY *const, ENTRY *const);
|
| 174 |
+
extern NCURSES_EXPORT(void) _nc_wrap_entry (ENTRY *const, bool);
|
| 175 |
+
|
| 176 |
+
/* alloc_ttype.c: elementary allocation code */
|
| 177 |
+
extern NCURSES_EXPORT(void) _nc_align_termtype (TERMTYPE2 *, TERMTYPE2 *);
|
| 178 |
+
|
| 179 |
+
/* free_ttype.c: elementary allocation code */
|
| 180 |
+
extern NCURSES_EXPORT(void) _nc_free_termtype (TERMTYPE *);
|
| 181 |
+
extern NCURSES_EXPORT(void) _nc_free_termtype1 (TERMTYPE *);
|
| 182 |
+
extern NCURSES_EXPORT(void) _nc_free_termtype2 (TERMTYPE2 *);
|
| 183 |
+
|
| 184 |
+
/* lib_termcap.c: trim sgr0 string for termcap users */
|
| 185 |
+
extern NCURSES_EXPORT(char *) _nc_trim_sgr0 (TERMTYPE2 *);
|
| 186 |
+
|
| 187 |
+
/* parse_entry.c: entry-parsing code */
|
| 188 |
+
#if NCURSES_XNAMES
|
| 189 |
+
extern NCURSES_EXPORT_VAR(bool) _nc_user_definable;
|
| 190 |
+
extern NCURSES_EXPORT_VAR(bool) _nc_disable_period;
|
| 191 |
+
#endif
|
| 192 |
+
extern NCURSES_EXPORT(int) _nc_parse_entry (ENTRY *, int, bool);
|
| 193 |
+
extern NCURSES_EXPORT(int) _nc_capcmp (const char *, const char *);
|
| 194 |
+
|
| 195 |
+
/* write_entry.c: writing an entry to the file system */
|
| 196 |
+
extern NCURSES_EXPORT(void) _nc_set_writedir (const char *);
|
| 197 |
+
extern NCURSES_EXPORT(void) _nc_write_entry (TERMTYPE2 *const);
|
| 198 |
+
extern NCURSES_EXPORT(int) _nc_write_object (TERMTYPE2 *, char *, unsigned *, unsigned);
|
| 199 |
+
|
| 200 |
+
/* comp_parse.c: entry list handling */
|
| 201 |
+
extern NCURSES_EXPORT(void) _nc_read_entry_source (FILE*, char*, int, bool, bool (*)(ENTRY*));
|
| 202 |
+
extern NCURSES_EXPORT(bool) _nc_entry_match (char *, char *);
|
| 203 |
+
extern NCURSES_EXPORT(int) _nc_resolve_uses (bool); /* obs 20040705 */
|
| 204 |
+
extern NCURSES_EXPORT(int) _nc_resolve_uses2 (bool, bool);
|
| 205 |
+
extern NCURSES_EXPORT(void) _nc_free_entries (ENTRY *);
|
| 206 |
+
extern NCURSES_IMPEXP void (NCURSES_API *_nc_check_termtype)(TERMTYPE *); /* obs 20040705 */
|
| 207 |
+
extern NCURSES_IMPEXP void (NCURSES_API *_nc_check_termtype2)(TERMTYPE2 *, bool);
|
| 208 |
+
|
| 209 |
+
/* trace_xnames.c */
|
| 210 |
+
extern NCURSES_EXPORT(void) _nc_trace_xnames (TERMTYPE *);
|
| 211 |
+
|
| 212 |
+
#endif /* NCURSES_INTERNALS */
|
| 213 |
+
|
| 214 |
+
#ifdef __cplusplus
|
| 215 |
+
}
|
| 216 |
+
#endif
|
| 217 |
+
|
| 218 |
+
/* *INDENT-ON* */
|
| 219 |
+
|
| 220 |
+
#endif /* NCURSES_TERM_ENTRY_H_incl */
|
miniconda3/envs/active_proaction/include/ncursesw/termcap.h
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/****************************************************************************
|
| 2 |
+
* Copyright 2018-2020,2021 Thomas E. Dickey *
|
| 3 |
+
* Copyright 1998-2000,2001 Free Software Foundation, Inc. *
|
| 4 |
+
* *
|
| 5 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 6 |
+
* copy of this software and associated documentation files (the *
|
| 7 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 8 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 9 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 10 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 11 |
+
* furnished to do so, subject to the following conditions: *
|
| 12 |
+
* *
|
| 13 |
+
* The above copyright notice and this permission notice shall be included *
|
| 14 |
+
* in all copies or substantial portions of the Software. *
|
| 15 |
+
* *
|
| 16 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 17 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 18 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 19 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 20 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 21 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 22 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 23 |
+
* *
|
| 24 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 25 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 26 |
+
* sale, use or other dealings in this Software without prior written *
|
| 27 |
+
* authorization. *
|
| 28 |
+
****************************************************************************/
|
| 29 |
+
|
| 30 |
+
/****************************************************************************
|
| 31 |
+
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
|
| 32 |
+
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
|
| 33 |
+
****************************************************************************/
|
| 34 |
+
|
| 35 |
+
/* $Id: termcap.h.in,v 1.20 2021/06/17 21:26:02 tom Exp $ */
|
| 36 |
+
|
| 37 |
+
#ifndef NCURSES_TERMCAP_H_incl
|
| 38 |
+
#define NCURSES_TERMCAP_H_incl 1
|
| 39 |
+
|
| 40 |
+
#undef NCURSES_VERSION
|
| 41 |
+
#define NCURSES_VERSION "6.5"
|
| 42 |
+
|
| 43 |
+
#include <ncursesw/ncurses_dll.h>
|
| 44 |
+
|
| 45 |
+
#ifdef __cplusplus
|
| 46 |
+
extern "C"
|
| 47 |
+
{
|
| 48 |
+
#endif /* __cplusplus */
|
| 49 |
+
|
| 50 |
+
#include <sys/types.h>
|
| 51 |
+
|
| 52 |
+
#undef NCURSES_OSPEED
|
| 53 |
+
#define NCURSES_OSPEED short
|
| 54 |
+
|
| 55 |
+
extern NCURSES_EXPORT_VAR(char) PC;
|
| 56 |
+
extern NCURSES_EXPORT_VAR(char *) UP;
|
| 57 |
+
extern NCURSES_EXPORT_VAR(char *) BC;
|
| 58 |
+
extern NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed;
|
| 59 |
+
|
| 60 |
+
#if !defined(NCURSES_TERM_H_incl)
|
| 61 |
+
extern NCURSES_EXPORT(char *) tgetstr (const char *, char **);
|
| 62 |
+
extern NCURSES_EXPORT(char *) tgoto (const char *, int, int);
|
| 63 |
+
extern NCURSES_EXPORT(int) tgetent (char *, const char *);
|
| 64 |
+
extern NCURSES_EXPORT(int) tgetflag (const char *);
|
| 65 |
+
extern NCURSES_EXPORT(int) tgetnum (const char *);
|
| 66 |
+
extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int));
|
| 67 |
+
#endif
|
| 68 |
+
|
| 69 |
+
#ifdef __cplusplus
|
| 70 |
+
}
|
| 71 |
+
#endif
|
| 72 |
+
|
| 73 |
+
#endif /* NCURSES_TERMCAP_H_incl */
|
miniconda3/envs/active_proaction/include/ncursesw/unctrl.h
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/****************************************************************************
|
| 2 |
+
* Copyright 2020 Thomas E. Dickey *
|
| 3 |
+
* Copyright 1998-2001,2009 Free Software Foundation, Inc. *
|
| 4 |
+
* *
|
| 5 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 6 |
+
* copy of this software and associated documentation files (the *
|
| 7 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 8 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 9 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 10 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 11 |
+
* furnished to do so, subject to the following conditions: *
|
| 12 |
+
* *
|
| 13 |
+
* The above copyright notice and this permission notice shall be included *
|
| 14 |
+
* in all copies or substantial portions of the Software. *
|
| 15 |
+
* *
|
| 16 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 17 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 18 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 19 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 20 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 21 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 22 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 23 |
+
* *
|
| 24 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 25 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 26 |
+
* sale, use or other dealings in this Software without prior written *
|
| 27 |
+
* authorization. *
|
| 28 |
+
****************************************************************************/
|
| 29 |
+
|
| 30 |
+
/****************************************************************************
|
| 31 |
+
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
|
| 32 |
+
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
|
| 33 |
+
****************************************************************************/
|
| 34 |
+
|
| 35 |
+
/*
|
| 36 |
+
* unctrl.h
|
| 37 |
+
*
|
| 38 |
+
* Display a printable version of a control character.
|
| 39 |
+
* Control characters are displayed in caret notation (^x), DELETE is displayed
|
| 40 |
+
* as ^?. Printable characters are displayed as is.
|
| 41 |
+
*/
|
| 42 |
+
|
| 43 |
+
/* $Id: unctrl.h.in,v 1.12 2020/02/02 23:34:34 tom Exp $ */
|
| 44 |
+
|
| 45 |
+
#ifndef NCURSES_UNCTRL_H_incl
|
| 46 |
+
#define NCURSES_UNCTRL_H_incl 1
|
| 47 |
+
|
| 48 |
+
#undef NCURSES_VERSION
|
| 49 |
+
#define NCURSES_VERSION "6.5"
|
| 50 |
+
|
| 51 |
+
#ifdef __cplusplus
|
| 52 |
+
extern "C" {
|
| 53 |
+
#endif
|
| 54 |
+
|
| 55 |
+
#include <ncursesw/curses.h>
|
| 56 |
+
|
| 57 |
+
#undef unctrl
|
| 58 |
+
NCURSES_EXPORT(NCURSES_CONST char *) unctrl (chtype);
|
| 59 |
+
|
| 60 |
+
#if 1
|
| 61 |
+
NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(unctrl) (SCREEN*, chtype);
|
| 62 |
+
#endif
|
| 63 |
+
|
| 64 |
+
#ifdef __cplusplus
|
| 65 |
+
}
|
| 66 |
+
#endif
|
| 67 |
+
|
| 68 |
+
#endif /* NCURSES_UNCTRL_H_incl */
|
miniconda3/envs/active_proaction/include/openssl/aes.h
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2002-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 OPENSSL_AES_H
|
| 11 |
+
#define OPENSSL_AES_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_AES_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#include <openssl/opensslconf.h>
|
| 20 |
+
|
| 21 |
+
#include <stddef.h>
|
| 22 |
+
#ifdef __cplusplus
|
| 23 |
+
extern "C" {
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
#define AES_BLOCK_SIZE 16
|
| 27 |
+
|
| 28 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 29 |
+
|
| 30 |
+
#define AES_ENCRYPT 1
|
| 31 |
+
#define AES_DECRYPT 0
|
| 32 |
+
|
| 33 |
+
#define AES_MAXNR 14
|
| 34 |
+
|
| 35 |
+
/* This should be a hidden type, but EVP requires that the size be known */
|
| 36 |
+
struct aes_key_st {
|
| 37 |
+
#ifdef AES_LONG
|
| 38 |
+
unsigned long rd_key[4 * (AES_MAXNR + 1)];
|
| 39 |
+
#else
|
| 40 |
+
unsigned int rd_key[4 * (AES_MAXNR + 1)];
|
| 41 |
+
#endif
|
| 42 |
+
int rounds;
|
| 43 |
+
};
|
| 44 |
+
typedef struct aes_key_st AES_KEY;
|
| 45 |
+
|
| 46 |
+
#endif
|
| 47 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 48 |
+
OSSL_DEPRECATEDIN_3_0 const char *AES_options(void);
|
| 49 |
+
OSSL_DEPRECATEDIN_3_0
|
| 50 |
+
int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
| 51 |
+
AES_KEY *key);
|
| 52 |
+
OSSL_DEPRECATEDIN_3_0
|
| 53 |
+
int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
|
| 54 |
+
AES_KEY *key);
|
| 55 |
+
OSSL_DEPRECATEDIN_3_0
|
| 56 |
+
void AES_encrypt(const unsigned char *in, unsigned char *out,
|
| 57 |
+
const AES_KEY *key);
|
| 58 |
+
OSSL_DEPRECATEDIN_3_0
|
| 59 |
+
void AES_decrypt(const unsigned char *in, unsigned char *out,
|
| 60 |
+
const AES_KEY *key);
|
| 61 |
+
OSSL_DEPRECATEDIN_3_0
|
| 62 |
+
void AES_ecb_encrypt(const unsigned char *in, unsigned char *out,
|
| 63 |
+
const AES_KEY *key, const int enc);
|
| 64 |
+
OSSL_DEPRECATEDIN_3_0
|
| 65 |
+
void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
| 66 |
+
size_t length, const AES_KEY *key,
|
| 67 |
+
unsigned char *ivec, const int enc);
|
| 68 |
+
OSSL_DEPRECATEDIN_3_0
|
| 69 |
+
void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
|
| 70 |
+
size_t length, const AES_KEY *key,
|
| 71 |
+
unsigned char *ivec, int *num, const int enc);
|
| 72 |
+
OSSL_DEPRECATEDIN_3_0
|
| 73 |
+
void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out,
|
| 74 |
+
size_t length, const AES_KEY *key,
|
| 75 |
+
unsigned char *ivec, int *num, const int enc);
|
| 76 |
+
OSSL_DEPRECATEDIN_3_0
|
| 77 |
+
void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,
|
| 78 |
+
size_t length, const AES_KEY *key,
|
| 79 |
+
unsigned char *ivec, int *num, const int enc);
|
| 80 |
+
OSSL_DEPRECATEDIN_3_0
|
| 81 |
+
void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
|
| 82 |
+
size_t length, const AES_KEY *key,
|
| 83 |
+
unsigned char *ivec, int *num);
|
| 84 |
+
|
| 85 |
+
/* NB: the IV is _two_ blocks long */
|
| 86 |
+
OSSL_DEPRECATEDIN_3_0
|
| 87 |
+
void AES_ige_encrypt(const unsigned char *in, unsigned char *out,
|
| 88 |
+
size_t length, const AES_KEY *key,
|
| 89 |
+
unsigned char *ivec, const int enc);
|
| 90 |
+
/* NB: the IV is _four_ blocks long */
|
| 91 |
+
OSSL_DEPRECATEDIN_3_0
|
| 92 |
+
void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out,
|
| 93 |
+
size_t length, const AES_KEY *key, const AES_KEY *key2,
|
| 94 |
+
const unsigned char *ivec, const int enc);
|
| 95 |
+
OSSL_DEPRECATEDIN_3_0
|
| 96 |
+
int AES_wrap_key(AES_KEY *key, const unsigned char *iv,
|
| 97 |
+
unsigned char *out, const unsigned char *in,
|
| 98 |
+
unsigned int inlen);
|
| 99 |
+
OSSL_DEPRECATEDIN_3_0
|
| 100 |
+
int AES_unwrap_key(AES_KEY *key, const unsigned char *iv,
|
| 101 |
+
unsigned char *out, const unsigned char *in,
|
| 102 |
+
unsigned int inlen);
|
| 103 |
+
#endif
|
| 104 |
+
|
| 105 |
+
#ifdef __cplusplus
|
| 106 |
+
}
|
| 107 |
+
#endif
|
| 108 |
+
|
| 109 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/asn1.h
ADDED
|
@@ -0,0 +1,1125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/asn1.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
/* clang-format off */
|
| 14 |
+
|
| 15 |
+
/* clang-format on */
|
| 16 |
+
|
| 17 |
+
#ifndef OPENSSL_ASN1_H
|
| 18 |
+
#define OPENSSL_ASN1_H
|
| 19 |
+
#pragma once
|
| 20 |
+
|
| 21 |
+
#include <openssl/macros.h>
|
| 22 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 23 |
+
#define HEADER_ASN1_H
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
#ifndef OPENSSL_NO_STDIO
|
| 27 |
+
#include <stdio.h>
|
| 28 |
+
#endif
|
| 29 |
+
#include <time.h>
|
| 30 |
+
#include <openssl/e_os2.h>
|
| 31 |
+
#include <openssl/opensslconf.h>
|
| 32 |
+
#include <openssl/bio.h>
|
| 33 |
+
#include <openssl/safestack.h>
|
| 34 |
+
#include <openssl/asn1err.h>
|
| 35 |
+
#include <openssl/symhacks.h>
|
| 36 |
+
|
| 37 |
+
#include <openssl/types.h>
|
| 38 |
+
#include <openssl/bn.h>
|
| 39 |
+
|
| 40 |
+
#ifdef OPENSSL_BUILD_SHLIBCRYPTO
|
| 41 |
+
#undef OPENSSL_EXTERN
|
| 42 |
+
#define OPENSSL_EXTERN OPENSSL_EXPORT
|
| 43 |
+
#endif
|
| 44 |
+
|
| 45 |
+
#ifdef __cplusplus
|
| 46 |
+
extern "C" {
|
| 47 |
+
#endif
|
| 48 |
+
|
| 49 |
+
#define V_ASN1_UNIVERSAL 0x00
|
| 50 |
+
#define V_ASN1_APPLICATION 0x40
|
| 51 |
+
#define V_ASN1_CONTEXT_SPECIFIC 0x80
|
| 52 |
+
#define V_ASN1_PRIVATE 0xc0
|
| 53 |
+
|
| 54 |
+
#define V_ASN1_CONSTRUCTED 0x20
|
| 55 |
+
#define V_ASN1_PRIMITIVE_TAG 0x1f
|
| 56 |
+
#define V_ASN1_PRIMATIVE_TAG /*compat*/ V_ASN1_PRIMITIVE_TAG
|
| 57 |
+
|
| 58 |
+
#define V_ASN1_APP_CHOOSE -2 /* let the recipient choose */
|
| 59 |
+
#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
|
| 60 |
+
#define V_ASN1_ANY -4 /* used in ASN1 template code */
|
| 61 |
+
|
| 62 |
+
#define V_ASN1_UNDEF -1
|
| 63 |
+
/* ASN.1 tag values */
|
| 64 |
+
#define V_ASN1_EOC 0
|
| 65 |
+
#define V_ASN1_BOOLEAN 1
|
| 66 |
+
#define V_ASN1_INTEGER 2
|
| 67 |
+
#define V_ASN1_BIT_STRING 3
|
| 68 |
+
#define V_ASN1_OCTET_STRING 4
|
| 69 |
+
#define V_ASN1_NULL 5
|
| 70 |
+
#define V_ASN1_OBJECT 6
|
| 71 |
+
#define V_ASN1_OBJECT_DESCRIPTOR 7
|
| 72 |
+
#define V_ASN1_EXTERNAL 8
|
| 73 |
+
#define V_ASN1_REAL 9
|
| 74 |
+
#define V_ASN1_ENUMERATED 10
|
| 75 |
+
#define V_ASN1_UTF8STRING 12
|
| 76 |
+
#define V_ASN1_SEQUENCE 16
|
| 77 |
+
#define V_ASN1_SET 17
|
| 78 |
+
#define V_ASN1_NUMERICSTRING 18
|
| 79 |
+
#define V_ASN1_PRINTABLESTRING 19
|
| 80 |
+
#define V_ASN1_T61STRING 20
|
| 81 |
+
#define V_ASN1_TELETEXSTRING 20 /* alias */
|
| 82 |
+
#define V_ASN1_VIDEOTEXSTRING 21
|
| 83 |
+
#define V_ASN1_IA5STRING 22
|
| 84 |
+
#define V_ASN1_UTCTIME 23
|
| 85 |
+
#define V_ASN1_GENERALIZEDTIME 24
|
| 86 |
+
#define V_ASN1_GRAPHICSTRING 25
|
| 87 |
+
#define V_ASN1_ISO64STRING 26
|
| 88 |
+
#define V_ASN1_VISIBLESTRING 26 /* alias */
|
| 89 |
+
#define V_ASN1_GENERALSTRING 27
|
| 90 |
+
#define V_ASN1_UNIVERSALSTRING 28
|
| 91 |
+
#define V_ASN1_BMPSTRING 30
|
| 92 |
+
|
| 93 |
+
/*
|
| 94 |
+
* NB the constants below are used internally by ASN1_INTEGER
|
| 95 |
+
* and ASN1_ENUMERATED to indicate the sign. They are *not* on
|
| 96 |
+
* the wire tag values.
|
| 97 |
+
*/
|
| 98 |
+
|
| 99 |
+
#define V_ASN1_NEG 0x100
|
| 100 |
+
#define V_ASN1_NEG_INTEGER (2 | V_ASN1_NEG)
|
| 101 |
+
#define V_ASN1_NEG_ENUMERATED (10 | V_ASN1_NEG)
|
| 102 |
+
|
| 103 |
+
/* For use with d2i_ASN1_type_bytes() */
|
| 104 |
+
#define B_ASN1_NUMERICSTRING 0x0001
|
| 105 |
+
#define B_ASN1_PRINTABLESTRING 0x0002
|
| 106 |
+
#define B_ASN1_T61STRING 0x0004
|
| 107 |
+
#define B_ASN1_TELETEXSTRING 0x0004
|
| 108 |
+
#define B_ASN1_VIDEOTEXSTRING 0x0008
|
| 109 |
+
#define B_ASN1_IA5STRING 0x0010
|
| 110 |
+
#define B_ASN1_GRAPHICSTRING 0x0020
|
| 111 |
+
#define B_ASN1_ISO64STRING 0x0040
|
| 112 |
+
#define B_ASN1_VISIBLESTRING 0x0040
|
| 113 |
+
#define B_ASN1_GENERALSTRING 0x0080
|
| 114 |
+
#define B_ASN1_UNIVERSALSTRING 0x0100
|
| 115 |
+
#define B_ASN1_OCTET_STRING 0x0200
|
| 116 |
+
#define B_ASN1_BIT_STRING 0x0400
|
| 117 |
+
#define B_ASN1_BMPSTRING 0x0800
|
| 118 |
+
#define B_ASN1_UNKNOWN 0x1000
|
| 119 |
+
#define B_ASN1_UTF8STRING 0x2000
|
| 120 |
+
#define B_ASN1_UTCTIME 0x4000
|
| 121 |
+
#define B_ASN1_GENERALIZEDTIME 0x8000
|
| 122 |
+
#define B_ASN1_SEQUENCE 0x10000
|
| 123 |
+
/* For use with ASN1_mbstring_copy() */
|
| 124 |
+
#define MBSTRING_FLAG 0x1000
|
| 125 |
+
#define MBSTRING_UTF8 (MBSTRING_FLAG)
|
| 126 |
+
#define MBSTRING_ASC (MBSTRING_FLAG | 1)
|
| 127 |
+
#define MBSTRING_BMP (MBSTRING_FLAG | 2)
|
| 128 |
+
#define MBSTRING_UNIV (MBSTRING_FLAG | 4)
|
| 129 |
+
#define SMIME_OLDMIME 0x400
|
| 130 |
+
#define SMIME_CRLFEOL 0x800
|
| 131 |
+
#define SMIME_STREAM 0x1000
|
| 132 |
+
|
| 133 |
+
/* Stacks for types not otherwise defined in this header */
|
| 134 |
+
/* clang-format off */
|
| 135 |
+
SKM_DEFINE_STACK_OF_INTERNAL(X509_ALGOR, X509_ALGOR, X509_ALGOR)
|
| 136 |
+
#define sk_X509_ALGOR_num(sk) OPENSSL_sk_num(ossl_check_const_X509_ALGOR_sk_type(sk))
|
| 137 |
+
#define sk_X509_ALGOR_value(sk, idx) ((X509_ALGOR *)OPENSSL_sk_value(ossl_check_const_X509_ALGOR_sk_type(sk), (idx)))
|
| 138 |
+
#define sk_X509_ALGOR_new(cmp) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_new(ossl_check_X509_ALGOR_compfunc_type(cmp)))
|
| 139 |
+
#define sk_X509_ALGOR_new_null() ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_new_null())
|
| 140 |
+
#define sk_X509_ALGOR_new_reserve(cmp, n) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_new_reserve(ossl_check_X509_ALGOR_compfunc_type(cmp), (n)))
|
| 141 |
+
#define sk_X509_ALGOR_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_X509_ALGOR_sk_type(sk), (n))
|
| 142 |
+
#define sk_X509_ALGOR_free(sk) OPENSSL_sk_free(ossl_check_X509_ALGOR_sk_type(sk))
|
| 143 |
+
#define sk_X509_ALGOR_zero(sk) OPENSSL_sk_zero(ossl_check_X509_ALGOR_sk_type(sk))
|
| 144 |
+
#define sk_X509_ALGOR_delete(sk, i) ((X509_ALGOR *)OPENSSL_sk_delete(ossl_check_X509_ALGOR_sk_type(sk), (i)))
|
| 145 |
+
#define sk_X509_ALGOR_delete_ptr(sk, ptr) ((X509_ALGOR *)OPENSSL_sk_delete_ptr(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr)))
|
| 146 |
+
#define sk_X509_ALGOR_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
|
| 147 |
+
#define sk_X509_ALGOR_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
|
| 148 |
+
#define sk_X509_ALGOR_pop(sk) ((X509_ALGOR *)OPENSSL_sk_pop(ossl_check_X509_ALGOR_sk_type(sk)))
|
| 149 |
+
#define sk_X509_ALGOR_shift(sk) ((X509_ALGOR *)OPENSSL_sk_shift(ossl_check_X509_ALGOR_sk_type(sk)))
|
| 150 |
+
#define sk_X509_ALGOR_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_ALGOR_sk_type(sk),ossl_check_X509_ALGOR_freefunc_type(freefunc))
|
| 151 |
+
#define sk_X509_ALGOR_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr), (idx))
|
| 152 |
+
#define sk_X509_ALGOR_set(sk, idx, ptr) ((X509_ALGOR *)OPENSSL_sk_set(ossl_check_X509_ALGOR_sk_type(sk), (idx), ossl_check_X509_ALGOR_type(ptr)))
|
| 153 |
+
#define sk_X509_ALGOR_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
|
| 154 |
+
#define sk_X509_ALGOR_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
|
| 155 |
+
#define sk_X509_ALGOR_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr), pnum)
|
| 156 |
+
#define sk_X509_ALGOR_sort(sk) OPENSSL_sk_sort(ossl_check_X509_ALGOR_sk_type(sk))
|
| 157 |
+
#define sk_X509_ALGOR_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_X509_ALGOR_sk_type(sk))
|
| 158 |
+
#define sk_X509_ALGOR_dup(sk) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_dup(ossl_check_const_X509_ALGOR_sk_type(sk)))
|
| 159 |
+
#define sk_X509_ALGOR_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_deep_copy(ossl_check_const_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_copyfunc_type(copyfunc), ossl_check_X509_ALGOR_freefunc_type(freefunc)))
|
| 160 |
+
#define sk_X509_ALGOR_set_cmp_func(sk, cmp) ((sk_X509_ALGOR_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_compfunc_type(cmp)))
|
| 161 |
+
|
| 162 |
+
/* clang-format on */
|
| 163 |
+
|
| 164 |
+
#define ASN1_STRING_FLAG_BITS_LEFT 0x08 /* Set if 0x07 has bits left value */
|
| 165 |
+
/*
|
| 166 |
+
* This indicates that the ASN1_STRING is not a real value but just a place
|
| 167 |
+
* holder for the location where indefinite length constructed data should be
|
| 168 |
+
* inserted in the memory buffer
|
| 169 |
+
*/
|
| 170 |
+
#define ASN1_STRING_FLAG_NDEF 0x010
|
| 171 |
+
|
| 172 |
+
/*
|
| 173 |
+
* This flag is used by the CMS code to indicate that a string is not
|
| 174 |
+
* complete and is a place holder for content when it had all been accessed.
|
| 175 |
+
* The flag will be reset when content has been written to it.
|
| 176 |
+
*/
|
| 177 |
+
|
| 178 |
+
#define ASN1_STRING_FLAG_CONT 0x020
|
| 179 |
+
/*
|
| 180 |
+
* This flag is used by ASN1 code to indicate an ASN1_STRING is an MSTRING
|
| 181 |
+
* type.
|
| 182 |
+
*/
|
| 183 |
+
#define ASN1_STRING_FLAG_MSTRING 0x040
|
| 184 |
+
/* String is embedded and only content should be freed */
|
| 185 |
+
#define ASN1_STRING_FLAG_EMBED 0x080
|
| 186 |
+
/* String should be parsed in RFC 5280's time format */
|
| 187 |
+
#define ASN1_STRING_FLAG_X509_TIME 0x100
|
| 188 |
+
/* This is the base type that holds just about everything :-) */
|
| 189 |
+
struct asn1_string_st {
|
| 190 |
+
int length;
|
| 191 |
+
int type;
|
| 192 |
+
unsigned char *data;
|
| 193 |
+
/*
|
| 194 |
+
* The value of the following field depends on the type being held. It
|
| 195 |
+
* is mostly being used for BIT_STRING so if the input data has a
|
| 196 |
+
* non-zero 'unused bits' value, it will be handled correctly
|
| 197 |
+
*/
|
| 198 |
+
long flags;
|
| 199 |
+
};
|
| 200 |
+
|
| 201 |
+
/*
|
| 202 |
+
* ASN1_ENCODING structure: this is used to save the received encoding of an
|
| 203 |
+
* ASN1 type. This is useful to get round problems with invalid encodings
|
| 204 |
+
* which can break signatures.
|
| 205 |
+
*/
|
| 206 |
+
|
| 207 |
+
typedef struct ASN1_ENCODING_st {
|
| 208 |
+
unsigned char *enc; /* DER encoding */
|
| 209 |
+
long len; /* Length of encoding */
|
| 210 |
+
int modified; /* set to 1 if 'enc' is invalid */
|
| 211 |
+
} ASN1_ENCODING;
|
| 212 |
+
|
| 213 |
+
/* Used with ASN1 LONG type: if a long is set to this it is omitted */
|
| 214 |
+
#define ASN1_LONG_UNDEF 0x7fffffffL
|
| 215 |
+
|
| 216 |
+
#define STABLE_FLAGS_MALLOC 0x01
|
| 217 |
+
/*
|
| 218 |
+
* A zero passed to ASN1_STRING_TABLE_new_add for the flags is interpreted
|
| 219 |
+
* as "don't change" and STABLE_FLAGS_MALLOC is always set. By setting
|
| 220 |
+
* STABLE_FLAGS_MALLOC only we can clear the existing value. Use the alias
|
| 221 |
+
* STABLE_FLAGS_CLEAR to reflect this.
|
| 222 |
+
*/
|
| 223 |
+
#define STABLE_FLAGS_CLEAR STABLE_FLAGS_MALLOC
|
| 224 |
+
#define STABLE_NO_MASK 0x02
|
| 225 |
+
#define DIRSTRING_TYPE \
|
| 226 |
+
(B_ASN1_PRINTABLESTRING | B_ASN1_T61STRING | B_ASN1_BMPSTRING | B_ASN1_UTF8STRING)
|
| 227 |
+
#define PKCS9STRING_TYPE (DIRSTRING_TYPE | B_ASN1_IA5STRING)
|
| 228 |
+
|
| 229 |
+
struct asn1_string_table_st {
|
| 230 |
+
int nid;
|
| 231 |
+
long minsize;
|
| 232 |
+
long maxsize;
|
| 233 |
+
unsigned long mask;
|
| 234 |
+
unsigned long flags;
|
| 235 |
+
};
|
| 236 |
+
|
| 237 |
+
/* clang-format off */
|
| 238 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_STRING_TABLE, ASN1_STRING_TABLE, ASN1_STRING_TABLE)
|
| 239 |
+
#define sk_ASN1_STRING_TABLE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk))
|
| 240 |
+
#define sk_ASN1_STRING_TABLE_value(sk, idx) ((ASN1_STRING_TABLE *)OPENSSL_sk_value(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk), (idx)))
|
| 241 |
+
#define sk_ASN1_STRING_TABLE_new(cmp) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_new(ossl_check_ASN1_STRING_TABLE_compfunc_type(cmp)))
|
| 242 |
+
#define sk_ASN1_STRING_TABLE_new_null() ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_new_null())
|
| 243 |
+
#define sk_ASN1_STRING_TABLE_new_reserve(cmp, n) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_STRING_TABLE_compfunc_type(cmp), (n)))
|
| 244 |
+
#define sk_ASN1_STRING_TABLE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_STRING_TABLE_sk_type(sk), (n))
|
| 245 |
+
#define sk_ASN1_STRING_TABLE_free(sk) OPENSSL_sk_free(ossl_check_ASN1_STRING_TABLE_sk_type(sk))
|
| 246 |
+
#define sk_ASN1_STRING_TABLE_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_STRING_TABLE_sk_type(sk))
|
| 247 |
+
#define sk_ASN1_STRING_TABLE_delete(sk, i) ((ASN1_STRING_TABLE *)OPENSSL_sk_delete(ossl_check_ASN1_STRING_TABLE_sk_type(sk), (i)))
|
| 248 |
+
#define sk_ASN1_STRING_TABLE_delete_ptr(sk, ptr) ((ASN1_STRING_TABLE *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr)))
|
| 249 |
+
#define sk_ASN1_STRING_TABLE_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
|
| 250 |
+
#define sk_ASN1_STRING_TABLE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
|
| 251 |
+
#define sk_ASN1_STRING_TABLE_pop(sk) ((ASN1_STRING_TABLE *)OPENSSL_sk_pop(ossl_check_ASN1_STRING_TABLE_sk_type(sk)))
|
| 252 |
+
#define sk_ASN1_STRING_TABLE_shift(sk) ((ASN1_STRING_TABLE *)OPENSSL_sk_shift(ossl_check_ASN1_STRING_TABLE_sk_type(sk)))
|
| 253 |
+
#define sk_ASN1_STRING_TABLE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_STRING_TABLE_sk_type(sk),ossl_check_ASN1_STRING_TABLE_freefunc_type(freefunc))
|
| 254 |
+
#define sk_ASN1_STRING_TABLE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr), (idx))
|
| 255 |
+
#define sk_ASN1_STRING_TABLE_set(sk, idx, ptr) ((ASN1_STRING_TABLE *)OPENSSL_sk_set(ossl_check_ASN1_STRING_TABLE_sk_type(sk), (idx), ossl_check_ASN1_STRING_TABLE_type(ptr)))
|
| 256 |
+
#define sk_ASN1_STRING_TABLE_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
|
| 257 |
+
#define sk_ASN1_STRING_TABLE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
|
| 258 |
+
#define sk_ASN1_STRING_TABLE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr), pnum)
|
| 259 |
+
#define sk_ASN1_STRING_TABLE_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_STRING_TABLE_sk_type(sk))
|
| 260 |
+
#define sk_ASN1_STRING_TABLE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk))
|
| 261 |
+
#define sk_ASN1_STRING_TABLE_dup(sk) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_dup(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk)))
|
| 262 |
+
#define sk_ASN1_STRING_TABLE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_copyfunc_type(copyfunc), ossl_check_ASN1_STRING_TABLE_freefunc_type(freefunc)))
|
| 263 |
+
#define sk_ASN1_STRING_TABLE_set_cmp_func(sk, cmp) ((sk_ASN1_STRING_TABLE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_compfunc_type(cmp)))
|
| 264 |
+
|
| 265 |
+
/* clang-format on */
|
| 266 |
+
|
| 267 |
+
/* size limits: this stuff is taken straight from RFC2459 */
|
| 268 |
+
|
| 269 |
+
#define ub_name 32768
|
| 270 |
+
#define ub_common_name 64
|
| 271 |
+
#define ub_locality_name 128
|
| 272 |
+
#define ub_state_name 128
|
| 273 |
+
#define ub_organization_name 64
|
| 274 |
+
#define ub_organization_unit_name 64
|
| 275 |
+
#define ub_title 64
|
| 276 |
+
#define ub_email_address 128
|
| 277 |
+
|
| 278 |
+
/*
|
| 279 |
+
* Declarations for template structures: for full definitions see asn1t.h
|
| 280 |
+
*/
|
| 281 |
+
typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE;
|
| 282 |
+
typedef struct ASN1_TLC_st ASN1_TLC;
|
| 283 |
+
/* This is just an opaque pointer */
|
| 284 |
+
typedef struct ASN1_VALUE_st ASN1_VALUE;
|
| 285 |
+
|
| 286 |
+
/* Declare ASN1 functions: the implement macro is in asn1t.h */
|
| 287 |
+
|
| 288 |
+
/*
|
| 289 |
+
* The mysterious 'extern' that's passed to some macros is innocuous,
|
| 290 |
+
* and is there to quiet pre-C99 compilers that may complain about empty
|
| 291 |
+
* arguments in macro calls.
|
| 292 |
+
*/
|
| 293 |
+
|
| 294 |
+
#define DECLARE_ASN1_FUNCTIONS_attr(attr, type) \
|
| 295 |
+
DECLARE_ASN1_FUNCTIONS_name_attr(attr, type, type)
|
| 296 |
+
#define DECLARE_ASN1_FUNCTIONS(type) \
|
| 297 |
+
DECLARE_ASN1_FUNCTIONS_attr(extern, type)
|
| 298 |
+
|
| 299 |
+
#define DECLARE_ASN1_ALLOC_FUNCTIONS_attr(attr, type) \
|
| 300 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(attr, type, type)
|
| 301 |
+
#define DECLARE_ASN1_ALLOC_FUNCTIONS(type) \
|
| 302 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_attr(extern, type)
|
| 303 |
+
|
| 304 |
+
#define DECLARE_ASN1_FUNCTIONS_name_attr(attr, type, name) \
|
| 305 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(attr, type, name) \
|
| 306 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_name_attr(attr, type, name)
|
| 307 |
+
#define DECLARE_ASN1_FUNCTIONS_name(type, name) \
|
| 308 |
+
DECLARE_ASN1_FUNCTIONS_name_attr(extern, type, name)
|
| 309 |
+
|
| 310 |
+
#define DECLARE_ASN1_ENCODE_FUNCTIONS_attr(attr, type, itname, name) \
|
| 311 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(attr, type, name) \
|
| 312 |
+
DECLARE_ASN1_ITEM_attr(attr, itname)
|
| 313 |
+
#define DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) \
|
| 314 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_attr(extern, type, itname, name)
|
| 315 |
+
|
| 316 |
+
#define DECLARE_ASN1_ENCODE_FUNCTIONS_name_attr(attr, type, name) \
|
| 317 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_attr(attr, type, name, name)
|
| 318 |
+
#define DECLARE_ASN1_ENCODE_FUNCTIONS_name(type, name) \
|
| 319 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_name_attr(extern, type, name)
|
| 320 |
+
|
| 321 |
+
#define DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(attr, type, name) \
|
| 322 |
+
attr type *d2i_##name(type **a, const unsigned char **in, long len); \
|
| 323 |
+
attr int i2d_##name(const type *a, unsigned char **out);
|
| 324 |
+
#define DECLARE_ASN1_ENCODE_FUNCTIONS_only(type, name) \
|
| 325 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(extern, type, name)
|
| 326 |
+
|
| 327 |
+
#define DECLARE_ASN1_NDEF_FUNCTION_attr(attr, name) \
|
| 328 |
+
attr int i2d_##name##_NDEF(const name *a, unsigned char **out);
|
| 329 |
+
#define DECLARE_ASN1_NDEF_FUNCTION(name) \
|
| 330 |
+
DECLARE_ASN1_NDEF_FUNCTION_attr(extern, name)
|
| 331 |
+
|
| 332 |
+
#define DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(attr, type, name) \
|
| 333 |
+
attr type *name##_new(void); \
|
| 334 |
+
attr void name##_free(type *a);
|
| 335 |
+
#define DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \
|
| 336 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(extern, type, name)
|
| 337 |
+
|
| 338 |
+
#define DECLARE_ASN1_DUP_FUNCTION_attr(attr, type) \
|
| 339 |
+
DECLARE_ASN1_DUP_FUNCTION_name_attr(attr, type, type)
|
| 340 |
+
#define DECLARE_ASN1_DUP_FUNCTION(type) \
|
| 341 |
+
DECLARE_ASN1_DUP_FUNCTION_attr(extern, type)
|
| 342 |
+
|
| 343 |
+
#define DECLARE_ASN1_DUP_FUNCTION_name_attr(attr, type, name) \
|
| 344 |
+
attr type *name##_dup(const type *a);
|
| 345 |
+
#define DECLARE_ASN1_DUP_FUNCTION_name(type, name) \
|
| 346 |
+
DECLARE_ASN1_DUP_FUNCTION_name_attr(extern, type, name)
|
| 347 |
+
|
| 348 |
+
#define DECLARE_ASN1_PRINT_FUNCTION_attr(attr, stname) \
|
| 349 |
+
DECLARE_ASN1_PRINT_FUNCTION_fname_attr(attr, stname, stname)
|
| 350 |
+
#define DECLARE_ASN1_PRINT_FUNCTION(stname) \
|
| 351 |
+
DECLARE_ASN1_PRINT_FUNCTION_attr(extern, stname)
|
| 352 |
+
|
| 353 |
+
#define DECLARE_ASN1_PRINT_FUNCTION_fname_attr(attr, stname, fname) \
|
| 354 |
+
attr int fname##_print_ctx(BIO *out, const stname *x, int indent, \
|
| 355 |
+
const ASN1_PCTX *pctx);
|
| 356 |
+
#define DECLARE_ASN1_PRINT_FUNCTION_fname(stname, fname) \
|
| 357 |
+
DECLARE_ASN1_PRINT_FUNCTION_fname_attr(extern, stname, fname)
|
| 358 |
+
|
| 359 |
+
#define D2I_OF(type) type *(*)(type **, const unsigned char **, long)
|
| 360 |
+
#define I2D_OF(type) int (*)(const type *, unsigned char **)
|
| 361 |
+
|
| 362 |
+
#define CHECKED_D2I_OF(type, d2i) \
|
| 363 |
+
((d2i_of_void *)(1 ? d2i : ((D2I_OF(type))0)))
|
| 364 |
+
#define CHECKED_I2D_OF(type, i2d) \
|
| 365 |
+
((i2d_of_void *)(1 ? i2d : ((I2D_OF(type))0)))
|
| 366 |
+
#define CHECKED_NEW_OF(type, xnew) \
|
| 367 |
+
((void *(*)(void))(1 ? xnew : ((type * (*)(void))0)))
|
| 368 |
+
#define CHECKED_PTR_OF(type, p) \
|
| 369 |
+
((void *)(1 ? p : (type *)0))
|
| 370 |
+
#define CHECKED_PPTR_OF(type, p) \
|
| 371 |
+
((void **)(1 ? p : (type **)0))
|
| 372 |
+
|
| 373 |
+
#define TYPEDEF_D2I_OF(type) typedef type *d2i_of_##type(type **, const unsigned char **, long)
|
| 374 |
+
#define TYPEDEF_I2D_OF(type) typedef int i2d_of_##type(const type *, unsigned char **)
|
| 375 |
+
#define TYPEDEF_D2I2D_OF(type) \
|
| 376 |
+
TYPEDEF_D2I_OF(type); \
|
| 377 |
+
TYPEDEF_I2D_OF(type)
|
| 378 |
+
|
| 379 |
+
typedef void *d2i_of_void(void **, const unsigned char **, long);
|
| 380 |
+
typedef int i2d_of_void(const void *, unsigned char **);
|
| 381 |
+
typedef int OSSL_i2d_of_void_ctx(const void *, unsigned char **, void *vctx);
|
| 382 |
+
|
| 383 |
+
/*-
|
| 384 |
+
* The following macros and typedefs allow an ASN1_ITEM
|
| 385 |
+
* to be embedded in a structure and referenced. Since
|
| 386 |
+
* the ASN1_ITEM pointers need to be globally accessible
|
| 387 |
+
* (possibly from shared libraries) they may exist in
|
| 388 |
+
* different forms. On platforms that support it the
|
| 389 |
+
* ASN1_ITEM structure itself will be globally exported.
|
| 390 |
+
* Other platforms will export a function that returns
|
| 391 |
+
* an ASN1_ITEM pointer.
|
| 392 |
+
*
|
| 393 |
+
* To handle both cases transparently the macros below
|
| 394 |
+
* should be used instead of hard coding an ASN1_ITEM
|
| 395 |
+
* pointer in a structure.
|
| 396 |
+
*
|
| 397 |
+
* The structure will look like this:
|
| 398 |
+
*
|
| 399 |
+
* typedef struct SOMETHING_st {
|
| 400 |
+
* ...
|
| 401 |
+
* ASN1_ITEM_EXP *iptr;
|
| 402 |
+
* ...
|
| 403 |
+
* } SOMETHING;
|
| 404 |
+
*
|
| 405 |
+
* It would be initialised as e.g.:
|
| 406 |
+
*
|
| 407 |
+
* SOMETHING somevar = {...,ASN1_ITEM_ref(X509),...};
|
| 408 |
+
*
|
| 409 |
+
* and the actual pointer extracted with:
|
| 410 |
+
*
|
| 411 |
+
* const ASN1_ITEM *it = ASN1_ITEM_ptr(somevar.iptr);
|
| 412 |
+
*
|
| 413 |
+
* Finally an ASN1_ITEM pointer can be extracted from an
|
| 414 |
+
* appropriate reference with: ASN1_ITEM_rptr(X509). This
|
| 415 |
+
* would be used when a function takes an ASN1_ITEM * argument.
|
| 416 |
+
*
|
| 417 |
+
*/
|
| 418 |
+
|
| 419 |
+
/*
|
| 420 |
+
* Platforms that can't easily handle shared global variables are declared as
|
| 421 |
+
* functions returning ASN1_ITEM pointers.
|
| 422 |
+
*/
|
| 423 |
+
|
| 424 |
+
/* ASN1_ITEM pointer exported type */
|
| 425 |
+
typedef const ASN1_ITEM *ASN1_ITEM_EXP(void);
|
| 426 |
+
|
| 427 |
+
/* Macro to obtain ASN1_ITEM pointer from exported type */
|
| 428 |
+
#define ASN1_ITEM_ptr(iptr) (iptr())
|
| 429 |
+
|
| 430 |
+
/* Macro to include ASN1_ITEM pointer from base type */
|
| 431 |
+
#define ASN1_ITEM_ref(iptr) (iptr##_it)
|
| 432 |
+
|
| 433 |
+
#define ASN1_ITEM_rptr(ref) (ref##_it())
|
| 434 |
+
|
| 435 |
+
#define DECLARE_ASN1_ITEM_attr(attr, name) \
|
| 436 |
+
attr const ASN1_ITEM *name##_it(void);
|
| 437 |
+
#define DECLARE_ASN1_ITEM(name) \
|
| 438 |
+
DECLARE_ASN1_ITEM_attr(extern, name)
|
| 439 |
+
|
| 440 |
+
/* Parameters used by ASN1_STRING_print_ex() */
|
| 441 |
+
|
| 442 |
+
/*
|
| 443 |
+
* These determine which characters to escape: RFC2253 special characters,
|
| 444 |
+
* control characters and MSB set characters
|
| 445 |
+
*/
|
| 446 |
+
|
| 447 |
+
#define ASN1_STRFLGS_ESC_2253 1
|
| 448 |
+
#define ASN1_STRFLGS_ESC_CTRL 2
|
| 449 |
+
#define ASN1_STRFLGS_ESC_MSB 4
|
| 450 |
+
|
| 451 |
+
/* Lower 8 bits are reserved as an output type specifier */
|
| 452 |
+
#define ASN1_DTFLGS_TYPE_MASK 0x0FUL
|
| 453 |
+
#define ASN1_DTFLGS_RFC822 0x00UL
|
| 454 |
+
#define ASN1_DTFLGS_ISO8601 0x01UL
|
| 455 |
+
|
| 456 |
+
/*
|
| 457 |
+
* This flag determines how we do escaping: normally RC2253 backslash only,
|
| 458 |
+
* set this to use backslash and quote.
|
| 459 |
+
*/
|
| 460 |
+
|
| 461 |
+
#define ASN1_STRFLGS_ESC_QUOTE 8
|
| 462 |
+
|
| 463 |
+
/* These three flags are internal use only. */
|
| 464 |
+
|
| 465 |
+
/* Character is a valid PrintableString character */
|
| 466 |
+
#define CHARTYPE_PRINTABLESTRING 0x10
|
| 467 |
+
/* Character needs escaping if it is the first character */
|
| 468 |
+
#define CHARTYPE_FIRST_ESC_2253 0x20
|
| 469 |
+
/* Character needs escaping if it is the last character */
|
| 470 |
+
#define CHARTYPE_LAST_ESC_2253 0x40
|
| 471 |
+
|
| 472 |
+
/*
|
| 473 |
+
* NB the internal flags are safely reused below by flags handled at the top
|
| 474 |
+
* level.
|
| 475 |
+
*/
|
| 476 |
+
|
| 477 |
+
/*
|
| 478 |
+
* If this is set we convert all character strings to UTF8 first
|
| 479 |
+
*/
|
| 480 |
+
|
| 481 |
+
#define ASN1_STRFLGS_UTF8_CONVERT 0x10
|
| 482 |
+
|
| 483 |
+
/*
|
| 484 |
+
* If this is set we don't attempt to interpret content: just assume all
|
| 485 |
+
* strings are 1 byte per character. This will produce some pretty odd
|
| 486 |
+
* looking output!
|
| 487 |
+
*/
|
| 488 |
+
|
| 489 |
+
#define ASN1_STRFLGS_IGNORE_TYPE 0x20
|
| 490 |
+
|
| 491 |
+
/* If this is set we include the string type in the output */
|
| 492 |
+
#define ASN1_STRFLGS_SHOW_TYPE 0x40
|
| 493 |
+
|
| 494 |
+
/*
|
| 495 |
+
* This determines which strings to display and which to 'dump' (hex dump of
|
| 496 |
+
* content octets or DER encoding). We can only dump non character strings or
|
| 497 |
+
* everything. If we don't dump 'unknown' they are interpreted as character
|
| 498 |
+
* strings with 1 octet per character and are subject to the usual escaping
|
| 499 |
+
* options.
|
| 500 |
+
*/
|
| 501 |
+
|
| 502 |
+
#define ASN1_STRFLGS_DUMP_ALL 0x80
|
| 503 |
+
#define ASN1_STRFLGS_DUMP_UNKNOWN 0x100
|
| 504 |
+
|
| 505 |
+
/*
|
| 506 |
+
* These determine what 'dumping' does, we can dump the content octets or the
|
| 507 |
+
* DER encoding: both use the RFC2253 #XXXXX notation.
|
| 508 |
+
*/
|
| 509 |
+
|
| 510 |
+
#define ASN1_STRFLGS_DUMP_DER 0x200
|
| 511 |
+
|
| 512 |
+
/*
|
| 513 |
+
* This flag specifies that RC2254 escaping shall be performed.
|
| 514 |
+
*/
|
| 515 |
+
#define ASN1_STRFLGS_ESC_2254 0x400
|
| 516 |
+
|
| 517 |
+
/*
|
| 518 |
+
* All the string flags consistent with RFC2253, escaping control characters
|
| 519 |
+
* isn't essential in RFC2253 but it is advisable anyway.
|
| 520 |
+
*/
|
| 521 |
+
|
| 522 |
+
#define ASN1_STRFLGS_RFC2253 (ASN1_STRFLGS_ESC_2253 | ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB | ASN1_STRFLGS_UTF8_CONVERT | ASN1_STRFLGS_DUMP_UNKNOWN | ASN1_STRFLGS_DUMP_DER)
|
| 523 |
+
|
| 524 |
+
struct asn1_type_st {
|
| 525 |
+
int type;
|
| 526 |
+
union {
|
| 527 |
+
char *ptr;
|
| 528 |
+
ASN1_BOOLEAN boolean;
|
| 529 |
+
ASN1_STRING *asn1_string;
|
| 530 |
+
ASN1_OBJECT *object;
|
| 531 |
+
ASN1_INTEGER *integer;
|
| 532 |
+
ASN1_ENUMERATED *enumerated;
|
| 533 |
+
ASN1_BIT_STRING *bit_string;
|
| 534 |
+
ASN1_OCTET_STRING *octet_string;
|
| 535 |
+
ASN1_PRINTABLESTRING *printablestring;
|
| 536 |
+
ASN1_T61STRING *t61string;
|
| 537 |
+
ASN1_IA5STRING *ia5string;
|
| 538 |
+
ASN1_GENERALSTRING *generalstring;
|
| 539 |
+
ASN1_BMPSTRING *bmpstring;
|
| 540 |
+
ASN1_UNIVERSALSTRING *universalstring;
|
| 541 |
+
ASN1_UTCTIME *utctime;
|
| 542 |
+
ASN1_GENERALIZEDTIME *generalizedtime;
|
| 543 |
+
ASN1_VISIBLESTRING *visiblestring;
|
| 544 |
+
ASN1_UTF8STRING *utf8string;
|
| 545 |
+
/*
|
| 546 |
+
* set and sequence are left complete and still contain the set or
|
| 547 |
+
* sequence bytes
|
| 548 |
+
*/
|
| 549 |
+
ASN1_STRING *set;
|
| 550 |
+
ASN1_STRING *sequence;
|
| 551 |
+
ASN1_VALUE *asn1_value;
|
| 552 |
+
} value;
|
| 553 |
+
};
|
| 554 |
+
|
| 555 |
+
/* clang-format off */
|
| 556 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_TYPE, ASN1_TYPE, ASN1_TYPE)
|
| 557 |
+
#define sk_ASN1_TYPE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_TYPE_sk_type(sk))
|
| 558 |
+
#define sk_ASN1_TYPE_value(sk, idx) ((ASN1_TYPE *)OPENSSL_sk_value(ossl_check_const_ASN1_TYPE_sk_type(sk), (idx)))
|
| 559 |
+
#define sk_ASN1_TYPE_new(cmp) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_new(ossl_check_ASN1_TYPE_compfunc_type(cmp)))
|
| 560 |
+
#define sk_ASN1_TYPE_new_null() ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_new_null())
|
| 561 |
+
#define sk_ASN1_TYPE_new_reserve(cmp, n) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_TYPE_compfunc_type(cmp), (n)))
|
| 562 |
+
#define sk_ASN1_TYPE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_TYPE_sk_type(sk), (n))
|
| 563 |
+
#define sk_ASN1_TYPE_free(sk) OPENSSL_sk_free(ossl_check_ASN1_TYPE_sk_type(sk))
|
| 564 |
+
#define sk_ASN1_TYPE_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_TYPE_sk_type(sk))
|
| 565 |
+
#define sk_ASN1_TYPE_delete(sk, i) ((ASN1_TYPE *)OPENSSL_sk_delete(ossl_check_ASN1_TYPE_sk_type(sk), (i)))
|
| 566 |
+
#define sk_ASN1_TYPE_delete_ptr(sk, ptr) ((ASN1_TYPE *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr)))
|
| 567 |
+
#define sk_ASN1_TYPE_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
|
| 568 |
+
#define sk_ASN1_TYPE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
|
| 569 |
+
#define sk_ASN1_TYPE_pop(sk) ((ASN1_TYPE *)OPENSSL_sk_pop(ossl_check_ASN1_TYPE_sk_type(sk)))
|
| 570 |
+
#define sk_ASN1_TYPE_shift(sk) ((ASN1_TYPE *)OPENSSL_sk_shift(ossl_check_ASN1_TYPE_sk_type(sk)))
|
| 571 |
+
#define sk_ASN1_TYPE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_TYPE_sk_type(sk),ossl_check_ASN1_TYPE_freefunc_type(freefunc))
|
| 572 |
+
#define sk_ASN1_TYPE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr), (idx))
|
| 573 |
+
#define sk_ASN1_TYPE_set(sk, idx, ptr) ((ASN1_TYPE *)OPENSSL_sk_set(ossl_check_ASN1_TYPE_sk_type(sk), (idx), ossl_check_ASN1_TYPE_type(ptr)))
|
| 574 |
+
#define sk_ASN1_TYPE_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
|
| 575 |
+
#define sk_ASN1_TYPE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
|
| 576 |
+
#define sk_ASN1_TYPE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr), pnum)
|
| 577 |
+
#define sk_ASN1_TYPE_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_TYPE_sk_type(sk))
|
| 578 |
+
#define sk_ASN1_TYPE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_TYPE_sk_type(sk))
|
| 579 |
+
#define sk_ASN1_TYPE_dup(sk) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_dup(ossl_check_const_ASN1_TYPE_sk_type(sk)))
|
| 580 |
+
#define sk_ASN1_TYPE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_copyfunc_type(copyfunc), ossl_check_ASN1_TYPE_freefunc_type(freefunc)))
|
| 581 |
+
#define sk_ASN1_TYPE_set_cmp_func(sk, cmp) ((sk_ASN1_TYPE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_compfunc_type(cmp)))
|
| 582 |
+
|
| 583 |
+
/* clang-format on */
|
| 584 |
+
|
| 585 |
+
typedef STACK_OF(ASN1_TYPE) ASN1_SEQUENCE_ANY;
|
| 586 |
+
|
| 587 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_name(ASN1_SEQUENCE_ANY, ASN1_SEQUENCE_ANY)
|
| 588 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_name(ASN1_SEQUENCE_ANY, ASN1_SET_ANY)
|
| 589 |
+
|
| 590 |
+
/* This is used to contain a list of bit names */
|
| 591 |
+
typedef struct BIT_STRING_BITNAME_st {
|
| 592 |
+
int bitnum;
|
| 593 |
+
const char *lname;
|
| 594 |
+
const char *sname;
|
| 595 |
+
} BIT_STRING_BITNAME;
|
| 596 |
+
|
| 597 |
+
#define B_ASN1_TIME \
|
| 598 |
+
B_ASN1_UTCTIME | B_ASN1_GENERALIZEDTIME
|
| 599 |
+
|
| 600 |
+
#define B_ASN1_PRINTABLE \
|
| 601 |
+
B_ASN1_NUMERICSTRING | B_ASN1_PRINTABLESTRING | B_ASN1_T61STRING | B_ASN1_IA5STRING | B_ASN1_BIT_STRING | B_ASN1_UNIVERSALSTRING | B_ASN1_BMPSTRING | B_ASN1_UTF8STRING | B_ASN1_SEQUENCE | B_ASN1_UNKNOWN
|
| 602 |
+
|
| 603 |
+
#define B_ASN1_DIRECTORYSTRING \
|
| 604 |
+
B_ASN1_PRINTABLESTRING | B_ASN1_TELETEXSTRING | B_ASN1_BMPSTRING | B_ASN1_UNIVERSALSTRING | B_ASN1_UTF8STRING
|
| 605 |
+
|
| 606 |
+
#define B_ASN1_DISPLAYTEXT \
|
| 607 |
+
B_ASN1_IA5STRING | B_ASN1_VISIBLESTRING | B_ASN1_BMPSTRING | B_ASN1_UTF8STRING
|
| 608 |
+
|
| 609 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name(ASN1_TYPE, ASN1_TYPE)
|
| 610 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS(ASN1_TYPE, ASN1_ANY, ASN1_TYPE)
|
| 611 |
+
|
| 612 |
+
int ASN1_TYPE_get(const ASN1_TYPE *a);
|
| 613 |
+
void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value);
|
| 614 |
+
int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value);
|
| 615 |
+
int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b);
|
| 616 |
+
|
| 617 |
+
ASN1_TYPE *ASN1_TYPE_pack_sequence(const ASN1_ITEM *it, void *s, ASN1_TYPE **t);
|
| 618 |
+
void *ASN1_TYPE_unpack_sequence(const ASN1_ITEM *it, const ASN1_TYPE *t);
|
| 619 |
+
|
| 620 |
+
/* clang-format off */
|
| 621 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_OBJECT, ASN1_OBJECT, ASN1_OBJECT)
|
| 622 |
+
#define sk_ASN1_OBJECT_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_OBJECT_sk_type(sk))
|
| 623 |
+
#define sk_ASN1_OBJECT_value(sk, idx) ((ASN1_OBJECT *)OPENSSL_sk_value(ossl_check_const_ASN1_OBJECT_sk_type(sk), (idx)))
|
| 624 |
+
#define sk_ASN1_OBJECT_new(cmp) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_new(ossl_check_ASN1_OBJECT_compfunc_type(cmp)))
|
| 625 |
+
#define sk_ASN1_OBJECT_new_null() ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_new_null())
|
| 626 |
+
#define sk_ASN1_OBJECT_new_reserve(cmp, n) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_OBJECT_compfunc_type(cmp), (n)))
|
| 627 |
+
#define sk_ASN1_OBJECT_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_OBJECT_sk_type(sk), (n))
|
| 628 |
+
#define sk_ASN1_OBJECT_free(sk) OPENSSL_sk_free(ossl_check_ASN1_OBJECT_sk_type(sk))
|
| 629 |
+
#define sk_ASN1_OBJECT_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_OBJECT_sk_type(sk))
|
| 630 |
+
#define sk_ASN1_OBJECT_delete(sk, i) ((ASN1_OBJECT *)OPENSSL_sk_delete(ossl_check_ASN1_OBJECT_sk_type(sk), (i)))
|
| 631 |
+
#define sk_ASN1_OBJECT_delete_ptr(sk, ptr) ((ASN1_OBJECT *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr)))
|
| 632 |
+
#define sk_ASN1_OBJECT_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
|
| 633 |
+
#define sk_ASN1_OBJECT_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
|
| 634 |
+
#define sk_ASN1_OBJECT_pop(sk) ((ASN1_OBJECT *)OPENSSL_sk_pop(ossl_check_ASN1_OBJECT_sk_type(sk)))
|
| 635 |
+
#define sk_ASN1_OBJECT_shift(sk) ((ASN1_OBJECT *)OPENSSL_sk_shift(ossl_check_ASN1_OBJECT_sk_type(sk)))
|
| 636 |
+
#define sk_ASN1_OBJECT_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_OBJECT_sk_type(sk),ossl_check_ASN1_OBJECT_freefunc_type(freefunc))
|
| 637 |
+
#define sk_ASN1_OBJECT_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr), (idx))
|
| 638 |
+
#define sk_ASN1_OBJECT_set(sk, idx, ptr) ((ASN1_OBJECT *)OPENSSL_sk_set(ossl_check_ASN1_OBJECT_sk_type(sk), (idx), ossl_check_ASN1_OBJECT_type(ptr)))
|
| 639 |
+
#define sk_ASN1_OBJECT_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
|
| 640 |
+
#define sk_ASN1_OBJECT_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
|
| 641 |
+
#define sk_ASN1_OBJECT_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr), pnum)
|
| 642 |
+
#define sk_ASN1_OBJECT_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_OBJECT_sk_type(sk))
|
| 643 |
+
#define sk_ASN1_OBJECT_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_OBJECT_sk_type(sk))
|
| 644 |
+
#define sk_ASN1_OBJECT_dup(sk) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_dup(ossl_check_const_ASN1_OBJECT_sk_type(sk)))
|
| 645 |
+
#define sk_ASN1_OBJECT_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_copyfunc_type(copyfunc), ossl_check_ASN1_OBJECT_freefunc_type(freefunc)))
|
| 646 |
+
#define sk_ASN1_OBJECT_set_cmp_func(sk, cmp) ((sk_ASN1_OBJECT_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_compfunc_type(cmp)))
|
| 647 |
+
|
| 648 |
+
/* clang-format on */
|
| 649 |
+
|
| 650 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_OBJECT)
|
| 651 |
+
|
| 652 |
+
ASN1_STRING *ASN1_STRING_new(void);
|
| 653 |
+
void ASN1_STRING_free(ASN1_STRING *a);
|
| 654 |
+
void ASN1_STRING_clear_free(ASN1_STRING *a);
|
| 655 |
+
int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str);
|
| 656 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_STRING)
|
| 657 |
+
ASN1_STRING *ASN1_STRING_type_new(int type);
|
| 658 |
+
int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b);
|
| 659 |
+
/*
|
| 660 |
+
* Since this is used to store all sorts of things, via macros, for now,
|
| 661 |
+
* make its data void *
|
| 662 |
+
*/
|
| 663 |
+
int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len);
|
| 664 |
+
void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len);
|
| 665 |
+
int ASN1_STRING_length(const ASN1_STRING *x);
|
| 666 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 667 |
+
OSSL_DEPRECATEDIN_3_0 void ASN1_STRING_length_set(ASN1_STRING *x, int n);
|
| 668 |
+
#endif
|
| 669 |
+
int ASN1_STRING_type(const ASN1_STRING *x);
|
| 670 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 671 |
+
OSSL_DEPRECATEDIN_1_1_0 unsigned char *ASN1_STRING_data(ASN1_STRING *x);
|
| 672 |
+
#endif
|
| 673 |
+
const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *x);
|
| 674 |
+
|
| 675 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_BIT_STRING)
|
| 676 |
+
int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, int length);
|
| 677 |
+
int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value);
|
| 678 |
+
int ASN1_BIT_STRING_get_bit(const ASN1_BIT_STRING *a, int n);
|
| 679 |
+
int ASN1_BIT_STRING_check(const ASN1_BIT_STRING *a,
|
| 680 |
+
const unsigned char *flags, int flags_len);
|
| 681 |
+
|
| 682 |
+
int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
|
| 683 |
+
BIT_STRING_BITNAME *tbl, int indent);
|
| 684 |
+
int ASN1_BIT_STRING_num_asc(const char *name, BIT_STRING_BITNAME *tbl);
|
| 685 |
+
int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, const char *name, int value,
|
| 686 |
+
BIT_STRING_BITNAME *tbl);
|
| 687 |
+
|
| 688 |
+
/* clang-format off */
|
| 689 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_INTEGER, ASN1_INTEGER, ASN1_INTEGER)
|
| 690 |
+
#define sk_ASN1_INTEGER_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_INTEGER_sk_type(sk))
|
| 691 |
+
#define sk_ASN1_INTEGER_value(sk, idx) ((ASN1_INTEGER *)OPENSSL_sk_value(ossl_check_const_ASN1_INTEGER_sk_type(sk), (idx)))
|
| 692 |
+
#define sk_ASN1_INTEGER_new(cmp) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_new(ossl_check_ASN1_INTEGER_compfunc_type(cmp)))
|
| 693 |
+
#define sk_ASN1_INTEGER_new_null() ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_new_null())
|
| 694 |
+
#define sk_ASN1_INTEGER_new_reserve(cmp, n) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_INTEGER_compfunc_type(cmp), (n)))
|
| 695 |
+
#define sk_ASN1_INTEGER_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_INTEGER_sk_type(sk), (n))
|
| 696 |
+
#define sk_ASN1_INTEGER_free(sk) OPENSSL_sk_free(ossl_check_ASN1_INTEGER_sk_type(sk))
|
| 697 |
+
#define sk_ASN1_INTEGER_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_INTEGER_sk_type(sk))
|
| 698 |
+
#define sk_ASN1_INTEGER_delete(sk, i) ((ASN1_INTEGER *)OPENSSL_sk_delete(ossl_check_ASN1_INTEGER_sk_type(sk), (i)))
|
| 699 |
+
#define sk_ASN1_INTEGER_delete_ptr(sk, ptr) ((ASN1_INTEGER *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr)))
|
| 700 |
+
#define sk_ASN1_INTEGER_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
|
| 701 |
+
#define sk_ASN1_INTEGER_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
|
| 702 |
+
#define sk_ASN1_INTEGER_pop(sk) ((ASN1_INTEGER *)OPENSSL_sk_pop(ossl_check_ASN1_INTEGER_sk_type(sk)))
|
| 703 |
+
#define sk_ASN1_INTEGER_shift(sk) ((ASN1_INTEGER *)OPENSSL_sk_shift(ossl_check_ASN1_INTEGER_sk_type(sk)))
|
| 704 |
+
#define sk_ASN1_INTEGER_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_INTEGER_sk_type(sk),ossl_check_ASN1_INTEGER_freefunc_type(freefunc))
|
| 705 |
+
#define sk_ASN1_INTEGER_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr), (idx))
|
| 706 |
+
#define sk_ASN1_INTEGER_set(sk, idx, ptr) ((ASN1_INTEGER *)OPENSSL_sk_set(ossl_check_ASN1_INTEGER_sk_type(sk), (idx), ossl_check_ASN1_INTEGER_type(ptr)))
|
| 707 |
+
#define sk_ASN1_INTEGER_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
|
| 708 |
+
#define sk_ASN1_INTEGER_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
|
| 709 |
+
#define sk_ASN1_INTEGER_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr), pnum)
|
| 710 |
+
#define sk_ASN1_INTEGER_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_INTEGER_sk_type(sk))
|
| 711 |
+
#define sk_ASN1_INTEGER_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_INTEGER_sk_type(sk))
|
| 712 |
+
#define sk_ASN1_INTEGER_dup(sk) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_dup(ossl_check_const_ASN1_INTEGER_sk_type(sk)))
|
| 713 |
+
#define sk_ASN1_INTEGER_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_copyfunc_type(copyfunc), ossl_check_ASN1_INTEGER_freefunc_type(freefunc)))
|
| 714 |
+
#define sk_ASN1_INTEGER_set_cmp_func(sk, cmp) ((sk_ASN1_INTEGER_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_compfunc_type(cmp)))
|
| 715 |
+
|
| 716 |
+
/* clang-format on */
|
| 717 |
+
|
| 718 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_INTEGER)
|
| 719 |
+
ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp,
|
| 720 |
+
long length);
|
| 721 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_INTEGER)
|
| 722 |
+
int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y);
|
| 723 |
+
|
| 724 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_ENUMERATED)
|
| 725 |
+
|
| 726 |
+
int ASN1_UTCTIME_check(const ASN1_UTCTIME *a);
|
| 727 |
+
ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t);
|
| 728 |
+
ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
|
| 729 |
+
int offset_day, long offset_sec);
|
| 730 |
+
int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str);
|
| 731 |
+
int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
|
| 732 |
+
|
| 733 |
+
int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a);
|
| 734 |
+
ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
|
| 735 |
+
time_t t);
|
| 736 |
+
ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
|
| 737 |
+
time_t t, int offset_day,
|
| 738 |
+
long offset_sec);
|
| 739 |
+
int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str);
|
| 740 |
+
|
| 741 |
+
int ASN1_TIME_diff(int *pday, int *psec,
|
| 742 |
+
const ASN1_TIME *from, const ASN1_TIME *to);
|
| 743 |
+
|
| 744 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_OCTET_STRING)
|
| 745 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_OCTET_STRING)
|
| 746 |
+
int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a,
|
| 747 |
+
const ASN1_OCTET_STRING *b);
|
| 748 |
+
int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data,
|
| 749 |
+
int len);
|
| 750 |
+
|
| 751 |
+
/* clang-format off */
|
| 752 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_UTF8STRING, ASN1_UTF8STRING, ASN1_UTF8STRING)
|
| 753 |
+
#define sk_ASN1_UTF8STRING_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_UTF8STRING_sk_type(sk))
|
| 754 |
+
#define sk_ASN1_UTF8STRING_value(sk, idx) ((ASN1_UTF8STRING *)OPENSSL_sk_value(ossl_check_const_ASN1_UTF8STRING_sk_type(sk), (idx)))
|
| 755 |
+
#define sk_ASN1_UTF8STRING_new(cmp) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_new(ossl_check_ASN1_UTF8STRING_compfunc_type(cmp)))
|
| 756 |
+
#define sk_ASN1_UTF8STRING_new_null() ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_new_null())
|
| 757 |
+
#define sk_ASN1_UTF8STRING_new_reserve(cmp, n) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_UTF8STRING_compfunc_type(cmp), (n)))
|
| 758 |
+
#define sk_ASN1_UTF8STRING_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_UTF8STRING_sk_type(sk), (n))
|
| 759 |
+
#define sk_ASN1_UTF8STRING_free(sk) OPENSSL_sk_free(ossl_check_ASN1_UTF8STRING_sk_type(sk))
|
| 760 |
+
#define sk_ASN1_UTF8STRING_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_UTF8STRING_sk_type(sk))
|
| 761 |
+
#define sk_ASN1_UTF8STRING_delete(sk, i) ((ASN1_UTF8STRING *)OPENSSL_sk_delete(ossl_check_ASN1_UTF8STRING_sk_type(sk), (i)))
|
| 762 |
+
#define sk_ASN1_UTF8STRING_delete_ptr(sk, ptr) ((ASN1_UTF8STRING *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr)))
|
| 763 |
+
#define sk_ASN1_UTF8STRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
|
| 764 |
+
#define sk_ASN1_UTF8STRING_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
|
| 765 |
+
#define sk_ASN1_UTF8STRING_pop(sk) ((ASN1_UTF8STRING *)OPENSSL_sk_pop(ossl_check_ASN1_UTF8STRING_sk_type(sk)))
|
| 766 |
+
#define sk_ASN1_UTF8STRING_shift(sk) ((ASN1_UTF8STRING *)OPENSSL_sk_shift(ossl_check_ASN1_UTF8STRING_sk_type(sk)))
|
| 767 |
+
#define sk_ASN1_UTF8STRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_UTF8STRING_sk_type(sk),ossl_check_ASN1_UTF8STRING_freefunc_type(freefunc))
|
| 768 |
+
#define sk_ASN1_UTF8STRING_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr), (idx))
|
| 769 |
+
#define sk_ASN1_UTF8STRING_set(sk, idx, ptr) ((ASN1_UTF8STRING *)OPENSSL_sk_set(ossl_check_ASN1_UTF8STRING_sk_type(sk), (idx), ossl_check_ASN1_UTF8STRING_type(ptr)))
|
| 770 |
+
#define sk_ASN1_UTF8STRING_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
|
| 771 |
+
#define sk_ASN1_UTF8STRING_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
|
| 772 |
+
#define sk_ASN1_UTF8STRING_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr), pnum)
|
| 773 |
+
#define sk_ASN1_UTF8STRING_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_UTF8STRING_sk_type(sk))
|
| 774 |
+
#define sk_ASN1_UTF8STRING_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_UTF8STRING_sk_type(sk))
|
| 775 |
+
#define sk_ASN1_UTF8STRING_dup(sk) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_dup(ossl_check_const_ASN1_UTF8STRING_sk_type(sk)))
|
| 776 |
+
#define sk_ASN1_UTF8STRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_copyfunc_type(copyfunc), ossl_check_ASN1_UTF8STRING_freefunc_type(freefunc)))
|
| 777 |
+
#define sk_ASN1_UTF8STRING_set_cmp_func(sk, cmp) ((sk_ASN1_UTF8STRING_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_compfunc_type(cmp)))
|
| 778 |
+
|
| 779 |
+
/* clang-format on */
|
| 780 |
+
|
| 781 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_VISIBLESTRING)
|
| 782 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_UNIVERSALSTRING)
|
| 783 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_UTF8STRING)
|
| 784 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_NULL)
|
| 785 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_BMPSTRING)
|
| 786 |
+
|
| 787 |
+
int UTF8_getc(const unsigned char *str, int len, unsigned long *val);
|
| 788 |
+
int UTF8_putc(unsigned char *str, int len, unsigned long value);
|
| 789 |
+
|
| 790 |
+
/* clang-format off */
|
| 791 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_GENERALSTRING, ASN1_GENERALSTRING, ASN1_GENERALSTRING)
|
| 792 |
+
#define sk_ASN1_GENERALSTRING_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk))
|
| 793 |
+
#define sk_ASN1_GENERALSTRING_value(sk, idx) ((ASN1_GENERALSTRING *)OPENSSL_sk_value(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk), (idx)))
|
| 794 |
+
#define sk_ASN1_GENERALSTRING_new(cmp) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_new(ossl_check_ASN1_GENERALSTRING_compfunc_type(cmp)))
|
| 795 |
+
#define sk_ASN1_GENERALSTRING_new_null() ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_new_null())
|
| 796 |
+
#define sk_ASN1_GENERALSTRING_new_reserve(cmp, n) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_GENERALSTRING_compfunc_type(cmp), (n)))
|
| 797 |
+
#define sk_ASN1_GENERALSTRING_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_GENERALSTRING_sk_type(sk), (n))
|
| 798 |
+
#define sk_ASN1_GENERALSTRING_free(sk) OPENSSL_sk_free(ossl_check_ASN1_GENERALSTRING_sk_type(sk))
|
| 799 |
+
#define sk_ASN1_GENERALSTRING_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_GENERALSTRING_sk_type(sk))
|
| 800 |
+
#define sk_ASN1_GENERALSTRING_delete(sk, i) ((ASN1_GENERALSTRING *)OPENSSL_sk_delete(ossl_check_ASN1_GENERALSTRING_sk_type(sk), (i)))
|
| 801 |
+
#define sk_ASN1_GENERALSTRING_delete_ptr(sk, ptr) ((ASN1_GENERALSTRING *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr)))
|
| 802 |
+
#define sk_ASN1_GENERALSTRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
|
| 803 |
+
#define sk_ASN1_GENERALSTRING_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
|
| 804 |
+
#define sk_ASN1_GENERALSTRING_pop(sk) ((ASN1_GENERALSTRING *)OPENSSL_sk_pop(ossl_check_ASN1_GENERALSTRING_sk_type(sk)))
|
| 805 |
+
#define sk_ASN1_GENERALSTRING_shift(sk) ((ASN1_GENERALSTRING *)OPENSSL_sk_shift(ossl_check_ASN1_GENERALSTRING_sk_type(sk)))
|
| 806 |
+
#define sk_ASN1_GENERALSTRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_GENERALSTRING_sk_type(sk),ossl_check_ASN1_GENERALSTRING_freefunc_type(freefunc))
|
| 807 |
+
#define sk_ASN1_GENERALSTRING_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr), (idx))
|
| 808 |
+
#define sk_ASN1_GENERALSTRING_set(sk, idx, ptr) ((ASN1_GENERALSTRING *)OPENSSL_sk_set(ossl_check_ASN1_GENERALSTRING_sk_type(sk), (idx), ossl_check_ASN1_GENERALSTRING_type(ptr)))
|
| 809 |
+
#define sk_ASN1_GENERALSTRING_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
|
| 810 |
+
#define sk_ASN1_GENERALSTRING_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
|
| 811 |
+
#define sk_ASN1_GENERALSTRING_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr), pnum)
|
| 812 |
+
#define sk_ASN1_GENERALSTRING_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_GENERALSTRING_sk_type(sk))
|
| 813 |
+
#define sk_ASN1_GENERALSTRING_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk))
|
| 814 |
+
#define sk_ASN1_GENERALSTRING_dup(sk) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_dup(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk)))
|
| 815 |
+
#define sk_ASN1_GENERALSTRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_copyfunc_type(copyfunc), ossl_check_ASN1_GENERALSTRING_freefunc_type(freefunc)))
|
| 816 |
+
#define sk_ASN1_GENERALSTRING_set_cmp_func(sk, cmp) ((sk_ASN1_GENERALSTRING_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_compfunc_type(cmp)))
|
| 817 |
+
|
| 818 |
+
/* clang-format on */
|
| 819 |
+
|
| 820 |
+
DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, ASN1_PRINTABLE)
|
| 821 |
+
|
| 822 |
+
DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DIRECTORYSTRING)
|
| 823 |
+
DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DISPLAYTEXT)
|
| 824 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_PRINTABLESTRING)
|
| 825 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_T61STRING)
|
| 826 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_IA5STRING)
|
| 827 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_GENERALSTRING)
|
| 828 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_UTCTIME)
|
| 829 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_GENERALIZEDTIME)
|
| 830 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_TIME)
|
| 831 |
+
|
| 832 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_TIME)
|
| 833 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_UTCTIME)
|
| 834 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_GENERALIZEDTIME)
|
| 835 |
+
|
| 836 |
+
DECLARE_ASN1_ITEM(ASN1_OCTET_STRING_NDEF)
|
| 837 |
+
|
| 838 |
+
ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t);
|
| 839 |
+
ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, time_t t,
|
| 840 |
+
int offset_day, long offset_sec);
|
| 841 |
+
int ASN1_TIME_check(const ASN1_TIME *t);
|
| 842 |
+
ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(const ASN1_TIME *t,
|
| 843 |
+
ASN1_GENERALIZEDTIME **out);
|
| 844 |
+
int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);
|
| 845 |
+
int ASN1_TIME_set_string_X509(ASN1_TIME *s, const char *str);
|
| 846 |
+
int ASN1_TIME_to_tm(const ASN1_TIME *s, struct tm *tm);
|
| 847 |
+
int ASN1_TIME_normalize(ASN1_TIME *s);
|
| 848 |
+
int ASN1_TIME_cmp_time_t(const ASN1_TIME *s, time_t t);
|
| 849 |
+
int ASN1_TIME_compare(const ASN1_TIME *a, const ASN1_TIME *b);
|
| 850 |
+
|
| 851 |
+
int i2a_ASN1_INTEGER(BIO *bp, const ASN1_INTEGER *a);
|
| 852 |
+
int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size);
|
| 853 |
+
int i2a_ASN1_ENUMERATED(BIO *bp, const ASN1_ENUMERATED *a);
|
| 854 |
+
int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size);
|
| 855 |
+
int i2a_ASN1_OBJECT(BIO *bp, const ASN1_OBJECT *a);
|
| 856 |
+
int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size);
|
| 857 |
+
int i2a_ASN1_STRING(BIO *bp, const ASN1_STRING *a, int type);
|
| 858 |
+
int i2t_ASN1_OBJECT(char *buf, int buf_len, const ASN1_OBJECT *a);
|
| 859 |
+
|
| 860 |
+
int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num);
|
| 861 |
+
ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len,
|
| 862 |
+
const char *sn, const char *ln);
|
| 863 |
+
|
| 864 |
+
int ASN1_INTEGER_get_int64(int64_t *pr, const ASN1_INTEGER *a);
|
| 865 |
+
int ASN1_INTEGER_set_int64(ASN1_INTEGER *a, int64_t r);
|
| 866 |
+
int ASN1_INTEGER_get_uint64(uint64_t *pr, const ASN1_INTEGER *a);
|
| 867 |
+
int ASN1_INTEGER_set_uint64(ASN1_INTEGER *a, uint64_t r);
|
| 868 |
+
|
| 869 |
+
int ASN1_INTEGER_set(ASN1_INTEGER *a, long v);
|
| 870 |
+
long ASN1_INTEGER_get(const ASN1_INTEGER *a);
|
| 871 |
+
ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai);
|
| 872 |
+
BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn);
|
| 873 |
+
|
| 874 |
+
int ASN1_ENUMERATED_get_int64(int64_t *pr, const ASN1_ENUMERATED *a);
|
| 875 |
+
int ASN1_ENUMERATED_set_int64(ASN1_ENUMERATED *a, int64_t r);
|
| 876 |
+
|
| 877 |
+
int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v);
|
| 878 |
+
long ASN1_ENUMERATED_get(const ASN1_ENUMERATED *a);
|
| 879 |
+
ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(const BIGNUM *bn, ASN1_ENUMERATED *ai);
|
| 880 |
+
BIGNUM *ASN1_ENUMERATED_to_BN(const ASN1_ENUMERATED *ai, BIGNUM *bn);
|
| 881 |
+
|
| 882 |
+
/* General */
|
| 883 |
+
/* given a string, return the correct type, max is the maximum length */
|
| 884 |
+
int ASN1_PRINTABLE_type(const unsigned char *s, int max);
|
| 885 |
+
|
| 886 |
+
unsigned long ASN1_tag2bit(int tag);
|
| 887 |
+
|
| 888 |
+
/* SPECIALS */
|
| 889 |
+
int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
|
| 890 |
+
int *pclass, long omax);
|
| 891 |
+
int ASN1_check_infinite_end(unsigned char **p, long len);
|
| 892 |
+
int ASN1_const_check_infinite_end(const unsigned char **p, long len);
|
| 893 |
+
void ASN1_put_object(unsigned char **pp, int constructed, int length,
|
| 894 |
+
int tag, int xclass);
|
| 895 |
+
int ASN1_put_eoc(unsigned char **pp);
|
| 896 |
+
int ASN1_object_size(int constructed, int length, int tag);
|
| 897 |
+
|
| 898 |
+
/* Used to implement other functions */
|
| 899 |
+
void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, const void *x);
|
| 900 |
+
|
| 901 |
+
#define ASN1_dup_of(type, i2d, d2i, x) \
|
| 902 |
+
((type *)ASN1_dup(CHECKED_I2D_OF(type, i2d), \
|
| 903 |
+
CHECKED_D2I_OF(type, d2i), \
|
| 904 |
+
CHECKED_PTR_OF(const type, x)))
|
| 905 |
+
|
| 906 |
+
void *ASN1_item_dup(const ASN1_ITEM *it, const void *x);
|
| 907 |
+
int ASN1_item_sign_ex(const ASN1_ITEM *it, X509_ALGOR *algor1,
|
| 908 |
+
X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
|
| 909 |
+
const void *data, const ASN1_OCTET_STRING *id,
|
| 910 |
+
EVP_PKEY *pkey, const EVP_MD *md, OSSL_LIB_CTX *libctx,
|
| 911 |
+
const char *propq);
|
| 912 |
+
int ASN1_item_verify_ex(const ASN1_ITEM *it, const X509_ALGOR *alg,
|
| 913 |
+
const ASN1_BIT_STRING *signature, const void *data,
|
| 914 |
+
const ASN1_OCTET_STRING *id, EVP_PKEY *pkey,
|
| 915 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 916 |
+
|
| 917 |
+
/* ASN1 alloc/free macros for when a type is only used internally */
|
| 918 |
+
|
| 919 |
+
#define M_ASN1_new_of(type) (type *)ASN1_item_new(ASN1_ITEM_rptr(type))
|
| 920 |
+
#define M_ASN1_free_of(x, type) \
|
| 921 |
+
ASN1_item_free(CHECKED_PTR_OF(type, x), ASN1_ITEM_rptr(type))
|
| 922 |
+
|
| 923 |
+
#ifndef OPENSSL_NO_STDIO
|
| 924 |
+
void *ASN1_d2i_fp(void *(*xnew)(void), d2i_of_void *d2i, FILE *in, void **x);
|
| 925 |
+
|
| 926 |
+
#define ASN1_d2i_fp_of(type, xnew, d2i, in, x) \
|
| 927 |
+
((type *)ASN1_d2i_fp(CHECKED_NEW_OF(type, xnew), \
|
| 928 |
+
CHECKED_D2I_OF(type, d2i), \
|
| 929 |
+
in, \
|
| 930 |
+
CHECKED_PPTR_OF(type, x)))
|
| 931 |
+
|
| 932 |
+
void *ASN1_item_d2i_fp_ex(const ASN1_ITEM *it, FILE *in, void *x,
|
| 933 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 934 |
+
void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x);
|
| 935 |
+
int ASN1_i2d_fp(i2d_of_void *i2d, FILE *out, const void *x);
|
| 936 |
+
|
| 937 |
+
#define ASN1_i2d_fp_of(type, i2d, out, x) \
|
| 938 |
+
(ASN1_i2d_fp(CHECKED_I2D_OF(type, i2d), \
|
| 939 |
+
out, \
|
| 940 |
+
CHECKED_PTR_OF(const type, x)))
|
| 941 |
+
|
| 942 |
+
int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, const void *x);
|
| 943 |
+
int ASN1_STRING_print_ex_fp(FILE *fp, const ASN1_STRING *str, unsigned long flags);
|
| 944 |
+
#endif
|
| 945 |
+
|
| 946 |
+
int ASN1_STRING_to_UTF8(unsigned char **out, const ASN1_STRING *in);
|
| 947 |
+
|
| 948 |
+
void *ASN1_d2i_bio(void *(*xnew)(void), d2i_of_void *d2i, BIO *in, void **x);
|
| 949 |
+
|
| 950 |
+
#define ASN1_d2i_bio_of(type, xnew, d2i, in, x) \
|
| 951 |
+
((type *)ASN1_d2i_bio(CHECKED_NEW_OF(type, xnew), \
|
| 952 |
+
CHECKED_D2I_OF(type, d2i), \
|
| 953 |
+
in, \
|
| 954 |
+
CHECKED_PPTR_OF(type, x)))
|
| 955 |
+
|
| 956 |
+
void *ASN1_item_d2i_bio_ex(const ASN1_ITEM *it, BIO *in, void *pval,
|
| 957 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 958 |
+
void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *pval);
|
| 959 |
+
int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, const void *x);
|
| 960 |
+
|
| 961 |
+
#define ASN1_i2d_bio_of(type, i2d, out, x) \
|
| 962 |
+
(ASN1_i2d_bio(CHECKED_I2D_OF(type, i2d), \
|
| 963 |
+
out, \
|
| 964 |
+
CHECKED_PTR_OF(const type, x)))
|
| 965 |
+
|
| 966 |
+
int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, const void *x);
|
| 967 |
+
BIO *ASN1_item_i2d_mem_bio(const ASN1_ITEM *it, const ASN1_VALUE *val);
|
| 968 |
+
int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a);
|
| 969 |
+
int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a);
|
| 970 |
+
int ASN1_TIME_print(BIO *bp, const ASN1_TIME *tm);
|
| 971 |
+
int ASN1_TIME_print_ex(BIO *bp, const ASN1_TIME *tm, unsigned long flags);
|
| 972 |
+
int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v);
|
| 973 |
+
int ASN1_STRING_print_ex(BIO *out, const ASN1_STRING *str, unsigned long flags);
|
| 974 |
+
int ASN1_buf_print(BIO *bp, const unsigned char *buf, size_t buflen, int off);
|
| 975 |
+
int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,
|
| 976 |
+
unsigned char *buf, int off);
|
| 977 |
+
int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent);
|
| 978 |
+
int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent,
|
| 979 |
+
int dump);
|
| 980 |
+
const char *ASN1_tag2str(int tag);
|
| 981 |
+
|
| 982 |
+
/* Used to load and write Netscape format cert */
|
| 983 |
+
|
| 984 |
+
int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s);
|
| 985 |
+
|
| 986 |
+
int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len);
|
| 987 |
+
int ASN1_TYPE_get_octetstring(const ASN1_TYPE *a, unsigned char *data, int max_len);
|
| 988 |
+
int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num,
|
| 989 |
+
unsigned char *data, int len);
|
| 990 |
+
int ASN1_TYPE_get_int_octetstring(const ASN1_TYPE *a, long *num,
|
| 991 |
+
unsigned char *data, int max_len);
|
| 992 |
+
|
| 993 |
+
void *ASN1_item_unpack(const ASN1_STRING *oct, const ASN1_ITEM *it);
|
| 994 |
+
void *ASN1_item_unpack_ex(const ASN1_STRING *oct, const ASN1_ITEM *it,
|
| 995 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 996 |
+
|
| 997 |
+
ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it,
|
| 998 |
+
ASN1_OCTET_STRING **oct);
|
| 999 |
+
|
| 1000 |
+
void ASN1_STRING_set_default_mask(unsigned long mask);
|
| 1001 |
+
int ASN1_STRING_set_default_mask_asc(const char *p);
|
| 1002 |
+
unsigned long ASN1_STRING_get_default_mask(void);
|
| 1003 |
+
int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len,
|
| 1004 |
+
int inform, unsigned long mask);
|
| 1005 |
+
int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
|
| 1006 |
+
int inform, unsigned long mask,
|
| 1007 |
+
long minsize, long maxsize);
|
| 1008 |
+
|
| 1009 |
+
ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out,
|
| 1010 |
+
const unsigned char *in, int inlen,
|
| 1011 |
+
int inform, int nid);
|
| 1012 |
+
ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
|
| 1013 |
+
int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long);
|
| 1014 |
+
void ASN1_STRING_TABLE_cleanup(void);
|
| 1015 |
+
|
| 1016 |
+
/* ASN1 template functions */
|
| 1017 |
+
|
| 1018 |
+
/* Old API compatible functions */
|
| 1019 |
+
ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it);
|
| 1020 |
+
ASN1_VALUE *ASN1_item_new_ex(const ASN1_ITEM *it, OSSL_LIB_CTX *libctx,
|
| 1021 |
+
const char *propq);
|
| 1022 |
+
void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it);
|
| 1023 |
+
ASN1_VALUE *ASN1_item_d2i_ex(ASN1_VALUE **val, const unsigned char **in,
|
| 1024 |
+
long len, const ASN1_ITEM *it,
|
| 1025 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 1026 |
+
ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in,
|
| 1027 |
+
long len, const ASN1_ITEM *it);
|
| 1028 |
+
int ASN1_item_i2d(const ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
|
| 1029 |
+
int ASN1_item_ndef_i2d(const ASN1_VALUE *val, unsigned char **out,
|
| 1030 |
+
const ASN1_ITEM *it);
|
| 1031 |
+
|
| 1032 |
+
void ASN1_add_oid_module(void);
|
| 1033 |
+
void ASN1_add_stable_module(void);
|
| 1034 |
+
|
| 1035 |
+
ASN1_TYPE *ASN1_generate_nconf(const char *str, CONF *nconf);
|
| 1036 |
+
ASN1_TYPE *ASN1_generate_v3(const char *str, X509V3_CTX *cnf);
|
| 1037 |
+
int ASN1_str2mask(const char *str, unsigned long *pmask);
|
| 1038 |
+
|
| 1039 |
+
/* ASN1 Print flags */
|
| 1040 |
+
|
| 1041 |
+
/* Indicate missing OPTIONAL fields */
|
| 1042 |
+
#define ASN1_PCTX_FLAGS_SHOW_ABSENT 0x001
|
| 1043 |
+
/* Mark start and end of SEQUENCE */
|
| 1044 |
+
#define ASN1_PCTX_FLAGS_SHOW_SEQUENCE 0x002
|
| 1045 |
+
/* Mark start and end of SEQUENCE/SET OF */
|
| 1046 |
+
#define ASN1_PCTX_FLAGS_SHOW_SSOF 0x004
|
| 1047 |
+
/* Show the ASN1 type of primitives */
|
| 1048 |
+
#define ASN1_PCTX_FLAGS_SHOW_TYPE 0x008
|
| 1049 |
+
/* Don't show ASN1 type of ANY */
|
| 1050 |
+
#define ASN1_PCTX_FLAGS_NO_ANY_TYPE 0x010
|
| 1051 |
+
/* Don't show ASN1 type of MSTRINGs */
|
| 1052 |
+
#define ASN1_PCTX_FLAGS_NO_MSTRING_TYPE 0x020
|
| 1053 |
+
/* Don't show field names in SEQUENCE */
|
| 1054 |
+
#define ASN1_PCTX_FLAGS_NO_FIELD_NAME 0x040
|
| 1055 |
+
/* Show structure names of each SEQUENCE field */
|
| 1056 |
+
#define ASN1_PCTX_FLAGS_SHOW_FIELD_STRUCT_NAME 0x080
|
| 1057 |
+
/* Don't show structure name even at top level */
|
| 1058 |
+
#define ASN1_PCTX_FLAGS_NO_STRUCT_NAME 0x100
|
| 1059 |
+
|
| 1060 |
+
int ASN1_item_print(BIO *out, const ASN1_VALUE *ifld, int indent,
|
| 1061 |
+
const ASN1_ITEM *it, const ASN1_PCTX *pctx);
|
| 1062 |
+
ASN1_PCTX *ASN1_PCTX_new(void);
|
| 1063 |
+
void ASN1_PCTX_free(ASN1_PCTX *p);
|
| 1064 |
+
unsigned long ASN1_PCTX_get_flags(const ASN1_PCTX *p);
|
| 1065 |
+
void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1066 |
+
unsigned long ASN1_PCTX_get_nm_flags(const ASN1_PCTX *p);
|
| 1067 |
+
void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1068 |
+
unsigned long ASN1_PCTX_get_cert_flags(const ASN1_PCTX *p);
|
| 1069 |
+
void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1070 |
+
unsigned long ASN1_PCTX_get_oid_flags(const ASN1_PCTX *p);
|
| 1071 |
+
void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1072 |
+
unsigned long ASN1_PCTX_get_str_flags(const ASN1_PCTX *p);
|
| 1073 |
+
void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1074 |
+
|
| 1075 |
+
ASN1_SCTX *ASN1_SCTX_new(int (*scan_cb)(ASN1_SCTX *ctx));
|
| 1076 |
+
void ASN1_SCTX_free(ASN1_SCTX *p);
|
| 1077 |
+
const ASN1_ITEM *ASN1_SCTX_get_item(ASN1_SCTX *p);
|
| 1078 |
+
const ASN1_TEMPLATE *ASN1_SCTX_get_template(ASN1_SCTX *p);
|
| 1079 |
+
unsigned long ASN1_SCTX_get_flags(ASN1_SCTX *p);
|
| 1080 |
+
void ASN1_SCTX_set_app_data(ASN1_SCTX *p, void *data);
|
| 1081 |
+
void *ASN1_SCTX_get_app_data(ASN1_SCTX *p);
|
| 1082 |
+
|
| 1083 |
+
const BIO_METHOD *BIO_f_asn1(void);
|
| 1084 |
+
|
| 1085 |
+
/* cannot constify val because of CMS_stream() */
|
| 1086 |
+
BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it);
|
| 1087 |
+
|
| 1088 |
+
int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
|
| 1089 |
+
const ASN1_ITEM *it);
|
| 1090 |
+
int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
|
| 1091 |
+
const char *hdr, const ASN1_ITEM *it);
|
| 1092 |
+
/* cannot constify val because of CMS_dataFinal() */
|
| 1093 |
+
int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
|
| 1094 |
+
int ctype_nid, int econt_nid,
|
| 1095 |
+
STACK_OF(X509_ALGOR) *mdalgs, const ASN1_ITEM *it);
|
| 1096 |
+
int SMIME_write_ASN1_ex(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
|
| 1097 |
+
int ctype_nid, int econt_nid,
|
| 1098 |
+
STACK_OF(X509_ALGOR) *mdalgs, const ASN1_ITEM *it,
|
| 1099 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 1100 |
+
ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it);
|
| 1101 |
+
ASN1_VALUE *SMIME_read_ASN1_ex(BIO *bio, int flags, BIO **bcont,
|
| 1102 |
+
const ASN1_ITEM *it, ASN1_VALUE **x,
|
| 1103 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 1104 |
+
int SMIME_crlf_copy(BIO *in, BIO *out, int flags);
|
| 1105 |
+
int SMIME_text(BIO *in, BIO *out);
|
| 1106 |
+
|
| 1107 |
+
const ASN1_ITEM *ASN1_ITEM_lookup(const char *name);
|
| 1108 |
+
const ASN1_ITEM *ASN1_ITEM_get(size_t i);
|
| 1109 |
+
|
| 1110 |
+
/* Legacy compatibility */
|
| 1111 |
+
#define DECLARE_ASN1_FUNCTIONS_fname(type, itname, name) \
|
| 1112 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \
|
| 1113 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name)
|
| 1114 |
+
#define DECLARE_ASN1_FUNCTIONS_const(type) DECLARE_ASN1_FUNCTIONS(type)
|
| 1115 |
+
#define DECLARE_ASN1_ENCODE_FUNCTIONS_const(type, name) \
|
| 1116 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS(type, name)
|
| 1117 |
+
#define I2D_OF_const(type) I2D_OF(type)
|
| 1118 |
+
#define ASN1_dup_of_const(type, i2d, d2i, x) ASN1_dup_of(type, i2d, d2i, x)
|
| 1119 |
+
#define ASN1_i2d_fp_of_const(type, i2d, out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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_ASN1ERR_H
|
| 12 |
+
#define OPENSSL_ASN1ERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
/*
|
| 20 |
+
* ASN1 reason codes.
|
| 21 |
+
*/
|
| 22 |
+
#define ASN1_R_ADDING_OBJECT 171
|
| 23 |
+
#define ASN1_R_ASN1_PARSE_ERROR 203
|
| 24 |
+
#define ASN1_R_ASN1_SIG_PARSE_ERROR 204
|
| 25 |
+
#define ASN1_R_AUX_ERROR 100
|
| 26 |
+
#define ASN1_R_BAD_OBJECT_HEADER 102
|
| 27 |
+
#define ASN1_R_BAD_TEMPLATE 230
|
| 28 |
+
#define ASN1_R_BMPSTRING_IS_WRONG_LENGTH 214
|
| 29 |
+
#define ASN1_R_BN_LIB 105
|
| 30 |
+
#define ASN1_R_BOOLEAN_IS_WRONG_LENGTH 106
|
| 31 |
+
#define ASN1_R_BUFFER_TOO_SMALL 107
|
| 32 |
+
#define ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER 108
|
| 33 |
+
#define ASN1_R_CONTEXT_NOT_INITIALISED 217
|
| 34 |
+
#define ASN1_R_DATA_IS_WRONG 109
|
| 35 |
+
#define ASN1_R_DECODE_ERROR 110
|
| 36 |
+
#define ASN1_R_DEPTH_EXCEEDED 174
|
| 37 |
+
#define ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED 198
|
| 38 |
+
#define ASN1_R_ENCODE_ERROR 112
|
| 39 |
+
#define ASN1_R_ERROR_GETTING_TIME 173
|
| 40 |
+
#define ASN1_R_ERROR_LOADING_SECTION 172
|
| 41 |
+
#define ASN1_R_ERROR_SETTING_CIPHER_PARAMS 114
|
| 42 |
+
#define ASN1_R_EXPECTING_AN_INTEGER 115
|
| 43 |
+
#define ASN1_R_EXPECTING_AN_OBJECT 116
|
| 44 |
+
#define ASN1_R_EXPLICIT_LENGTH_MISMATCH 119
|
| 45 |
+
#define ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED 120
|
| 46 |
+
#define ASN1_R_FIELD_MISSING 121
|
| 47 |
+
#define ASN1_R_FIRST_NUM_TOO_LARGE 122
|
| 48 |
+
#define ASN1_R_GENERALIZEDTIME_IS_TOO_SHORT 232
|
| 49 |
+
#define ASN1_R_HEADER_TOO_LONG 123
|
| 50 |
+
#define ASN1_R_ILLEGAL_BITSTRING_FORMAT 175
|
| 51 |
+
#define ASN1_R_ILLEGAL_BOOLEAN 176
|
| 52 |
+
#define ASN1_R_ILLEGAL_CHARACTERS 124
|
| 53 |
+
#define ASN1_R_ILLEGAL_FORMAT 177
|
| 54 |
+
#define ASN1_R_ILLEGAL_HEX 178
|
| 55 |
+
#define ASN1_R_ILLEGAL_IMPLICIT_TAG 179
|
| 56 |
+
#define ASN1_R_ILLEGAL_INTEGER 180
|
| 57 |
+
#define ASN1_R_ILLEGAL_NEGATIVE_VALUE 226
|
| 58 |
+
#define ASN1_R_ILLEGAL_NESTED_TAGGING 181
|
| 59 |
+
#define ASN1_R_ILLEGAL_NULL 125
|
| 60 |
+
#define ASN1_R_ILLEGAL_NULL_VALUE 182
|
| 61 |
+
#define ASN1_R_ILLEGAL_OBJECT 183
|
| 62 |
+
#define ASN1_R_ILLEGAL_OPTIONAL_ANY 126
|
| 63 |
+
#define ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE 170
|
| 64 |
+
#define ASN1_R_ILLEGAL_PADDING 221
|
| 65 |
+
#define ASN1_R_ILLEGAL_TAGGED_ANY 127
|
| 66 |
+
#define ASN1_R_ILLEGAL_TIME_VALUE 184
|
| 67 |
+
#define ASN1_R_ILLEGAL_ZERO_CONTENT 222
|
| 68 |
+
#define ASN1_R_INTEGER_NOT_ASCII_FORMAT 185
|
| 69 |
+
#define ASN1_R_INTEGER_TOO_LARGE_FOR_LONG 128
|
| 70 |
+
#define ASN1_R_INVALID_BIT_STRING_BITS_LEFT 220
|
| 71 |
+
#define ASN1_R_INVALID_BMPSTRING_LENGTH 129
|
| 72 |
+
#define ASN1_R_INVALID_DIGIT 130
|
| 73 |
+
#define ASN1_R_INVALID_MIME_TYPE 205
|
| 74 |
+
#define ASN1_R_INVALID_MODIFIER 186
|
| 75 |
+
#define ASN1_R_INVALID_NUMBER 187
|
| 76 |
+
#define ASN1_R_INVALID_OBJECT_ENCODING 216
|
| 77 |
+
#define ASN1_R_INVALID_SCRYPT_PARAMETERS 227
|
| 78 |
+
#define ASN1_R_INVALID_SEPARATOR 131
|
| 79 |
+
#define ASN1_R_INVALID_STRING_TABLE_VALUE 218
|
| 80 |
+
#define ASN1_R_INVALID_UNIVERSALSTRING_LENGTH 133
|
| 81 |
+
#define ASN1_R_INVALID_UTF8STRING 134
|
| 82 |
+
#define ASN1_R_INVALID_VALUE 219
|
| 83 |
+
#define ASN1_R_LENGTH_TOO_LONG 231
|
| 84 |
+
#define ASN1_R_LIST_ERROR 188
|
| 85 |
+
#define ASN1_R_MIME_NO_CONTENT_TYPE 206
|
| 86 |
+
#define ASN1_R_MIME_PARSE_ERROR 207
|
| 87 |
+
#define ASN1_R_MIME_SIG_PARSE_ERROR 208
|
| 88 |
+
#define ASN1_R_MISSING_EOC 137
|
| 89 |
+
#define ASN1_R_MISSING_SECOND_NUMBER 138
|
| 90 |
+
#define ASN1_R_MISSING_VALUE 189
|
| 91 |
+
#define ASN1_R_MSTRING_NOT_UNIVERSAL 139
|
| 92 |
+
#define ASN1_R_MSTRING_WRONG_TAG 140
|
| 93 |
+
#define ASN1_R_NESTED_ASN1_STRING 197
|
| 94 |
+
#define ASN1_R_NESTED_TOO_DEEP 201
|
| 95 |
+
#define ASN1_R_NON_HEX_CHARACTERS 141
|
| 96 |
+
#define ASN1_R_NOT_ASCII_FORMAT 190
|
| 97 |
+
#define ASN1_R_NOT_ENOUGH_DATA 142
|
| 98 |
+
#define ASN1_R_NO_CONTENT_TYPE 209
|
| 99 |
+
#define ASN1_R_NO_MATCHING_CHOICE_TYPE 143
|
| 100 |
+
#define ASN1_R_NO_MULTIPART_BODY_FAILURE 210
|
| 101 |
+
#define ASN1_R_NO_MULTIPART_BOUNDARY 211
|
| 102 |
+
#define ASN1_R_NO_SIG_CONTENT_TYPE 212
|
| 103 |
+
#define ASN1_R_NULL_IS_WRONG_LENGTH 144
|
| 104 |
+
#define ASN1_R_OBJECT_NOT_ASCII_FORMAT 191
|
| 105 |
+
#define ASN1_R_ODD_NUMBER_OF_CHARS 145
|
| 106 |
+
#define ASN1_R_SECOND_NUMBER_TOO_LARGE 147
|
| 107 |
+
#define ASN1_R_SEQUENCE_LENGTH_MISMATCH 148
|
| 108 |
+
#define ASN1_R_SEQUENCE_NOT_CONSTRUCTED 149
|
| 109 |
+
#define ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG 192
|
| 110 |
+
#define ASN1_R_SHORT_LINE 150
|
| 111 |
+
#define ASN1_R_SIG_INVALID_MIME_TYPE 213
|
| 112 |
+
#define ASN1_R_STREAMING_NOT_SUPPORTED 202
|
| 113 |
+
#define ASN1_R_STRING_TOO_LONG 151
|
| 114 |
+
#define ASN1_R_STRING_TOO_SHORT 152
|
| 115 |
+
#define ASN1_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 154
|
| 116 |
+
#define ASN1_R_TIME_NOT_ASCII_FORMAT 193
|
| 117 |
+
#define ASN1_R_TOO_LARGE 223
|
| 118 |
+
#define ASN1_R_TOO_LONG 155
|
| 119 |
+
#define ASN1_R_TOO_SMALL 224
|
| 120 |
+
#define ASN1_R_TYPE_NOT_CONSTRUCTED 156
|
| 121 |
+
#define ASN1_R_TYPE_NOT_PRIMITIVE 195
|
| 122 |
+
#define ASN1_R_UNEXPECTED_EOC 159
|
| 123 |
+
#define ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH 215
|
| 124 |
+
#define ASN1_R_UNKNOWN_DIGEST 229
|
| 125 |
+
#define ASN1_R_UNKNOWN_FORMAT 160
|
| 126 |
+
#define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM 161
|
| 127 |
+
#define ASN1_R_UNKNOWN_OBJECT_TYPE 162
|
| 128 |
+
#define ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE 163
|
| 129 |
+
#define ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM 199
|
| 130 |
+
#define ASN1_R_UNKNOWN_TAG 194
|
| 131 |
+
#define ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE 164
|
| 132 |
+
#define ASN1_R_UNSUPPORTED_CIPHER 228
|
| 133 |
+
#define ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE 167
|
| 134 |
+
#define ASN1_R_UNSUPPORTED_TYPE 196
|
| 135 |
+
#define ASN1_R_UTCTIME_IS_TOO_SHORT 233
|
| 136 |
+
#define ASN1_R_WRONG_INTEGER_TYPE 225
|
| 137 |
+
#define ASN1_R_WRONG_PUBLIC_KEY_TYPE 200
|
| 138 |
+
#define ASN1_R_WRONG_TAG 168
|
| 139 |
+
|
| 140 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/asn1t.h
ADDED
|
@@ -0,0 +1,935 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/asn1t.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
/* clang-format off */
|
| 14 |
+
|
| 15 |
+
/* clang-format on */
|
| 16 |
+
|
| 17 |
+
#ifndef OPENSSL_ASN1T_H
|
| 18 |
+
#define OPENSSL_ASN1T_H
|
| 19 |
+
#pragma once
|
| 20 |
+
|
| 21 |
+
#include <openssl/macros.h>
|
| 22 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 23 |
+
#define HEADER_ASN1T_H
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
#include <stddef.h>
|
| 27 |
+
#include <openssl/e_os2.h>
|
| 28 |
+
#include <openssl/asn1.h>
|
| 29 |
+
|
| 30 |
+
#ifdef OPENSSL_BUILD_SHLIBCRYPTO
|
| 31 |
+
#undef OPENSSL_EXTERN
|
| 32 |
+
#define OPENSSL_EXTERN OPENSSL_EXPORT
|
| 33 |
+
#endif
|
| 34 |
+
|
| 35 |
+
/* ASN1 template defines, structures and functions */
|
| 36 |
+
|
| 37 |
+
#ifdef __cplusplus
|
| 38 |
+
extern "C" {
|
| 39 |
+
#endif
|
| 40 |
+
|
| 41 |
+
/*-
|
| 42 |
+
* These are the possible values for the itype field of the
|
| 43 |
+
* ASN1_ITEM structure and determine how it is interpreted.
|
| 44 |
+
*
|
| 45 |
+
* For PRIMITIVE types the underlying type
|
| 46 |
+
* determines the behaviour if items is NULL.
|
| 47 |
+
*
|
| 48 |
+
* Otherwise templates must contain a single
|
| 49 |
+
* template and the type is treated in the
|
| 50 |
+
* same way as the type specified in the template.
|
| 51 |
+
*
|
| 52 |
+
* For SEQUENCE types the templates field points
|
| 53 |
+
* to the members, the size field is the
|
| 54 |
+
* structure size.
|
| 55 |
+
*
|
| 56 |
+
* For CHOICE types the templates field points
|
| 57 |
+
* to each possible member (typically a union)
|
| 58 |
+
* and the 'size' field is the offset of the
|
| 59 |
+
* selector.
|
| 60 |
+
*
|
| 61 |
+
* The 'funcs' field is used for application-specific
|
| 62 |
+
* data and functions.
|
| 63 |
+
*
|
| 64 |
+
* The EXTERN type uses a new style d2i/i2d.
|
| 65 |
+
* The new style should be used where possible
|
| 66 |
+
* because it avoids things like the d2i IMPLICIT
|
| 67 |
+
* hack.
|
| 68 |
+
*
|
| 69 |
+
* MSTRING is a multiple string type, it is used
|
| 70 |
+
* for a CHOICE of character strings where the
|
| 71 |
+
* actual strings all occupy an ASN1_STRING
|
| 72 |
+
* structure. In this case the 'utype' field
|
| 73 |
+
* has a special meaning, it is used as a mask
|
| 74 |
+
* of acceptable types using the B_ASN1 constants.
|
| 75 |
+
*
|
| 76 |
+
* NDEF_SEQUENCE is the same as SEQUENCE except
|
| 77 |
+
* that it will use indefinite length constructed
|
| 78 |
+
* encoding if requested.
|
| 79 |
+
*
|
| 80 |
+
*/
|
| 81 |
+
|
| 82 |
+
#define ASN1_ITYPE_PRIMITIVE 0x0
|
| 83 |
+
#define ASN1_ITYPE_SEQUENCE 0x1
|
| 84 |
+
#define ASN1_ITYPE_CHOICE 0x2
|
| 85 |
+
/* unused value 0x3 */
|
| 86 |
+
#define ASN1_ITYPE_EXTERN 0x4
|
| 87 |
+
#define ASN1_ITYPE_MSTRING 0x5
|
| 88 |
+
#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
|
| 89 |
+
|
| 90 |
+
/* Macro to obtain ASN1_ADB pointer from a type (only used internally) */
|
| 91 |
+
#define ASN1_ADB_ptr(iptr) ((const ASN1_ADB *)((iptr)()))
|
| 92 |
+
|
| 93 |
+
/* Macros for start and end of ASN1_ITEM definition */
|
| 94 |
+
|
| 95 |
+
#define ASN1_ITEM_start(itname) \
|
| 96 |
+
const ASN1_ITEM *itname##_it(void) \
|
| 97 |
+
{ \
|
| 98 |
+
static const ASN1_ITEM local_it = {
|
| 99 |
+
|
| 100 |
+
#define static_ASN1_ITEM_start(itname) \
|
| 101 |
+
static ASN1_ITEM_start(itname)
|
| 102 |
+
|
| 103 |
+
#define ASN1_ITEM_end(itname) \
|
| 104 |
+
} \
|
| 105 |
+
; \
|
| 106 |
+
return &local_it; \
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
/* Macros to aid ASN1 template writing */
|
| 110 |
+
|
| 111 |
+
#define ASN1_ITEM_TEMPLATE(tname) \
|
| 112 |
+
static const ASN1_TEMPLATE tname##_item_tt
|
| 113 |
+
|
| 114 |
+
#define ASN1_ITEM_TEMPLATE_END(tname) \
|
| 115 |
+
; \
|
| 116 |
+
ASN1_ITEM_start(tname) \
|
| 117 |
+
ASN1_ITYPE_PRIMITIVE, \
|
| 118 |
+
-1, \
|
| 119 |
+
&tname##_item_tt, \
|
| 120 |
+
0, \
|
| 121 |
+
NULL, \
|
| 122 |
+
0, \
|
| 123 |
+
#tname ASN1_ITEM_end(tname)
|
| 124 |
+
#define static_ASN1_ITEM_TEMPLATE_END(tname) \
|
| 125 |
+
; \
|
| 126 |
+
static_ASN1_ITEM_start(tname) \
|
| 127 |
+
ASN1_ITYPE_PRIMITIVE, \
|
| 128 |
+
-1, \
|
| 129 |
+
&tname##_item_tt, \
|
| 130 |
+
0, \
|
| 131 |
+
NULL, \
|
| 132 |
+
0, \
|
| 133 |
+
#tname ASN1_ITEM_end(tname)
|
| 134 |
+
|
| 135 |
+
/* This is a ASN1 type which just embeds a template */
|
| 136 |
+
|
| 137 |
+
/*-
|
| 138 |
+
* This pair helps declare a SEQUENCE. We can do:
|
| 139 |
+
*
|
| 140 |
+
* ASN1_SEQUENCE(stname) = {
|
| 141 |
+
* ... SEQUENCE components ...
|
| 142 |
+
* } ASN1_SEQUENCE_END(stname)
|
| 143 |
+
*
|
| 144 |
+
* This will produce an ASN1_ITEM called stname_it
|
| 145 |
+
* for a structure called stname.
|
| 146 |
+
*
|
| 147 |
+
* If you want the same structure but a different
|
| 148 |
+
* name then use:
|
| 149 |
+
*
|
| 150 |
+
* ASN1_SEQUENCE(itname) = {
|
| 151 |
+
* ... SEQUENCE components ...
|
| 152 |
+
* } ASN1_SEQUENCE_END_name(stname, itname)
|
| 153 |
+
*
|
| 154 |
+
* This will create an item called itname_it using
|
| 155 |
+
* a structure called stname.
|
| 156 |
+
*/
|
| 157 |
+
|
| 158 |
+
#define ASN1_SEQUENCE(tname) \
|
| 159 |
+
static const ASN1_TEMPLATE tname##_seq_tt[]
|
| 160 |
+
|
| 161 |
+
#define ASN1_SEQUENCE_END(stname) ASN1_SEQUENCE_END_name(stname, stname)
|
| 162 |
+
|
| 163 |
+
#define static_ASN1_SEQUENCE_END(stname) static_ASN1_SEQUENCE_END_name(stname, stname)
|
| 164 |
+
|
| 165 |
+
#define ASN1_SEQUENCE_END_name(stname, tname) \
|
| 166 |
+
; \
|
| 167 |
+
ASN1_ITEM_start(tname) \
|
| 168 |
+
ASN1_ITYPE_SEQUENCE, \
|
| 169 |
+
V_ASN1_SEQUENCE, \
|
| 170 |
+
tname##_seq_tt, \
|
| 171 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
|
| 172 |
+
NULL, \
|
| 173 |
+
sizeof(stname), \
|
| 174 |
+
#tname ASN1_ITEM_end(tname)
|
| 175 |
+
|
| 176 |
+
#define static_ASN1_SEQUENCE_END_name(stname, tname) \
|
| 177 |
+
; \
|
| 178 |
+
static_ASN1_ITEM_start(tname) \
|
| 179 |
+
ASN1_ITYPE_SEQUENCE, \
|
| 180 |
+
V_ASN1_SEQUENCE, \
|
| 181 |
+
tname##_seq_tt, \
|
| 182 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
|
| 183 |
+
NULL, \
|
| 184 |
+
sizeof(stname), \
|
| 185 |
+
#stname ASN1_ITEM_end(tname)
|
| 186 |
+
|
| 187 |
+
#define ASN1_NDEF_SEQUENCE(tname) \
|
| 188 |
+
ASN1_SEQUENCE(tname)
|
| 189 |
+
|
| 190 |
+
#define ASN1_NDEF_SEQUENCE_cb(tname, cb) \
|
| 191 |
+
ASN1_SEQUENCE_cb(tname, cb)
|
| 192 |
+
|
| 193 |
+
#define ASN1_SEQUENCE_cb(tname, cb) \
|
| 194 |
+
static const ASN1_AUX tname##_aux = { NULL, 0, 0, 0, cb, 0, NULL }; \
|
| 195 |
+
ASN1_SEQUENCE(tname)
|
| 196 |
+
|
| 197 |
+
#define ASN1_SEQUENCE_const_cb(tname, const_cb) \
|
| 198 |
+
static const ASN1_AUX tname##_aux = { NULL, ASN1_AFLG_CONST_CB, 0, 0, NULL, 0, const_cb }; \
|
| 199 |
+
ASN1_SEQUENCE(tname)
|
| 200 |
+
|
| 201 |
+
#define ASN1_SEQUENCE_cb_const_cb(tname, cb, const_cb) \
|
| 202 |
+
static const ASN1_AUX tname##_aux = { NULL, ASN1_AFLG_CONST_CB, 0, 0, cb, 0, const_cb }; \
|
| 203 |
+
ASN1_SEQUENCE(tname)
|
| 204 |
+
|
| 205 |
+
#define ASN1_SEQUENCE_ref(tname, cb) \
|
| 206 |
+
static const ASN1_AUX tname##_aux = { NULL, ASN1_AFLG_REFCOUNT, offsetof(tname, references), offsetof(tname, lock), cb, 0, NULL }; \
|
| 207 |
+
ASN1_SEQUENCE(tname)
|
| 208 |
+
|
| 209 |
+
#define ASN1_SEQUENCE_enc(tname, enc, cb) \
|
| 210 |
+
static const ASN1_AUX tname##_aux = { NULL, ASN1_AFLG_ENCODING, 0, 0, cb, offsetof(tname, enc), NULL }; \
|
| 211 |
+
ASN1_SEQUENCE(tname)
|
| 212 |
+
|
| 213 |
+
#define ASN1_NDEF_SEQUENCE_END(tname) \
|
| 214 |
+
; \
|
| 215 |
+
ASN1_ITEM_start(tname) \
|
| 216 |
+
ASN1_ITYPE_NDEF_SEQUENCE, \
|
| 217 |
+
V_ASN1_SEQUENCE, \
|
| 218 |
+
tname##_seq_tt, \
|
| 219 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
|
| 220 |
+
NULL, \
|
| 221 |
+
sizeof(tname), \
|
| 222 |
+
#tname ASN1_ITEM_end(tname)
|
| 223 |
+
#define static_ASN1_NDEF_SEQUENCE_END(tname) \
|
| 224 |
+
; \
|
| 225 |
+
static_ASN1_ITEM_start(tname) \
|
| 226 |
+
ASN1_ITYPE_NDEF_SEQUENCE, \
|
| 227 |
+
V_ASN1_SEQUENCE, \
|
| 228 |
+
tname##_seq_tt, \
|
| 229 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
|
| 230 |
+
NULL, \
|
| 231 |
+
sizeof(tname), \
|
| 232 |
+
#tname ASN1_ITEM_end(tname)
|
| 233 |
+
|
| 234 |
+
#define ASN1_SEQUENCE_END_enc(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname)
|
| 235 |
+
|
| 236 |
+
#define ASN1_SEQUENCE_END_cb(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname)
|
| 237 |
+
#define static_ASN1_SEQUENCE_END_cb(stname, tname) static_ASN1_SEQUENCE_END_ref(stname, tname)
|
| 238 |
+
|
| 239 |
+
#define ASN1_SEQUENCE_END_ref(stname, tname) \
|
| 240 |
+
; \
|
| 241 |
+
ASN1_ITEM_start(tname) \
|
| 242 |
+
ASN1_ITYPE_SEQUENCE, \
|
| 243 |
+
V_ASN1_SEQUENCE, \
|
| 244 |
+
tname##_seq_tt, \
|
| 245 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
|
| 246 |
+
&tname##_aux, \
|
| 247 |
+
sizeof(stname), \
|
| 248 |
+
#tname ASN1_ITEM_end(tname)
|
| 249 |
+
#define static_ASN1_SEQUENCE_END_ref(stname, tname) \
|
| 250 |
+
; \
|
| 251 |
+
static_ASN1_ITEM_start(tname) \
|
| 252 |
+
ASN1_ITYPE_SEQUENCE, \
|
| 253 |
+
V_ASN1_SEQUENCE, \
|
| 254 |
+
tname##_seq_tt, \
|
| 255 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
|
| 256 |
+
&tname##_aux, \
|
| 257 |
+
sizeof(stname), \
|
| 258 |
+
#stname ASN1_ITEM_end(tname)
|
| 259 |
+
|
| 260 |
+
#define ASN1_NDEF_SEQUENCE_END_cb(stname, tname) \
|
| 261 |
+
; \
|
| 262 |
+
ASN1_ITEM_start(tname) \
|
| 263 |
+
ASN1_ITYPE_NDEF_SEQUENCE, \
|
| 264 |
+
V_ASN1_SEQUENCE, \
|
| 265 |
+
tname##_seq_tt, \
|
| 266 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
|
| 267 |
+
&tname##_aux, \
|
| 268 |
+
sizeof(stname), \
|
| 269 |
+
#stname ASN1_ITEM_end(tname)
|
| 270 |
+
|
| 271 |
+
/*-
|
| 272 |
+
* This pair helps declare a CHOICE type. We can do:
|
| 273 |
+
*
|
| 274 |
+
* ASN1_CHOICE(chname) = {
|
| 275 |
+
* ... CHOICE options ...
|
| 276 |
+
* ASN1_CHOICE_END(chname)
|
| 277 |
+
*
|
| 278 |
+
* This will produce an ASN1_ITEM called chname_it
|
| 279 |
+
* for a structure called chname. The structure
|
| 280 |
+
* definition must look like this:
|
| 281 |
+
* typedef struct {
|
| 282 |
+
* int type;
|
| 283 |
+
* union {
|
| 284 |
+
* ASN1_SOMETHING *opt1;
|
| 285 |
+
* ASN1_SOMEOTHER *opt2;
|
| 286 |
+
* } value;
|
| 287 |
+
* } chname;
|
| 288 |
+
*
|
| 289 |
+
* the name of the selector must be 'type'.
|
| 290 |
+
* to use an alternative selector name use the
|
| 291 |
+
* ASN1_CHOICE_END_selector() version.
|
| 292 |
+
*/
|
| 293 |
+
|
| 294 |
+
#define ASN1_CHOICE(tname) \
|
| 295 |
+
static const ASN1_TEMPLATE tname##_ch_tt[]
|
| 296 |
+
|
| 297 |
+
#define ASN1_CHOICE_cb(tname, cb) \
|
| 298 |
+
static const ASN1_AUX tname##_aux = { NULL, 0, 0, 0, cb, 0, NULL }; \
|
| 299 |
+
ASN1_CHOICE(tname)
|
| 300 |
+
|
| 301 |
+
#define ASN1_CHOICE_END(stname) ASN1_CHOICE_END_name(stname, stname)
|
| 302 |
+
|
| 303 |
+
#define static_ASN1_CHOICE_END(stname) static_ASN1_CHOICE_END_name(stname, stname)
|
| 304 |
+
|
| 305 |
+
#define ASN1_CHOICE_END_name(stname, tname) ASN1_CHOICE_END_selector(stname, tname, type)
|
| 306 |
+
|
| 307 |
+
#define static_ASN1_CHOICE_END_name(stname, tname) static_ASN1_CHOICE_END_selector(stname, tname, type)
|
| 308 |
+
|
| 309 |
+
#define ASN1_CHOICE_END_selector(stname, tname, selname) \
|
| 310 |
+
; \
|
| 311 |
+
ASN1_ITEM_start(tname) \
|
| 312 |
+
ASN1_ITYPE_CHOICE, \
|
| 313 |
+
offsetof(stname, selname), \
|
| 314 |
+
tname##_ch_tt, \
|
| 315 |
+
sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE), \
|
| 316 |
+
NULL, \
|
| 317 |
+
sizeof(stname), \
|
| 318 |
+
#stname ASN1_ITEM_end(tname)
|
| 319 |
+
|
| 320 |
+
#define static_ASN1_CHOICE_END_selector(stname, tname, selname) \
|
| 321 |
+
; \
|
| 322 |
+
static_ASN1_ITEM_start(tname) \
|
| 323 |
+
ASN1_ITYPE_CHOICE, \
|
| 324 |
+
offsetof(stname, selname), \
|
| 325 |
+
tname##_ch_tt, \
|
| 326 |
+
sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE), \
|
| 327 |
+
NULL, \
|
| 328 |
+
sizeof(stname), \
|
| 329 |
+
#stname ASN1_ITEM_end(tname)
|
| 330 |
+
|
| 331 |
+
#define ASN1_CHOICE_END_cb(stname, tname, selname) \
|
| 332 |
+
; \
|
| 333 |
+
ASN1_ITEM_start(tname) \
|
| 334 |
+
ASN1_ITYPE_CHOICE, \
|
| 335 |
+
offsetof(stname, selname), \
|
| 336 |
+
tname##_ch_tt, \
|
| 337 |
+
sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE), \
|
| 338 |
+
&tname##_aux, \
|
| 339 |
+
sizeof(stname), \
|
| 340 |
+
#stname ASN1_ITEM_end(tname)
|
| 341 |
+
|
| 342 |
+
/* This helps with the template wrapper form of ASN1_ITEM */
|
| 343 |
+
|
| 344 |
+
#define ASN1_EX_TEMPLATE_TYPE(flags, tag, name, type) { \
|
| 345 |
+
(flags), (tag), 0, \
|
| 346 |
+
#name, ASN1_ITEM_ref(type) \
|
| 347 |
+
}
|
| 348 |
+
|
| 349 |
+
/* These help with SEQUENCE or CHOICE components */
|
| 350 |
+
|
| 351 |
+
/* used to declare other types */
|
| 352 |
+
|
| 353 |
+
#define ASN1_EX_TYPE(flags, tag, stname, field, type) { \
|
| 354 |
+
(flags), (tag), offsetof(stname, field), \
|
| 355 |
+
#field, ASN1_ITEM_ref(type) \
|
| 356 |
+
}
|
| 357 |
+
|
| 358 |
+
/* implicit and explicit helper macros */
|
| 359 |
+
|
| 360 |
+
#define ASN1_IMP_EX(stname, field, type, tag, ex) \
|
| 361 |
+
ASN1_EX_TYPE(ASN1_TFLG_IMPLICIT | (ex), tag, stname, field, type)
|
| 362 |
+
|
| 363 |
+
#define ASN1_EXP_EX(stname, field, type, tag, ex) \
|
| 364 |
+
ASN1_EX_TYPE(ASN1_TFLG_EXPLICIT | (ex), tag, stname, field, type)
|
| 365 |
+
|
| 366 |
+
/* Any defined by macros: the field used is in the table itself */
|
| 367 |
+
|
| 368 |
+
#define ASN1_ADB_OBJECT(tblname) { ASN1_TFLG_ADB_OID, -1, 0, #tblname, tblname##_adb }
|
| 369 |
+
#define ASN1_ADB_INTEGER(tblname) { ASN1_TFLG_ADB_INT, -1, 0, #tblname, tblname##_adb }
|
| 370 |
+
|
| 371 |
+
/* Plain simple type */
|
| 372 |
+
#define ASN1_SIMPLE(stname, field, type) ASN1_EX_TYPE(0, 0, stname, field, type)
|
| 373 |
+
/* Embedded simple type */
|
| 374 |
+
#define ASN1_EMBED(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_EMBED, 0, stname, field, type)
|
| 375 |
+
|
| 376 |
+
/* OPTIONAL simple type */
|
| 377 |
+
#define ASN1_OPT(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_OPTIONAL, 0, stname, field, type)
|
| 378 |
+
#define ASN1_OPT_EMBED(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_OPTIONAL | ASN1_TFLG_EMBED, 0, stname, field, type)
|
| 379 |
+
|
| 380 |
+
/* IMPLICIT tagged simple type */
|
| 381 |
+
#define ASN1_IMP(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, 0)
|
| 382 |
+
#define ASN1_IMP_EMBED(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_EMBED)
|
| 383 |
+
|
| 384 |
+
/* IMPLICIT tagged OPTIONAL simple type */
|
| 385 |
+
#define ASN1_IMP_OPT(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL)
|
| 386 |
+
#define ASN1_IMP_OPT_EMBED(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL | ASN1_TFLG_EMBED)
|
| 387 |
+
|
| 388 |
+
/* Same as above but EXPLICIT */
|
| 389 |
+
|
| 390 |
+
#define ASN1_EXP(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, 0)
|
| 391 |
+
#define ASN1_EXP_EMBED(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_EMBED)
|
| 392 |
+
#define ASN1_EXP_OPT(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL)
|
| 393 |
+
#define ASN1_EXP_OPT_EMBED(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL | ASN1_TFLG_EMBED)
|
| 394 |
+
|
| 395 |
+
/* SEQUENCE OF type */
|
| 396 |
+
#define ASN1_SEQUENCE_OF(stname, field, type) \
|
| 397 |
+
ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, stname, field, type)
|
| 398 |
+
|
| 399 |
+
/* OPTIONAL SEQUENCE OF */
|
| 400 |
+
#define ASN1_SEQUENCE_OF_OPT(stname, field, type) \
|
| 401 |
+
ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF | ASN1_TFLG_OPTIONAL, 0, stname, field, type)
|
| 402 |
+
|
| 403 |
+
/* Same as above but for SET OF */
|
| 404 |
+
|
| 405 |
+
#define ASN1_SET_OF(stname, field, type) \
|
| 406 |
+
ASN1_EX_TYPE(ASN1_TFLG_SET_OF, 0, stname, field, type)
|
| 407 |
+
|
| 408 |
+
#define ASN1_SET_OF_OPT(stname, field, type) \
|
| 409 |
+
ASN1_EX_TYPE(ASN1_TFLG_SET_OF | ASN1_TFLG_OPTIONAL, 0, stname, field, type)
|
| 410 |
+
|
| 411 |
+
/* Finally compound types of SEQUENCE, SET, IMPLICIT, EXPLICIT and OPTIONAL */
|
| 412 |
+
|
| 413 |
+
#define ASN1_IMP_SET_OF(stname, field, type, tag) \
|
| 414 |
+
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF)
|
| 415 |
+
|
| 416 |
+
#define ASN1_EXP_SET_OF(stname, field, type, tag) \
|
| 417 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF)
|
| 418 |
+
|
| 419 |
+
#define ASN1_IMP_SET_OF_OPT(stname, field, type, tag) \
|
| 420 |
+
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF | ASN1_TFLG_OPTIONAL)
|
| 421 |
+
|
| 422 |
+
#define ASN1_EXP_SET_OF_OPT(stname, field, type, tag) \
|
| 423 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF | ASN1_TFLG_OPTIONAL)
|
| 424 |
+
|
| 425 |
+
#define ASN1_IMP_SEQUENCE_OF(stname, field, type, tag) \
|
| 426 |
+
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF)
|
| 427 |
+
|
| 428 |
+
#define ASN1_IMP_SEQUENCE_OF_OPT(stname, field, type, tag) \
|
| 429 |
+
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF | ASN1_TFLG_OPTIONAL)
|
| 430 |
+
|
| 431 |
+
#define ASN1_EXP_SEQUENCE_OF(stname, field, type, tag) \
|
| 432 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF)
|
| 433 |
+
|
| 434 |
+
#define ASN1_EXP_SEQUENCE_OF_OPT(stname, field, type, tag) \
|
| 435 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF | ASN1_TFLG_OPTIONAL)
|
| 436 |
+
|
| 437 |
+
/* EXPLICIT using indefinite length constructed form */
|
| 438 |
+
#define ASN1_NDEF_EXP(stname, field, type, tag) \
|
| 439 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_NDEF)
|
| 440 |
+
|
| 441 |
+
/* EXPLICIT OPTIONAL using indefinite length constructed form */
|
| 442 |
+
#define ASN1_NDEF_EXP_OPT(stname, field, type, tag) \
|
| 443 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL | ASN1_TFLG_NDEF)
|
| 444 |
+
|
| 445 |
+
/* Macros for the ASN1_ADB structure */
|
| 446 |
+
|
| 447 |
+
#define ASN1_ADB(name) \
|
| 448 |
+
static const ASN1_ADB_TABLE name##_adbtbl[]
|
| 449 |
+
|
| 450 |
+
#define ASN1_ADB_END(name, flags, field, adb_cb, def, none) \
|
| 451 |
+
; \
|
| 452 |
+
static const ASN1_ITEM *name##_adb(void) \
|
| 453 |
+
{ \
|
| 454 |
+
static const ASN1_ADB internal_adb = { \
|
| 455 |
+
flags, \
|
| 456 |
+
offsetof(name, field), \
|
| 457 |
+
adb_cb, \
|
| 458 |
+
name##_adbtbl, \
|
| 459 |
+
sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE), \
|
| 460 |
+
def, \
|
| 461 |
+
none \
|
| 462 |
+
}; \
|
| 463 |
+
return (const ASN1_ITEM *)&internal_adb; \
|
| 464 |
+
} \
|
| 465 |
+
void dummy_function(void)
|
| 466 |
+
|
| 467 |
+
#define ADB_ENTRY(val, template) { val, template }
|
| 468 |
+
|
| 469 |
+
#define ASN1_ADB_TEMPLATE(name) \
|
| 470 |
+
static const ASN1_TEMPLATE name##_tt
|
| 471 |
+
|
| 472 |
+
/*
|
| 473 |
+
* This is the ASN1 template structure that defines a wrapper round the
|
| 474 |
+
* actual type. It determines the actual position of the field in the value
|
| 475 |
+
* structure, various flags such as OPTIONAL and the field name.
|
| 476 |
+
*/
|
| 477 |
+
|
| 478 |
+
struct ASN1_TEMPLATE_st {
|
| 479 |
+
unsigned long flags; /* Various flags */
|
| 480 |
+
long tag; /* tag, not used if no tagging */
|
| 481 |
+
unsigned long offset; /* Offset of this field in structure */
|
| 482 |
+
const char *field_name; /* Field name */
|
| 483 |
+
ASN1_ITEM_EXP *item; /* Relevant ASN1_ITEM or ASN1_ADB */
|
| 484 |
+
};
|
| 485 |
+
|
| 486 |
+
/* Macro to extract ASN1_ITEM and ASN1_ADB pointer from ASN1_TEMPLATE */
|
| 487 |
+
|
| 488 |
+
#define ASN1_TEMPLATE_item(t) (t->item_ptr)
|
| 489 |
+
#define ASN1_TEMPLATE_adb(t) (t->item_ptr)
|
| 490 |
+
|
| 491 |
+
typedef struct ASN1_ADB_TABLE_st ASN1_ADB_TABLE;
|
| 492 |
+
typedef struct ASN1_ADB_st ASN1_ADB;
|
| 493 |
+
|
| 494 |
+
struct ASN1_ADB_st {
|
| 495 |
+
unsigned long flags; /* Various flags */
|
| 496 |
+
unsigned long offset; /* Offset of selector field */
|
| 497 |
+
int (*adb_cb)(long *psel); /* Application callback */
|
| 498 |
+
const ASN1_ADB_TABLE *tbl; /* Table of possible types */
|
| 499 |
+
long tblcount; /* Number of entries in tbl */
|
| 500 |
+
const ASN1_TEMPLATE *default_tt; /* Type to use if no match */
|
| 501 |
+
const ASN1_TEMPLATE *null_tt; /* Type to use if selector is NULL */
|
| 502 |
+
};
|
| 503 |
+
|
| 504 |
+
struct ASN1_ADB_TABLE_st {
|
| 505 |
+
long value; /* NID for an object or value for an int */
|
| 506 |
+
const ASN1_TEMPLATE tt; /* item for this value */
|
| 507 |
+
};
|
| 508 |
+
|
| 509 |
+
/* template flags */
|
| 510 |
+
|
| 511 |
+
/* Field is optional */
|
| 512 |
+
#define ASN1_TFLG_OPTIONAL (0x1)
|
| 513 |
+
|
| 514 |
+
/* Field is a SET OF */
|
| 515 |
+
#define ASN1_TFLG_SET_OF (0x1 << 1)
|
| 516 |
+
|
| 517 |
+
/* Field is a SEQUENCE OF */
|
| 518 |
+
#define ASN1_TFLG_SEQUENCE_OF (0x2 << 1)
|
| 519 |
+
|
| 520 |
+
/*
|
| 521 |
+
* Special case: this refers to a SET OF that will be sorted into DER order
|
| 522 |
+
* when encoded *and* the corresponding STACK will be modified to match the
|
| 523 |
+
* new order.
|
| 524 |
+
*/
|
| 525 |
+
#define ASN1_TFLG_SET_ORDER (0x3 << 1)
|
| 526 |
+
|
| 527 |
+
/* Mask for SET OF or SEQUENCE OF */
|
| 528 |
+
#define ASN1_TFLG_SK_MASK (0x3 << 1)
|
| 529 |
+
|
| 530 |
+
/*
|
| 531 |
+
* These flags mean the tag should be taken from the tag field. If EXPLICIT
|
| 532 |
+
* then the underlying type is used for the inner tag.
|
| 533 |
+
*/
|
| 534 |
+
|
| 535 |
+
/* IMPLICIT tagging */
|
| 536 |
+
#define ASN1_TFLG_IMPTAG (0x1 << 3)
|
| 537 |
+
|
| 538 |
+
/* EXPLICIT tagging, inner tag from underlying type */
|
| 539 |
+
#define ASN1_TFLG_EXPTAG (0x2 << 3)
|
| 540 |
+
|
| 541 |
+
#define ASN1_TFLG_TAG_MASK (0x3 << 3)
|
| 542 |
+
|
| 543 |
+
/* context specific IMPLICIT */
|
| 544 |
+
#define ASN1_TFLG_IMPLICIT (ASN1_TFLG_IMPTAG | ASN1_TFLG_CONTEXT)
|
| 545 |
+
|
| 546 |
+
/* context specific EXPLICIT */
|
| 547 |
+
#define ASN1_TFLG_EXPLICIT (ASN1_TFLG_EXPTAG | ASN1_TFLG_CONTEXT)
|
| 548 |
+
|
| 549 |
+
/*
|
| 550 |
+
* If tagging is in force these determine the type of tag to use. Otherwise
|
| 551 |
+
* the tag is determined by the underlying type. These values reflect the
|
| 552 |
+
* actual octet format.
|
| 553 |
+
*/
|
| 554 |
+
|
| 555 |
+
/* Universal tag */
|
| 556 |
+
#define ASN1_TFLG_UNIVERSAL (0x0 << 6)
|
| 557 |
+
/* Application tag */
|
| 558 |
+
#define ASN1_TFLG_APPLICATION (0x1 << 6)
|
| 559 |
+
/* Context specific tag */
|
| 560 |
+
#define ASN1_TFLG_CONTEXT (0x2 << 6)
|
| 561 |
+
/* Private tag */
|
| 562 |
+
#define ASN1_TFLG_PRIVATE (0x3 << 6)
|
| 563 |
+
|
| 564 |
+
#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
|
| 565 |
+
|
| 566 |
+
/*
|
| 567 |
+
* These are for ANY DEFINED BY type. In this case the 'item' field points to
|
| 568 |
+
* an ASN1_ADB structure which contains a table of values to decode the
|
| 569 |
+
* relevant type
|
| 570 |
+
*/
|
| 571 |
+
|
| 572 |
+
#define ASN1_TFLG_ADB_MASK (0x3 << 8)
|
| 573 |
+
|
| 574 |
+
#define ASN1_TFLG_ADB_OID (0x1 << 8)
|
| 575 |
+
|
| 576 |
+
#define ASN1_TFLG_ADB_INT (0x1 << 9)
|
| 577 |
+
|
| 578 |
+
/*
|
| 579 |
+
* This flag when present in a SEQUENCE OF, SET OF or EXPLICIT causes
|
| 580 |
+
* indefinite length constructed encoding to be used if required.
|
| 581 |
+
*/
|
| 582 |
+
|
| 583 |
+
#define ASN1_TFLG_NDEF (0x1 << 11)
|
| 584 |
+
|
| 585 |
+
/* Field is embedded and not a pointer */
|
| 586 |
+
#define ASN1_TFLG_EMBED (0x1 << 12)
|
| 587 |
+
|
| 588 |
+
/* This is the actual ASN1 item itself */
|
| 589 |
+
|
| 590 |
+
struct ASN1_ITEM_st {
|
| 591 |
+
char itype; /* The item type, primitive, SEQUENCE, CHOICE
|
| 592 |
+
* or extern */
|
| 593 |
+
long utype; /* underlying type */
|
| 594 |
+
const ASN1_TEMPLATE *templates; /* If SEQUENCE or CHOICE this contains
|
| 595 |
+
* the contents */
|
| 596 |
+
long tcount; /* Number of templates if SEQUENCE or CHOICE */
|
| 597 |
+
const void *funcs; /* further data and type-specific functions */
|
| 598 |
+
/* funcs can be ASN1_PRIMITIVE_FUNCS*, ASN1_EXTERN_FUNCS*, or ASN1_AUX* */
|
| 599 |
+
long size; /* Structure size (usually) */
|
| 600 |
+
const char *sname; /* Structure name */
|
| 601 |
+
};
|
| 602 |
+
|
| 603 |
+
/*
|
| 604 |
+
* Cache for ASN1 tag and length, so we don't keep re-reading it for things
|
| 605 |
+
* like CHOICE
|
| 606 |
+
*/
|
| 607 |
+
|
| 608 |
+
struct ASN1_TLC_st {
|
| 609 |
+
char valid; /* Values below are valid */
|
| 610 |
+
int ret; /* return value */
|
| 611 |
+
long plen; /* length */
|
| 612 |
+
int ptag; /* class value */
|
| 613 |
+
int pclass; /* class value */
|
| 614 |
+
int hdrlen; /* header length */
|
| 615 |
+
};
|
| 616 |
+
|
| 617 |
+
/* Typedefs for ASN1 function pointers */
|
| 618 |
+
typedef int ASN1_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
|
| 619 |
+
const ASN1_ITEM *it, int tag, int aclass, char opt,
|
| 620 |
+
ASN1_TLC *ctx);
|
| 621 |
+
|
| 622 |
+
typedef int ASN1_ex_d2i_ex(ASN1_VALUE **pval, const unsigned char **in, long len,
|
| 623 |
+
const ASN1_ITEM *it, int tag, int aclass, char opt,
|
| 624 |
+
ASN1_TLC *ctx, OSSL_LIB_CTX *libctx,
|
| 625 |
+
const char *propq);
|
| 626 |
+
typedef int ASN1_ex_i2d(const ASN1_VALUE **pval, unsigned char **out,
|
| 627 |
+
const ASN1_ITEM *it, int tag, int aclass);
|
| 628 |
+
typedef int ASN1_ex_new_func(ASN1_VALUE **pval, const ASN1_ITEM *it);
|
| 629 |
+
typedef int ASN1_ex_new_ex_func(ASN1_VALUE **pval, const ASN1_ITEM *it,
|
| 630 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 631 |
+
typedef void ASN1_ex_free_func(ASN1_VALUE **pval, const ASN1_ITEM *it);
|
| 632 |
+
|
| 633 |
+
typedef int ASN1_ex_print_func(BIO *out, const ASN1_VALUE **pval,
|
| 634 |
+
int indent, const char *fname,
|
| 635 |
+
const ASN1_PCTX *pctx);
|
| 636 |
+
|
| 637 |
+
typedef int ASN1_primitive_i2c(const ASN1_VALUE **pval, unsigned char *cont,
|
| 638 |
+
int *putype, const ASN1_ITEM *it);
|
| 639 |
+
typedef int ASN1_primitive_c2i(ASN1_VALUE **pval, const unsigned char *cont,
|
| 640 |
+
int len, int utype, char *free_cont,
|
| 641 |
+
const ASN1_ITEM *it);
|
| 642 |
+
typedef int ASN1_primitive_print(BIO *out, const ASN1_VALUE **pval,
|
| 643 |
+
const ASN1_ITEM *it, int indent,
|
| 644 |
+
const ASN1_PCTX *pctx);
|
| 645 |
+
|
| 646 |
+
typedef struct ASN1_EXTERN_FUNCS_st {
|
| 647 |
+
void *app_data;
|
| 648 |
+
ASN1_ex_new_func *asn1_ex_new;
|
| 649 |
+
ASN1_ex_free_func *asn1_ex_free;
|
| 650 |
+
ASN1_ex_free_func *asn1_ex_clear;
|
| 651 |
+
ASN1_ex_d2i *asn1_ex_d2i;
|
| 652 |
+
ASN1_ex_i2d *asn1_ex_i2d;
|
| 653 |
+
ASN1_ex_print_func *asn1_ex_print;
|
| 654 |
+
ASN1_ex_new_ex_func *asn1_ex_new_ex;
|
| 655 |
+
ASN1_ex_d2i_ex *asn1_ex_d2i_ex;
|
| 656 |
+
} ASN1_EXTERN_FUNCS;
|
| 657 |
+
|
| 658 |
+
typedef struct ASN1_PRIMITIVE_FUNCS_st {
|
| 659 |
+
void *app_data;
|
| 660 |
+
unsigned long flags;
|
| 661 |
+
ASN1_ex_new_func *prim_new;
|
| 662 |
+
ASN1_ex_free_func *prim_free;
|
| 663 |
+
ASN1_ex_free_func *prim_clear;
|
| 664 |
+
ASN1_primitive_c2i *prim_c2i;
|
| 665 |
+
ASN1_primitive_i2c *prim_i2c;
|
| 666 |
+
ASN1_primitive_print *prim_print;
|
| 667 |
+
} ASN1_PRIMITIVE_FUNCS;
|
| 668 |
+
|
| 669 |
+
/*
|
| 670 |
+
* This is the ASN1_AUX structure: it handles various miscellaneous
|
| 671 |
+
* requirements. For example the use of reference counts and an informational
|
| 672 |
+
* callback. The "informational callback" is called at various points during
|
| 673 |
+
* the ASN1 encoding and decoding. It can be used to provide minor
|
| 674 |
+
* customisation of the structures used. This is most useful where the
|
| 675 |
+
* supplied routines *almost* do the right thing but need some extra help at
|
| 676 |
+
* a few points. If the callback returns zero then it is assumed a fatal
|
| 677 |
+
* error has occurred and the main operation should be abandoned. If major
|
| 678 |
+
* changes in the default behaviour are required then an external type is
|
| 679 |
+
* more appropriate.
|
| 680 |
+
* For the operations ASN1_OP_I2D_PRE, ASN1_OP_I2D_POST, ASN1_OP_PRINT_PRE, and
|
| 681 |
+
* ASN1_OP_PRINT_POST, meanwhile a variant of the callback with const parameter
|
| 682 |
+
* 'in' is provided to make clear statically that its input is not modified. If
|
| 683 |
+
* and only if this variant is in use the flag ASN1_AFLG_CONST_CB must be set.
|
| 684 |
+
*/
|
| 685 |
+
|
| 686 |
+
typedef int ASN1_aux_cb(int operation, ASN1_VALUE **in, const ASN1_ITEM *it,
|
| 687 |
+
void *exarg);
|
| 688 |
+
typedef int ASN1_aux_const_cb(int operation, const ASN1_VALUE **in,
|
| 689 |
+
const ASN1_ITEM *it, void *exarg);
|
| 690 |
+
|
| 691 |
+
typedef struct ASN1_AUX_st {
|
| 692 |
+
void *app_data;
|
| 693 |
+
int flags;
|
| 694 |
+
int ref_offset; /* Offset of reference value */
|
| 695 |
+
int ref_lock; /* Offset of lock value */
|
| 696 |
+
ASN1_aux_cb *asn1_cb;
|
| 697 |
+
int enc_offset; /* Offset of ASN1_ENCODING structure */
|
| 698 |
+
ASN1_aux_const_cb *asn1_const_cb; /* for ASN1_OP_I2D_ and ASN1_OP_PRINT_ */
|
| 699 |
+
} ASN1_AUX;
|
| 700 |
+
|
| 701 |
+
/* For print related callbacks exarg points to this structure */
|
| 702 |
+
typedef struct ASN1_PRINT_ARG_st {
|
| 703 |
+
BIO *out;
|
| 704 |
+
int indent;
|
| 705 |
+
const ASN1_PCTX *pctx;
|
| 706 |
+
} ASN1_PRINT_ARG;
|
| 707 |
+
|
| 708 |
+
/* For streaming related callbacks exarg points to this structure */
|
| 709 |
+
typedef struct ASN1_STREAM_ARG_st {
|
| 710 |
+
/* BIO to stream through */
|
| 711 |
+
BIO *out;
|
| 712 |
+
/* BIO with filters appended */
|
| 713 |
+
BIO *ndef_bio;
|
| 714 |
+
/* Streaming I/O boundary */
|
| 715 |
+
unsigned char **boundary;
|
| 716 |
+
} ASN1_STREAM_ARG;
|
| 717 |
+
|
| 718 |
+
/* Flags in ASN1_AUX */
|
| 719 |
+
|
| 720 |
+
/* Use a reference count */
|
| 721 |
+
#define ASN1_AFLG_REFCOUNT 1
|
| 722 |
+
/* Save the encoding of structure (useful for signatures) */
|
| 723 |
+
#define ASN1_AFLG_ENCODING 2
|
| 724 |
+
/* The Sequence length is invalid */
|
| 725 |
+
#define ASN1_AFLG_BROKEN 4
|
| 726 |
+
/* Use the new asn1_const_cb */
|
| 727 |
+
#define ASN1_AFLG_CONST_CB 8
|
| 728 |
+
|
| 729 |
+
/* operation values for asn1_cb */
|
| 730 |
+
|
| 731 |
+
#define ASN1_OP_NEW_PRE 0
|
| 732 |
+
#define ASN1_OP_NEW_POST 1
|
| 733 |
+
#define ASN1_OP_FREE_PRE 2
|
| 734 |
+
#define ASN1_OP_FREE_POST 3
|
| 735 |
+
#define ASN1_OP_D2I_PRE 4
|
| 736 |
+
#define ASN1_OP_D2I_POST 5
|
| 737 |
+
#define ASN1_OP_I2D_PRE 6
|
| 738 |
+
#define ASN1_OP_I2D_POST 7
|
| 739 |
+
#define ASN1_OP_PRINT_PRE 8
|
| 740 |
+
#define ASN1_OP_PRINT_POST 9
|
| 741 |
+
#define ASN1_OP_STREAM_PRE 10
|
| 742 |
+
#define ASN1_OP_STREAM_POST 11
|
| 743 |
+
#define ASN1_OP_DETACHED_PRE 12
|
| 744 |
+
#define ASN1_OP_DETACHED_POST 13
|
| 745 |
+
#define ASN1_OP_DUP_PRE 14
|
| 746 |
+
#define ASN1_OP_DUP_POST 15
|
| 747 |
+
#define ASN1_OP_GET0_LIBCTX 16
|
| 748 |
+
#define ASN1_OP_GET0_PROPQ 17
|
| 749 |
+
|
| 750 |
+
/* Macro to implement a primitive type */
|
| 751 |
+
#define IMPLEMENT_ASN1_TYPE(stname) IMPLEMENT_ASN1_TYPE_ex(stname, stname, 0)
|
| 752 |
+
#define IMPLEMENT_ASN1_TYPE_ex(itname, vname, ex) \
|
| 753 |
+
ASN1_ITEM_start(itname) \
|
| 754 |
+
ASN1_ITYPE_PRIMITIVE, \
|
| 755 |
+
V_##vname, NULL, 0, NULL, ex, #itname ASN1_ITEM_end(itname)
|
| 756 |
+
|
| 757 |
+
/* Macro to implement a multi string type */
|
| 758 |
+
#define IMPLEMENT_ASN1_MSTRING(itname, mask) \
|
| 759 |
+
ASN1_ITEM_start(itname) \
|
| 760 |
+
ASN1_ITYPE_MSTRING, \
|
| 761 |
+
mask, NULL, 0, NULL, sizeof(ASN1_STRING), #itname ASN1_ITEM_end(itname)
|
| 762 |
+
|
| 763 |
+
#define IMPLEMENT_EXTERN_ASN1(sname, tag, fptrs) \
|
| 764 |
+
ASN1_ITEM_start(sname) \
|
| 765 |
+
ASN1_ITYPE_EXTERN, \
|
| 766 |
+
tag, \
|
| 767 |
+
NULL, \
|
| 768 |
+
0, \
|
| 769 |
+
&fptrs, \
|
| 770 |
+
0, \
|
| 771 |
+
#sname ASN1_ITEM_end(sname)
|
| 772 |
+
|
| 773 |
+
/* Macro to implement standard functions in terms of ASN1_ITEM structures */
|
| 774 |
+
|
| 775 |
+
#define IMPLEMENT_ASN1_FUNCTIONS(stname) IMPLEMENT_ASN1_FUNCTIONS_fname(stname, stname, stname)
|
| 776 |
+
|
| 777 |
+
#define IMPLEMENT_ASN1_FUNCTIONS_name(stname, itname) IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, itname)
|
| 778 |
+
|
| 779 |
+
#define IMPLEMENT_ASN1_FUNCTIONS_ENCODE_name(stname, itname) \
|
| 780 |
+
IMPLEMENT_ASN1_FUNCTIONS_ENCODE_fname(stname, itname, itname)
|
| 781 |
+
|
| 782 |
+
#define IMPLEMENT_STATIC_ASN1_ALLOC_FUNCTIONS(stname) \
|
| 783 |
+
IMPLEMENT_ASN1_ALLOC_FUNCTIONS_pfname(static, stname, stname, stname)
|
| 784 |
+
|
| 785 |
+
#define IMPLEMENT_ASN1_ALLOC_FUNCTIONS(stname) \
|
| 786 |
+
IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, stname, stname)
|
| 787 |
+
|
| 788 |
+
#define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_pfname(pre, stname, itname, fname) \
|
| 789 |
+
pre stname *fname##_new(void) \
|
| 790 |
+
{ \
|
| 791 |
+
return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname)); \
|
| 792 |
+
} \
|
| 793 |
+
pre void fname##_free(stname *a) \
|
| 794 |
+
{ \
|
| 795 |
+
ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname)); \
|
| 796 |
+
}
|
| 797 |
+
|
| 798 |
+
#define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname) \
|
| 799 |
+
stname *fname##_new(void) \
|
| 800 |
+
{ \
|
| 801 |
+
return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname)); \
|
| 802 |
+
} \
|
| 803 |
+
void fname##_free(stname *a) \
|
| 804 |
+
{ \
|
| 805 |
+
ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname)); \
|
| 806 |
+
}
|
| 807 |
+
|
| 808 |
+
#define IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, fname) \
|
| 809 |
+
IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \
|
| 810 |
+
IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname)
|
| 811 |
+
|
| 812 |
+
#define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \
|
| 813 |
+
stname *d2i_##fname(stname **a, const unsigned char **in, long len) \
|
| 814 |
+
{ \
|
| 815 |
+
return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname)); \
|
| 816 |
+
} \
|
| 817 |
+
int i2d_##fname(const stname *a, unsigned char **out) \
|
| 818 |
+
{ \
|
| 819 |
+
return ASN1_item_i2d((const ASN1_VALUE *)a, out, ASN1_ITEM_rptr(itname)); \
|
| 820 |
+
}
|
| 821 |
+
|
| 822 |
+
#define IMPLEMENT_ASN1_NDEF_FUNCTION(stname) \
|
| 823 |
+
int i2d_##stname##_NDEF(const stname *a, unsigned char **out) \
|
| 824 |
+
{ \
|
| 825 |
+
return ASN1_item_ndef_i2d((const ASN1_VALUE *)a, out, ASN1_ITEM_rptr(stname)); \
|
| 826 |
+
}
|
| 827 |
+
|
| 828 |
+
#define IMPLEMENT_STATIC_ASN1_ENCODE_FUNCTIONS(stname) \
|
| 829 |
+
static stname *d2i_##stname(stname **a, \
|
| 830 |
+
const unsigned char **in, long len) \
|
| 831 |
+
{ \
|
| 832 |
+
return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, \
|
| 833 |
+
ASN1_ITEM_rptr(stname)); \
|
| 834 |
+
} \
|
| 835 |
+
static int i2d_##stname(const stname *a, unsigned char **out) \
|
| 836 |
+
{ \
|
| 837 |
+
return ASN1_item_i2d((const ASN1_VALUE *)a, out, \
|
| 838 |
+
ASN1_ITEM_rptr(stname)); \
|
| 839 |
+
}
|
| 840 |
+
|
| 841 |
+
#define IMPLEMENT_ASN1_DUP_FUNCTION(stname) \
|
| 842 |
+
stname *stname##_dup(const stname *x) \
|
| 843 |
+
{ \
|
| 844 |
+
return ASN1_item_dup(ASN1_ITEM_rptr(stname), x); \
|
| 845 |
+
}
|
| 846 |
+
|
| 847 |
+
#define IMPLEMENT_ASN1_PRINT_FUNCTION(stname) \
|
| 848 |
+
IMPLEMENT_ASN1_PRINT_FUNCTION_fname(stname, stname, stname)
|
| 849 |
+
|
| 850 |
+
#define IMPLEMENT_ASN1_PRINT_FUNCTION_fname(stname, itname, fname) \
|
| 851 |
+
int fname##_print_ctx(BIO *out, const stname *x, int indent, \
|
| 852 |
+
const ASN1_PCTX *pctx) \
|
| 853 |
+
{ \
|
| 854 |
+
return ASN1_item_print(out, (const ASN1_VALUE *)x, indent, \
|
| 855 |
+
ASN1_ITEM_rptr(itname), pctx); \
|
| 856 |
+
}
|
| 857 |
+
|
| 858 |
+
/* external definitions for primitive types */
|
| 859 |
+
|
| 860 |
+
DECLARE_ASN1_ITEM(ASN1_BOOLEAN)
|
| 861 |
+
DECLARE_ASN1_ITEM(ASN1_TBOOLEAN)
|
| 862 |
+
DECLARE_ASN1_ITEM(ASN1_FBOOLEAN)
|
| 863 |
+
DECLARE_ASN1_ITEM(ASN1_SEQUENCE)
|
| 864 |
+
DECLARE_ASN1_ITEM(CBIGNUM)
|
| 865 |
+
DECLARE_ASN1_ITEM(BIGNUM)
|
| 866 |
+
DECLARE_ASN1_ITEM(INT32)
|
| 867 |
+
DECLARE_ASN1_ITEM(ZINT32)
|
| 868 |
+
DECLARE_ASN1_ITEM(UINT32)
|
| 869 |
+
DECLARE_ASN1_ITEM(ZUINT32)
|
| 870 |
+
DECLARE_ASN1_ITEM(INT64)
|
| 871 |
+
DECLARE_ASN1_ITEM(ZINT64)
|
| 872 |
+
DECLARE_ASN1_ITEM(UINT64)
|
| 873 |
+
DECLARE_ASN1_ITEM(ZUINT64)
|
| 874 |
+
|
| 875 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 876 |
+
/*
|
| 877 |
+
* LONG and ZLONG are strongly discouraged for use as stored data, as the
|
| 878 |
+
* underlying C type (long) differs in size depending on the architecture.
|
| 879 |
+
* They are designed with 32-bit longs in mind.
|
| 880 |
+
*/
|
| 881 |
+
DECLARE_ASN1_ITEM(LONG)
|
| 882 |
+
DECLARE_ASN1_ITEM(ZLONG)
|
| 883 |
+
#endif
|
| 884 |
+
|
| 885 |
+
/* clang-format off */
|
| 886 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_VALUE, ASN1_VALUE, ASN1_VALUE)
|
| 887 |
+
#define sk_ASN1_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_VALUE_sk_type(sk))
|
| 888 |
+
#define sk_ASN1_VALUE_value(sk, idx) ((ASN1_VALUE *)OPENSSL_sk_value(ossl_check_const_ASN1_VALUE_sk_type(sk), (idx)))
|
| 889 |
+
#define sk_ASN1_VALUE_new(cmp) ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_new(ossl_check_ASN1_VALUE_compfunc_type(cmp)))
|
| 890 |
+
#define sk_ASN1_VALUE_new_null() ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_new_null())
|
| 891 |
+
#define sk_ASN1_VALUE_new_reserve(cmp, n) ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_VALUE_compfunc_type(cmp), (n)))
|
| 892 |
+
#define sk_ASN1_VALUE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_VALUE_sk_type(sk), (n))
|
| 893 |
+
#define sk_ASN1_VALUE_free(sk) OPENSSL_sk_free(ossl_check_ASN1_VALUE_sk_type(sk))
|
| 894 |
+
#define sk_ASN1_VALUE_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_VALUE_sk_type(sk))
|
| 895 |
+
#define sk_ASN1_VALUE_delete(sk, i) ((ASN1_VALUE *)OPENSSL_sk_delete(ossl_check_ASN1_VALUE_sk_type(sk), (i)))
|
| 896 |
+
#define sk_ASN1_VALUE_delete_ptr(sk, ptr) ((ASN1_VALUE *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr)))
|
| 897 |
+
#define sk_ASN1_VALUE_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr))
|
| 898 |
+
#define sk_ASN1_VALUE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr))
|
| 899 |
+
#define sk_ASN1_VALUE_pop(sk) ((ASN1_VALUE *)OPENSSL_sk_pop(ossl_check_ASN1_VALUE_sk_type(sk)))
|
| 900 |
+
#define sk_ASN1_VALUE_shift(sk) ((ASN1_VALUE *)OPENSSL_sk_shift(ossl_check_ASN1_VALUE_sk_type(sk)))
|
| 901 |
+
#define sk_ASN1_VALUE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_VALUE_sk_type(sk),ossl_check_ASN1_VALUE_freefunc_type(freefunc))
|
| 902 |
+
#define sk_ASN1_VALUE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr), (idx))
|
| 903 |
+
#define sk_ASN1_VALUE_set(sk, idx, ptr) ((ASN1_VALUE *)OPENSSL_sk_set(ossl_check_ASN1_VALUE_sk_type(sk), (idx), ossl_check_ASN1_VALUE_type(ptr)))
|
| 904 |
+
#define sk_ASN1_VALUE_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr))
|
| 905 |
+
#define sk_ASN1_VALUE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr))
|
| 906 |
+
#define sk_ASN1_VALUE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr), pnum)
|
| 907 |
+
#define sk_ASN1_VALUE_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_VALUE_sk_type(sk))
|
| 908 |
+
#define sk_ASN1_VALUE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_VALUE_sk_type(sk))
|
| 909 |
+
#define sk_ASN1_VALUE_dup(sk) ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_dup(ossl_check_const_ASN1_VALUE_sk_type(sk)))
|
| 910 |
+
#define sk_ASN1_VALUE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_copyfunc_type(copyfunc), ossl_check_ASN1_VALUE_freefunc_type(freefunc)))
|
| 911 |
+
#define sk_ASN1_VALUE_set_cmp_func(sk, cmp) ((sk_ASN1_VALUE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_compfunc_type(cmp)))
|
| 912 |
+
|
| 913 |
+
/* clang-format on */
|
| 914 |
+
|
| 915 |
+
/* Functions used internally by the ASN1 code */
|
| 916 |
+
|
| 917 |
+
int ASN1_item_ex_new(ASN1_VALUE **pval, const ASN1_ITEM *it);
|
| 918 |
+
void ASN1_item_ex_free(ASN1_VALUE **pval, const ASN1_ITEM *it);
|
| 919 |
+
|
| 920 |
+
int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
|
| 921 |
+
const ASN1_ITEM *it, int tag, int aclass, char opt,
|
| 922 |
+
ASN1_TLC *ctx);
|
| 923 |
+
|
| 924 |
+
int ASN1_item_ex_i2d(const ASN1_VALUE **pval, unsigned char **out,
|
| 925 |
+
const ASN1_ITEM *it, int tag, int aclass);
|
| 926 |
+
|
| 927 |
+
/* Legacy compatibility */
|
| 928 |
+
#define IMPLEMENT_ASN1_FUNCTIONS_const(name) IMPLEMENT_ASN1_FUNCTIONS(name)
|
| 929 |
+
#define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(stname, itname, fname) \
|
| 930 |
+
IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname)
|
| 931 |
+
|
| 932 |
+
#ifdef __cplusplus
|
| 933 |
+
}
|
| 934 |
+
#endif
|
| 935 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/async.h
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2015-2022 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 |
+
#include <stdlib.h>
|
| 11 |
+
|
| 12 |
+
#ifndef OPENSSL_ASYNC_H
|
| 13 |
+
#define OPENSSL_ASYNC_H
|
| 14 |
+
#pragma once
|
| 15 |
+
|
| 16 |
+
#include <openssl/macros.h>
|
| 17 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 18 |
+
#define HEADER_ASYNC_H
|
| 19 |
+
#endif
|
| 20 |
+
|
| 21 |
+
#if defined(_WIN32)
|
| 22 |
+
#if defined(BASETYPES) || defined(_WINDEF_H)
|
| 23 |
+
/* application has to include <windows.h> to use this */
|
| 24 |
+
#define OSSL_ASYNC_FD HANDLE
|
| 25 |
+
#define OSSL_BAD_ASYNC_FD INVALID_HANDLE_VALUE
|
| 26 |
+
#endif
|
| 27 |
+
#else
|
| 28 |
+
#define OSSL_ASYNC_FD int
|
| 29 |
+
#define OSSL_BAD_ASYNC_FD -1
|
| 30 |
+
#endif
|
| 31 |
+
#include <openssl/asyncerr.h>
|
| 32 |
+
|
| 33 |
+
#ifdef __cplusplus
|
| 34 |
+
extern "C" {
|
| 35 |
+
#endif
|
| 36 |
+
|
| 37 |
+
typedef struct async_job_st ASYNC_JOB;
|
| 38 |
+
typedef struct async_wait_ctx_st ASYNC_WAIT_CTX;
|
| 39 |
+
typedef int (*ASYNC_callback_fn)(void *arg);
|
| 40 |
+
|
| 41 |
+
#define ASYNC_ERR 0
|
| 42 |
+
#define ASYNC_NO_JOBS 1
|
| 43 |
+
#define ASYNC_PAUSE 2
|
| 44 |
+
#define ASYNC_FINISH 3
|
| 45 |
+
|
| 46 |
+
#define ASYNC_STATUS_UNSUPPORTED 0
|
| 47 |
+
#define ASYNC_STATUS_ERR 1
|
| 48 |
+
#define ASYNC_STATUS_OK 2
|
| 49 |
+
#define ASYNC_STATUS_EAGAIN 3
|
| 50 |
+
|
| 51 |
+
int ASYNC_init_thread(size_t max_size, size_t init_size);
|
| 52 |
+
void ASYNC_cleanup_thread(void);
|
| 53 |
+
|
| 54 |
+
#ifdef OSSL_ASYNC_FD
|
| 55 |
+
ASYNC_WAIT_CTX *ASYNC_WAIT_CTX_new(void);
|
| 56 |
+
void ASYNC_WAIT_CTX_free(ASYNC_WAIT_CTX *ctx);
|
| 57 |
+
int ASYNC_WAIT_CTX_set_wait_fd(ASYNC_WAIT_CTX *ctx, const void *key,
|
| 58 |
+
OSSL_ASYNC_FD fd,
|
| 59 |
+
void *custom_data,
|
| 60 |
+
void (*cleanup)(ASYNC_WAIT_CTX *, const void *,
|
| 61 |
+
OSSL_ASYNC_FD, void *));
|
| 62 |
+
int ASYNC_WAIT_CTX_get_fd(ASYNC_WAIT_CTX *ctx, const void *key,
|
| 63 |
+
OSSL_ASYNC_FD *fd, void **custom_data);
|
| 64 |
+
int ASYNC_WAIT_CTX_get_all_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *fd,
|
| 65 |
+
size_t *numfds);
|
| 66 |
+
int ASYNC_WAIT_CTX_get_callback(ASYNC_WAIT_CTX *ctx,
|
| 67 |
+
ASYNC_callback_fn *callback,
|
| 68 |
+
void **callback_arg);
|
| 69 |
+
int ASYNC_WAIT_CTX_set_callback(ASYNC_WAIT_CTX *ctx,
|
| 70 |
+
ASYNC_callback_fn callback,
|
| 71 |
+
void *callback_arg);
|
| 72 |
+
int ASYNC_WAIT_CTX_set_status(ASYNC_WAIT_CTX *ctx, int status);
|
| 73 |
+
int ASYNC_WAIT_CTX_get_status(ASYNC_WAIT_CTX *ctx);
|
| 74 |
+
int ASYNC_WAIT_CTX_get_changed_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *addfd,
|
| 75 |
+
size_t *numaddfds, OSSL_ASYNC_FD *delfd,
|
| 76 |
+
size_t *numdelfds);
|
| 77 |
+
int ASYNC_WAIT_CTX_clear_fd(ASYNC_WAIT_CTX *ctx, const void *key);
|
| 78 |
+
#endif
|
| 79 |
+
|
| 80 |
+
int ASYNC_is_capable(void);
|
| 81 |
+
|
| 82 |
+
typedef void *(*ASYNC_stack_alloc_fn)(size_t *num);
|
| 83 |
+
typedef void (*ASYNC_stack_free_fn)(void *addr);
|
| 84 |
+
|
| 85 |
+
int ASYNC_set_mem_functions(ASYNC_stack_alloc_fn alloc_fn,
|
| 86 |
+
ASYNC_stack_free_fn free_fn);
|
| 87 |
+
void ASYNC_get_mem_functions(ASYNC_stack_alloc_fn *alloc_fn,
|
| 88 |
+
ASYNC_stack_free_fn *free_fn);
|
| 89 |
+
|
| 90 |
+
int ASYNC_start_job(ASYNC_JOB **job, ASYNC_WAIT_CTX *ctx, int *ret,
|
| 91 |
+
int (*func)(void *), void *args, size_t size);
|
| 92 |
+
int ASYNC_pause_job(void);
|
| 93 |
+
|
| 94 |
+
ASYNC_JOB *ASYNC_get_current_job(void);
|
| 95 |
+
ASYNC_WAIT_CTX *ASYNC_get_wait_ctx(ASYNC_JOB *job);
|
| 96 |
+
void ASYNC_block_pause(void);
|
| 97 |
+
void ASYNC_unblock_pause(void);
|
| 98 |
+
|
| 99 |
+
#ifdef __cplusplus
|
| 100 |
+
}
|
| 101 |
+
#endif
|
| 102 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/asyncerr.h
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_ASYNCERR_H
|
| 12 |
+
#define OPENSSL_ASYNCERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
/*
|
| 20 |
+
* ASYNC reason codes.
|
| 21 |
+
*/
|
| 22 |
+
#define ASYNC_R_FAILED_TO_SET_POOL 101
|
| 23 |
+
#define ASYNC_R_FAILED_TO_SWAP_CONTEXT 102
|
| 24 |
+
#define ASYNC_R_INIT_FAILED 105
|
| 25 |
+
#define ASYNC_R_INVALID_POOL_SIZE 103
|
| 26 |
+
|
| 27 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/bio.h
ADDED
|
@@ -0,0 +1,1028 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/bio.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
/* clang-format off */
|
| 13 |
+
|
| 14 |
+
/* clang-format on */
|
| 15 |
+
|
| 16 |
+
#ifndef OPENSSL_BIO_H
|
| 17 |
+
#define OPENSSL_BIO_H
|
| 18 |
+
#pragma once
|
| 19 |
+
|
| 20 |
+
#include <openssl/macros.h>
|
| 21 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 22 |
+
#define HEADER_BIO_H
|
| 23 |
+
#endif
|
| 24 |
+
|
| 25 |
+
#include <openssl/e_os2.h>
|
| 26 |
+
|
| 27 |
+
#ifndef OPENSSL_NO_STDIO
|
| 28 |
+
#include <stdio.h>
|
| 29 |
+
#endif
|
| 30 |
+
#include <stdarg.h>
|
| 31 |
+
|
| 32 |
+
#include <openssl/crypto.h>
|
| 33 |
+
#include <openssl/bioerr.h>
|
| 34 |
+
#include <openssl/core.h>
|
| 35 |
+
|
| 36 |
+
#ifdef __cplusplus
|
| 37 |
+
extern "C" {
|
| 38 |
+
#endif
|
| 39 |
+
|
| 40 |
+
/* There are the classes of BIOs */
|
| 41 |
+
#define BIO_TYPE_DESCRIPTOR 0x0100 /* socket, fd, connect or accept */
|
| 42 |
+
#define BIO_TYPE_FILTER 0x0200
|
| 43 |
+
#define BIO_TYPE_SOURCE_SINK 0x0400
|
| 44 |
+
|
| 45 |
+
/* These are the 'types' of BIOs */
|
| 46 |
+
#define BIO_TYPE_NONE 0
|
| 47 |
+
#define BIO_TYPE_MEM (1 | BIO_TYPE_SOURCE_SINK)
|
| 48 |
+
#define BIO_TYPE_FILE (2 | BIO_TYPE_SOURCE_SINK)
|
| 49 |
+
|
| 50 |
+
#define BIO_TYPE_FD (4 | BIO_TYPE_SOURCE_SINK | BIO_TYPE_DESCRIPTOR)
|
| 51 |
+
#define BIO_TYPE_SOCKET (5 | BIO_TYPE_SOURCE_SINK | BIO_TYPE_DESCRIPTOR)
|
| 52 |
+
#define BIO_TYPE_NULL (6 | BIO_TYPE_SOURCE_SINK)
|
| 53 |
+
#define BIO_TYPE_SSL (7 | BIO_TYPE_FILTER)
|
| 54 |
+
#define BIO_TYPE_MD (8 | BIO_TYPE_FILTER)
|
| 55 |
+
#define BIO_TYPE_BUFFER (9 | BIO_TYPE_FILTER)
|
| 56 |
+
#define BIO_TYPE_CIPHER (10 | BIO_TYPE_FILTER)
|
| 57 |
+
#define BIO_TYPE_BASE64 (11 | BIO_TYPE_FILTER)
|
| 58 |
+
#define BIO_TYPE_CONNECT (12 | BIO_TYPE_SOURCE_SINK | BIO_TYPE_DESCRIPTOR)
|
| 59 |
+
#define BIO_TYPE_ACCEPT (13 | BIO_TYPE_SOURCE_SINK | BIO_TYPE_DESCRIPTOR)
|
| 60 |
+
|
| 61 |
+
#define BIO_TYPE_NBIO_TEST (16 | BIO_TYPE_FILTER) /* server proxy BIO */
|
| 62 |
+
#define BIO_TYPE_NULL_FILTER (17 | BIO_TYPE_FILTER)
|
| 63 |
+
#define BIO_TYPE_BIO (19 | BIO_TYPE_SOURCE_SINK) /* half a BIO pair */
|
| 64 |
+
#define BIO_TYPE_LINEBUFFER (20 | BIO_TYPE_FILTER)
|
| 65 |
+
#define BIO_TYPE_DGRAM (21 | BIO_TYPE_SOURCE_SINK | BIO_TYPE_DESCRIPTOR)
|
| 66 |
+
#define BIO_TYPE_ASN1 (22 | BIO_TYPE_FILTER)
|
| 67 |
+
#define BIO_TYPE_COMP (23 | BIO_TYPE_FILTER)
|
| 68 |
+
#ifndef OPENSSL_NO_SCTP
|
| 69 |
+
#define BIO_TYPE_DGRAM_SCTP (24 | BIO_TYPE_SOURCE_SINK | BIO_TYPE_DESCRIPTOR)
|
| 70 |
+
#endif
|
| 71 |
+
#define BIO_TYPE_CORE_TO_PROV (25 | BIO_TYPE_SOURCE_SINK)
|
| 72 |
+
#define BIO_TYPE_DGRAM_PAIR (26 | BIO_TYPE_SOURCE_SINK)
|
| 73 |
+
#define BIO_TYPE_DGRAM_MEM (27 | BIO_TYPE_SOURCE_SINK)
|
| 74 |
+
|
| 75 |
+
/* Custom type starting index returned by BIO_get_new_index() */
|
| 76 |
+
#define BIO_TYPE_START 128
|
| 77 |
+
/* Custom type maximum index that can be returned by BIO_get_new_index() */
|
| 78 |
+
#define BIO_TYPE_MASK 0xFF
|
| 79 |
+
|
| 80 |
+
/*
|
| 81 |
+
* BIO_FILENAME_READ|BIO_CLOSE to open or close on free.
|
| 82 |
+
* BIO_set_fp(in,stdin,BIO_NOCLOSE);
|
| 83 |
+
*/
|
| 84 |
+
#define BIO_NOCLOSE 0x00
|
| 85 |
+
#define BIO_CLOSE 0x01
|
| 86 |
+
|
| 87 |
+
/*
|
| 88 |
+
* These are used in the following macros and are passed to BIO_ctrl()
|
| 89 |
+
*/
|
| 90 |
+
#define BIO_CTRL_RESET 1 /* opt - rewind/zero etc */
|
| 91 |
+
#define BIO_CTRL_EOF 2 /* opt - are we at the eof */
|
| 92 |
+
#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
|
| 93 |
+
#define BIO_CTRL_SET 4 /* man - set the 'IO' type */
|
| 94 |
+
#define BIO_CTRL_GET 5 /* man - get the 'IO' type */
|
| 95 |
+
#define BIO_CTRL_PUSH 6 /* opt - internal, used to signify change */
|
| 96 |
+
#define BIO_CTRL_POP 7 /* opt - internal, used to signify change */
|
| 97 |
+
#define BIO_CTRL_GET_CLOSE 8 /* man - set the 'close' on free */
|
| 98 |
+
#define BIO_CTRL_SET_CLOSE 9 /* man - set the 'close' on free */
|
| 99 |
+
#define BIO_CTRL_PENDING 10 /* opt - is their more data buffered */
|
| 100 |
+
#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */
|
| 101 |
+
#define BIO_CTRL_DUP 12 /* man - extra stuff for 'duped' BIO */
|
| 102 |
+
#define BIO_CTRL_WPENDING 13 /* opt - number of bytes still to write */
|
| 103 |
+
#define BIO_CTRL_SET_CALLBACK 14 /* opt - set callback function */
|
| 104 |
+
#define BIO_CTRL_GET_CALLBACK 15 /* opt - set callback function */
|
| 105 |
+
|
| 106 |
+
#define BIO_CTRL_PEEK 29 /* BIO_f_buffer special */
|
| 107 |
+
#define BIO_CTRL_SET_FILENAME 30 /* BIO_s_file special */
|
| 108 |
+
|
| 109 |
+
/* dgram BIO stuff */
|
| 110 |
+
#define BIO_CTRL_DGRAM_CONNECT 31 /* BIO dgram special */
|
| 111 |
+
#define BIO_CTRL_DGRAM_SET_CONNECTED 32 /* allow for an externally connected \
|
| 112 |
+
* socket to be passed in */
|
| 113 |
+
#define BIO_CTRL_DGRAM_SET_RECV_TIMEOUT 33 /* setsockopt, essentially */
|
| 114 |
+
#define BIO_CTRL_DGRAM_GET_RECV_TIMEOUT 34 /* getsockopt, essentially */
|
| 115 |
+
#define BIO_CTRL_DGRAM_SET_SEND_TIMEOUT 35 /* setsockopt, essentially */
|
| 116 |
+
#define BIO_CTRL_DGRAM_GET_SEND_TIMEOUT 36 /* getsockopt, essentially */
|
| 117 |
+
|
| 118 |
+
#define BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP 37 /* flag whether the last */
|
| 119 |
+
#define BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP 38 /* I/O operation timed out */
|
| 120 |
+
|
| 121 |
+
/* #ifdef IP_MTU_DISCOVER */
|
| 122 |
+
#define BIO_CTRL_DGRAM_MTU_DISCOVER 39 /* set DF bit on egress packets */
|
| 123 |
+
/* #endif */
|
| 124 |
+
|
| 125 |
+
#define BIO_CTRL_DGRAM_QUERY_MTU 40 /* as kernel for current MTU */
|
| 126 |
+
#define BIO_CTRL_DGRAM_GET_FALLBACK_MTU 47
|
| 127 |
+
#define BIO_CTRL_DGRAM_GET_MTU 41 /* get cached value for MTU */
|
| 128 |
+
#define BIO_CTRL_DGRAM_SET_MTU 42 /* set cached value for MTU. \
|
| 129 |
+
* want to use this if asking \
|
| 130 |
+
* the kernel fails */
|
| 131 |
+
|
| 132 |
+
#define BIO_CTRL_DGRAM_MTU_EXCEEDED 43 /* check whether the MTU was \
|
| 133 |
+
* exceed in the previous write \
|
| 134 |
+
* operation */
|
| 135 |
+
|
| 136 |
+
#define BIO_CTRL_DGRAM_GET_PEER 46
|
| 137 |
+
#define BIO_CTRL_DGRAM_SET_PEER 44 /* Destination for the data */
|
| 138 |
+
|
| 139 |
+
#define BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT 45 /* Next DTLS handshake timeout \
|
| 140 |
+
* to adjust socket timeouts */
|
| 141 |
+
#define BIO_CTRL_DGRAM_SET_DONT_FRAG 48
|
| 142 |
+
|
| 143 |
+
#define BIO_CTRL_DGRAM_GET_MTU_OVERHEAD 49
|
| 144 |
+
|
| 145 |
+
/* Deliberately outside of OPENSSL_NO_SCTP - used in bss_dgram.c */
|
| 146 |
+
#define BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE 50
|
| 147 |
+
#ifndef OPENSSL_NO_SCTP
|
| 148 |
+
/* SCTP stuff */
|
| 149 |
+
#define BIO_CTRL_DGRAM_SCTP_ADD_AUTH_KEY 51
|
| 150 |
+
#define BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY 52
|
| 151 |
+
#define BIO_CTRL_DGRAM_SCTP_AUTH_CCS_RCVD 53
|
| 152 |
+
#define BIO_CTRL_DGRAM_SCTP_GET_SNDINFO 60
|
| 153 |
+
#define BIO_CTRL_DGRAM_SCTP_SET_SNDINFO 61
|
| 154 |
+
#define BIO_CTRL_DGRAM_SCTP_GET_RCVINFO 62
|
| 155 |
+
#define BIO_CTRL_DGRAM_SCTP_SET_RCVINFO 63
|
| 156 |
+
#define BIO_CTRL_DGRAM_SCTP_GET_PRINFO 64
|
| 157 |
+
#define BIO_CTRL_DGRAM_SCTP_SET_PRINFO 65
|
| 158 |
+
#define BIO_CTRL_DGRAM_SCTP_SAVE_SHUTDOWN 70
|
| 159 |
+
#endif
|
| 160 |
+
|
| 161 |
+
#define BIO_CTRL_DGRAM_SET_PEEK_MODE 71
|
| 162 |
+
|
| 163 |
+
/*
|
| 164 |
+
* internal BIO:
|
| 165 |
+
* # define BIO_CTRL_SET_KTLS_SEND 72
|
| 166 |
+
* # define BIO_CTRL_SET_KTLS_SEND_CTRL_MSG 74
|
| 167 |
+
* # define BIO_CTRL_CLEAR_KTLS_CTRL_MSG 75
|
| 168 |
+
*/
|
| 169 |
+
|
| 170 |
+
#define BIO_CTRL_GET_KTLS_SEND 73
|
| 171 |
+
#define BIO_CTRL_GET_KTLS_RECV 76
|
| 172 |
+
|
| 173 |
+
#define BIO_CTRL_DGRAM_SCTP_WAIT_FOR_DRY 77
|
| 174 |
+
#define BIO_CTRL_DGRAM_SCTP_MSG_WAITING 78
|
| 175 |
+
|
| 176 |
+
/* BIO_f_prefix controls */
|
| 177 |
+
#define BIO_CTRL_SET_PREFIX 79
|
| 178 |
+
#define BIO_CTRL_SET_INDENT 80
|
| 179 |
+
#define BIO_CTRL_GET_INDENT 81
|
| 180 |
+
|
| 181 |
+
#define BIO_CTRL_DGRAM_GET_LOCAL_ADDR_CAP 82
|
| 182 |
+
#define BIO_CTRL_DGRAM_GET_LOCAL_ADDR_ENABLE 83
|
| 183 |
+
#define BIO_CTRL_DGRAM_SET_LOCAL_ADDR_ENABLE 84
|
| 184 |
+
#define BIO_CTRL_DGRAM_GET_EFFECTIVE_CAPS 85
|
| 185 |
+
#define BIO_CTRL_DGRAM_GET_CAPS 86
|
| 186 |
+
#define BIO_CTRL_DGRAM_SET_CAPS 87
|
| 187 |
+
#define BIO_CTRL_DGRAM_GET_NO_TRUNC 88
|
| 188 |
+
#define BIO_CTRL_DGRAM_SET_NO_TRUNC 89
|
| 189 |
+
|
| 190 |
+
/*
|
| 191 |
+
* internal BIO:
|
| 192 |
+
* # define BIO_CTRL_SET_KTLS_TX_ZEROCOPY_SENDFILE 90
|
| 193 |
+
*/
|
| 194 |
+
|
| 195 |
+
#define BIO_CTRL_GET_RPOLL_DESCRIPTOR 91
|
| 196 |
+
#define BIO_CTRL_GET_WPOLL_DESCRIPTOR 92
|
| 197 |
+
#define BIO_CTRL_DGRAM_DETECT_PEER_ADDR 93
|
| 198 |
+
#define BIO_CTRL_DGRAM_SET0_LOCAL_ADDR 94
|
| 199 |
+
|
| 200 |
+
#define BIO_DGRAM_CAP_NONE 0U
|
| 201 |
+
#define BIO_DGRAM_CAP_HANDLES_SRC_ADDR (1U << 0)
|
| 202 |
+
#define BIO_DGRAM_CAP_HANDLES_DST_ADDR (1U << 1)
|
| 203 |
+
#define BIO_DGRAM_CAP_PROVIDES_SRC_ADDR (1U << 2)
|
| 204 |
+
#define BIO_DGRAM_CAP_PROVIDES_DST_ADDR (1U << 3)
|
| 205 |
+
|
| 206 |
+
#ifndef OPENSSL_NO_KTLS
|
| 207 |
+
#define BIO_get_ktls_send(b) \
|
| 208 |
+
(BIO_ctrl(b, BIO_CTRL_GET_KTLS_SEND, 0, NULL) > 0)
|
| 209 |
+
#define BIO_get_ktls_recv(b) \
|
| 210 |
+
(BIO_ctrl(b, BIO_CTRL_GET_KTLS_RECV, 0, NULL) > 0)
|
| 211 |
+
#else
|
| 212 |
+
#define BIO_get_ktls_send(b) (0)
|
| 213 |
+
#define BIO_get_ktls_recv(b) (0)
|
| 214 |
+
#endif
|
| 215 |
+
|
| 216 |
+
/* modifiers */
|
| 217 |
+
#define BIO_FP_READ 0x02
|
| 218 |
+
#define BIO_FP_WRITE 0x04
|
| 219 |
+
#define BIO_FP_APPEND 0x08
|
| 220 |
+
#define BIO_FP_TEXT 0x10
|
| 221 |
+
|
| 222 |
+
#define BIO_FLAGS_READ 0x01
|
| 223 |
+
#define BIO_FLAGS_WRITE 0x02
|
| 224 |
+
#define BIO_FLAGS_IO_SPECIAL 0x04
|
| 225 |
+
#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
|
| 226 |
+
#define BIO_FLAGS_SHOULD_RETRY 0x08
|
| 227 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 228 |
+
/* This #define was replaced by an internal constant and should not be used. */
|
| 229 |
+
#define BIO_FLAGS_UPLINK 0
|
| 230 |
+
#endif
|
| 231 |
+
|
| 232 |
+
#define BIO_FLAGS_BASE64_NO_NL 0x100
|
| 233 |
+
|
| 234 |
+
/*
|
| 235 |
+
* This is used with memory BIOs:
|
| 236 |
+
* BIO_FLAGS_MEM_RDONLY means we shouldn't free up or change the data in any way;
|
| 237 |
+
* BIO_FLAGS_NONCLEAR_RST means we shouldn't clear data on reset.
|
| 238 |
+
*/
|
| 239 |
+
#define BIO_FLAGS_MEM_RDONLY 0x200
|
| 240 |
+
#define BIO_FLAGS_NONCLEAR_RST 0x400
|
| 241 |
+
#define BIO_FLAGS_IN_EOF 0x800
|
| 242 |
+
|
| 243 |
+
/* the BIO FLAGS values 0x1000 to 0x8000 are reserved for internal KTLS flags */
|
| 244 |
+
|
| 245 |
+
typedef union bio_addr_st BIO_ADDR;
|
| 246 |
+
typedef struct bio_addrinfo_st BIO_ADDRINFO;
|
| 247 |
+
|
| 248 |
+
int BIO_get_new_index(void);
|
| 249 |
+
void BIO_set_flags(BIO *b, int flags);
|
| 250 |
+
int BIO_test_flags(const BIO *b, int flags);
|
| 251 |
+
void BIO_clear_flags(BIO *b, int flags);
|
| 252 |
+
|
| 253 |
+
#define BIO_get_flags(b) BIO_test_flags(b, ~(0x0))
|
| 254 |
+
#define BIO_set_retry_special(b) \
|
| 255 |
+
BIO_set_flags(b, (BIO_FLAGS_IO_SPECIAL | BIO_FLAGS_SHOULD_RETRY))
|
| 256 |
+
#define BIO_set_retry_read(b) \
|
| 257 |
+
BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
|
| 258 |
+
#define BIO_set_retry_write(b) \
|
| 259 |
+
BIO_set_flags(b, (BIO_FLAGS_WRITE | BIO_FLAGS_SHOULD_RETRY))
|
| 260 |
+
|
| 261 |
+
/* These are normally used internally in BIOs */
|
| 262 |
+
#define BIO_clear_retry_flags(b) \
|
| 263 |
+
BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
|
| 264 |
+
#define BIO_get_retry_flags(b) \
|
| 265 |
+
BIO_test_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
|
| 266 |
+
|
| 267 |
+
/* These should be used by the application to tell why we should retry */
|
| 268 |
+
#define BIO_should_read(a) BIO_test_flags(a, BIO_FLAGS_READ)
|
| 269 |
+
#define BIO_should_write(a) BIO_test_flags(a, BIO_FLAGS_WRITE)
|
| 270 |
+
#define BIO_should_io_special(a) BIO_test_flags(a, BIO_FLAGS_IO_SPECIAL)
|
| 271 |
+
#define BIO_retry_type(a) BIO_test_flags(a, BIO_FLAGS_RWS)
|
| 272 |
+
#define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)
|
| 273 |
+
|
| 274 |
+
/*
|
| 275 |
+
* The next three are used in conjunction with the BIO_should_io_special()
|
| 276 |
+
* condition. After this returns true, BIO *BIO_get_retry_BIO(BIO *bio, int
|
| 277 |
+
* *reason); will walk the BIO stack and return the 'reason' for the special
|
| 278 |
+
* and the offending BIO. Given a BIO, BIO_get_retry_reason(bio) will return
|
| 279 |
+
* the code.
|
| 280 |
+
*/
|
| 281 |
+
/*
|
| 282 |
+
* Returned from the SSL bio when the certificate retrieval code had an error
|
| 283 |
+
*/
|
| 284 |
+
#define BIO_RR_SSL_X509_LOOKUP 0x01
|
| 285 |
+
/* Returned from the connect BIO when a connect would have blocked */
|
| 286 |
+
#define BIO_RR_CONNECT 0x02
|
| 287 |
+
/* Returned from the accept BIO when an accept would have blocked */
|
| 288 |
+
#define BIO_RR_ACCEPT 0x03
|
| 289 |
+
|
| 290 |
+
/* These are passed by the BIO callback */
|
| 291 |
+
#define BIO_CB_FREE 0x01
|
| 292 |
+
#define BIO_CB_READ 0x02
|
| 293 |
+
#define BIO_CB_WRITE 0x03
|
| 294 |
+
#define BIO_CB_PUTS 0x04
|
| 295 |
+
#define BIO_CB_GETS 0x05
|
| 296 |
+
#define BIO_CB_CTRL 0x06
|
| 297 |
+
#define BIO_CB_RECVMMSG 0x07
|
| 298 |
+
#define BIO_CB_SENDMMSG 0x08
|
| 299 |
+
|
| 300 |
+
/*
|
| 301 |
+
* The callback is called before and after the underling operation, The
|
| 302 |
+
* BIO_CB_RETURN flag indicates if it is after the call
|
| 303 |
+
*/
|
| 304 |
+
#define BIO_CB_RETURN 0x80
|
| 305 |
+
#define BIO_CB_return(a) ((a) | BIO_CB_RETURN)
|
| 306 |
+
#define BIO_cb_pre(a) (!((a) & BIO_CB_RETURN))
|
| 307 |
+
#define BIO_cb_post(a) ((a) & BIO_CB_RETURN)
|
| 308 |
+
|
| 309 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 310 |
+
typedef long (*BIO_callback_fn)(BIO *b, int oper, const char *argp, int argi,
|
| 311 |
+
long argl, long ret);
|
| 312 |
+
OSSL_DEPRECATEDIN_3_0 BIO_callback_fn BIO_get_callback(const BIO *b);
|
| 313 |
+
OSSL_DEPRECATEDIN_3_0 void BIO_set_callback(BIO *b, BIO_callback_fn callback);
|
| 314 |
+
OSSL_DEPRECATEDIN_3_0 long BIO_debug_callback(BIO *bio, int cmd,
|
| 315 |
+
const char *argp, int argi,
|
| 316 |
+
long argl, long ret);
|
| 317 |
+
#endif
|
| 318 |
+
|
| 319 |
+
typedef long (*BIO_callback_fn_ex)(BIO *b, int oper, const char *argp,
|
| 320 |
+
size_t len, int argi,
|
| 321 |
+
long argl, int ret, size_t *processed);
|
| 322 |
+
BIO_callback_fn_ex BIO_get_callback_ex(const BIO *b);
|
| 323 |
+
void BIO_set_callback_ex(BIO *b, BIO_callback_fn_ex callback);
|
| 324 |
+
long BIO_debug_callback_ex(BIO *bio, int oper, const char *argp, size_t len,
|
| 325 |
+
int argi, long argl, int ret, size_t *processed);
|
| 326 |
+
|
| 327 |
+
char *BIO_get_callback_arg(const BIO *b);
|
| 328 |
+
void BIO_set_callback_arg(BIO *b, char *arg);
|
| 329 |
+
|
| 330 |
+
typedef struct bio_method_st BIO_METHOD;
|
| 331 |
+
|
| 332 |
+
const char *BIO_method_name(const BIO *b);
|
| 333 |
+
int BIO_method_type(const BIO *b);
|
| 334 |
+
|
| 335 |
+
typedef int BIO_info_cb(BIO *, int, int);
|
| 336 |
+
typedef BIO_info_cb bio_info_cb; /* backward compatibility */
|
| 337 |
+
|
| 338 |
+
/* clang-format off */
|
| 339 |
+
SKM_DEFINE_STACK_OF_INTERNAL(BIO, BIO, BIO)
|
| 340 |
+
#define sk_BIO_num(sk) OPENSSL_sk_num(ossl_check_const_BIO_sk_type(sk))
|
| 341 |
+
#define sk_BIO_value(sk, idx) ((BIO *)OPENSSL_sk_value(ossl_check_const_BIO_sk_type(sk), (idx)))
|
| 342 |
+
#define sk_BIO_new(cmp) ((STACK_OF(BIO) *)OPENSSL_sk_new(ossl_check_BIO_compfunc_type(cmp)))
|
| 343 |
+
#define sk_BIO_new_null() ((STACK_OF(BIO) *)OPENSSL_sk_new_null())
|
| 344 |
+
#define sk_BIO_new_reserve(cmp, n) ((STACK_OF(BIO) *)OPENSSL_sk_new_reserve(ossl_check_BIO_compfunc_type(cmp), (n)))
|
| 345 |
+
#define sk_BIO_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_BIO_sk_type(sk), (n))
|
| 346 |
+
#define sk_BIO_free(sk) OPENSSL_sk_free(ossl_check_BIO_sk_type(sk))
|
| 347 |
+
#define sk_BIO_zero(sk) OPENSSL_sk_zero(ossl_check_BIO_sk_type(sk))
|
| 348 |
+
#define sk_BIO_delete(sk, i) ((BIO *)OPENSSL_sk_delete(ossl_check_BIO_sk_type(sk), (i)))
|
| 349 |
+
#define sk_BIO_delete_ptr(sk, ptr) ((BIO *)OPENSSL_sk_delete_ptr(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr)))
|
| 350 |
+
#define sk_BIO_push(sk, ptr) OPENSSL_sk_push(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 351 |
+
#define sk_BIO_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 352 |
+
#define sk_BIO_pop(sk) ((BIO *)OPENSSL_sk_pop(ossl_check_BIO_sk_type(sk)))
|
| 353 |
+
#define sk_BIO_shift(sk) ((BIO *)OPENSSL_sk_shift(ossl_check_BIO_sk_type(sk)))
|
| 354 |
+
#define sk_BIO_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_BIO_sk_type(sk),ossl_check_BIO_freefunc_type(freefunc))
|
| 355 |
+
#define sk_BIO_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr), (idx))
|
| 356 |
+
#define sk_BIO_set(sk, idx, ptr) ((BIO *)OPENSSL_sk_set(ossl_check_BIO_sk_type(sk), (idx), ossl_check_BIO_type(ptr)))
|
| 357 |
+
#define sk_BIO_find(sk, ptr) OPENSSL_sk_find(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 358 |
+
#define sk_BIO_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 359 |
+
#define sk_BIO_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr), pnum)
|
| 360 |
+
#define sk_BIO_sort(sk) OPENSSL_sk_sort(ossl_check_BIO_sk_type(sk))
|
| 361 |
+
#define sk_BIO_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_BIO_sk_type(sk))
|
| 362 |
+
#define sk_BIO_dup(sk) ((STACK_OF(BIO) *)OPENSSL_sk_dup(ossl_check_const_BIO_sk_type(sk)))
|
| 363 |
+
#define sk_BIO_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(BIO) *)OPENSSL_sk_deep_copy(ossl_check_const_BIO_sk_type(sk), ossl_check_BIO_copyfunc_type(copyfunc), ossl_check_BIO_freefunc_type(freefunc)))
|
| 364 |
+
#define sk_BIO_set_cmp_func(sk, cmp) ((sk_BIO_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_BIO_sk_type(sk), ossl_check_BIO_compfunc_type(cmp)))
|
| 365 |
+
|
| 366 |
+
/* clang-format on */
|
| 367 |
+
|
| 368 |
+
/* Prefix and suffix callback in ASN1 BIO */
|
| 369 |
+
typedef int asn1_ps_func(BIO *b, unsigned char **pbuf, int *plen,
|
| 370 |
+
void *parg);
|
| 371 |
+
|
| 372 |
+
typedef void (*BIO_dgram_sctp_notification_handler_fn)(BIO *b,
|
| 373 |
+
void *context,
|
| 374 |
+
void *buf);
|
| 375 |
+
#ifndef OPENSSL_NO_SCTP
|
| 376 |
+
/* SCTP parameter structs */
|
| 377 |
+
struct bio_dgram_sctp_sndinfo {
|
| 378 |
+
uint16_t snd_sid;
|
| 379 |
+
uint16_t snd_flags;
|
| 380 |
+
uint32_t snd_ppid;
|
| 381 |
+
uint32_t snd_context;
|
| 382 |
+
};
|
| 383 |
+
|
| 384 |
+
struct bio_dgram_sctp_rcvinfo {
|
| 385 |
+
uint16_t rcv_sid;
|
| 386 |
+
uint16_t rcv_ssn;
|
| 387 |
+
uint16_t rcv_flags;
|
| 388 |
+
uint32_t rcv_ppid;
|
| 389 |
+
uint32_t rcv_tsn;
|
| 390 |
+
uint32_t rcv_cumtsn;
|
| 391 |
+
uint32_t rcv_context;
|
| 392 |
+
};
|
| 393 |
+
|
| 394 |
+
struct bio_dgram_sctp_prinfo {
|
| 395 |
+
uint16_t pr_policy;
|
| 396 |
+
uint32_t pr_value;
|
| 397 |
+
};
|
| 398 |
+
#endif
|
| 399 |
+
|
| 400 |
+
/* BIO_sendmmsg/BIO_recvmmsg-related definitions */
|
| 401 |
+
typedef struct bio_msg_st {
|
| 402 |
+
void *data;
|
| 403 |
+
size_t data_len;
|
| 404 |
+
BIO_ADDR *peer, *local;
|
| 405 |
+
uint64_t flags;
|
| 406 |
+
} BIO_MSG;
|
| 407 |
+
|
| 408 |
+
typedef struct bio_mmsg_cb_args_st {
|
| 409 |
+
BIO_MSG *msg;
|
| 410 |
+
size_t stride, num_msg;
|
| 411 |
+
uint64_t flags;
|
| 412 |
+
size_t *msgs_processed;
|
| 413 |
+
} BIO_MMSG_CB_ARGS;
|
| 414 |
+
|
| 415 |
+
#define BIO_POLL_DESCRIPTOR_TYPE_NONE 0
|
| 416 |
+
#define BIO_POLL_DESCRIPTOR_TYPE_SOCK_FD 1
|
| 417 |
+
#define BIO_POLL_DESCRIPTOR_TYPE_SSL 2
|
| 418 |
+
#define BIO_POLL_DESCRIPTOR_CUSTOM_START 8192
|
| 419 |
+
|
| 420 |
+
typedef struct bio_poll_descriptor_st {
|
| 421 |
+
uint32_t type;
|
| 422 |
+
union {
|
| 423 |
+
int fd;
|
| 424 |
+
void *custom;
|
| 425 |
+
uintptr_t custom_ui;
|
| 426 |
+
SSL *ssl;
|
| 427 |
+
} value;
|
| 428 |
+
} BIO_POLL_DESCRIPTOR;
|
| 429 |
+
|
| 430 |
+
/*
|
| 431 |
+
* #define BIO_CONN_get_param_hostname BIO_ctrl
|
| 432 |
+
*/
|
| 433 |
+
|
| 434 |
+
#define BIO_C_SET_CONNECT 100
|
| 435 |
+
#define BIO_C_DO_STATE_MACHINE 101
|
| 436 |
+
#define BIO_C_SET_NBIO 102
|
| 437 |
+
/* # define BIO_C_SET_PROXY_PARAM 103 */
|
| 438 |
+
#define BIO_C_SET_FD 104
|
| 439 |
+
#define BIO_C_GET_FD 105
|
| 440 |
+
#define BIO_C_SET_FILE_PTR 106
|
| 441 |
+
#define BIO_C_GET_FILE_PTR 107
|
| 442 |
+
#define BIO_C_SET_FILENAME 108
|
| 443 |
+
#define BIO_C_SET_SSL 109
|
| 444 |
+
#define BIO_C_GET_SSL 110
|
| 445 |
+
#define BIO_C_SET_MD 111
|
| 446 |
+
#define BIO_C_GET_MD 112
|
| 447 |
+
#define BIO_C_GET_CIPHER_STATUS 113
|
| 448 |
+
#define BIO_C_SET_BUF_MEM 114
|
| 449 |
+
#define BIO_C_GET_BUF_MEM_PTR 115
|
| 450 |
+
#define BIO_C_GET_BUFF_NUM_LINES 116
|
| 451 |
+
#define BIO_C_SET_BUFF_SIZE 117
|
| 452 |
+
#define BIO_C_SET_ACCEPT 118
|
| 453 |
+
#define BIO_C_SSL_MODE 119
|
| 454 |
+
#define BIO_C_GET_MD_CTX 120
|
| 455 |
+
/* # define BIO_C_GET_PROXY_PARAM 121 */
|
| 456 |
+
#define BIO_C_SET_BUFF_READ_DATA 122 /* data to read first */
|
| 457 |
+
#define BIO_C_GET_CONNECT 123
|
| 458 |
+
#define BIO_C_GET_ACCEPT 124
|
| 459 |
+
#define BIO_C_SET_SSL_RENEGOTIATE_BYTES 125
|
| 460 |
+
#define BIO_C_GET_SSL_NUM_RENEGOTIATES 126
|
| 461 |
+
#define BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT 127
|
| 462 |
+
#define BIO_C_FILE_SEEK 128
|
| 463 |
+
#define BIO_C_GET_CIPHER_CTX 129
|
| 464 |
+
#define BIO_C_SET_BUF_MEM_EOF_RETURN 130 /* return end of input \
|
| 465 |
+
* value */
|
| 466 |
+
#define BIO_C_SET_BIND_MODE 131
|
| 467 |
+
#define BIO_C_GET_BIND_MODE 132
|
| 468 |
+
#define BIO_C_FILE_TELL 133
|
| 469 |
+
#define BIO_C_GET_SOCKS 134
|
| 470 |
+
#define BIO_C_SET_SOCKS 135
|
| 471 |
+
|
| 472 |
+
#define BIO_C_SET_WRITE_BUF_SIZE 136 /* for BIO_s_bio */
|
| 473 |
+
#define BIO_C_GET_WRITE_BUF_SIZE 137
|
| 474 |
+
#define BIO_C_MAKE_BIO_PAIR 138
|
| 475 |
+
#define BIO_C_DESTROY_BIO_PAIR 139
|
| 476 |
+
#define BIO_C_GET_WRITE_GUARANTEE 140
|
| 477 |
+
#define BIO_C_GET_READ_REQUEST 141
|
| 478 |
+
#define BIO_C_SHUTDOWN_WR 142
|
| 479 |
+
#define BIO_C_NREAD0 143
|
| 480 |
+
#define BIO_C_NREAD 144
|
| 481 |
+
#define BIO_C_NWRITE0 145
|
| 482 |
+
#define BIO_C_NWRITE 146
|
| 483 |
+
#define BIO_C_RESET_READ_REQUEST 147
|
| 484 |
+
#define BIO_C_SET_MD_CTX 148
|
| 485 |
+
|
| 486 |
+
#define BIO_C_SET_PREFIX 149
|
| 487 |
+
#define BIO_C_GET_PREFIX 150
|
| 488 |
+
#define BIO_C_SET_SUFFIX 151
|
| 489 |
+
#define BIO_C_GET_SUFFIX 152
|
| 490 |
+
|
| 491 |
+
#define BIO_C_SET_EX_ARG 153
|
| 492 |
+
#define BIO_C_GET_EX_ARG 154
|
| 493 |
+
|
| 494 |
+
#define BIO_C_SET_CONNECT_MODE 155
|
| 495 |
+
|
| 496 |
+
#define BIO_C_SET_TFO 156 /* like BIO_C_SET_NBIO */
|
| 497 |
+
|
| 498 |
+
#define BIO_C_SET_SOCK_TYPE 157
|
| 499 |
+
#define BIO_C_GET_SOCK_TYPE 158
|
| 500 |
+
#define BIO_C_GET_DGRAM_BIO 159
|
| 501 |
+
|
| 502 |
+
#define BIO_set_app_data(s, arg) BIO_set_ex_data(s, 0, arg)
|
| 503 |
+
#define BIO_get_app_data(s) BIO_get_ex_data(s, 0)
|
| 504 |
+
|
| 505 |
+
#define BIO_set_nbio(b, n) BIO_ctrl(b, BIO_C_SET_NBIO, (n), NULL)
|
| 506 |
+
#define BIO_set_tfo(b, n) BIO_ctrl(b, BIO_C_SET_TFO, (n), NULL)
|
| 507 |
+
|
| 508 |
+
#ifndef OPENSSL_NO_SOCK
|
| 509 |
+
/* IP families we support, for BIO_s_connect() and BIO_s_accept() */
|
| 510 |
+
/* Note: the underlying operating system may not support some of them */
|
| 511 |
+
#define BIO_FAMILY_IPV4 4
|
| 512 |
+
#define BIO_FAMILY_IPV6 6
|
| 513 |
+
#define BIO_FAMILY_IPANY 256
|
| 514 |
+
|
| 515 |
+
/* BIO_s_connect() */
|
| 516 |
+
#define BIO_set_conn_hostname(b, name) BIO_ctrl(b, BIO_C_SET_CONNECT, 0, \
|
| 517 |
+
(char *)(name))
|
| 518 |
+
#define BIO_set_conn_port(b, port) BIO_ctrl(b, BIO_C_SET_CONNECT, 1, \
|
| 519 |
+
(char *)(port))
|
| 520 |
+
#define BIO_set_conn_address(b, addr) BIO_ctrl(b, BIO_C_SET_CONNECT, 2, \
|
| 521 |
+
(char *)(addr))
|
| 522 |
+
#define BIO_set_conn_ip_family(b, f) BIO_int_ctrl(b, BIO_C_SET_CONNECT, 3, f)
|
| 523 |
+
#define BIO_get_conn_hostname(b) ((const char *)BIO_ptr_ctrl(b, BIO_C_GET_CONNECT, 0))
|
| 524 |
+
#define BIO_get_conn_port(b) ((const char *)BIO_ptr_ctrl(b, BIO_C_GET_CONNECT, 1))
|
| 525 |
+
#define BIO_get_conn_address(b) ((const BIO_ADDR *)BIO_ptr_ctrl(b, BIO_C_GET_CONNECT, 2))
|
| 526 |
+
#define BIO_get_conn_ip_family(b) BIO_ctrl(b, BIO_C_GET_CONNECT, 3, NULL)
|
| 527 |
+
#define BIO_get_conn_mode(b) BIO_ctrl(b, BIO_C_GET_CONNECT, 4, NULL)
|
| 528 |
+
#define BIO_set_conn_mode(b, n) BIO_ctrl(b, BIO_C_SET_CONNECT_MODE, (n), NULL)
|
| 529 |
+
#define BIO_set_sock_type(b, t) BIO_ctrl(b, BIO_C_SET_SOCK_TYPE, (t), NULL)
|
| 530 |
+
#define BIO_get_sock_type(b) BIO_ctrl(b, BIO_C_GET_SOCK_TYPE, 0, NULL)
|
| 531 |
+
#define BIO_get0_dgram_bio(b, p) BIO_ctrl(b, BIO_C_GET_DGRAM_BIO, 0, (void *)(BIO **)(p))
|
| 532 |
+
|
| 533 |
+
/* BIO_s_accept() */
|
| 534 |
+
#define BIO_set_accept_name(b, name) BIO_ctrl(b, BIO_C_SET_ACCEPT, 0, \
|
| 535 |
+
(char *)(name))
|
| 536 |
+
#define BIO_set_accept_port(b, port) BIO_ctrl(b, BIO_C_SET_ACCEPT, 1, \
|
| 537 |
+
(char *)(port))
|
| 538 |
+
#define BIO_get_accept_name(b) ((const char *)BIO_ptr_ctrl(b, BIO_C_GET_ACCEPT, 0))
|
| 539 |
+
#define BIO_get_accept_port(b) ((const char *)BIO_ptr_ctrl(b, BIO_C_GET_ACCEPT, 1))
|
| 540 |
+
#define BIO_get_peer_name(b) ((const char *)BIO_ptr_ctrl(b, BIO_C_GET_ACCEPT, 2))
|
| 541 |
+
#define BIO_get_peer_port(b) ((const char *)BIO_ptr_ctrl(b, BIO_C_GET_ACCEPT, 3))
|
| 542 |
+
/* #define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */
|
| 543 |
+
#define BIO_set_nbio_accept(b, n) BIO_ctrl(b, BIO_C_SET_ACCEPT, 2, (n) ? (void *)"a" : NULL)
|
| 544 |
+
#define BIO_set_accept_bios(b, bio) BIO_ctrl(b, BIO_C_SET_ACCEPT, 3, \
|
| 545 |
+
(char *)(bio))
|
| 546 |
+
#define BIO_set_accept_ip_family(b, f) BIO_int_ctrl(b, BIO_C_SET_ACCEPT, 4, f)
|
| 547 |
+
#define BIO_get_accept_ip_family(b) BIO_ctrl(b, BIO_C_GET_ACCEPT, 4, NULL)
|
| 548 |
+
#define BIO_set_tfo_accept(b, n) BIO_ctrl(b, BIO_C_SET_ACCEPT, 5, (n) ? (void *)"a" : NULL)
|
| 549 |
+
|
| 550 |
+
/* Aliases kept for backward compatibility */
|
| 551 |
+
#define BIO_BIND_NORMAL 0
|
| 552 |
+
#define BIO_BIND_REUSEADDR BIO_SOCK_REUSEADDR
|
| 553 |
+
#define BIO_BIND_REUSEADDR_IF_UNUSED BIO_SOCK_REUSEADDR
|
| 554 |
+
#define BIO_set_bind_mode(b, mode) BIO_ctrl(b, BIO_C_SET_BIND_MODE, mode, NULL)
|
| 555 |
+
#define BIO_get_bind_mode(b) BIO_ctrl(b, BIO_C_GET_BIND_MODE, 0, NULL)
|
| 556 |
+
#endif /* OPENSSL_NO_SOCK */
|
| 557 |
+
|
| 558 |
+
#define BIO_do_connect(b) BIO_do_handshake(b)
|
| 559 |
+
#define BIO_do_accept(b) BIO_do_handshake(b)
|
| 560 |
+
|
| 561 |
+
#define BIO_do_handshake(b) BIO_ctrl(b, BIO_C_DO_STATE_MACHINE, 0, NULL)
|
| 562 |
+
|
| 563 |
+
/* BIO_s_datagram(), BIO_s_fd(), BIO_s_socket(), BIO_s_accept() and BIO_s_connect() */
|
| 564 |
+
#define BIO_set_fd(b, fd, c) BIO_int_ctrl(b, BIO_C_SET_FD, c, fd)
|
| 565 |
+
#define BIO_get_fd(b, c) BIO_ctrl(b, BIO_C_GET_FD, 0, (char *)(c))
|
| 566 |
+
|
| 567 |
+
/* BIO_s_file() */
|
| 568 |
+
#define BIO_set_fp(b, fp, c) BIO_ctrl(b, BIO_C_SET_FILE_PTR, c, (char *)(fp))
|
| 569 |
+
#define BIO_get_fp(b, fpp) BIO_ctrl(b, BIO_C_GET_FILE_PTR, 0, (char *)(fpp))
|
| 570 |
+
|
| 571 |
+
/* BIO_s_fd() and BIO_s_file() */
|
| 572 |
+
#define BIO_seek(b, ofs) (int)BIO_ctrl(b, BIO_C_FILE_SEEK, ofs, NULL)
|
| 573 |
+
#define BIO_tell(b) (int)BIO_ctrl(b, BIO_C_FILE_TELL, 0, NULL)
|
| 574 |
+
|
| 575 |
+
/*
|
| 576 |
+
* name is cast to lose const, but might be better to route through a
|
| 577 |
+
* function so we can do it safely
|
| 578 |
+
*/
|
| 579 |
+
#ifdef CONST_STRICT
|
| 580 |
+
/*
|
| 581 |
+
* If you are wondering why this isn't defined, its because CONST_STRICT is
|
| 582 |
+
* purely a compile-time kludge to allow const to be checked.
|
| 583 |
+
*/
|
| 584 |
+
int BIO_read_filename(BIO *b, const char *name);
|
| 585 |
+
#else
|
| 586 |
+
#define BIO_read_filename(b, name) (int)BIO_ctrl(b, BIO_C_SET_FILENAME, \
|
| 587 |
+
BIO_CLOSE | BIO_FP_READ, (char *)(name))
|
| 588 |
+
#endif
|
| 589 |
+
#define BIO_write_filename(b, name) (int)BIO_ctrl(b, BIO_C_SET_FILENAME, \
|
| 590 |
+
BIO_CLOSE | BIO_FP_WRITE, name)
|
| 591 |
+
#define BIO_append_filename(b, name) (int)BIO_ctrl(b, BIO_C_SET_FILENAME, \
|
| 592 |
+
BIO_CLOSE | BIO_FP_APPEND, name)
|
| 593 |
+
#define BIO_rw_filename(b, name) (int)BIO_ctrl(b, BIO_C_SET_FILENAME, \
|
| 594 |
+
BIO_CLOSE | BIO_FP_READ | BIO_FP_WRITE, name)
|
| 595 |
+
|
| 596 |
+
/*
|
| 597 |
+
* WARNING WARNING, this ups the reference count on the read bio of the SSL
|
| 598 |
+
* structure. This is because the ssl read BIO is now pointed to by the
|
| 599 |
+
* next_bio field in the bio. So when you free the BIO, make sure you are
|
| 600 |
+
* doing a BIO_free_all() to catch the underlying BIO.
|
| 601 |
+
*/
|
| 602 |
+
#define BIO_set_ssl(b, ssl, c) BIO_ctrl(b, BIO_C_SET_SSL, c, (char *)(ssl))
|
| 603 |
+
#define BIO_get_ssl(b, sslp) BIO_ctrl(b, BIO_C_GET_SSL, 0, (char *)(sslp))
|
| 604 |
+
#define BIO_set_ssl_mode(b, client) BIO_ctrl(b, BIO_C_SSL_MODE, client, NULL)
|
| 605 |
+
#define BIO_set_ssl_renegotiate_bytes(b, num) \
|
| 606 |
+
BIO_ctrl(b, BIO_C_SET_SSL_RENEGOTIATE_BYTES, num, NULL)
|
| 607 |
+
#define BIO_get_num_renegotiates(b) \
|
| 608 |
+
BIO_ctrl(b, BIO_C_GET_SSL_NUM_RENEGOTIATES, 0, NULL)
|
| 609 |
+
#define BIO_set_ssl_renegotiate_timeout(b, seconds) \
|
| 610 |
+
BIO_ctrl(b, BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT, seconds, NULL)
|
| 611 |
+
|
| 612 |
+
/* defined in evp.h */
|
| 613 |
+
/* #define BIO_set_md(b,md) BIO_ctrl(b,BIO_C_SET_MD,1,(char *)(md)) */
|
| 614 |
+
|
| 615 |
+
#define BIO_get_mem_data(b, pp) BIO_ctrl(b, BIO_CTRL_INFO, 0, (char *)(pp))
|
| 616 |
+
#define BIO_set_mem_buf(b, bm, c) BIO_ctrl(b, BIO_C_SET_BUF_MEM, c, (char *)(bm))
|
| 617 |
+
#define BIO_get_mem_ptr(b, pp) BIO_ctrl(b, BIO_C_GET_BUF_MEM_PTR, 0, \
|
| 618 |
+
(char *)(pp))
|
| 619 |
+
#define BIO_set_mem_eof_return(b, v) \
|
| 620 |
+
BIO_ctrl(b, BIO_C_SET_BUF_MEM_EOF_RETURN, v, NULL)
|
| 621 |
+
|
| 622 |
+
/* For the BIO_f_buffer() type */
|
| 623 |
+
#define BIO_get_buffer_num_lines(b) BIO_ctrl(b, BIO_C_GET_BUFF_NUM_LINES, 0, NULL)
|
| 624 |
+
#define BIO_set_buffer_size(b, size) BIO_ctrl(b, BIO_C_SET_BUFF_SIZE, size, NULL)
|
| 625 |
+
#define BIO_set_read_buffer_size(b, size) BIO_int_ctrl(b, BIO_C_SET_BUFF_SIZE, size, 0)
|
| 626 |
+
#define BIO_set_write_buffer_size(b, size) BIO_int_ctrl(b, BIO_C_SET_BUFF_SIZE, size, 1)
|
| 627 |
+
#define BIO_set_buffer_read_data(b, buf, num) BIO_ctrl(b, BIO_C_SET_BUFF_READ_DATA, num, buf)
|
| 628 |
+
|
| 629 |
+
/* Don't use the next one unless you know what you are doing :-) */
|
| 630 |
+
#define BIO_dup_state(b, ret) BIO_ctrl(b, BIO_CTRL_DUP, 0, (char *)(ret))
|
| 631 |
+
|
| 632 |
+
#define BIO_reset(b) (int)BIO_ctrl(b, BIO_CTRL_RESET, 0, NULL)
|
| 633 |
+
#define BIO_eof(b) (int)BIO_ctrl(b, BIO_CTRL_EOF, 0, NULL)
|
| 634 |
+
#define BIO_set_close(b, c) (int)BIO_ctrl(b, BIO_CTRL_SET_CLOSE, (c), NULL)
|
| 635 |
+
#define BIO_get_close(b) (int)BIO_ctrl(b, BIO_CTRL_GET_CLOSE, 0, NULL)
|
| 636 |
+
#define BIO_pending(b) (int)BIO_ctrl(b, BIO_CTRL_PENDING, 0, NULL)
|
| 637 |
+
#define BIO_wpending(b) (int)BIO_ctrl(b, BIO_CTRL_WPENDING, 0, NULL)
|
| 638 |
+
/* ...pending macros have inappropriate return type */
|
| 639 |
+
size_t BIO_ctrl_pending(BIO *b);
|
| 640 |
+
size_t BIO_ctrl_wpending(BIO *b);
|
| 641 |
+
#define BIO_flush(b) (int)BIO_ctrl(b, BIO_CTRL_FLUSH, 0, NULL)
|
| 642 |
+
#define BIO_get_info_callback(b, cbp) (int)BIO_ctrl(b, BIO_CTRL_GET_CALLBACK, 0, \
|
| 643 |
+
cbp)
|
| 644 |
+
#define BIO_set_info_callback(b, cb) (int)BIO_callback_ctrl(b, BIO_CTRL_SET_CALLBACK, cb)
|
| 645 |
+
|
| 646 |
+
/* For the BIO_f_buffer() type */
|
| 647 |
+
#define BIO_buffer_get_num_lines(b) BIO_ctrl(b, BIO_CTRL_GET, 0, NULL)
|
| 648 |
+
#define BIO_buffer_peek(b, s, l) BIO_ctrl(b, BIO_CTRL_PEEK, (l), (s))
|
| 649 |
+
|
| 650 |
+
/* For BIO_s_bio() */
|
| 651 |
+
#define BIO_set_write_buf_size(b, size) (int)BIO_ctrl(b, BIO_C_SET_WRITE_BUF_SIZE, size, NULL)
|
| 652 |
+
#define BIO_get_write_buf_size(b, size) (size_t)BIO_ctrl(b, BIO_C_GET_WRITE_BUF_SIZE, size, NULL)
|
| 653 |
+
#define BIO_make_bio_pair(b1, b2) (int)BIO_ctrl(b1, BIO_C_MAKE_BIO_PAIR, 0, b2)
|
| 654 |
+
#define BIO_destroy_bio_pair(b) (int)BIO_ctrl(b, BIO_C_DESTROY_BIO_PAIR, 0, NULL)
|
| 655 |
+
#define BIO_shutdown_wr(b) (int)BIO_ctrl(b, BIO_C_SHUTDOWN_WR, 0, NULL)
|
| 656 |
+
/* macros with inappropriate type -- but ...pending macros use int too: */
|
| 657 |
+
#define BIO_get_write_guarantee(b) (int)BIO_ctrl(b, BIO_C_GET_WRITE_GUARANTEE, 0, NULL)
|
| 658 |
+
#define BIO_get_read_request(b) (int)BIO_ctrl(b, BIO_C_GET_READ_REQUEST, 0, NULL)
|
| 659 |
+
size_t BIO_ctrl_get_write_guarantee(BIO *b);
|
| 660 |
+
size_t BIO_ctrl_get_read_request(BIO *b);
|
| 661 |
+
int BIO_ctrl_reset_read_request(BIO *b);
|
| 662 |
+
|
| 663 |
+
/* ctrl macros for dgram */
|
| 664 |
+
#define BIO_ctrl_dgram_connect(b, peer) \
|
| 665 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_CONNECT, 0, (char *)(peer))
|
| 666 |
+
#define BIO_ctrl_set_connected(b, peer) \
|
| 667 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_CONNECTED, 0, (char *)(peer))
|
| 668 |
+
#define BIO_dgram_recv_timedout(b) \
|
| 669 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP, 0, NULL)
|
| 670 |
+
#define BIO_dgram_send_timedout(b) \
|
| 671 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP, 0, NULL)
|
| 672 |
+
#define BIO_dgram_get_peer(b, peer) \
|
| 673 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_PEER, 0, (char *)(peer))
|
| 674 |
+
#define BIO_dgram_set_peer(b, peer) \
|
| 675 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, (char *)(peer))
|
| 676 |
+
#define BIO_dgram_detect_peer_addr(b, peer) \
|
| 677 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_DETECT_PEER_ADDR, 0, (char *)(peer))
|
| 678 |
+
#define BIO_dgram_get_mtu_overhead(b) \
|
| 679 |
+
(unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_MTU_OVERHEAD, 0, NULL)
|
| 680 |
+
#define BIO_dgram_get_local_addr_cap(b) \
|
| 681 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_LOCAL_ADDR_CAP, 0, NULL)
|
| 682 |
+
#define BIO_dgram_get_local_addr_enable(b, penable) \
|
| 683 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_LOCAL_ADDR_ENABLE, 0, (char *)(penable))
|
| 684 |
+
#define BIO_dgram_set_local_addr_enable(b, enable) \
|
| 685 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_LOCAL_ADDR_ENABLE, (enable), NULL)
|
| 686 |
+
#define BIO_dgram_get_effective_caps(b) \
|
| 687 |
+
(uint32_t)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_EFFECTIVE_CAPS, 0, NULL)
|
| 688 |
+
#define BIO_dgram_get_caps(b) \
|
| 689 |
+
(uint32_t)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_CAPS, 0, NULL)
|
| 690 |
+
#define BIO_dgram_set_caps(b, caps) \
|
| 691 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_CAPS, (long)(caps), NULL)
|
| 692 |
+
#define BIO_dgram_get_no_trunc(b) \
|
| 693 |
+
(unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_NO_TRUNC, 0, NULL)
|
| 694 |
+
#define BIO_dgram_set_no_trunc(b, enable) \
|
| 695 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_NO_TRUNC, (enable), NULL)
|
| 696 |
+
#define BIO_dgram_get_mtu(b) \
|
| 697 |
+
(unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_MTU, 0, NULL)
|
| 698 |
+
#define BIO_dgram_set_mtu(b, mtu) \
|
| 699 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_MTU, (mtu), NULL)
|
| 700 |
+
#define BIO_dgram_set0_local_addr(b, addr) \
|
| 701 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET0_LOCAL_ADDR, 0, (addr))
|
| 702 |
+
|
| 703 |
+
/* ctrl macros for BIO_f_prefix */
|
| 704 |
+
#define BIO_set_prefix(b, p) BIO_ctrl((b), BIO_CTRL_SET_PREFIX, 0, (void *)(p))
|
| 705 |
+
#define BIO_set_indent(b, i) BIO_ctrl((b), BIO_CTRL_SET_INDENT, (i), NULL)
|
| 706 |
+
#define BIO_get_indent(b) BIO_ctrl((b), BIO_CTRL_GET_INDENT, 0, NULL)
|
| 707 |
+
|
| 708 |
+
#define BIO_get_ex_new_index(l, p, newf, dupf, freef) \
|
| 709 |
+
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_BIO, l, p, newf, dupf, freef)
|
| 710 |
+
int BIO_set_ex_data(BIO *bio, int idx, void *data);
|
| 711 |
+
void *BIO_get_ex_data(const BIO *bio, int idx);
|
| 712 |
+
uint64_t BIO_number_read(BIO *bio);
|
| 713 |
+
uint64_t BIO_number_written(BIO *bio);
|
| 714 |
+
|
| 715 |
+
/* For BIO_f_asn1() */
|
| 716 |
+
int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix,
|
| 717 |
+
asn1_ps_func *prefix_free);
|
| 718 |
+
int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix,
|
| 719 |
+
asn1_ps_func **pprefix_free);
|
| 720 |
+
int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix,
|
| 721 |
+
asn1_ps_func *suffix_free);
|
| 722 |
+
int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
|
| 723 |
+
asn1_ps_func **psuffix_free);
|
| 724 |
+
|
| 725 |
+
const BIO_METHOD *BIO_s_file(void);
|
| 726 |
+
BIO *BIO_new_file(const char *filename, const char *mode);
|
| 727 |
+
BIO *BIO_new_from_core_bio(OSSL_LIB_CTX *libctx, OSSL_CORE_BIO *corebio);
|
| 728 |
+
#ifndef OPENSSL_NO_STDIO
|
| 729 |
+
BIO *BIO_new_fp(FILE *stream, int close_flag);
|
| 730 |
+
#endif
|
| 731 |
+
BIO *BIO_new_ex(OSSL_LIB_CTX *libctx, const BIO_METHOD *method);
|
| 732 |
+
BIO *BIO_new(const BIO_METHOD *type);
|
| 733 |
+
int BIO_free(BIO *a);
|
| 734 |
+
void BIO_set_data(BIO *a, void *ptr);
|
| 735 |
+
void *BIO_get_data(BIO *a);
|
| 736 |
+
void BIO_set_init(BIO *a, int init);
|
| 737 |
+
int BIO_get_init(BIO *a);
|
| 738 |
+
void BIO_set_shutdown(BIO *a, int shut);
|
| 739 |
+
int BIO_get_shutdown(BIO *a);
|
| 740 |
+
void BIO_vfree(BIO *a);
|
| 741 |
+
int BIO_up_ref(BIO *a);
|
| 742 |
+
int BIO_read(BIO *b, void *data, int dlen);
|
| 743 |
+
int BIO_read_ex(BIO *b, void *data, size_t dlen, size_t *readbytes);
|
| 744 |
+
__owur int BIO_recvmmsg(BIO *b, BIO_MSG *msg,
|
| 745 |
+
size_t stride, size_t num_msg, uint64_t flags,
|
| 746 |
+
size_t *msgs_processed);
|
| 747 |
+
int BIO_gets(BIO *bp, char *buf, int size);
|
| 748 |
+
int BIO_get_line(BIO *bio, char *buf, int size);
|
| 749 |
+
int BIO_write(BIO *b, const void *data, int dlen);
|
| 750 |
+
int BIO_write_ex(BIO *b, const void *data, size_t dlen, size_t *written);
|
| 751 |
+
__owur int BIO_sendmmsg(BIO *b, BIO_MSG *msg,
|
| 752 |
+
size_t stride, size_t num_msg, uint64_t flags,
|
| 753 |
+
size_t *msgs_processed);
|
| 754 |
+
__owur int BIO_get_rpoll_descriptor(BIO *b, BIO_POLL_DESCRIPTOR *desc);
|
| 755 |
+
__owur int BIO_get_wpoll_descriptor(BIO *b, BIO_POLL_DESCRIPTOR *desc);
|
| 756 |
+
int BIO_puts(BIO *bp, const char *buf);
|
| 757 |
+
int BIO_indent(BIO *b, int indent, int max);
|
| 758 |
+
long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg);
|
| 759 |
+
long BIO_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp);
|
| 760 |
+
void *BIO_ptr_ctrl(BIO *bp, int cmd, long larg);
|
| 761 |
+
long BIO_int_ctrl(BIO *bp, int cmd, long larg, int iarg);
|
| 762 |
+
BIO *BIO_push(BIO *b, BIO *append);
|
| 763 |
+
BIO *BIO_pop(BIO *b);
|
| 764 |
+
void BIO_free_all(BIO *a);
|
| 765 |
+
BIO *BIO_find_type(BIO *b, int bio_type);
|
| 766 |
+
BIO *BIO_next(BIO *b);
|
| 767 |
+
void BIO_set_next(BIO *b, BIO *next);
|
| 768 |
+
BIO *BIO_get_retry_BIO(BIO *bio, int *reason);
|
| 769 |
+
int BIO_get_retry_reason(BIO *bio);
|
| 770 |
+
void BIO_set_retry_reason(BIO *bio, int reason);
|
| 771 |
+
BIO *BIO_dup_chain(BIO *in);
|
| 772 |
+
|
| 773 |
+
int BIO_nread0(BIO *bio, char **buf);
|
| 774 |
+
int BIO_nread(BIO *bio, char **buf, int num);
|
| 775 |
+
int BIO_nwrite0(BIO *bio, char **buf);
|
| 776 |
+
int BIO_nwrite(BIO *bio, char **buf, int num);
|
| 777 |
+
|
| 778 |
+
const BIO_METHOD *BIO_s_mem(void);
|
| 779 |
+
#ifndef OPENSSL_NO_DGRAM
|
| 780 |
+
const BIO_METHOD *BIO_s_dgram_mem(void);
|
| 781 |
+
#endif
|
| 782 |
+
const BIO_METHOD *BIO_s_secmem(void);
|
| 783 |
+
BIO *BIO_new_mem_buf(const void *buf, int len);
|
| 784 |
+
#ifndef OPENSSL_NO_SOCK
|
| 785 |
+
const BIO_METHOD *BIO_s_socket(void);
|
| 786 |
+
const BIO_METHOD *BIO_s_connect(void);
|
| 787 |
+
const BIO_METHOD *BIO_s_accept(void);
|
| 788 |
+
#endif
|
| 789 |
+
const BIO_METHOD *BIO_s_fd(void);
|
| 790 |
+
const BIO_METHOD *BIO_s_log(void);
|
| 791 |
+
const BIO_METHOD *BIO_s_bio(void);
|
| 792 |
+
const BIO_METHOD *BIO_s_null(void);
|
| 793 |
+
const BIO_METHOD *BIO_f_null(void);
|
| 794 |
+
const BIO_METHOD *BIO_f_buffer(void);
|
| 795 |
+
const BIO_METHOD *BIO_f_readbuffer(void);
|
| 796 |
+
const BIO_METHOD *BIO_f_linebuffer(void);
|
| 797 |
+
const BIO_METHOD *BIO_f_nbio_test(void);
|
| 798 |
+
const BIO_METHOD *BIO_f_prefix(void);
|
| 799 |
+
const BIO_METHOD *BIO_s_core(void);
|
| 800 |
+
#ifndef OPENSSL_NO_DGRAM
|
| 801 |
+
const BIO_METHOD *BIO_s_dgram_pair(void);
|
| 802 |
+
const BIO_METHOD *BIO_s_datagram(void);
|
| 803 |
+
int BIO_dgram_non_fatal_error(int error);
|
| 804 |
+
BIO *BIO_new_dgram(int fd, int close_flag);
|
| 805 |
+
#ifndef OPENSSL_NO_SCTP
|
| 806 |
+
const BIO_METHOD *BIO_s_datagram_sctp(void);
|
| 807 |
+
BIO *BIO_new_dgram_sctp(int fd, int close_flag);
|
| 808 |
+
int BIO_dgram_is_sctp(BIO *bio);
|
| 809 |
+
int BIO_dgram_sctp_notification_cb(BIO *b,
|
| 810 |
+
BIO_dgram_sctp_notification_handler_fn handle_notifications,
|
| 811 |
+
void *context);
|
| 812 |
+
int BIO_dgram_sctp_wait_for_dry(BIO *b);
|
| 813 |
+
int BIO_dgram_sctp_msg_waiting(BIO *b);
|
| 814 |
+
#endif
|
| 815 |
+
#endif
|
| 816 |
+
|
| 817 |
+
#ifndef OPENSSL_NO_SOCK
|
| 818 |
+
int BIO_sock_should_retry(int i);
|
| 819 |
+
int BIO_sock_non_fatal_error(int error);
|
| 820 |
+
int BIO_err_is_non_fatal(unsigned int errcode);
|
| 821 |
+
int BIO_socket_wait(int fd, int for_read, time_t max_time);
|
| 822 |
+
#endif
|
| 823 |
+
int BIO_wait(BIO *bio, time_t max_time, unsigned int nap_milliseconds);
|
| 824 |
+
int BIO_do_connect_retry(BIO *bio, int timeout, int nap_milliseconds);
|
| 825 |
+
|
| 826 |
+
int BIO_fd_should_retry(int i);
|
| 827 |
+
int BIO_fd_non_fatal_error(int error);
|
| 828 |
+
int BIO_dump_cb(int (*cb)(const void *data, size_t len, void *u),
|
| 829 |
+
void *u, const void *s, int len);
|
| 830 |
+
int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u),
|
| 831 |
+
void *u, const void *s, int len, int indent);
|
| 832 |
+
int BIO_dump(BIO *b, const void *bytes, int len);
|
| 833 |
+
int BIO_dump_indent(BIO *b, const void *bytes, int len, int indent);
|
| 834 |
+
#ifndef OPENSSL_NO_STDIO
|
| 835 |
+
int BIO_dump_fp(FILE *fp, const void *s, int len);
|
| 836 |
+
int BIO_dump_indent_fp(FILE *fp, const void *s, int len, int indent);
|
| 837 |
+
#endif
|
| 838 |
+
int BIO_hex_string(BIO *out, int indent, int width, const void *data,
|
| 839 |
+
int datalen);
|
| 840 |
+
|
| 841 |
+
#ifndef OPENSSL_NO_SOCK
|
| 842 |
+
BIO_ADDR *BIO_ADDR_new(void);
|
| 843 |
+
int BIO_ADDR_copy(BIO_ADDR *dst, const BIO_ADDR *src);
|
| 844 |
+
BIO_ADDR *BIO_ADDR_dup(const BIO_ADDR *ap);
|
| 845 |
+
int BIO_ADDR_rawmake(BIO_ADDR *ap, int family,
|
| 846 |
+
const void *where, size_t wherelen, unsigned short port);
|
| 847 |
+
void BIO_ADDR_free(BIO_ADDR *);
|
| 848 |
+
void BIO_ADDR_clear(BIO_ADDR *ap);
|
| 849 |
+
int BIO_ADDR_family(const BIO_ADDR *ap);
|
| 850 |
+
int BIO_ADDR_rawaddress(const BIO_ADDR *ap, void *p, size_t *l);
|
| 851 |
+
unsigned short BIO_ADDR_rawport(const BIO_ADDR *ap);
|
| 852 |
+
char *BIO_ADDR_hostname_string(const BIO_ADDR *ap, int numeric);
|
| 853 |
+
char *BIO_ADDR_service_string(const BIO_ADDR *ap, int numeric);
|
| 854 |
+
char *BIO_ADDR_path_string(const BIO_ADDR *ap);
|
| 855 |
+
|
| 856 |
+
const BIO_ADDRINFO *BIO_ADDRINFO_next(const BIO_ADDRINFO *bai);
|
| 857 |
+
int BIO_ADDRINFO_family(const BIO_ADDRINFO *bai);
|
| 858 |
+
int BIO_ADDRINFO_socktype(const BIO_ADDRINFO *bai);
|
| 859 |
+
int BIO_ADDRINFO_protocol(const BIO_ADDRINFO *bai);
|
| 860 |
+
const BIO_ADDR *BIO_ADDRINFO_address(const BIO_ADDRINFO *bai);
|
| 861 |
+
void BIO_ADDRINFO_free(BIO_ADDRINFO *bai);
|
| 862 |
+
|
| 863 |
+
enum BIO_hostserv_priorities {
|
| 864 |
+
BIO_PARSE_PRIO_HOST,
|
| 865 |
+
BIO_PARSE_PRIO_SERV
|
| 866 |
+
};
|
| 867 |
+
int BIO_parse_hostserv(const char *hostserv, char **host, char **service,
|
| 868 |
+
enum BIO_hostserv_priorities hostserv_prio);
|
| 869 |
+
enum BIO_lookup_type {
|
| 870 |
+
BIO_LOOKUP_CLIENT,
|
| 871 |
+
BIO_LOOKUP_SERVER
|
| 872 |
+
};
|
| 873 |
+
int BIO_lookup(const char *host, const char *service,
|
| 874 |
+
enum BIO_lookup_type lookup_type,
|
| 875 |
+
int family, int socktype, BIO_ADDRINFO **res);
|
| 876 |
+
int BIO_lookup_ex(const char *host, const char *service,
|
| 877 |
+
int lookup_type, int family, int socktype, int protocol,
|
| 878 |
+
BIO_ADDRINFO **res);
|
| 879 |
+
int BIO_sock_error(int sock);
|
| 880 |
+
int BIO_socket_ioctl(int fd, long type, void *arg);
|
| 881 |
+
int BIO_socket_nbio(int fd, int mode);
|
| 882 |
+
int BIO_sock_init(void);
|
| 883 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 884 |
+
#define BIO_sock_cleanup() \
|
| 885 |
+
while (0) \
|
| 886 |
+
continue
|
| 887 |
+
#endif
|
| 888 |
+
int BIO_set_tcp_ndelay(int sock, int turn_on);
|
| 889 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 890 |
+
OSSL_DEPRECATEDIN_1_1_0 struct hostent *BIO_gethostbyname(const char *name);
|
| 891 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_get_port(const char *str, unsigned short *port_ptr);
|
| 892 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_get_host_ip(const char *str, unsigned char *ip);
|
| 893 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_get_accept_socket(char *host_port, int mode);
|
| 894 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_accept(int sock, char **ip_port);
|
| 895 |
+
#endif
|
| 896 |
+
|
| 897 |
+
union BIO_sock_info_u {
|
| 898 |
+
BIO_ADDR *addr;
|
| 899 |
+
};
|
| 900 |
+
enum BIO_sock_info_type {
|
| 901 |
+
BIO_SOCK_INFO_ADDRESS
|
| 902 |
+
};
|
| 903 |
+
int BIO_sock_info(int sock,
|
| 904 |
+
enum BIO_sock_info_type type, union BIO_sock_info_u *info);
|
| 905 |
+
|
| 906 |
+
#define BIO_SOCK_REUSEADDR 0x01
|
| 907 |
+
#define BIO_SOCK_V6_ONLY 0x02
|
| 908 |
+
#define BIO_SOCK_KEEPALIVE 0x04
|
| 909 |
+
#define BIO_SOCK_NONBLOCK 0x08
|
| 910 |
+
#define BIO_SOCK_NODELAY 0x10
|
| 911 |
+
#define BIO_SOCK_TFO 0x20
|
| 912 |
+
|
| 913 |
+
int BIO_socket(int domain, int socktype, int protocol, int options);
|
| 914 |
+
int BIO_connect(int sock, const BIO_ADDR *addr, int options);
|
| 915 |
+
int BIO_bind(int sock, const BIO_ADDR *addr, int options);
|
| 916 |
+
int BIO_listen(int sock, const BIO_ADDR *addr, int options);
|
| 917 |
+
int BIO_accept_ex(int accept_sock, BIO_ADDR *addr, int options);
|
| 918 |
+
int BIO_closesocket(int sock);
|
| 919 |
+
|
| 920 |
+
BIO *BIO_new_socket(int sock, int close_flag);
|
| 921 |
+
BIO *BIO_new_connect(const char *host_port);
|
| 922 |
+
BIO *BIO_new_accept(const char *host_port);
|
| 923 |
+
#endif /* OPENSSL_NO_SOCK*/
|
| 924 |
+
|
| 925 |
+
BIO *BIO_new_fd(int fd, int close_flag);
|
| 926 |
+
|
| 927 |
+
int BIO_new_bio_pair(BIO **bio1, size_t writebuf1,
|
| 928 |
+
BIO **bio2, size_t writebuf2);
|
| 929 |
+
#ifndef OPENSSL_NO_DGRAM
|
| 930 |
+
int BIO_new_bio_dgram_pair(BIO **bio1, size_t writebuf1,
|
| 931 |
+
BIO **bio2, size_t writebuf2);
|
| 932 |
+
#endif
|
| 933 |
+
|
| 934 |
+
/*
|
| 935 |
+
* If successful, returns 1 and in *bio1, *bio2 two BIO pair endpoints.
|
| 936 |
+
* Otherwise returns 0 and sets *bio1 and *bio2 to NULL. Size 0 uses default
|
| 937 |
+
* value.
|
| 938 |
+
*/
|
| 939 |
+
|
| 940 |
+
void BIO_copy_next_retry(BIO *b);
|
| 941 |
+
|
| 942 |
+
/*
|
| 943 |
+
* long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);
|
| 944 |
+
*/
|
| 945 |
+
|
| 946 |
+
#define ossl_bio__attr__(x)
|
| 947 |
+
#if defined(__GNUC__) && defined(__STDC_VERSION__) \
|
| 948 |
+
&& !defined(__MINGW32__) && !defined(__MINGW64__) \
|
| 949 |
+
&& !defined(__APPLE__)
|
| 950 |
+
/*
|
| 951 |
+
* Because we support the 'z' modifier, which made its appearance in C99,
|
| 952 |
+
* we can't use __attribute__ with pre C99 dialects.
|
| 953 |
+
*/
|
| 954 |
+
#if __STDC_VERSION__ >= 199901L
|
| 955 |
+
#undef ossl_bio__attr__
|
| 956 |
+
#define ossl_bio__attr__ __attribute__
|
| 957 |
+
#if __GNUC__ * 10 + __GNUC_MINOR__ >= 44
|
| 958 |
+
#define ossl_bio__printf__ __gnu_printf__
|
| 959 |
+
#else
|
| 960 |
+
#define ossl_bio__printf__ __printf__
|
| 961 |
+
#endif
|
| 962 |
+
#endif
|
| 963 |
+
#endif
|
| 964 |
+
int BIO_printf(BIO *bio, const char *format, ...)
|
| 965 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 2, 3)));
|
| 966 |
+
int BIO_vprintf(BIO *bio, const char *format, va_list args)
|
| 967 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 2, 0)));
|
| 968 |
+
int BIO_snprintf(char *buf, size_t n, const char *format, ...)
|
| 969 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 3, 4)));
|
| 970 |
+
int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
|
| 971 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 3, 0)));
|
| 972 |
+
#undef ossl_bio__attr__
|
| 973 |
+
#undef ossl_bio__printf__
|
| 974 |
+
|
| 975 |
+
BIO_METHOD *BIO_meth_new(int type, const char *name);
|
| 976 |
+
void BIO_meth_free(BIO_METHOD *biom);
|
| 977 |
+
int BIO_meth_set_write(BIO_METHOD *biom,
|
| 978 |
+
int (*write)(BIO *, const char *, int));
|
| 979 |
+
int BIO_meth_set_write_ex(BIO_METHOD *biom,
|
| 980 |
+
int (*bwrite)(BIO *, const char *, size_t, size_t *));
|
| 981 |
+
int BIO_meth_set_sendmmsg(BIO_METHOD *biom,
|
| 982 |
+
int (*f)(BIO *, BIO_MSG *, size_t, size_t,
|
| 983 |
+
uint64_t, size_t *));
|
| 984 |
+
int BIO_meth_set_read(BIO_METHOD *biom,
|
| 985 |
+
int (*read)(BIO *, char *, int));
|
| 986 |
+
int BIO_meth_set_read_ex(BIO_METHOD *biom,
|
| 987 |
+
int (*bread)(BIO *, char *, size_t, size_t *));
|
| 988 |
+
int BIO_meth_set_recvmmsg(BIO_METHOD *biom,
|
| 989 |
+
int (*f)(BIO *, BIO_MSG *, size_t, size_t,
|
| 990 |
+
uint64_t, size_t *));
|
| 991 |
+
int BIO_meth_set_puts(BIO_METHOD *biom,
|
| 992 |
+
int (*puts)(BIO *, const char *));
|
| 993 |
+
int BIO_meth_set_gets(BIO_METHOD *biom,
|
| 994 |
+
int (*ossl_gets)(BIO *, char *, int));
|
| 995 |
+
int BIO_meth_set_ctrl(BIO_METHOD *biom,
|
| 996 |
+
long (*ctrl)(BIO *, int, long, void *));
|
| 997 |
+
int BIO_meth_set_create(BIO_METHOD *biom, int (*create)(BIO *));
|
| 998 |
+
int BIO_meth_set_destroy(BIO_METHOD *biom, int (*destroy)(BIO *));
|
| 999 |
+
int BIO_meth_set_callback_ctrl(BIO_METHOD *biom,
|
| 1000 |
+
long (*callback_ctrl)(BIO *, int,
|
| 1001 |
+
BIO_info_cb *));
|
| 1002 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_5
|
| 1003 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_write(const BIO_METHOD *biom))(BIO *, const char *,
|
| 1004 |
+
int);
|
| 1005 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_write_ex(const BIO_METHOD *biom))(BIO *, const char *,
|
| 1006 |
+
size_t, size_t *);
|
| 1007 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_sendmmsg(const BIO_METHOD *biom))(BIO *, BIO_MSG *,
|
| 1008 |
+
size_t, size_t,
|
| 1009 |
+
uint64_t, size_t *);
|
| 1010 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_read(const BIO_METHOD *biom))(BIO *, char *, int);
|
| 1011 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_read_ex(const BIO_METHOD *biom))(BIO *, char *,
|
| 1012 |
+
size_t, size_t *);
|
| 1013 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_recvmmsg(const BIO_METHOD *biom))(BIO *, BIO_MSG *,
|
| 1014 |
+
size_t, size_t,
|
| 1015 |
+
uint64_t, size_t *);
|
| 1016 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_puts(const BIO_METHOD *biom))(BIO *, const char *);
|
| 1017 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_gets(const BIO_METHOD *biom))(BIO *, char *, int);
|
| 1018 |
+
OSSL_DEPRECATEDIN_3_5 long (*BIO_meth_get_ctrl(const BIO_METHOD *biom))(BIO *, int,
|
| 1019 |
+
long, void *);
|
| 1020 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_create(const BIO_METHOD *bion))(BIO *);
|
| 1021 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_destroy(const BIO_METHOD *biom))(BIO *);
|
| 1022 |
+
OSSL_DEPRECATEDIN_3_5 long (*BIO_meth_get_callback_ctrl(const BIO_METHOD *biom))(BIO *, int,
|
| 1023 |
+
BIO_info_cb *);
|
| 1024 |
+
#endif
|
| 1025 |
+
#ifdef __cplusplus
|
| 1026 |
+
}
|
| 1027 |
+
#endif
|
| 1028 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/bioerr.h
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_BIOERR_H
|
| 12 |
+
#define OPENSSL_BIOERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
/*
|
| 20 |
+
* BIO reason codes.
|
| 21 |
+
*/
|
| 22 |
+
#define BIO_R_ACCEPT_ERROR 100
|
| 23 |
+
#define BIO_R_ADDRINFO_ADDR_IS_NOT_AF_INET 141
|
| 24 |
+
#define BIO_R_AMBIGUOUS_HOST_OR_SERVICE 129
|
| 25 |
+
#define BIO_R_BAD_FOPEN_MODE 101
|
| 26 |
+
#define BIO_R_BROKEN_PIPE 124
|
| 27 |
+
#define BIO_R_CONNECT_ERROR 103
|
| 28 |
+
#define BIO_R_CONNECT_TIMEOUT 147
|
| 29 |
+
#define BIO_R_GETHOSTBYNAME_ADDR_IS_NOT_AF_INET 107
|
| 30 |
+
#define BIO_R_GETSOCKNAME_ERROR 132
|
| 31 |
+
#define BIO_R_GETSOCKNAME_TRUNCATED_ADDRESS 133
|
| 32 |
+
#define BIO_R_GETTING_SOCKTYPE 134
|
| 33 |
+
#define BIO_R_INVALID_ARGUMENT 125
|
| 34 |
+
#define BIO_R_INVALID_SOCKET 135
|
| 35 |
+
#define BIO_R_IN_USE 123
|
| 36 |
+
#define BIO_R_LENGTH_TOO_LONG 102
|
| 37 |
+
#define BIO_R_LISTEN_V6_ONLY 136
|
| 38 |
+
#define BIO_R_LOCAL_ADDR_NOT_AVAILABLE 111
|
| 39 |
+
#define BIO_R_LOOKUP_RETURNED_NOTHING 142
|
| 40 |
+
#define BIO_R_MALFORMED_HOST_OR_SERVICE 130
|
| 41 |
+
#define BIO_R_NBIO_CONNECT_ERROR 110
|
| 42 |
+
#define BIO_R_NON_FATAL 112
|
| 43 |
+
#define BIO_R_NO_ACCEPT_ADDR_OR_SERVICE_SPECIFIED 143
|
| 44 |
+
#define BIO_R_NO_HOSTNAME_OR_SERVICE_SPECIFIED 144
|
| 45 |
+
#define BIO_R_NO_PORT_DEFINED 113
|
| 46 |
+
#define BIO_R_NO_SUCH_FILE 128
|
| 47 |
+
#define BIO_R_NULL_PARAMETER 115 /* unused */
|
| 48 |
+
#define BIO_R_TFO_DISABLED 106
|
| 49 |
+
#define BIO_R_TFO_NO_KERNEL_SUPPORT 108
|
| 50 |
+
#define BIO_R_TRANSFER_ERROR 104
|
| 51 |
+
#define BIO_R_TRANSFER_TIMEOUT 105
|
| 52 |
+
#define BIO_R_UNABLE_TO_BIND_SOCKET 117
|
| 53 |
+
#define BIO_R_UNABLE_TO_CREATE_SOCKET 118
|
| 54 |
+
#define BIO_R_UNABLE_TO_KEEPALIVE 137
|
| 55 |
+
#define BIO_R_UNABLE_TO_LISTEN_SOCKET 119
|
| 56 |
+
#define BIO_R_UNABLE_TO_NODELAY 138
|
| 57 |
+
#define BIO_R_UNABLE_TO_REUSEADDR 139
|
| 58 |
+
#define BIO_R_UNABLE_TO_TFO 109
|
| 59 |
+
#define BIO_R_UNAVAILABLE_IP_FAMILY 145
|
| 60 |
+
#define BIO_R_UNINITIALIZED 120
|
| 61 |
+
#define BIO_R_UNKNOWN_INFO_TYPE 140
|
| 62 |
+
#define BIO_R_UNSUPPORTED_IP_FAMILY 146
|
| 63 |
+
#define BIO_R_UNSUPPORTED_METHOD 121
|
| 64 |
+
#define BIO_R_UNSUPPORTED_PROTOCOL_FAMILY 131
|
| 65 |
+
#define BIO_R_WRITE_TO_READ_ONLY_BIO 126
|
| 66 |
+
#define BIO_R_WSASTARTUP 122
|
| 67 |
+
#define BIO_R_PORT_MISMATCH 150
|
| 68 |
+
#define BIO_R_PEER_ADDR_NOT_AVAILABLE 151
|
| 69 |
+
|
| 70 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/blowfish.h
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-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 OPENSSL_BLOWFISH_H
|
| 11 |
+
#define OPENSSL_BLOWFISH_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_BLOWFISH_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#include <openssl/opensslconf.h>
|
| 20 |
+
|
| 21 |
+
#ifndef OPENSSL_NO_BF
|
| 22 |
+
#include <openssl/e_os2.h>
|
| 23 |
+
#ifdef __cplusplus
|
| 24 |
+
extern "C" {
|
| 25 |
+
#endif
|
| 26 |
+
|
| 27 |
+
#define BF_BLOCK 8
|
| 28 |
+
|
| 29 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 30 |
+
|
| 31 |
+
#define BF_ENCRYPT 1
|
| 32 |
+
#define BF_DECRYPT 0
|
| 33 |
+
|
| 34 |
+
/*-
|
| 35 |
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
| 36 |
+
* ! BF_LONG has to be at least 32 bits wide. !
|
| 37 |
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
| 38 |
+
*/
|
| 39 |
+
#define BF_LONG unsigned int
|
| 40 |
+
|
| 41 |
+
#define BF_ROUNDS 16
|
| 42 |
+
|
| 43 |
+
typedef struct bf_key_st {
|
| 44 |
+
BF_LONG P[BF_ROUNDS + 2];
|
| 45 |
+
BF_LONG S[4 * 256];
|
| 46 |
+
} BF_KEY;
|
| 47 |
+
|
| 48 |
+
#endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
| 49 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 50 |
+
OSSL_DEPRECATEDIN_3_0 void BF_set_key(BF_KEY *key, int len,
|
| 51 |
+
const unsigned char *data);
|
| 52 |
+
OSSL_DEPRECATEDIN_3_0 void BF_encrypt(BF_LONG *data, const BF_KEY *key);
|
| 53 |
+
OSSL_DEPRECATEDIN_3_0 void BF_decrypt(BF_LONG *data, const BF_KEY *key);
|
| 54 |
+
OSSL_DEPRECATEDIN_3_0 void BF_ecb_encrypt(const unsigned char *in,
|
| 55 |
+
unsigned char *out, const BF_KEY *key,
|
| 56 |
+
int enc);
|
| 57 |
+
OSSL_DEPRECATEDIN_3_0 void BF_cbc_encrypt(const unsigned char *in,
|
| 58 |
+
unsigned char *out, long length,
|
| 59 |
+
const BF_KEY *schedule,
|
| 60 |
+
unsigned char *ivec, int enc);
|
| 61 |
+
OSSL_DEPRECATEDIN_3_0 void BF_cfb64_encrypt(const unsigned char *in,
|
| 62 |
+
unsigned char *out,
|
| 63 |
+
long length, const BF_KEY *schedule,
|
| 64 |
+
unsigned char *ivec, int *num,
|
| 65 |
+
int enc);
|
| 66 |
+
OSSL_DEPRECATEDIN_3_0 void BF_ofb64_encrypt(const unsigned char *in,
|
| 67 |
+
unsigned char *out,
|
| 68 |
+
long length, const BF_KEY *schedule,
|
| 69 |
+
unsigned char *ivec, int *num);
|
| 70 |
+
OSSL_DEPRECATEDIN_3_0 const char *BF_options(void);
|
| 71 |
+
#endif
|
| 72 |
+
|
| 73 |
+
#ifdef __cplusplus
|
| 74 |
+
}
|
| 75 |
+
#endif
|
| 76 |
+
#endif
|
| 77 |
+
|
| 78 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/bn.h
ADDED
|
@@ -0,0 +1,588 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_BN_H
|
| 12 |
+
#define OPENSSL_BN_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/macros.h>
|
| 16 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 17 |
+
#define HEADER_BN_H
|
| 18 |
+
#endif
|
| 19 |
+
|
| 20 |
+
#include <openssl/e_os2.h>
|
| 21 |
+
#ifndef OPENSSL_NO_STDIO
|
| 22 |
+
#include <stdio.h>
|
| 23 |
+
#endif
|
| 24 |
+
#include <openssl/opensslconf.h>
|
| 25 |
+
#include <openssl/types.h>
|
| 26 |
+
#include <openssl/crypto.h>
|
| 27 |
+
#include <openssl/bnerr.h>
|
| 28 |
+
|
| 29 |
+
#ifdef __cplusplus
|
| 30 |
+
extern "C" {
|
| 31 |
+
#endif
|
| 32 |
+
|
| 33 |
+
/*
|
| 34 |
+
* 64-bit processor with LP64 ABI
|
| 35 |
+
*/
|
| 36 |
+
#ifdef SIXTY_FOUR_BIT_LONG
|
| 37 |
+
#define BN_ULONG unsigned long
|
| 38 |
+
#define BN_BYTES 8
|
| 39 |
+
#endif
|
| 40 |
+
|
| 41 |
+
/*
|
| 42 |
+
* 64-bit processor other than LP64 ABI
|
| 43 |
+
*/
|
| 44 |
+
#ifdef SIXTY_FOUR_BIT
|
| 45 |
+
#define BN_ULONG unsigned long long
|
| 46 |
+
#define BN_BYTES 8
|
| 47 |
+
#endif
|
| 48 |
+
|
| 49 |
+
#ifdef THIRTY_TWO_BIT
|
| 50 |
+
#define BN_ULONG unsigned int
|
| 51 |
+
#define BN_BYTES 4
|
| 52 |
+
#endif
|
| 53 |
+
|
| 54 |
+
#define BN_BITS2 (BN_BYTES * 8)
|
| 55 |
+
#define BN_BITS (BN_BITS2 * 2)
|
| 56 |
+
#define BN_TBIT ((BN_ULONG)1 << (BN_BITS2 - 1))
|
| 57 |
+
|
| 58 |
+
#define BN_FLG_MALLOCED 0x01
|
| 59 |
+
#define BN_FLG_STATIC_DATA 0x02
|
| 60 |
+
|
| 61 |
+
/*
|
| 62 |
+
* avoid leaking exponent information through timing,
|
| 63 |
+
* BN_mod_exp_mont() will call BN_mod_exp_mont_consttime,
|
| 64 |
+
* BN_div() will call BN_div_no_branch,
|
| 65 |
+
* BN_mod_inverse() will call bn_mod_inverse_no_branch.
|
| 66 |
+
*/
|
| 67 |
+
#define BN_FLG_CONSTTIME 0x04
|
| 68 |
+
#define BN_FLG_SECURE 0x08
|
| 69 |
+
|
| 70 |
+
#ifndef OPENSSL_NO_DEPRECATED_0_9_8
|
| 71 |
+
/* deprecated name for the flag */
|
| 72 |
+
#define BN_FLG_EXP_CONSTTIME BN_FLG_CONSTTIME
|
| 73 |
+
#define BN_FLG_FREE 0x8000 /* used for debugging */
|
| 74 |
+
#endif
|
| 75 |
+
|
| 76 |
+
void BN_set_flags(BIGNUM *b, int n);
|
| 77 |
+
int BN_get_flags(const BIGNUM *b, int n);
|
| 78 |
+
|
| 79 |
+
/* Values for |top| in BN_rand() */
|
| 80 |
+
#define BN_RAND_TOP_ANY -1
|
| 81 |
+
#define BN_RAND_TOP_ONE 0
|
| 82 |
+
#define BN_RAND_TOP_TWO 1
|
| 83 |
+
|
| 84 |
+
/* Values for |bottom| in BN_rand() */
|
| 85 |
+
#define BN_RAND_BOTTOM_ANY 0
|
| 86 |
+
#define BN_RAND_BOTTOM_ODD 1
|
| 87 |
+
|
| 88 |
+
/*
|
| 89 |
+
* get a clone of a BIGNUM with changed flags, for *temporary* use only (the
|
| 90 |
+
* two BIGNUMs cannot be used in parallel!). Also only for *read only* use. The
|
| 91 |
+
* value |dest| should be a newly allocated BIGNUM obtained via BN_new() that
|
| 92 |
+
* has not been otherwise initialised or used.
|
| 93 |
+
*/
|
| 94 |
+
void BN_with_flags(BIGNUM *dest, const BIGNUM *b, int flags);
|
| 95 |
+
|
| 96 |
+
/* Wrapper function to make using BN_GENCB easier */
|
| 97 |
+
int BN_GENCB_call(BN_GENCB *cb, int a, int b);
|
| 98 |
+
|
| 99 |
+
BN_GENCB *BN_GENCB_new(void);
|
| 100 |
+
void BN_GENCB_free(BN_GENCB *cb);
|
| 101 |
+
|
| 102 |
+
/* Populate a BN_GENCB structure with an "old"-style callback */
|
| 103 |
+
void BN_GENCB_set_old(BN_GENCB *gencb, void (*callback)(int, int, void *),
|
| 104 |
+
void *cb_arg);
|
| 105 |
+
|
| 106 |
+
/* Populate a BN_GENCB structure with a "new"-style callback */
|
| 107 |
+
void BN_GENCB_set(BN_GENCB *gencb, int (*callback)(int, int, BN_GENCB *),
|
| 108 |
+
void *cb_arg);
|
| 109 |
+
|
| 110 |
+
void *BN_GENCB_get_arg(BN_GENCB *cb);
|
| 111 |
+
|
| 112 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 113 |
+
#define BN_prime_checks 0 /* default: select number of iterations based \
|
| 114 |
+
* on the size of the number */
|
| 115 |
+
|
| 116 |
+
/*
|
| 117 |
+
* BN_prime_checks_for_size() returns the number of Miller-Rabin iterations
|
| 118 |
+
* that will be done for checking that a random number is probably prime. The
|
| 119 |
+
* error rate for accepting a composite number as prime depends on the size of
|
| 120 |
+
* the prime |b|. The error rates used are for calculating an RSA key with 2 primes,
|
| 121 |
+
* and so the level is what you would expect for a key of double the size of the
|
| 122 |
+
* prime.
|
| 123 |
+
*
|
| 124 |
+
* This table is generated using the algorithm of FIPS PUB 186-4
|
| 125 |
+
* Digital Signature Standard (DSS), section F.1, page 117.
|
| 126 |
+
* (https://dx.doi.org/10.6028/NIST.FIPS.186-4)
|
| 127 |
+
*
|
| 128 |
+
* The following magma script was used to generate the output:
|
| 129 |
+
* securitybits:=125;
|
| 130 |
+
* k:=1024;
|
| 131 |
+
* for t:=1 to 65 do
|
| 132 |
+
* for M:=3 to Floor(2*Sqrt(k-1)-1) do
|
| 133 |
+
* S:=0;
|
| 134 |
+
* // Sum over m
|
| 135 |
+
* for m:=3 to M do
|
| 136 |
+
* s:=0;
|
| 137 |
+
* // Sum over j
|
| 138 |
+
* for j:=2 to m do
|
| 139 |
+
* s+:=(RealField(32)!2)^-(j+(k-1)/j);
|
| 140 |
+
* end for;
|
| 141 |
+
* S+:=2^(m-(m-1)*t)*s;
|
| 142 |
+
* end for;
|
| 143 |
+
* A:=2^(k-2-M*t);
|
| 144 |
+
* B:=8*(Pi(RealField(32))^2-6)/3*2^(k-2)*S;
|
| 145 |
+
* pkt:=2.00743*Log(2)*k*2^-k*(A+B);
|
| 146 |
+
* seclevel:=Floor(-Log(2,pkt));
|
| 147 |
+
* if seclevel ge securitybits then
|
| 148 |
+
* printf "k: %5o, security: %o bits (t: %o, M: %o)\n",k,seclevel,t,M;
|
| 149 |
+
* break;
|
| 150 |
+
* end if;
|
| 151 |
+
* end for;
|
| 152 |
+
* if seclevel ge securitybits then break; end if;
|
| 153 |
+
* end for;
|
| 154 |
+
*
|
| 155 |
+
* It can be run online at:
|
| 156 |
+
* http://magma.maths.usyd.edu.au/calc
|
| 157 |
+
*
|
| 158 |
+
* And will output:
|
| 159 |
+
* k: 1024, security: 129 bits (t: 6, M: 23)
|
| 160 |
+
*
|
| 161 |
+
* k is the number of bits of the prime, securitybits is the level we want to
|
| 162 |
+
* reach.
|
| 163 |
+
*
|
| 164 |
+
* prime length | RSA key size | # MR tests | security level
|
| 165 |
+
* -------------+--------------|------------+---------------
|
| 166 |
+
* (b) >= 6394 | >= 12788 | 3 | 256 bit
|
| 167 |
+
* (b) >= 3747 | >= 7494 | 3 | 192 bit
|
| 168 |
+
* (b) >= 1345 | >= 2690 | 4 | 128 bit
|
| 169 |
+
* (b) >= 1080 | >= 2160 | 5 | 128 bit
|
| 170 |
+
* (b) >= 852 | >= 1704 | 5 | 112 bit
|
| 171 |
+
* (b) >= 476 | >= 952 | 5 | 80 bit
|
| 172 |
+
* (b) >= 400 | >= 800 | 6 | 80 bit
|
| 173 |
+
* (b) >= 347 | >= 694 | 7 | 80 bit
|
| 174 |
+
* (b) >= 308 | >= 616 | 8 | 80 bit
|
| 175 |
+
* (b) >= 55 | >= 110 | 27 | 64 bit
|
| 176 |
+
* (b) >= 6 | >= 12 | 34 | 64 bit
|
| 177 |
+
*/
|
| 178 |
+
|
| 179 |
+
#define BN_prime_checks_for_size(b) ((b) >= 3747 ? 3 : (b) >= 1345 ? 4 \
|
| 180 |
+
: (b) >= 476 ? 5 \
|
| 181 |
+
: (b) >= 400 ? 6 \
|
| 182 |
+
: (b) >= 347 ? 7 \
|
| 183 |
+
: (b) >= 308 ? 8 \
|
| 184 |
+
: (b) >= 55 ? 27 \
|
| 185 |
+
: /* b >= 6 */ 34)
|
| 186 |
+
#endif
|
| 187 |
+
|
| 188 |
+
#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
|
| 189 |
+
|
| 190 |
+
int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w);
|
| 191 |
+
int BN_is_zero(const BIGNUM *a);
|
| 192 |
+
int BN_is_one(const BIGNUM *a);
|
| 193 |
+
int BN_is_word(const BIGNUM *a, const BN_ULONG w);
|
| 194 |
+
int BN_is_odd(const BIGNUM *a);
|
| 195 |
+
|
| 196 |
+
#define BN_one(a) (BN_set_word((a), 1))
|
| 197 |
+
|
| 198 |
+
void BN_zero_ex(BIGNUM *a);
|
| 199 |
+
|
| 200 |
+
#if OPENSSL_API_LEVEL > 908
|
| 201 |
+
#define BN_zero(a) BN_zero_ex(a)
|
| 202 |
+
#else
|
| 203 |
+
#define BN_zero(a) (BN_set_word((a), 0))
|
| 204 |
+
#endif
|
| 205 |
+
|
| 206 |
+
const BIGNUM *BN_value_one(void);
|
| 207 |
+
char *BN_options(void);
|
| 208 |
+
BN_CTX *BN_CTX_new_ex(OSSL_LIB_CTX *ctx);
|
| 209 |
+
BN_CTX *BN_CTX_new(void);
|
| 210 |
+
BN_CTX *BN_CTX_secure_new_ex(OSSL_LIB_CTX *ctx);
|
| 211 |
+
BN_CTX *BN_CTX_secure_new(void);
|
| 212 |
+
void BN_CTX_free(BN_CTX *c);
|
| 213 |
+
void BN_CTX_start(BN_CTX *ctx);
|
| 214 |
+
BIGNUM *BN_CTX_get(BN_CTX *ctx);
|
| 215 |
+
void BN_CTX_end(BN_CTX *ctx);
|
| 216 |
+
int BN_rand_ex(BIGNUM *rnd, int bits, int top, int bottom,
|
| 217 |
+
unsigned int strength, BN_CTX *ctx);
|
| 218 |
+
int BN_rand(BIGNUM *rnd, int bits, int top, int bottom);
|
| 219 |
+
int BN_priv_rand_ex(BIGNUM *rnd, int bits, int top, int bottom,
|
| 220 |
+
unsigned int strength, BN_CTX *ctx);
|
| 221 |
+
int BN_priv_rand(BIGNUM *rnd, int bits, int top, int bottom);
|
| 222 |
+
int BN_rand_range_ex(BIGNUM *r, const BIGNUM *range, unsigned int strength,
|
| 223 |
+
BN_CTX *ctx);
|
| 224 |
+
int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
|
| 225 |
+
int BN_priv_rand_range_ex(BIGNUM *r, const BIGNUM *range,
|
| 226 |
+
unsigned int strength, BN_CTX *ctx);
|
| 227 |
+
int BN_priv_rand_range(BIGNUM *rnd, const BIGNUM *range);
|
| 228 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 229 |
+
OSSL_DEPRECATEDIN_3_0
|
| 230 |
+
int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);
|
| 231 |
+
OSSL_DEPRECATEDIN_3_0
|
| 232 |
+
int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
|
| 233 |
+
#endif
|
| 234 |
+
int BN_num_bits(const BIGNUM *a);
|
| 235 |
+
int BN_num_bits_word(BN_ULONG l);
|
| 236 |
+
int BN_security_bits(int L, int N);
|
| 237 |
+
BIGNUM *BN_new(void);
|
| 238 |
+
BIGNUM *BN_secure_new(void);
|
| 239 |
+
void BN_clear_free(BIGNUM *a);
|
| 240 |
+
BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
|
| 241 |
+
void BN_swap(BIGNUM *a, BIGNUM *b);
|
| 242 |
+
BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
|
| 243 |
+
BIGNUM *BN_signed_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
|
| 244 |
+
int BN_bn2bin(const BIGNUM *a, unsigned char *to);
|
| 245 |
+
int BN_bn2binpad(const BIGNUM *a, unsigned char *to, int tolen);
|
| 246 |
+
int BN_signed_bn2bin(const BIGNUM *a, unsigned char *to, int tolen);
|
| 247 |
+
BIGNUM *BN_lebin2bn(const unsigned char *s, int len, BIGNUM *ret);
|
| 248 |
+
BIGNUM *BN_signed_lebin2bn(const unsigned char *s, int len, BIGNUM *ret);
|
| 249 |
+
int BN_bn2lebinpad(const BIGNUM *a, unsigned char *to, int tolen);
|
| 250 |
+
int BN_signed_bn2lebin(const BIGNUM *a, unsigned char *to, int tolen);
|
| 251 |
+
BIGNUM *BN_native2bn(const unsigned char *s, int len, BIGNUM *ret);
|
| 252 |
+
BIGNUM *BN_signed_native2bn(const unsigned char *s, int len, BIGNUM *ret);
|
| 253 |
+
int BN_bn2nativepad(const BIGNUM *a, unsigned char *to, int tolen);
|
| 254 |
+
int BN_signed_bn2native(const BIGNUM *a, unsigned char *to, int tolen);
|
| 255 |
+
BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret);
|
| 256 |
+
int BN_bn2mpi(const BIGNUM *a, unsigned char *to);
|
| 257 |
+
int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
| 258 |
+
int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
| 259 |
+
int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
| 260 |
+
int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
| 261 |
+
int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
|
| 262 |
+
int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
|
| 263 |
+
/** BN_set_negative sets sign of a BIGNUM
|
| 264 |
+
* \param b pointer to the BIGNUM object
|
| 265 |
+
* \param n 0 if the BIGNUM b should be positive and a value != 0 otherwise
|
| 266 |
+
*/
|
| 267 |
+
void BN_set_negative(BIGNUM *b, int n);
|
| 268 |
+
/** BN_is_negative returns 1 if the BIGNUM is negative
|
| 269 |
+
* \param b pointer to the BIGNUM object
|
| 270 |
+
* \return 1 if a < 0 and 0 otherwise
|
| 271 |
+
*/
|
| 272 |
+
int BN_is_negative(const BIGNUM *b);
|
| 273 |
+
|
| 274 |
+
int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
|
| 275 |
+
BN_CTX *ctx);
|
| 276 |
+
#define BN_mod(rem, m, d, ctx) BN_div(NULL, (rem), (m), (d), (ctx))
|
| 277 |
+
int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
|
| 278 |
+
int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
|
| 279 |
+
BN_CTX *ctx);
|
| 280 |
+
int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 281 |
+
const BIGNUM *m);
|
| 282 |
+
int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
|
| 283 |
+
BN_CTX *ctx);
|
| 284 |
+
int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 285 |
+
const BIGNUM *m);
|
| 286 |
+
int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
|
| 287 |
+
BN_CTX *ctx);
|
| 288 |
+
int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
|
| 289 |
+
int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
|
| 290 |
+
int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m);
|
| 291 |
+
int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m,
|
| 292 |
+
BN_CTX *ctx);
|
| 293 |
+
int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m);
|
| 294 |
+
|
| 295 |
+
BN_ULONG BN_mod_word(const BIGNUM *a, BN_ULONG w);
|
| 296 |
+
BN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w);
|
| 297 |
+
int BN_mul_word(BIGNUM *a, BN_ULONG w);
|
| 298 |
+
int BN_add_word(BIGNUM *a, BN_ULONG w);
|
| 299 |
+
int BN_sub_word(BIGNUM *a, BN_ULONG w);
|
| 300 |
+
int BN_set_word(BIGNUM *a, BN_ULONG w);
|
| 301 |
+
BN_ULONG BN_get_word(const BIGNUM *a);
|
| 302 |
+
|
| 303 |
+
int BN_cmp(const BIGNUM *a, const BIGNUM *b);
|
| 304 |
+
void BN_free(BIGNUM *a);
|
| 305 |
+
int BN_is_bit_set(const BIGNUM *a, int n);
|
| 306 |
+
int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
|
| 307 |
+
int BN_lshift1(BIGNUM *r, const BIGNUM *a);
|
| 308 |
+
int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
| 309 |
+
|
| 310 |
+
int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
| 311 |
+
const BIGNUM *m, BN_CTX *ctx);
|
| 312 |
+
int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
| 313 |
+
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
| 314 |
+
int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
|
| 315 |
+
const BIGNUM *m, BN_CTX *ctx,
|
| 316 |
+
BN_MONT_CTX *in_mont);
|
| 317 |
+
int BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p,
|
| 318 |
+
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
| 319 |
+
int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
|
| 320 |
+
const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,
|
| 321 |
+
BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
| 322 |
+
int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
| 323 |
+
const BIGNUM *m, BN_CTX *ctx);
|
| 324 |
+
int BN_mod_exp_mont_consttime_x2(BIGNUM *rr1, const BIGNUM *a1, const BIGNUM *p1,
|
| 325 |
+
const BIGNUM *m1, BN_MONT_CTX *in_mont1,
|
| 326 |
+
BIGNUM *rr2, const BIGNUM *a2, const BIGNUM *p2,
|
| 327 |
+
const BIGNUM *m2, BN_MONT_CTX *in_mont2,
|
| 328 |
+
BN_CTX *ctx);
|
| 329 |
+
|
| 330 |
+
int BN_mask_bits(BIGNUM *a, int n);
|
| 331 |
+
#ifndef OPENSSL_NO_STDIO
|
| 332 |
+
int BN_print_fp(FILE *fp, const BIGNUM *a);
|
| 333 |
+
#endif
|
| 334 |
+
int BN_print(BIO *bio, const BIGNUM *a);
|
| 335 |
+
int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx);
|
| 336 |
+
int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
|
| 337 |
+
int BN_rshift1(BIGNUM *r, const BIGNUM *a);
|
| 338 |
+
void BN_clear(BIGNUM *a);
|
| 339 |
+
BIGNUM *BN_dup(const BIGNUM *a);
|
| 340 |
+
int BN_ucmp(const BIGNUM *a, const BIGNUM *b);
|
| 341 |
+
int BN_set_bit(BIGNUM *a, int n);
|
| 342 |
+
int BN_clear_bit(BIGNUM *a, int n);
|
| 343 |
+
char *BN_bn2hex(const BIGNUM *a);
|
| 344 |
+
char *BN_bn2dec(const BIGNUM *a);
|
| 345 |
+
int BN_hex2bn(BIGNUM **a, const char *str);
|
| 346 |
+
int BN_dec2bn(BIGNUM **a, const char *str);
|
| 347 |
+
int BN_asc2bn(BIGNUM **a, const char *str);
|
| 348 |
+
int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
|
| 349 |
+
int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* returns
|
| 350 |
+
* -2 for
|
| 351 |
+
* error */
|
| 352 |
+
int BN_are_coprime(BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
|
| 353 |
+
BIGNUM *BN_mod_inverse(BIGNUM *ret,
|
| 354 |
+
const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
|
| 355 |
+
BIGNUM *BN_mod_sqrt(BIGNUM *ret,
|
| 356 |
+
const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
|
| 357 |
+
|
| 358 |
+
void BN_consttime_swap(BN_ULONG swap, BIGNUM *a, BIGNUM *b, int nwords);
|
| 359 |
+
|
| 360 |
+
/* Deprecated versions */
|
| 361 |
+
#ifndef OPENSSL_NO_DEPRECATED_0_9_8
|
| 362 |
+
OSSL_DEPRECATEDIN_0_9_8
|
| 363 |
+
BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
|
| 364 |
+
const BIGNUM *add, const BIGNUM *rem,
|
| 365 |
+
void (*callback)(int, int, void *),
|
| 366 |
+
void *cb_arg);
|
| 367 |
+
OSSL_DEPRECATEDIN_0_9_8
|
| 368 |
+
int BN_is_prime(const BIGNUM *p, int nchecks,
|
| 369 |
+
void (*callback)(int, int, void *),
|
| 370 |
+
BN_CTX *ctx, void *cb_arg);
|
| 371 |
+
OSSL_DEPRECATEDIN_0_9_8
|
| 372 |
+
int BN_is_prime_fasttest(const BIGNUM *p, int nchecks,
|
| 373 |
+
void (*callback)(int, int, void *),
|
| 374 |
+
BN_CTX *ctx, void *cb_arg,
|
| 375 |
+
int do_trial_division);
|
| 376 |
+
#endif
|
| 377 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 378 |
+
OSSL_DEPRECATEDIN_3_0
|
| 379 |
+
int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
|
| 380 |
+
OSSL_DEPRECATEDIN_3_0
|
| 381 |
+
int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
|
| 382 |
+
int do_trial_division, BN_GENCB *cb);
|
| 383 |
+
#endif
|
| 384 |
+
/* Newer versions */
|
| 385 |
+
int BN_generate_prime_ex2(BIGNUM *ret, int bits, int safe,
|
| 386 |
+
const BIGNUM *add, const BIGNUM *rem, BN_GENCB *cb,
|
| 387 |
+
BN_CTX *ctx);
|
| 388 |
+
int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
|
| 389 |
+
const BIGNUM *rem, BN_GENCB *cb);
|
| 390 |
+
int BN_check_prime(const BIGNUM *p, BN_CTX *ctx, BN_GENCB *cb);
|
| 391 |
+
|
| 392 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 393 |
+
OSSL_DEPRECATEDIN_3_0
|
| 394 |
+
int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);
|
| 395 |
+
|
| 396 |
+
OSSL_DEPRECATEDIN_3_0
|
| 397 |
+
int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
|
| 398 |
+
const BIGNUM *Xp, const BIGNUM *Xp1,
|
| 399 |
+
const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx,
|
| 400 |
+
BN_GENCB *cb);
|
| 401 |
+
OSSL_DEPRECATEDIN_3_0
|
| 402 |
+
int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1,
|
| 403 |
+
BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e,
|
| 404 |
+
BN_CTX *ctx, BN_GENCB *cb);
|
| 405 |
+
#endif
|
| 406 |
+
|
| 407 |
+
BN_MONT_CTX *BN_MONT_CTX_new(void);
|
| 408 |
+
int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 409 |
+
BN_MONT_CTX *mont, BN_CTX *ctx);
|
| 410 |
+
int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
|
| 411 |
+
BN_CTX *ctx);
|
| 412 |
+
int BN_from_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
|
| 413 |
+
BN_CTX *ctx);
|
| 414 |
+
void BN_MONT_CTX_free(BN_MONT_CTX *mont);
|
| 415 |
+
int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx);
|
| 416 |
+
BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from);
|
| 417 |
+
BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, CRYPTO_RWLOCK *lock,
|
| 418 |
+
const BIGNUM *mod, BN_CTX *ctx);
|
| 419 |
+
|
| 420 |
+
/* BN_BLINDING flags */
|
| 421 |
+
#define BN_BLINDING_NO_UPDATE 0x00000001
|
| 422 |
+
#define BN_BLINDING_NO_RECREATE 0x00000002
|
| 423 |
+
|
| 424 |
+
BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod);
|
| 425 |
+
void BN_BLINDING_free(BN_BLINDING *b);
|
| 426 |
+
int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx);
|
| 427 |
+
int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
|
| 428 |
+
int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
|
| 429 |
+
int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);
|
| 430 |
+
int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b,
|
| 431 |
+
BN_CTX *);
|
| 432 |
+
|
| 433 |
+
int BN_BLINDING_is_current_thread(BN_BLINDING *b);
|
| 434 |
+
void BN_BLINDING_set_current_thread(BN_BLINDING *b);
|
| 435 |
+
int BN_BLINDING_lock(BN_BLINDING *b);
|
| 436 |
+
int BN_BLINDING_unlock(BN_BLINDING *b);
|
| 437 |
+
|
| 438 |
+
unsigned long BN_BLINDING_get_flags(const BN_BLINDING *);
|
| 439 |
+
void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long);
|
| 440 |
+
BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b,
|
| 441 |
+
const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
|
| 442 |
+
int (*bn_mod_exp)(BIGNUM *r,
|
| 443 |
+
const BIGNUM *a,
|
| 444 |
+
const BIGNUM *p,
|
| 445 |
+
const BIGNUM *m,
|
| 446 |
+
BN_CTX *ctx,
|
| 447 |
+
BN_MONT_CTX *m_ctx),
|
| 448 |
+
BN_MONT_CTX *m_ctx);
|
| 449 |
+
#ifndef OPENSSL_NO_DEPRECATED_0_9_8
|
| 450 |
+
OSSL_DEPRECATEDIN_0_9_8
|
| 451 |
+
void BN_set_params(int mul, int high, int low, int mont);
|
| 452 |
+
OSSL_DEPRECATEDIN_0_9_8
|
| 453 |
+
int BN_get_params(int which); /* 0, mul, 1 high, 2 low, 3 mont */
|
| 454 |
+
#endif
|
| 455 |
+
|
| 456 |
+
BN_RECP_CTX *BN_RECP_CTX_new(void);
|
| 457 |
+
void BN_RECP_CTX_free(BN_RECP_CTX *recp);
|
| 458 |
+
int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx);
|
| 459 |
+
int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
|
| 460 |
+
BN_RECP_CTX *recp, BN_CTX *ctx);
|
| 461 |
+
int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
| 462 |
+
const BIGNUM *m, BN_CTX *ctx);
|
| 463 |
+
int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
|
| 464 |
+
BN_RECP_CTX *recp, BN_CTX *ctx);
|
| 465 |
+
|
| 466 |
+
#ifndef OPENSSL_NO_EC2M
|
| 467 |
+
|
| 468 |
+
/*
|
| 469 |
+
* Functions for arithmetic over binary polynomials represented by BIGNUMs.
|
| 470 |
+
* The BIGNUM::neg property of BIGNUMs representing binary polynomials is
|
| 471 |
+
* ignored. Note that input arguments are not const so that their bit arrays
|
| 472 |
+
* can be expanded to the appropriate size if needed.
|
| 473 |
+
*/
|
| 474 |
+
|
| 475 |
+
/*
|
| 476 |
+
* r = a + b
|
| 477 |
+
*/
|
| 478 |
+
int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
| 479 |
+
#define BN_GF2m_sub(r, a, b) BN_GF2m_add(r, a, b)
|
| 480 |
+
/*
|
| 481 |
+
* r=a mod p
|
| 482 |
+
*/
|
| 483 |
+
int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p);
|
| 484 |
+
/* r = (a * b) mod p */
|
| 485 |
+
int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 486 |
+
const BIGNUM *p, BN_CTX *ctx);
|
| 487 |
+
/* r = (a * a) mod p */
|
| 488 |
+
int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
| 489 |
+
/* r = (1 / b) mod p */
|
| 490 |
+
int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx);
|
| 491 |
+
/* r = (a / b) mod p */
|
| 492 |
+
int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 493 |
+
const BIGNUM *p, BN_CTX *ctx);
|
| 494 |
+
/* r = (a ^ b) mod p */
|
| 495 |
+
int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 496 |
+
const BIGNUM *p, BN_CTX *ctx);
|
| 497 |
+
/* r = sqrt(a) mod p */
|
| 498 |
+
int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
| 499 |
+
BN_CTX *ctx);
|
| 500 |
+
/* r^2 + r = a mod p */
|
| 501 |
+
int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
| 502 |
+
BN_CTX *ctx);
|
| 503 |
+
#define BN_GF2m_cmp(a, b) BN_ucmp((a), (b))
|
| 504 |
+
/*-
|
| 505 |
+
* Some functions allow for representation of the irreducible polynomials
|
| 506 |
+
* as an unsigned int[], say p. The irreducible f(t) is then of the form:
|
| 507 |
+
* t^p[0] + t^p[1] + ... + t^p[k]
|
| 508 |
+
* where m = p[0] > p[1] > ... > p[k] = 0.
|
| 509 |
+
*/
|
| 510 |
+
/* r = a mod p */
|
| 511 |
+
int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]);
|
| 512 |
+
/* r = (a * b) mod p */
|
| 513 |
+
int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 514 |
+
const int p[], BN_CTX *ctx);
|
| 515 |
+
/* r = (a * a) mod p */
|
| 516 |
+
int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[],
|
| 517 |
+
BN_CTX *ctx);
|
| 518 |
+
/* r = (1 / b) mod p */
|
| 519 |
+
int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[],
|
| 520 |
+
BN_CTX *ctx);
|
| 521 |
+
/* r = (a / b) mod p */
|
| 522 |
+
int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 523 |
+
const int p[], BN_CTX *ctx);
|
| 524 |
+
/* r = (a ^ b) mod p */
|
| 525 |
+
int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 526 |
+
const int p[], BN_CTX *ctx);
|
| 527 |
+
/* r = sqrt(a) mod p */
|
| 528 |
+
int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a,
|
| 529 |
+
const int p[], BN_CTX *ctx);
|
| 530 |
+
/* r^2 + r = a mod p */
|
| 531 |
+
int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a,
|
| 532 |
+
const int p[], BN_CTX *ctx);
|
| 533 |
+
int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max);
|
| 534 |
+
int BN_GF2m_arr2poly(const int p[], BIGNUM *a);
|
| 535 |
+
|
| 536 |
+
#endif
|
| 537 |
+
|
| 538 |
+
/*
|
| 539 |
+
* faster mod functions for the 'NIST primes' 0 <= a < p^2
|
| 540 |
+
*/
|
| 541 |
+
int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
| 542 |
+
int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
| 543 |
+
int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
| 544 |
+
int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
| 545 |
+
int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
| 546 |
+
|
| 547 |
+
const BIGNUM *BN_get0_nist_prime_192(void);
|
| 548 |
+
const BIGNUM *BN_get0_nist_prime_224(void);
|
| 549 |
+
const BIGNUM *BN_get0_nist_prime_256(void);
|
| 550 |
+
const BIGNUM *BN_get0_nist_prime_384(void);
|
| 551 |
+
const BIGNUM *BN_get0_nist_prime_521(void);
|
| 552 |
+
|
| 553 |
+
int (*BN_nist_mod_func(const BIGNUM *p))(BIGNUM *r, const BIGNUM *a,
|
| 554 |
+
const BIGNUM *field, BN_CTX *ctx);
|
| 555 |
+
|
| 556 |
+
int BN_generate_dsa_nonce(BIGNUM *out, const BIGNUM *range,
|
| 557 |
+
const BIGNUM *priv, const unsigned char *message,
|
| 558 |
+
size_t message_len, BN_CTX *ctx);
|
| 559 |
+
|
| 560 |
+
/* Primes from RFC 2409 */
|
| 561 |
+
BIGNUM *BN_get_rfc2409_prime_768(BIGNUM *bn);
|
| 562 |
+
BIGNUM *BN_get_rfc2409_prime_1024(BIGNUM *bn);
|
| 563 |
+
|
| 564 |
+
/* Primes from RFC 3526 */
|
| 565 |
+
BIGNUM *BN_get_rfc3526_prime_1536(BIGNUM *bn);
|
| 566 |
+
BIGNUM *BN_get_rfc3526_prime_2048(BIGNUM *bn);
|
| 567 |
+
BIGNUM *BN_get_rfc3526_prime_3072(BIGNUM *bn);
|
| 568 |
+
BIGNUM *BN_get_rfc3526_prime_4096(BIGNUM *bn);
|
| 569 |
+
BIGNUM *BN_get_rfc3526_prime_6144(BIGNUM *bn);
|
| 570 |
+
BIGNUM *BN_get_rfc3526_prime_8192(BIGNUM *bn);
|
| 571 |
+
|
| 572 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 573 |
+
#define get_rfc2409_prime_768 BN_get_rfc2409_prime_768
|
| 574 |
+
#define get_rfc2409_prime_1024 BN_get_rfc2409_prime_1024
|
| 575 |
+
#define get_rfc3526_prime_1536 BN_get_rfc3526_prime_1536
|
| 576 |
+
#define get_rfc3526_prime_2048 BN_get_rfc3526_prime_2048
|
| 577 |
+
#define get_rfc3526_prime_3072 BN_get_rfc3526_prime_3072
|
| 578 |
+
#define get_rfc3526_prime_4096 BN_get_rfc3526_prime_4096
|
| 579 |
+
#define get_rfc3526_prime_6144 BN_get_rfc3526_prime_6144
|
| 580 |
+
#define get_rfc3526_prime_8192 BN_get_rfc3526_prime_8192
|
| 581 |
+
#endif
|
| 582 |
+
|
| 583 |
+
int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom);
|
| 584 |
+
|
| 585 |
+
#ifdef __cplusplus
|
| 586 |
+
}
|
| 587 |
+
#endif
|
| 588 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/bnerr.h
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_BNERR_H
|
| 12 |
+
#define OPENSSL_BNERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
/*
|
| 20 |
+
* BN reason codes.
|
| 21 |
+
*/
|
| 22 |
+
#define BN_R_ARG2_LT_ARG3 100
|
| 23 |
+
#define BN_R_BAD_RECIPROCAL 101
|
| 24 |
+
#define BN_R_BIGNUM_TOO_LONG 114
|
| 25 |
+
#define BN_R_BITS_TOO_SMALL 118
|
| 26 |
+
#define BN_R_CALLED_WITH_EVEN_MODULUS 102
|
| 27 |
+
#define BN_R_DIV_BY_ZERO 103
|
| 28 |
+
#define BN_R_ENCODING_ERROR 104
|
| 29 |
+
#define BN_R_EXPAND_ON_STATIC_BIGNUM_DATA 105
|
| 30 |
+
#define BN_R_INPUT_NOT_REDUCED 110
|
| 31 |
+
#define BN_R_INVALID_LENGTH 106
|
| 32 |
+
#define BN_R_INVALID_RANGE 115
|
| 33 |
+
#define BN_R_INVALID_SHIFT 119
|
| 34 |
+
#define BN_R_NOT_A_SQUARE 111
|
| 35 |
+
#define BN_R_NOT_INITIALIZED 107
|
| 36 |
+
#define BN_R_NO_INVERSE 108
|
| 37 |
+
#define BN_R_NO_PRIME_CANDIDATE 121
|
| 38 |
+
#define BN_R_NO_SOLUTION 116
|
| 39 |
+
#define BN_R_NO_SUITABLE_DIGEST 120
|
| 40 |
+
#define BN_R_PRIVATE_KEY_TOO_LARGE 117
|
| 41 |
+
#define BN_R_P_IS_NOT_PRIME 112
|
| 42 |
+
#define BN_R_TOO_MANY_ITERATIONS 113
|
| 43 |
+
#define BN_R_TOO_MANY_TEMPORARY_VARIABLES 109
|
| 44 |
+
|
| 45 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/buffer.h
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-2018 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 OPENSSL_BUFFER_H
|
| 11 |
+
#define OPENSSL_BUFFER_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_BUFFER_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#include <openssl/types.h>
|
| 20 |
+
#ifndef OPENSSL_CRYPTO_H
|
| 21 |
+
#include <openssl/crypto.h>
|
| 22 |
+
#endif
|
| 23 |
+
#include <openssl/buffererr.h>
|
| 24 |
+
|
| 25 |
+
#ifdef __cplusplus
|
| 26 |
+
extern "C" {
|
| 27 |
+
#endif
|
| 28 |
+
|
| 29 |
+
#include <stddef.h>
|
| 30 |
+
#include <sys/types.h>
|
| 31 |
+
|
| 32 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 33 |
+
#define BUF_strdup(s) OPENSSL_strdup(s)
|
| 34 |
+
#define BUF_strndup(s, size) OPENSSL_strndup(s, size)
|
| 35 |
+
#define BUF_memdup(data, size) OPENSSL_memdup(data, size)
|
| 36 |
+
#define BUF_strlcpy(dst, src, size) OPENSSL_strlcpy(dst, src, size)
|
| 37 |
+
#define BUF_strlcat(dst, src, size) OPENSSL_strlcat(dst, src, size)
|
| 38 |
+
#define BUF_strnlen(str, maxlen) OPENSSL_strnlen(str, maxlen)
|
| 39 |
+
#endif
|
| 40 |
+
|
| 41 |
+
struct buf_mem_st {
|
| 42 |
+
size_t length; /* current number of bytes */
|
| 43 |
+
char *data;
|
| 44 |
+
size_t max; /* size of buffer */
|
| 45 |
+
unsigned long flags;
|
| 46 |
+
};
|
| 47 |
+
|
| 48 |
+
#define BUF_MEM_FLAG_SECURE 0x01
|
| 49 |
+
|
| 50 |
+
BUF_MEM *BUF_MEM_new(void);
|
| 51 |
+
BUF_MEM *BUF_MEM_new_ex(unsigned long flags);
|
| 52 |
+
void BUF_MEM_free(BUF_MEM *a);
|
| 53 |
+
size_t BUF_MEM_grow(BUF_MEM *str, size_t len);
|
| 54 |
+
size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len);
|
| 55 |
+
void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz);
|
| 56 |
+
|
| 57 |
+
#ifdef __cplusplus
|
| 58 |
+
}
|
| 59 |
+
#endif
|
| 60 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/buffererr.h
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_BUFFERERR_H
|
| 12 |
+
#define OPENSSL_BUFFERERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2025 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 OPENSSL_BYTEORDER_H
|
| 11 |
+
#define OPENSSL_BYTEORDER_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/e_os2.h>
|
| 15 |
+
#include <string.h>
|
| 16 |
+
|
| 17 |
+
/*
|
| 18 |
+
* "Modern" compilers do a decent job of optimising these functions to just a
|
| 19 |
+
* couple of instruction ([swap +] store, or load [+ swap]) when either no
|
| 20 |
+
* swapping is required, or a suitable swap instruction is available.
|
| 21 |
+
*/
|
| 22 |
+
|
| 23 |
+
#if defined(_MSC_VER) && _MSC_VER >= 1300
|
| 24 |
+
#include <stdlib.h>
|
| 25 |
+
#pragma intrinsic(_byteswap_ushort)
|
| 26 |
+
#pragma intrinsic(_byteswap_ulong)
|
| 27 |
+
#pragma intrinsic(_byteswap_uint64)
|
| 28 |
+
#define OSSL_HTOBE16(x) _byteswap_ushort(x)
|
| 29 |
+
#define OSSL_HTOBE32(x) _byteswap_ulong(x)
|
| 30 |
+
#define OSSL_HTOBE64(x) _byteswap_uint64(x)
|
| 31 |
+
#define OSSL_BE16TOH(x) _byteswap_ushort(x)
|
| 32 |
+
#define OSSL_BE32TOH(x) _byteswap_ulong(x)
|
| 33 |
+
#define OSSL_BE64TOH(x) _byteswap_uint64(x)
|
| 34 |
+
#define OSSL_HTOLE16(x) (x)
|
| 35 |
+
#define OSSL_HTOLE32(x) (x)
|
| 36 |
+
#define OSSL_HTOLE64(x) (x)
|
| 37 |
+
#define OSSL_LE16TOH(x) (x)
|
| 38 |
+
#define OSSL_LE32TOH(x) (x)
|
| 39 |
+
#define OSSL_LE64TOH(x) (x)
|
| 40 |
+
|
| 41 |
+
#elif defined(__GLIBC__) && defined(__GLIBC_PREREQ)
|
| 42 |
+
#if (__GLIBC_PREREQ(2, 19)) && defined(_DEFAULT_SOURCE)
|
| 43 |
+
#include <endian.h>
|
| 44 |
+
#define OSSL_HTOBE16(x) htobe16(x)
|
| 45 |
+
#define OSSL_HTOBE32(x) htobe32(x)
|
| 46 |
+
#define OSSL_HTOBE64(x) htobe64(x)
|
| 47 |
+
#define OSSL_BE16TOH(x) be16toh(x)
|
| 48 |
+
#define OSSL_BE32TOH(x) be32toh(x)
|
| 49 |
+
#define OSSL_BE64TOH(x) be64toh(x)
|
| 50 |
+
#define OSSL_HTOLE16(x) htole16(x)
|
| 51 |
+
#define OSSL_HTOLE32(x) htole32(x)
|
| 52 |
+
#define OSSL_HTOLE64(x) htole64(x)
|
| 53 |
+
#define OSSL_LE16TOH(x) le16toh(x)
|
| 54 |
+
#define OSSL_LE32TOH(x) le32toh(x)
|
| 55 |
+
#define OSSL_LE64TOH(x) le64toh(x)
|
| 56 |
+
#endif
|
| 57 |
+
|
| 58 |
+
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
| 59 |
+
#if defined(__OpenBSD__)
|
| 60 |
+
#include <sys/types.h>
|
| 61 |
+
#else
|
| 62 |
+
#include <sys/endian.h>
|
| 63 |
+
#endif
|
| 64 |
+
#define OSSL_HTOBE16(x) htobe16(x)
|
| 65 |
+
#define OSSL_HTOBE32(x) htobe32(x)
|
| 66 |
+
#define OSSL_HTOBE64(x) htobe64(x)
|
| 67 |
+
#define OSSL_BE16TOH(x) be16toh(x)
|
| 68 |
+
#define OSSL_BE32TOH(x) be32toh(x)
|
| 69 |
+
#define OSSL_BE64TOH(x) be64toh(x)
|
| 70 |
+
#define OSSL_HTOLE16(x) htole16(x)
|
| 71 |
+
#define OSSL_HTOLE32(x) htole32(x)
|
| 72 |
+
#define OSSL_HTOLE64(x) htole64(x)
|
| 73 |
+
#define OSSL_LE16TOH(x) le16toh(x)
|
| 74 |
+
#define OSSL_LE32TOH(x) le32toh(x)
|
| 75 |
+
#define OSSL_LE64TOH(x) le64toh(x)
|
| 76 |
+
|
| 77 |
+
#elif defined(__APPLE__)
|
| 78 |
+
#include <libkern/OSByteOrder.h>
|
| 79 |
+
#define OSSL_HTOBE16(x) OSSwapHostToBigInt16(x)
|
| 80 |
+
#define OSSL_HTOBE32(x) OSSwapHostToBigInt32(x)
|
| 81 |
+
#define OSSL_HTOBE64(x) OSSwapHostToBigInt64(x)
|
| 82 |
+
#define OSSL_BE16TOH(x) OSSwapBigToHostInt16(x)
|
| 83 |
+
#define OSSL_BE32TOH(x) OSSwapBigToHostInt32(x)
|
| 84 |
+
#define OSSL_BE64TOH(x) OSSwapBigToHostInt64(x)
|
| 85 |
+
#define OSSL_HTOLE16(x) OSSwapHostToLittleInt16(x)
|
| 86 |
+
#define OSSL_HTOLE32(x) OSSwapHostToLittleInt32(x)
|
| 87 |
+
#define OSSL_HTOLE64(x) OSSwapHostToLittleInt64(x)
|
| 88 |
+
#define OSSL_LE16TOH(x) OSSwapLittleToHostInt16(x)
|
| 89 |
+
#define OSSL_LE32TOH(x) OSSwapLittleToHostInt32(x)
|
| 90 |
+
#define OSSL_LE64TOH(x) OSSwapLittleToHostInt64(x)
|
| 91 |
+
|
| 92 |
+
#endif
|
| 93 |
+
|
| 94 |
+
static ossl_inline ossl_unused unsigned char *
|
| 95 |
+
OPENSSL_store_u16_le(unsigned char *out, uint16_t val)
|
| 96 |
+
{
|
| 97 |
+
#ifdef OSSL_HTOLE16
|
| 98 |
+
uint16_t t = OSSL_HTOLE16(val);
|
| 99 |
+
|
| 100 |
+
memcpy(out, (unsigned char *)&t, 2);
|
| 101 |
+
return out + 2;
|
| 102 |
+
#else
|
| 103 |
+
*out++ = (val & 0xff);
|
| 104 |
+
*out++ = (val >> 8) & 0xff;
|
| 105 |
+
return out;
|
| 106 |
+
#endif
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
static ossl_inline ossl_unused unsigned char *
|
| 110 |
+
OPENSSL_store_u16_be(unsigned char *out, uint16_t val)
|
| 111 |
+
{
|
| 112 |
+
#ifdef OSSL_HTOBE16
|
| 113 |
+
uint16_t t = OSSL_HTOBE16(val);
|
| 114 |
+
|
| 115 |
+
memcpy(out, (unsigned char *)&t, 2);
|
| 116 |
+
return out + 2;
|
| 117 |
+
#else
|
| 118 |
+
*out++ = (val >> 8) & 0xff;
|
| 119 |
+
*out++ = (val & 0xff);
|
| 120 |
+
return out;
|
| 121 |
+
#endif
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
static ossl_inline ossl_unused unsigned char *
|
| 125 |
+
OPENSSL_store_u32_le(unsigned char *out, uint32_t val)
|
| 126 |
+
{
|
| 127 |
+
#ifdef OSSL_HTOLE32
|
| 128 |
+
uint32_t t = OSSL_HTOLE32(val);
|
| 129 |
+
|
| 130 |
+
memcpy(out, (unsigned char *)&t, 4);
|
| 131 |
+
return out + 4;
|
| 132 |
+
#else
|
| 133 |
+
*out++ = (val & 0xff);
|
| 134 |
+
*out++ = (val >> 8) & 0xff;
|
| 135 |
+
*out++ = (val >> 16) & 0xff;
|
| 136 |
+
*out++ = (val >> 24) & 0xff;
|
| 137 |
+
return out;
|
| 138 |
+
#endif
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
static ossl_inline ossl_unused unsigned char *
|
| 142 |
+
OPENSSL_store_u32_be(unsigned char *out, uint32_t val)
|
| 143 |
+
{
|
| 144 |
+
#ifdef OSSL_HTOBE32
|
| 145 |
+
uint32_t t = OSSL_HTOBE32(val);
|
| 146 |
+
|
| 147 |
+
memcpy(out, (unsigned char *)&t, 4);
|
| 148 |
+
return out + 4;
|
| 149 |
+
#else
|
| 150 |
+
*out++ = (val >> 24) & 0xff;
|
| 151 |
+
*out++ = (val >> 16) & 0xff;
|
| 152 |
+
*out++ = (val >> 8) & 0xff;
|
| 153 |
+
*out++ = (val & 0xff);
|
| 154 |
+
return out;
|
| 155 |
+
#endif
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
static ossl_inline ossl_unused unsigned char *
|
| 159 |
+
OPENSSL_store_u64_le(unsigned char *out, uint64_t val)
|
| 160 |
+
{
|
| 161 |
+
#ifdef OSSL_HTOLE64
|
| 162 |
+
uint64_t t = OSSL_HTOLE64(val);
|
| 163 |
+
|
| 164 |
+
memcpy(out, (unsigned char *)&t, 8);
|
| 165 |
+
return out + 8;
|
| 166 |
+
#else
|
| 167 |
+
*out++ = (val & 0xff);
|
| 168 |
+
*out++ = (val >> 8) & 0xff;
|
| 169 |
+
*out++ = (val >> 16) & 0xff;
|
| 170 |
+
*out++ = (val >> 24) & 0xff;
|
| 171 |
+
*out++ = (val >> 32) & 0xff;
|
| 172 |
+
*out++ = (val >> 40) & 0xff;
|
| 173 |
+
*out++ = (val >> 48) & 0xff;
|
| 174 |
+
*out++ = (val >> 56) & 0xff;
|
| 175 |
+
return out;
|
| 176 |
+
#endif
|
| 177 |
+
}
|
| 178 |
+
|
| 179 |
+
static ossl_inline ossl_unused unsigned char *
|
| 180 |
+
OPENSSL_store_u64_be(unsigned char *out, uint64_t val)
|
| 181 |
+
{
|
| 182 |
+
#ifdef OSSL_HTOLE64
|
| 183 |
+
uint64_t t = OSSL_HTOBE64(val);
|
| 184 |
+
|
| 185 |
+
memcpy(out, (unsigned char *)&t, 8);
|
| 186 |
+
return out + 8;
|
| 187 |
+
#else
|
| 188 |
+
*out++ = (val >> 56) & 0xff;
|
| 189 |
+
*out++ = (val >> 48) & 0xff;
|
| 190 |
+
*out++ = (val >> 40) & 0xff;
|
| 191 |
+
*out++ = (val >> 32) & 0xff;
|
| 192 |
+
*out++ = (val >> 24) & 0xff;
|
| 193 |
+
*out++ = (val >> 16) & 0xff;
|
| 194 |
+
*out++ = (val >> 8) & 0xff;
|
| 195 |
+
*out++ = (val & 0xff);
|
| 196 |
+
return out;
|
| 197 |
+
#endif
|
| 198 |
+
}
|
| 199 |
+
|
| 200 |
+
static ossl_inline ossl_unused const unsigned char *
|
| 201 |
+
OPENSSL_load_u16_le(uint16_t *val, const unsigned char *in)
|
| 202 |
+
{
|
| 203 |
+
#ifdef OSSL_LE16TOH
|
| 204 |
+
uint16_t t;
|
| 205 |
+
|
| 206 |
+
memcpy((unsigned char *)&t, in, 2);
|
| 207 |
+
*val = OSSL_LE16TOH(t);
|
| 208 |
+
return in + 2;
|
| 209 |
+
#else
|
| 210 |
+
uint16_t b0 = *in++;
|
| 211 |
+
uint16_t b1 = *in++;
|
| 212 |
+
|
| 213 |
+
*val = b0 | (b1 << 8);
|
| 214 |
+
return in;
|
| 215 |
+
#endif
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
+
static ossl_inline ossl_unused const unsigned char *
|
| 219 |
+
OPENSSL_load_u16_be(uint16_t *val, const unsigned char *in)
|
| 220 |
+
{
|
| 221 |
+
#ifdef OSSL_LE16TOH
|
| 222 |
+
uint16_t t;
|
| 223 |
+
|
| 224 |
+
memcpy((unsigned char *)&t, in, 2);
|
| 225 |
+
*val = OSSL_BE16TOH(t);
|
| 226 |
+
return in + 2;
|
| 227 |
+
#else
|
| 228 |
+
uint16_t b1 = *in++;
|
| 229 |
+
uint16_t b0 = *in++;
|
| 230 |
+
|
| 231 |
+
*val = b0 | (b1 << 8);
|
| 232 |
+
return in;
|
| 233 |
+
#endif
|
| 234 |
+
}
|
| 235 |
+
|
| 236 |
+
static ossl_inline ossl_unused const unsigned char *
|
| 237 |
+
OPENSSL_load_u32_le(uint32_t *val, const unsigned char *in)
|
| 238 |
+
{
|
| 239 |
+
#ifdef OSSL_LE32TOH
|
| 240 |
+
uint32_t t;
|
| 241 |
+
|
| 242 |
+
memcpy((unsigned char *)&t, in, 4);
|
| 243 |
+
*val = OSSL_LE32TOH(t);
|
| 244 |
+
return in + 4;
|
| 245 |
+
#else
|
| 246 |
+
uint32_t b0 = *in++;
|
| 247 |
+
uint32_t b1 = *in++;
|
| 248 |
+
uint32_t b2 = *in++;
|
| 249 |
+
uint32_t b3 = *in++;
|
| 250 |
+
|
| 251 |
+
*val = b0 | (b1 << 8) | (b2 << 16) | (b3 << 24);
|
| 252 |
+
return in;
|
| 253 |
+
#endif
|
| 254 |
+
}
|
| 255 |
+
|
| 256 |
+
static ossl_inline ossl_unused const unsigned char *
|
| 257 |
+
OPENSSL_load_u32_be(uint32_t *val, const unsigned char *in)
|
| 258 |
+
{
|
| 259 |
+
#ifdef OSSL_LE32TOH
|
| 260 |
+
uint32_t t;
|
| 261 |
+
|
| 262 |
+
memcpy((unsigned char *)&t, in, 4);
|
| 263 |
+
*val = OSSL_BE32TOH(t);
|
| 264 |
+
return in + 4;
|
| 265 |
+
#else
|
| 266 |
+
uint32_t b3 = *in++;
|
| 267 |
+
uint32_t b2 = *in++;
|
| 268 |
+
uint32_t b1 = *in++;
|
| 269 |
+
uint32_t b0 = *in++;
|
| 270 |
+
|
| 271 |
+
*val = b0 | (b1 << 8) | (b2 << 16) | (b3 << 24);
|
| 272 |
+
return in;
|
| 273 |
+
#endif
|
| 274 |
+
}
|
| 275 |
+
|
| 276 |
+
static ossl_inline ossl_unused const unsigned char *
|
| 277 |
+
OPENSSL_load_u64_le(uint64_t *val, const unsigned char *in)
|
| 278 |
+
{
|
| 279 |
+
#ifdef OSSL_LE64TOH
|
| 280 |
+
uint64_t t;
|
| 281 |
+
|
| 282 |
+
memcpy((unsigned char *)&t, in, 8);
|
| 283 |
+
*val = OSSL_LE64TOH(t);
|
| 284 |
+
return in + 8;
|
| 285 |
+
#else
|
| 286 |
+
uint64_t b0 = *in++;
|
| 287 |
+
uint64_t b1 = *in++;
|
| 288 |
+
uint64_t b2 = *in++;
|
| 289 |
+
uint64_t b3 = *in++;
|
| 290 |
+
uint64_t b4 = *in++;
|
| 291 |
+
uint64_t b5 = *in++;
|
| 292 |
+
uint64_t b6 = *in++;
|
| 293 |
+
uint64_t b7 = *in++;
|
| 294 |
+
|
| 295 |
+
*val = b0 | (b1 << 8) | (b2 << 16) | (b3 << 24)
|
| 296 |
+
| (b4 << 32) | (b5 << 40) | (b6 << 48) | (b7 << 56);
|
| 297 |
+
return in;
|
| 298 |
+
#endif
|
| 299 |
+
}
|
| 300 |
+
|
| 301 |
+
static ossl_inline ossl_unused const unsigned char *
|
| 302 |
+
OPENSSL_load_u64_be(uint64_t *val, const unsigned char *in)
|
| 303 |
+
{
|
| 304 |
+
#ifdef OSSL_LE64TOH
|
| 305 |
+
uint64_t t;
|
| 306 |
+
|
| 307 |
+
memcpy((unsigned char *)&t, in, 8);
|
| 308 |
+
*val = OSSL_BE64TOH(t);
|
| 309 |
+
return in + 8;
|
| 310 |
+
#else
|
| 311 |
+
uint64_t b7 = *in++;
|
| 312 |
+
uint64_t b6 = *in++;
|
| 313 |
+
uint64_t b5 = *in++;
|
| 314 |
+
uint64_t b4 = *in++;
|
| 315 |
+
uint64_t b3 = *in++;
|
| 316 |
+
uint64_t b2 = *in++;
|
| 317 |
+
uint64_t b1 = *in++;
|
| 318 |
+
uint64_t b0 = *in++;
|
| 319 |
+
|
| 320 |
+
*val = b0 | (b1 << 8) | (b2 << 16) | (b3 << 24)
|
| 321 |
+
| (b4 << 32) | (b5 << 40) | (b6 << 48) | (b7 << 56);
|
| 322 |
+
return in;
|
| 323 |
+
#endif
|
| 324 |
+
}
|
| 325 |
+
|
| 326 |
+
#undef OSSL_HTOBE16
|
| 327 |
+
#undef OSSL_HTOBE32
|
| 328 |
+
#undef OSSL_HTOBE64
|
| 329 |
+
#undef OSSL_BE16TOH
|
| 330 |
+
#undef OSSL_BE32TOH
|
| 331 |
+
#undef OSSL_BE64TOH
|
| 332 |
+
#undef OSSL_HTOLE16
|
| 333 |
+
#undef OSSL_HTOLE32
|
| 334 |
+
#undef OSSL_HTOLE64
|
| 335 |
+
#undef OSSL_LE16TOH
|
| 336 |
+
#undef OSSL_LE32TOH
|
| 337 |
+
#undef OSSL_LE64TOH
|
| 338 |
+
|
| 339 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/camellia.h
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2006-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 OPENSSL_CAMELLIA_H
|
| 11 |
+
#define OPENSSL_CAMELLIA_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_CAMELLIA_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#include <openssl/opensslconf.h>
|
| 20 |
+
|
| 21 |
+
#ifndef OPENSSL_NO_CAMELLIA
|
| 22 |
+
#include <stddef.h>
|
| 23 |
+
#ifdef __cplusplus
|
| 24 |
+
extern "C" {
|
| 25 |
+
#endif
|
| 26 |
+
|
| 27 |
+
#define CAMELLIA_BLOCK_SIZE 16
|
| 28 |
+
|
| 29 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 30 |
+
|
| 31 |
+
#define CAMELLIA_ENCRYPT 1
|
| 32 |
+
#define CAMELLIA_DECRYPT 0
|
| 33 |
+
|
| 34 |
+
/*
|
| 35 |
+
* Because array size can't be a const in C, the following two are macros.
|
| 36 |
+
* Both sizes are in bytes.
|
| 37 |
+
*/
|
| 38 |
+
|
| 39 |
+
/* This should be a hidden type, but EVP requires that the size be known */
|
| 40 |
+
|
| 41 |
+
#define CAMELLIA_TABLE_BYTE_LEN 272
|
| 42 |
+
#define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / 4)
|
| 43 |
+
|
| 44 |
+
typedef unsigned int KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN]; /* to match
|
| 45 |
+
* with WORD */
|
| 46 |
+
|
| 47 |
+
struct camellia_key_st {
|
| 48 |
+
union {
|
| 49 |
+
double d; /* ensures 64-bit align */
|
| 50 |
+
KEY_TABLE_TYPE rd_key;
|
| 51 |
+
} u;
|
| 52 |
+
int grand_rounds;
|
| 53 |
+
};
|
| 54 |
+
typedef struct camellia_key_st CAMELLIA_KEY;
|
| 55 |
+
|
| 56 |
+
#endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
| 57 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 58 |
+
OSSL_DEPRECATEDIN_3_0 int Camellia_set_key(const unsigned char *userKey,
|
| 59 |
+
const int bits,
|
| 60 |
+
CAMELLIA_KEY *key);
|
| 61 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_encrypt(const unsigned char *in,
|
| 62 |
+
unsigned char *out,
|
| 63 |
+
const CAMELLIA_KEY *key);
|
| 64 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_decrypt(const unsigned char *in,
|
| 65 |
+
unsigned char *out,
|
| 66 |
+
const CAMELLIA_KEY *key);
|
| 67 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_ecb_encrypt(const unsigned char *in,
|
| 68 |
+
unsigned char *out,
|
| 69 |
+
const CAMELLIA_KEY *key,
|
| 70 |
+
const int enc);
|
| 71 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_cbc_encrypt(const unsigned char *in,
|
| 72 |
+
unsigned char *out,
|
| 73 |
+
size_t length,
|
| 74 |
+
const CAMELLIA_KEY *key,
|
| 75 |
+
unsigned char *ivec,
|
| 76 |
+
const int enc);
|
| 77 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_cfb128_encrypt(const unsigned char *in,
|
| 78 |
+
unsigned char *out,
|
| 79 |
+
size_t length,
|
| 80 |
+
const CAMELLIA_KEY *key,
|
| 81 |
+
unsigned char *ivec,
|
| 82 |
+
int *num,
|
| 83 |
+
const int enc);
|
| 84 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_cfb1_encrypt(const unsigned char *in,
|
| 85 |
+
unsigned char *out,
|
| 86 |
+
size_t length,
|
| 87 |
+
const CAMELLIA_KEY *key,
|
| 88 |
+
unsigned char *ivec,
|
| 89 |
+
int *num,
|
| 90 |
+
const int enc);
|
| 91 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_cfb8_encrypt(const unsigned char *in,
|
| 92 |
+
unsigned char *out,
|
| 93 |
+
size_t length,
|
| 94 |
+
const CAMELLIA_KEY *key,
|
| 95 |
+
unsigned char *ivec,
|
| 96 |
+
int *num,
|
| 97 |
+
const int enc);
|
| 98 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_ofb128_encrypt(const unsigned char *in,
|
| 99 |
+
unsigned char *out,
|
| 100 |
+
size_t length,
|
| 101 |
+
const CAMELLIA_KEY *key,
|
| 102 |
+
unsigned char *ivec,
|
| 103 |
+
int *num);
|
| 104 |
+
OSSL_DEPRECATEDIN_3_0
|
| 105 |
+
void Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out,
|
| 106 |
+
size_t length, const CAMELLIA_KEY *key,
|
| 107 |
+
unsigned char ivec[CAMELLIA_BLOCK_SIZE],
|
| 108 |
+
unsigned char ecount_buf[CAMELLIA_BLOCK_SIZE],
|
| 109 |
+
unsigned int *num);
|
| 110 |
+
#endif
|
| 111 |
+
|
| 112 |
+
#ifdef __cplusplus
|
| 113 |
+
}
|
| 114 |
+
#endif
|
| 115 |
+
#endif
|
| 116 |
+
|
| 117 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/cast.h
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-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 OPENSSL_CAST_H
|
| 11 |
+
#define OPENSSL_CAST_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_CAST_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#include <openssl/opensslconf.h>
|
| 20 |
+
|
| 21 |
+
#ifndef OPENSSL_NO_CAST
|
| 22 |
+
#ifdef __cplusplus
|
| 23 |
+
extern "C" {
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
#define CAST_BLOCK 8
|
| 27 |
+
#define CAST_KEY_LENGTH 16
|
| 28 |
+
|
| 29 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 30 |
+
|
| 31 |
+
#define CAST_ENCRYPT 1
|
| 32 |
+
#define CAST_DECRYPT 0
|
| 33 |
+
|
| 34 |
+
#define CAST_LONG unsigned int
|
| 35 |
+
|
| 36 |
+
typedef struct cast_key_st {
|
| 37 |
+
CAST_LONG data[32];
|
| 38 |
+
int short_key; /* Use reduced rounds for short key */
|
| 39 |
+
} CAST_KEY;
|
| 40 |
+
|
| 41 |
+
#endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
| 42 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 43 |
+
OSSL_DEPRECATEDIN_3_0
|
| 44 |
+
void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data);
|
| 45 |
+
OSSL_DEPRECATEDIN_3_0
|
| 46 |
+
void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out,
|
| 47 |
+
const CAST_KEY *key, int enc);
|
| 48 |
+
OSSL_DEPRECATEDIN_3_0
|
| 49 |
+
void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key);
|
| 50 |
+
OSSL_DEPRECATEDIN_3_0
|
| 51 |
+
void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key);
|
| 52 |
+
OSSL_DEPRECATEDIN_3_0
|
| 53 |
+
void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
| 54 |
+
long length, const CAST_KEY *ks, unsigned char *iv,
|
| 55 |
+
int enc);
|
| 56 |
+
OSSL_DEPRECATEDIN_3_0
|
| 57 |
+
void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out,
|
| 58 |
+
long length, const CAST_KEY *schedule,
|
| 59 |
+
unsigned char *ivec, int *num, int enc);
|
| 60 |
+
OSSL_DEPRECATEDIN_3_0
|
| 61 |
+
void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out,
|
| 62 |
+
long length, const CAST_KEY *schedule,
|
| 63 |
+
unsigned char *ivec, int *num);
|
| 64 |
+
#endif
|
| 65 |
+
|
| 66 |
+
#ifdef __cplusplus
|
| 67 |
+
}
|
| 68 |
+
#endif
|
| 69 |
+
#endif
|
| 70 |
+
|
| 71 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/cmac.h
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2010-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 OPENSSL_CMAC_H
|
| 11 |
+
#define OPENSSL_CMAC_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_CMAC_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#ifndef OPENSSL_NO_CMAC
|
| 20 |
+
|
| 21 |
+
#ifdef __cplusplus
|
| 22 |
+
extern "C" {
|
| 23 |
+
#endif
|
| 24 |
+
|
| 25 |
+
#include <openssl/evp.h>
|
| 26 |
+
|
| 27 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 28 |
+
/* Opaque */
|
| 29 |
+
typedef struct CMAC_CTX_st CMAC_CTX;
|
| 30 |
+
#endif
|
| 31 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 32 |
+
OSSL_DEPRECATEDIN_3_0 CMAC_CTX *CMAC_CTX_new(void);
|
| 33 |
+
OSSL_DEPRECATEDIN_3_0 void CMAC_CTX_cleanup(CMAC_CTX *ctx);
|
| 34 |
+
OSSL_DEPRECATEDIN_3_0 void CMAC_CTX_free(CMAC_CTX *ctx);
|
| 35 |
+
OSSL_DEPRECATEDIN_3_0 EVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx);
|
| 36 |
+
OSSL_DEPRECATEDIN_3_0 int CMAC_CTX_copy(CMAC_CTX *out, const CMAC_CTX *in);
|
| 37 |
+
OSSL_DEPRECATEDIN_3_0 int CMAC_Init(CMAC_CTX *ctx,
|
| 38 |
+
const void *key, size_t keylen,
|
| 39 |
+
const EVP_CIPHER *cipher, ENGINE *impl);
|
| 40 |
+
OSSL_DEPRECATEDIN_3_0 int CMAC_Update(CMAC_CTX *ctx,
|
| 41 |
+
const void *data, size_t dlen);
|
| 42 |
+
OSSL_DEPRECATEDIN_3_0 int CMAC_Final(CMAC_CTX *ctx,
|
| 43 |
+
unsigned char *out, size_t *poutlen);
|
| 44 |
+
OSSL_DEPRECATEDIN_3_0 int CMAC_resume(CMAC_CTX *ctx);
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
#ifdef __cplusplus
|
| 48 |
+
}
|
| 49 |
+
#endif
|
| 50 |
+
|
| 51 |
+
#endif
|
| 52 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/cmp.h
ADDED
|
@@ -0,0 +1,739 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
* Copyright Nokia 2007-2019
|
| 7 |
+
* Copyright Siemens AG 2015-2019
|
| 8 |
+
*
|
| 9 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 10 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 11 |
+
* in the file LICENSE in the source distribution or at
|
| 12 |
+
* https://www.openssl.org/source/license.html
|
| 13 |
+
*/
|
| 14 |
+
|
| 15 |
+
/* clang-format off */
|
| 16 |
+
|
| 17 |
+
/* clang-format on */
|
| 18 |
+
|
| 19 |
+
#ifndef OPENSSL_CMP_H
|
| 20 |
+
#define OPENSSL_CMP_H
|
| 21 |
+
|
| 22 |
+
#include <openssl/opensslconf.h>
|
| 23 |
+
#ifndef OPENSSL_NO_CMP
|
| 24 |
+
|
| 25 |
+
#include <openssl/crmf.h>
|
| 26 |
+
#include <openssl/cmperr.h>
|
| 27 |
+
#include <openssl/cmp_util.h>
|
| 28 |
+
#include <openssl/http.h>
|
| 29 |
+
|
| 30 |
+
/* explicit #includes not strictly needed since implied by the above: */
|
| 31 |
+
#include <openssl/types.h>
|
| 32 |
+
#include <openssl/safestack.h>
|
| 33 |
+
#include <openssl/x509.h>
|
| 34 |
+
#include <openssl/x509v3.h>
|
| 35 |
+
|
| 36 |
+
#ifdef __cplusplus
|
| 37 |
+
extern "C" {
|
| 38 |
+
#endif
|
| 39 |
+
|
| 40 |
+
#define OSSL_CMP_PVNO_2 2
|
| 41 |
+
#define OSSL_CMP_PVNO_3 3
|
| 42 |
+
#define OSSL_CMP_PVNO OSSL_CMP_PVNO_2 /* v2 is the default */
|
| 43 |
+
|
| 44 |
+
/*-
|
| 45 |
+
* PKIFailureInfo ::= BIT STRING {
|
| 46 |
+
* -- since we can fail in more than one way!
|
| 47 |
+
* -- More codes may be added in the future if/when required.
|
| 48 |
+
* badAlg (0),
|
| 49 |
+
* -- unrecognized or unsupported Algorithm Identifier
|
| 50 |
+
* badMessageCheck (1),
|
| 51 |
+
* -- integrity check failed (e.g., signature did not verify)
|
| 52 |
+
* badRequest (2),
|
| 53 |
+
* -- transaction not permitted or supported
|
| 54 |
+
* badTime (3),
|
| 55 |
+
* -- messageTime was not sufficiently close to the system time,
|
| 56 |
+
* -- as defined by local policy
|
| 57 |
+
* badCertId (4),
|
| 58 |
+
* -- no certificate could be found matching the provided criteria
|
| 59 |
+
* badDataFormat (5),
|
| 60 |
+
* -- the data submitted has the wrong format
|
| 61 |
+
* wrongAuthority (6),
|
| 62 |
+
* -- the authority indicated in the request is different from the
|
| 63 |
+
* -- one creating the response token
|
| 64 |
+
* incorrectData (7),
|
| 65 |
+
* -- the requester's data is incorrect (for notary services)
|
| 66 |
+
* missingTimeStamp (8),
|
| 67 |
+
* -- when the timestamp is missing but should be there
|
| 68 |
+
* -- (by policy)
|
| 69 |
+
* badPOP (9),
|
| 70 |
+
* -- the proof-of-possession failed
|
| 71 |
+
* certRevoked (10),
|
| 72 |
+
* -- the certificate has already been revoked
|
| 73 |
+
* certConfirmed (11),
|
| 74 |
+
* -- the certificate has already been confirmed
|
| 75 |
+
* wrongIntegrity (12),
|
| 76 |
+
* -- invalid integrity, password based instead of signature or
|
| 77 |
+
* -- vice versa
|
| 78 |
+
* badRecipientNonce (13),
|
| 79 |
+
* -- invalid recipient nonce, either missing or wrong value
|
| 80 |
+
* timeNotAvailable (14),
|
| 81 |
+
* -- the TSA's time source is not available
|
| 82 |
+
* unacceptedPolicy (15),
|
| 83 |
+
* -- the requested TSA policy is not supported by the TSA.
|
| 84 |
+
* unacceptedExtension (16),
|
| 85 |
+
* -- the requested extension is not supported by the TSA.
|
| 86 |
+
* addInfoNotAvailable (17),
|
| 87 |
+
* -- the additional information requested could not be
|
| 88 |
+
* -- understood or is not available
|
| 89 |
+
* badSenderNonce (18),
|
| 90 |
+
* -- invalid sender nonce, either missing or wrong size
|
| 91 |
+
* badCertTemplate (19),
|
| 92 |
+
* -- invalid cert. template or missing mandatory information
|
| 93 |
+
* signerNotTrusted (20),
|
| 94 |
+
* -- signer of the message unknown or not trusted
|
| 95 |
+
* transactionIdInUse (21),
|
| 96 |
+
* -- the transaction identifier is already in use
|
| 97 |
+
* unsupportedVersion (22),
|
| 98 |
+
* -- the version of the message is not supported
|
| 99 |
+
* notAuthorized (23),
|
| 100 |
+
* -- the sender was not authorized to make the preceding
|
| 101 |
+
* -- request or perform the preceding action
|
| 102 |
+
* systemUnavail (24),
|
| 103 |
+
* -- the request cannot be handled due to system unavailability
|
| 104 |
+
* systemFailure (25),
|
| 105 |
+
* -- the request cannot be handled due to system failure
|
| 106 |
+
* duplicateCertReq (26)
|
| 107 |
+
* -- certificate cannot be issued because a duplicate
|
| 108 |
+
* -- certificate already exists
|
| 109 |
+
* }
|
| 110 |
+
*/
|
| 111 |
+
#define OSSL_CMP_PKIFAILUREINFO_badAlg 0
|
| 112 |
+
#define OSSL_CMP_PKIFAILUREINFO_badMessageCheck 1
|
| 113 |
+
#define OSSL_CMP_PKIFAILUREINFO_badRequest 2
|
| 114 |
+
#define OSSL_CMP_PKIFAILUREINFO_badTime 3
|
| 115 |
+
#define OSSL_CMP_PKIFAILUREINFO_badCertId 4
|
| 116 |
+
#define OSSL_CMP_PKIFAILUREINFO_badDataFormat 5
|
| 117 |
+
#define OSSL_CMP_PKIFAILUREINFO_wrongAuthority 6
|
| 118 |
+
#define OSSL_CMP_PKIFAILUREINFO_incorrectData 7
|
| 119 |
+
#define OSSL_CMP_PKIFAILUREINFO_missingTimeStamp 8
|
| 120 |
+
#define OSSL_CMP_PKIFAILUREINFO_badPOP 9
|
| 121 |
+
#define OSSL_CMP_PKIFAILUREINFO_certRevoked 10
|
| 122 |
+
#define OSSL_CMP_PKIFAILUREINFO_certConfirmed 11
|
| 123 |
+
#define OSSL_CMP_PKIFAILUREINFO_wrongIntegrity 12
|
| 124 |
+
#define OSSL_CMP_PKIFAILUREINFO_badRecipientNonce 13
|
| 125 |
+
#define OSSL_CMP_PKIFAILUREINFO_timeNotAvailable 14
|
| 126 |
+
#define OSSL_CMP_PKIFAILUREINFO_unacceptedPolicy 15
|
| 127 |
+
#define OSSL_CMP_PKIFAILUREINFO_unacceptedExtension 16
|
| 128 |
+
#define OSSL_CMP_PKIFAILUREINFO_addInfoNotAvailable 17
|
| 129 |
+
#define OSSL_CMP_PKIFAILUREINFO_badSenderNonce 18
|
| 130 |
+
#define OSSL_CMP_PKIFAILUREINFO_badCertTemplate 19
|
| 131 |
+
#define OSSL_CMP_PKIFAILUREINFO_signerNotTrusted 20
|
| 132 |
+
#define OSSL_CMP_PKIFAILUREINFO_transactionIdInUse 21
|
| 133 |
+
#define OSSL_CMP_PKIFAILUREINFO_unsupportedVersion 22
|
| 134 |
+
#define OSSL_CMP_PKIFAILUREINFO_notAuthorized 23
|
| 135 |
+
#define OSSL_CMP_PKIFAILUREINFO_systemUnavail 24
|
| 136 |
+
#define OSSL_CMP_PKIFAILUREINFO_systemFailure 25
|
| 137 |
+
#define OSSL_CMP_PKIFAILUREINFO_duplicateCertReq 26
|
| 138 |
+
#define OSSL_CMP_PKIFAILUREINFO_MAX 26
|
| 139 |
+
#define OSSL_CMP_PKIFAILUREINFO_MAX_BIT_PATTERN \
|
| 140 |
+
((1 << (OSSL_CMP_PKIFAILUREINFO_MAX + 1)) - 1)
|
| 141 |
+
#if OSSL_CMP_PKIFAILUREINFO_MAX_BIT_PATTERN > INT_MAX
|
| 142 |
+
#error CMP_PKIFAILUREINFO_MAX bit pattern does not fit in type int
|
| 143 |
+
#endif
|
| 144 |
+
typedef ASN1_BIT_STRING OSSL_CMP_PKIFAILUREINFO;
|
| 145 |
+
|
| 146 |
+
#define OSSL_CMP_CTX_FAILINFO_badAlg (1 << 0)
|
| 147 |
+
#define OSSL_CMP_CTX_FAILINFO_badMessageCheck (1 << 1)
|
| 148 |
+
#define OSSL_CMP_CTX_FAILINFO_badRequest (1 << 2)
|
| 149 |
+
#define OSSL_CMP_CTX_FAILINFO_badTime (1 << 3)
|
| 150 |
+
#define OSSL_CMP_CTX_FAILINFO_badCertId (1 << 4)
|
| 151 |
+
#define OSSL_CMP_CTX_FAILINFO_badDataFormat (1 << 5)
|
| 152 |
+
#define OSSL_CMP_CTX_FAILINFO_wrongAuthority (1 << 6)
|
| 153 |
+
#define OSSL_CMP_CTX_FAILINFO_incorrectData (1 << 7)
|
| 154 |
+
#define OSSL_CMP_CTX_FAILINFO_missingTimeStamp (1 << 8)
|
| 155 |
+
#define OSSL_CMP_CTX_FAILINFO_badPOP (1 << 9)
|
| 156 |
+
#define OSSL_CMP_CTX_FAILINFO_certRevoked (1 << 10)
|
| 157 |
+
#define OSSL_CMP_CTX_FAILINFO_certConfirmed (1 << 11)
|
| 158 |
+
#define OSSL_CMP_CTX_FAILINFO_wrongIntegrity (1 << 12)
|
| 159 |
+
#define OSSL_CMP_CTX_FAILINFO_badRecipientNonce (1 << 13)
|
| 160 |
+
#define OSSL_CMP_CTX_FAILINFO_timeNotAvailable (1 << 14)
|
| 161 |
+
#define OSSL_CMP_CTX_FAILINFO_unacceptedPolicy (1 << 15)
|
| 162 |
+
#define OSSL_CMP_CTX_FAILINFO_unacceptedExtension (1 << 16)
|
| 163 |
+
#define OSSL_CMP_CTX_FAILINFO_addInfoNotAvailable (1 << 17)
|
| 164 |
+
#define OSSL_CMP_CTX_FAILINFO_badSenderNonce (1 << 18)
|
| 165 |
+
#define OSSL_CMP_CTX_FAILINFO_badCertTemplate (1 << 19)
|
| 166 |
+
#define OSSL_CMP_CTX_FAILINFO_signerNotTrusted (1 << 20)
|
| 167 |
+
#define OSSL_CMP_CTX_FAILINFO_transactionIdInUse (1 << 21)
|
| 168 |
+
#define OSSL_CMP_CTX_FAILINFO_unsupportedVersion (1 << 22)
|
| 169 |
+
#define OSSL_CMP_CTX_FAILINFO_notAuthorized (1 << 23)
|
| 170 |
+
#define OSSL_CMP_CTX_FAILINFO_systemUnavail (1 << 24)
|
| 171 |
+
#define OSSL_CMP_CTX_FAILINFO_systemFailure (1 << 25)
|
| 172 |
+
#define OSSL_CMP_CTX_FAILINFO_duplicateCertReq (1 << 26)
|
| 173 |
+
|
| 174 |
+
/*-
|
| 175 |
+
* PKIStatus ::= INTEGER {
|
| 176 |
+
* accepted (0),
|
| 177 |
+
* -- you got exactly what you asked for
|
| 178 |
+
* grantedWithMods (1),
|
| 179 |
+
* -- you got something like what you asked for; the
|
| 180 |
+
* -- requester is responsible for ascertaining the differences
|
| 181 |
+
* rejection (2),
|
| 182 |
+
* -- you don't get it, more information elsewhere in the message
|
| 183 |
+
* waiting (3),
|
| 184 |
+
* -- the request body part has not yet been processed; expect to
|
| 185 |
+
* -- hear more later (note: proper handling of this status
|
| 186 |
+
* -- response MAY use the polling req/rep PKIMessages specified
|
| 187 |
+
* -- in Section 5.3.22; alternatively, polling in the underlying
|
| 188 |
+
* -- transport layer MAY have some utility in this regard)
|
| 189 |
+
* revocationWarning (4),
|
| 190 |
+
* -- this message contains a warning that a revocation is
|
| 191 |
+
* -- imminent
|
| 192 |
+
* revocationNotification (5),
|
| 193 |
+
* -- notification that a revocation has occurred
|
| 194 |
+
* keyUpdateWarning (6)
|
| 195 |
+
* -- update already done for the oldCertId specified in
|
| 196 |
+
* -- CertReqMsg
|
| 197 |
+
* }
|
| 198 |
+
*/
|
| 199 |
+
#define OSSL_CMP_PKISTATUS_request -3
|
| 200 |
+
#define OSSL_CMP_PKISTATUS_trans -2
|
| 201 |
+
#define OSSL_CMP_PKISTATUS_unspecified -1
|
| 202 |
+
#define OSSL_CMP_PKISTATUS_accepted 0
|
| 203 |
+
#define OSSL_CMP_PKISTATUS_grantedWithMods 1
|
| 204 |
+
#define OSSL_CMP_PKISTATUS_rejection 2
|
| 205 |
+
#define OSSL_CMP_PKISTATUS_waiting 3
|
| 206 |
+
#define OSSL_CMP_PKISTATUS_revocationWarning 4
|
| 207 |
+
#define OSSL_CMP_PKISTATUS_revocationNotification 5
|
| 208 |
+
#define OSSL_CMP_PKISTATUS_keyUpdateWarning 6
|
| 209 |
+
typedef ASN1_INTEGER OSSL_CMP_PKISTATUS;
|
| 210 |
+
|
| 211 |
+
DECLARE_ASN1_ITEM(OSSL_CMP_PKISTATUS)
|
| 212 |
+
|
| 213 |
+
#define OSSL_CMP_CERTORENCCERT_CERTIFICATE 0
|
| 214 |
+
#define OSSL_CMP_CERTORENCCERT_ENCRYPTEDCERT 1
|
| 215 |
+
|
| 216 |
+
/* data type declarations */
|
| 217 |
+
typedef struct ossl_cmp_ctx_st OSSL_CMP_CTX;
|
| 218 |
+
typedef struct ossl_cmp_pkiheader_st OSSL_CMP_PKIHEADER;
|
| 219 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CMP_PKIHEADER)
|
| 220 |
+
typedef struct ossl_cmp_msg_st OSSL_CMP_MSG;
|
| 221 |
+
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_MSG)
|
| 222 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS(OSSL_CMP_MSG, OSSL_CMP_MSG, OSSL_CMP_MSG)
|
| 223 |
+
typedef struct ossl_cmp_certstatus_st OSSL_CMP_CERTSTATUS;
|
| 224 |
+
/* clang-format off */
|
| 225 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTSTATUS, OSSL_CMP_CERTSTATUS, OSSL_CMP_CERTSTATUS)
|
| 226 |
+
#define sk_OSSL_CMP_CERTSTATUS_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 227 |
+
#define sk_OSSL_CMP_CERTSTATUS_value(sk, idx) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk), (idx)))
|
| 228 |
+
#define sk_OSSL_CMP_CERTSTATUS_new(cmp) ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_CERTSTATUS_compfunc_type(cmp)))
|
| 229 |
+
#define sk_OSSL_CMP_CERTSTATUS_new_null() ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_new_null())
|
| 230 |
+
#define sk_OSSL_CMP_CERTSTATUS_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_CERTSTATUS_compfunc_type(cmp), (n)))
|
| 231 |
+
#define sk_OSSL_CMP_CERTSTATUS_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), (n))
|
| 232 |
+
#define sk_OSSL_CMP_CERTSTATUS_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 233 |
+
#define sk_OSSL_CMP_CERTSTATUS_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 234 |
+
#define sk_OSSL_CMP_CERTSTATUS_delete(sk, i) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), (i)))
|
| 235 |
+
#define sk_OSSL_CMP_CERTSTATUS_delete_ptr(sk, ptr) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr)))
|
| 236 |
+
#define sk_OSSL_CMP_CERTSTATUS_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr))
|
| 237 |
+
#define sk_OSSL_CMP_CERTSTATUS_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr))
|
| 238 |
+
#define sk_OSSL_CMP_CERTSTATUS_pop(sk) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk)))
|
| 239 |
+
#define sk_OSSL_CMP_CERTSTATUS_shift(sk) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk)))
|
| 240 |
+
#define sk_OSSL_CMP_CERTSTATUS_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk),ossl_check_OSSL_CMP_CERTSTATUS_freefunc_type(freefunc))
|
| 241 |
+
#define sk_OSSL_CMP_CERTSTATUS_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr), (idx))
|
| 242 |
+
#define sk_OSSL_CMP_CERTSTATUS_set(sk, idx, ptr) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_set(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), (idx), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr)))
|
| 243 |
+
#define sk_OSSL_CMP_CERTSTATUS_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr))
|
| 244 |
+
#define sk_OSSL_CMP_CERTSTATUS_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr))
|
| 245 |
+
#define sk_OSSL_CMP_CERTSTATUS_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr), pnum)
|
| 246 |
+
#define sk_OSSL_CMP_CERTSTATUS_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 247 |
+
#define sk_OSSL_CMP_CERTSTATUS_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 248 |
+
#define sk_OSSL_CMP_CERTSTATUS_dup(sk) ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk)))
|
| 249 |
+
#define sk_OSSL_CMP_CERTSTATUS_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_CERTSTATUS_freefunc_type(freefunc)))
|
| 250 |
+
#define sk_OSSL_CMP_CERTSTATUS_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_CERTSTATUS_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_compfunc_type(cmp)))
|
| 251 |
+
|
| 252 |
+
/* clang-format on */
|
| 253 |
+
typedef struct ossl_cmp_itav_st OSSL_CMP_ITAV;
|
| 254 |
+
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_ITAV)
|
| 255 |
+
/* clang-format off */
|
| 256 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_ITAV, OSSL_CMP_ITAV, OSSL_CMP_ITAV)
|
| 257 |
+
#define sk_OSSL_CMP_ITAV_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk))
|
| 258 |
+
#define sk_OSSL_CMP_ITAV_value(sk, idx) ((OSSL_CMP_ITAV *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk), (idx)))
|
| 259 |
+
#define sk_OSSL_CMP_ITAV_new(cmp) ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_ITAV_compfunc_type(cmp)))
|
| 260 |
+
#define sk_OSSL_CMP_ITAV_new_null() ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_new_null())
|
| 261 |
+
#define sk_OSSL_CMP_ITAV_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_ITAV_compfunc_type(cmp), (n)))
|
| 262 |
+
#define sk_OSSL_CMP_ITAV_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_ITAV_sk_type(sk), (n))
|
| 263 |
+
#define sk_OSSL_CMP_ITAV_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_ITAV_sk_type(sk))
|
| 264 |
+
#define sk_OSSL_CMP_ITAV_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_ITAV_sk_type(sk))
|
| 265 |
+
#define sk_OSSL_CMP_ITAV_delete(sk, i) ((OSSL_CMP_ITAV *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_ITAV_sk_type(sk), (i)))
|
| 266 |
+
#define sk_OSSL_CMP_ITAV_delete_ptr(sk, ptr) ((OSSL_CMP_ITAV *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr)))
|
| 267 |
+
#define sk_OSSL_CMP_ITAV_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr))
|
| 268 |
+
#define sk_OSSL_CMP_ITAV_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr))
|
| 269 |
+
#define sk_OSSL_CMP_ITAV_pop(sk) ((OSSL_CMP_ITAV *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_ITAV_sk_type(sk)))
|
| 270 |
+
#define sk_OSSL_CMP_ITAV_shift(sk) ((OSSL_CMP_ITAV *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_ITAV_sk_type(sk)))
|
| 271 |
+
#define sk_OSSL_CMP_ITAV_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_ITAV_sk_type(sk),ossl_check_OSSL_CMP_ITAV_freefunc_type(freefunc))
|
| 272 |
+
#define sk_OSSL_CMP_ITAV_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr), (idx))
|
| 273 |
+
#define sk_OSSL_CMP_ITAV_set(sk, idx, ptr) ((OSSL_CMP_ITAV *)OPENSSL_sk_set(ossl_check_OSSL_CMP_ITAV_sk_type(sk), (idx), ossl_check_OSSL_CMP_ITAV_type(ptr)))
|
| 274 |
+
#define sk_OSSL_CMP_ITAV_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr))
|
| 275 |
+
#define sk_OSSL_CMP_ITAV_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr))
|
| 276 |
+
#define sk_OSSL_CMP_ITAV_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr), pnum)
|
| 277 |
+
#define sk_OSSL_CMP_ITAV_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_ITAV_sk_type(sk))
|
| 278 |
+
#define sk_OSSL_CMP_ITAV_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk))
|
| 279 |
+
#define sk_OSSL_CMP_ITAV_dup(sk) ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk)))
|
| 280 |
+
#define sk_OSSL_CMP_ITAV_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_ITAV_freefunc_type(freefunc)))
|
| 281 |
+
#define sk_OSSL_CMP_ITAV_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_ITAV_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_compfunc_type(cmp)))
|
| 282 |
+
|
| 283 |
+
/* clang-format on */
|
| 284 |
+
|
| 285 |
+
typedef struct ossl_cmp_crlstatus_st OSSL_CMP_CRLSTATUS;
|
| 286 |
+
/* clang-format off */
|
| 287 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CRLSTATUS, OSSL_CMP_CRLSTATUS, OSSL_CMP_CRLSTATUS)
|
| 288 |
+
#define sk_OSSL_CMP_CRLSTATUS_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
| 289 |
+
#define sk_OSSL_CMP_CRLSTATUS_value(sk, idx) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk), (idx)))
|
| 290 |
+
#define sk_OSSL_CMP_CRLSTATUS_new(cmp) ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_CRLSTATUS_compfunc_type(cmp)))
|
| 291 |
+
#define sk_OSSL_CMP_CRLSTATUS_new_null() ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_new_null())
|
| 292 |
+
#define sk_OSSL_CMP_CRLSTATUS_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_CRLSTATUS_compfunc_type(cmp), (n)))
|
| 293 |
+
#define sk_OSSL_CMP_CRLSTATUS_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), (n))
|
| 294 |
+
#define sk_OSSL_CMP_CRLSTATUS_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
| 295 |
+
#define sk_OSSL_CMP_CRLSTATUS_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
| 296 |
+
#define sk_OSSL_CMP_CRLSTATUS_delete(sk, i) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), (i)))
|
| 297 |
+
#define sk_OSSL_CMP_CRLSTATUS_delete_ptr(sk, ptr) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr)))
|
| 298 |
+
#define sk_OSSL_CMP_CRLSTATUS_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr))
|
| 299 |
+
#define sk_OSSL_CMP_CRLSTATUS_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr))
|
| 300 |
+
#define sk_OSSL_CMP_CRLSTATUS_pop(sk) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk)))
|
| 301 |
+
#define sk_OSSL_CMP_CRLSTATUS_shift(sk) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk)))
|
| 302 |
+
#define sk_OSSL_CMP_CRLSTATUS_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk),ossl_check_OSSL_CMP_CRLSTATUS_freefunc_type(freefunc))
|
| 303 |
+
#define sk_OSSL_CMP_CRLSTATUS_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr), (idx))
|
| 304 |
+
#define sk_OSSL_CMP_CRLSTATUS_set(sk, idx, ptr) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_set(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), (idx), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr)))
|
| 305 |
+
#define sk_OSSL_CMP_CRLSTATUS_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr))
|
| 306 |
+
#define sk_OSSL_CMP_CRLSTATUS_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr))
|
| 307 |
+
#define sk_OSSL_CMP_CRLSTATUS_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr), pnum)
|
| 308 |
+
#define sk_OSSL_CMP_CRLSTATUS_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
| 309 |
+
#define sk_OSSL_CMP_CRLSTATUS_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
| 310 |
+
#define sk_OSSL_CMP_CRLSTATUS_dup(sk) ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk)))
|
| 311 |
+
#define sk_OSSL_CMP_CRLSTATUS_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_CRLSTATUS_freefunc_type(freefunc)))
|
| 312 |
+
#define sk_OSSL_CMP_CRLSTATUS_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_CRLSTATUS_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_compfunc_type(cmp)))
|
| 313 |
+
|
| 314 |
+
/* clang-format on */
|
| 315 |
+
|
| 316 |
+
typedef OSSL_CRMF_ATTRIBUTETYPEANDVALUE OSSL_CMP_ATAV;
|
| 317 |
+
#define OSSL_CMP_ATAV_free OSSL_CRMF_ATTRIBUTETYPEANDVALUE_free
|
| 318 |
+
typedef STACK_OF(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) OSSL_CMP_ATAVS;
|
| 319 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CMP_ATAVS)
|
| 320 |
+
#define stack_st_OSSL_CMP_ATAV stack_st_OSSL_CRMF_ATTRIBUTETYPEANDVALUE
|
| 321 |
+
#define sk_OSSL_CMP_ATAV_num sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_num
|
| 322 |
+
#define sk_OSSL_CMP_ATAV_value sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_value
|
| 323 |
+
#define sk_OSSL_CMP_ATAV_push sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_push
|
| 324 |
+
#define sk_OSSL_CMP_ATAV_pop_free sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_pop_free
|
| 325 |
+
|
| 326 |
+
typedef struct ossl_cmp_revrepcontent_st OSSL_CMP_REVREPCONTENT;
|
| 327 |
+
typedef struct ossl_cmp_pkisi_st OSSL_CMP_PKISI;
|
| 328 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CMP_PKISI)
|
| 329 |
+
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_PKISI)
|
| 330 |
+
/* clang-format off */
|
| 331 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_PKISI, OSSL_CMP_PKISI, OSSL_CMP_PKISI)
|
| 332 |
+
#define sk_OSSL_CMP_PKISI_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk))
|
| 333 |
+
#define sk_OSSL_CMP_PKISI_value(sk, idx) ((OSSL_CMP_PKISI *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk), (idx)))
|
| 334 |
+
#define sk_OSSL_CMP_PKISI_new(cmp) ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_PKISI_compfunc_type(cmp)))
|
| 335 |
+
#define sk_OSSL_CMP_PKISI_new_null() ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_new_null())
|
| 336 |
+
#define sk_OSSL_CMP_PKISI_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_PKISI_compfunc_type(cmp), (n)))
|
| 337 |
+
#define sk_OSSL_CMP_PKISI_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_PKISI_sk_type(sk), (n))
|
| 338 |
+
#define sk_OSSL_CMP_PKISI_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_PKISI_sk_type(sk))
|
| 339 |
+
#define sk_OSSL_CMP_PKISI_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_PKISI_sk_type(sk))
|
| 340 |
+
#define sk_OSSL_CMP_PKISI_delete(sk, i) ((OSSL_CMP_PKISI *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_PKISI_sk_type(sk), (i)))
|
| 341 |
+
#define sk_OSSL_CMP_PKISI_delete_ptr(sk, ptr) ((OSSL_CMP_PKISI *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr)))
|
| 342 |
+
#define sk_OSSL_CMP_PKISI_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr))
|
| 343 |
+
#define sk_OSSL_CMP_PKISI_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr))
|
| 344 |
+
#define sk_OSSL_CMP_PKISI_pop(sk) ((OSSL_CMP_PKISI *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_PKISI_sk_type(sk)))
|
| 345 |
+
#define sk_OSSL_CMP_PKISI_shift(sk) ((OSSL_CMP_PKISI *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_PKISI_sk_type(sk)))
|
| 346 |
+
#define sk_OSSL_CMP_PKISI_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_PKISI_sk_type(sk),ossl_check_OSSL_CMP_PKISI_freefunc_type(freefunc))
|
| 347 |
+
#define sk_OSSL_CMP_PKISI_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr), (idx))
|
| 348 |
+
#define sk_OSSL_CMP_PKISI_set(sk, idx, ptr) ((OSSL_CMP_PKISI *)OPENSSL_sk_set(ossl_check_OSSL_CMP_PKISI_sk_type(sk), (idx), ossl_check_OSSL_CMP_PKISI_type(ptr)))
|
| 349 |
+
#define sk_OSSL_CMP_PKISI_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr))
|
| 350 |
+
#define sk_OSSL_CMP_PKISI_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr))
|
| 351 |
+
#define sk_OSSL_CMP_PKISI_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr), pnum)
|
| 352 |
+
#define sk_OSSL_CMP_PKISI_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_PKISI_sk_type(sk))
|
| 353 |
+
#define sk_OSSL_CMP_PKISI_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk))
|
| 354 |
+
#define sk_OSSL_CMP_PKISI_dup(sk) ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk)))
|
| 355 |
+
#define sk_OSSL_CMP_PKISI_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_PKISI_freefunc_type(freefunc)))
|
| 356 |
+
#define sk_OSSL_CMP_PKISI_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_PKISI_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_compfunc_type(cmp)))
|
| 357 |
+
|
| 358 |
+
/* clang-format on */
|
| 359 |
+
typedef struct ossl_cmp_certrepmessage_st OSSL_CMP_CERTREPMESSAGE;
|
| 360 |
+
/* clang-format off */
|
| 361 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTREPMESSAGE, OSSL_CMP_CERTREPMESSAGE, OSSL_CMP_CERTREPMESSAGE)
|
| 362 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 363 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_value(sk, idx) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), (idx)))
|
| 364 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_new(cmp) ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_CERTREPMESSAGE_compfunc_type(cmp)))
|
| 365 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_new_null() ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_new_null())
|
| 366 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_CERTREPMESSAGE_compfunc_type(cmp), (n)))
|
| 367 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), (n))
|
| 368 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 369 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 370 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_delete(sk, i) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), (i)))
|
| 371 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_delete_ptr(sk, ptr) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr)))
|
| 372 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr))
|
| 373 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr))
|
| 374 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_pop(sk) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk)))
|
| 375 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_shift(sk) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk)))
|
| 376 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk),ossl_check_OSSL_CMP_CERTREPMESSAGE_freefunc_type(freefunc))
|
| 377 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr), (idx))
|
| 378 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_set(sk, idx, ptr) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_set(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), (idx), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr)))
|
| 379 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr))
|
| 380 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr))
|
| 381 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr), pnum)
|
| 382 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 383 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 384 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_dup(sk) ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk)))
|
| 385 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_CERTREPMESSAGE_freefunc_type(freefunc)))
|
| 386 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_CERTREPMESSAGE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_compfunc_type(cmp)))
|
| 387 |
+
|
| 388 |
+
/* clang-format on */
|
| 389 |
+
typedef struct ossl_cmp_pollrep_st OSSL_CMP_POLLREP;
|
| 390 |
+
typedef STACK_OF(OSSL_CMP_POLLREP) OSSL_CMP_POLLREPCONTENT;
|
| 391 |
+
typedef struct ossl_cmp_certresponse_st OSSL_CMP_CERTRESPONSE;
|
| 392 |
+
/* clang-format off */
|
| 393 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTRESPONSE, OSSL_CMP_CERTRESPONSE, OSSL_CMP_CERTRESPONSE)
|
| 394 |
+
#define sk_OSSL_CMP_CERTRESPONSE_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 395 |
+
#define sk_OSSL_CMP_CERTRESPONSE_value(sk, idx) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk), (idx)))
|
| 396 |
+
#define sk_OSSL_CMP_CERTRESPONSE_new(cmp) ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_CERTRESPONSE_compfunc_type(cmp)))
|
| 397 |
+
#define sk_OSSL_CMP_CERTRESPONSE_new_null() ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_new_null())
|
| 398 |
+
#define sk_OSSL_CMP_CERTRESPONSE_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_CERTRESPONSE_compfunc_type(cmp), (n)))
|
| 399 |
+
#define sk_OSSL_CMP_CERTRESPONSE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), (n))
|
| 400 |
+
#define sk_OSSL_CMP_CERTRESPONSE_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 401 |
+
#define sk_OSSL_CMP_CERTRESPONSE_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 402 |
+
#define sk_OSSL_CMP_CERTRESPONSE_delete(sk, i) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), (i)))
|
| 403 |
+
#define sk_OSSL_CMP_CERTRESPONSE_delete_ptr(sk, ptr) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr)))
|
| 404 |
+
#define sk_OSSL_CMP_CERTRESPONSE_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr))
|
| 405 |
+
#define sk_OSSL_CMP_CERTRESPONSE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr))
|
| 406 |
+
#define sk_OSSL_CMP_CERTRESPONSE_pop(sk) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk)))
|
| 407 |
+
#define sk_OSSL_CMP_CERTRESPONSE_shift(sk) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk)))
|
| 408 |
+
#define sk_OSSL_CMP_CERTRESPONSE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk),ossl_check_OSSL_CMP_CERTRESPONSE_freefunc_type(freefunc))
|
| 409 |
+
#define sk_OSSL_CMP_CERTRESPONSE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr), (idx))
|
| 410 |
+
#define sk_OSSL_CMP_CERTRESPONSE_set(sk, idx, ptr) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_set(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), (idx), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr)))
|
| 411 |
+
#define sk_OSSL_CMP_CERTRESPONSE_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr))
|
| 412 |
+
#define sk_OSSL_CMP_CERTRESPONSE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr))
|
| 413 |
+
#define sk_OSSL_CMP_CERTRESPONSE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr), pnum)
|
| 414 |
+
#define sk_OSSL_CMP_CERTRESPONSE_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 415 |
+
#define sk_OSSL_CMP_CERTRESPONSE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 416 |
+
#define sk_OSSL_CMP_CERTRESPONSE_dup(sk) ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk)))
|
| 417 |
+
#define sk_OSSL_CMP_CERTRESPONSE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_CERTRESPONSE_freefunc_type(freefunc)))
|
| 418 |
+
#define sk_OSSL_CMP_CERTRESPONSE_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_CERTRESPONSE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_compfunc_type(cmp)))
|
| 419 |
+
|
| 420 |
+
/* clang-format on */
|
| 421 |
+
typedef STACK_OF(ASN1_UTF8STRING) OSSL_CMP_PKIFREETEXT;
|
| 422 |
+
|
| 423 |
+
/*
|
| 424 |
+
* function DECLARATIONS
|
| 425 |
+
*/
|
| 426 |
+
|
| 427 |
+
/* from cmp_asn.c */
|
| 428 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_create(ASN1_OBJECT *type, ASN1_TYPE *value);
|
| 429 |
+
void OSSL_CMP_ITAV_set0(OSSL_CMP_ITAV *itav, ASN1_OBJECT *type,
|
| 430 |
+
ASN1_TYPE *value);
|
| 431 |
+
ASN1_OBJECT *OSSL_CMP_ITAV_get0_type(const OSSL_CMP_ITAV *itav);
|
| 432 |
+
ASN1_TYPE *OSSL_CMP_ITAV_get0_value(const OSSL_CMP_ITAV *itav);
|
| 433 |
+
int OSSL_CMP_ITAV_push0_stack_item(STACK_OF(OSSL_CMP_ITAV) **sk_p,
|
| 434 |
+
OSSL_CMP_ITAV *itav);
|
| 435 |
+
void OSSL_CMP_ITAV_free(OSSL_CMP_ITAV *itav);
|
| 436 |
+
|
| 437 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new0_certProfile(STACK_OF(ASN1_UTF8STRING)
|
| 438 |
+
*certProfile);
|
| 439 |
+
int OSSL_CMP_ITAV_get0_certProfile(const OSSL_CMP_ITAV *itav,
|
| 440 |
+
STACK_OF(ASN1_UTF8STRING) **out);
|
| 441 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_caCerts(const STACK_OF(X509) *caCerts);
|
| 442 |
+
int OSSL_CMP_ITAV_get0_caCerts(const OSSL_CMP_ITAV *itav, STACK_OF(X509) **out);
|
| 443 |
+
|
| 444 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_rootCaCert(const X509 *rootCaCert);
|
| 445 |
+
int OSSL_CMP_ITAV_get0_rootCaCert(const OSSL_CMP_ITAV *itav, X509 **out);
|
| 446 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_rootCaKeyUpdate(const X509 *newWithNew,
|
| 447 |
+
const X509 *newWithOld,
|
| 448 |
+
const X509 *oldWithNew);
|
| 449 |
+
int OSSL_CMP_ITAV_get0_rootCaKeyUpdate(const OSSL_CMP_ITAV *itav,
|
| 450 |
+
X509 **newWithNew,
|
| 451 |
+
X509 **newWithOld,
|
| 452 |
+
X509 **oldWithNew);
|
| 453 |
+
|
| 454 |
+
OSSL_CMP_CRLSTATUS *OSSL_CMP_CRLSTATUS_create(const X509_CRL *crl,
|
| 455 |
+
const X509 *cert, int only_DN);
|
| 456 |
+
OSSL_CMP_CRLSTATUS *OSSL_CMP_CRLSTATUS_new1(const DIST_POINT_NAME *dpn,
|
| 457 |
+
const GENERAL_NAMES *issuer,
|
| 458 |
+
const ASN1_TIME *thisUpdate);
|
| 459 |
+
int OSSL_CMP_CRLSTATUS_get0(const OSSL_CMP_CRLSTATUS *crlstatus,
|
| 460 |
+
DIST_POINT_NAME **dpn, GENERAL_NAMES **issuer,
|
| 461 |
+
ASN1_TIME **thisUpdate);
|
| 462 |
+
void OSSL_CMP_CRLSTATUS_free(OSSL_CMP_CRLSTATUS *crlstatus);
|
| 463 |
+
OSSL_CMP_ITAV
|
| 464 |
+
*OSSL_CMP_ITAV_new0_crlStatusList(STACK_OF(OSSL_CMP_CRLSTATUS) *crlStatusList);
|
| 465 |
+
int OSSL_CMP_ITAV_get0_crlStatusList(const OSSL_CMP_ITAV *itav,
|
| 466 |
+
STACK_OF(OSSL_CMP_CRLSTATUS) **out);
|
| 467 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_crls(const X509_CRL *crls);
|
| 468 |
+
int OSSL_CMP_ITAV_get0_crls(const OSSL_CMP_ITAV *it, STACK_OF(X509_CRL) **out);
|
| 469 |
+
OSSL_CMP_ITAV
|
| 470 |
+
*OSSL_CMP_ITAV_new0_certReqTemplate(OSSL_CRMF_CERTTEMPLATE *certTemplate,
|
| 471 |
+
OSSL_CMP_ATAVS *keySpec);
|
| 472 |
+
int OSSL_CMP_ITAV_get1_certReqTemplate(const OSSL_CMP_ITAV *itav,
|
| 473 |
+
OSSL_CRMF_CERTTEMPLATE **certTemplate,
|
| 474 |
+
OSSL_CMP_ATAVS **keySpec);
|
| 475 |
+
|
| 476 |
+
OSSL_CMP_ATAV *OSSL_CMP_ATAV_create(ASN1_OBJECT *type, ASN1_TYPE *value);
|
| 477 |
+
void OSSL_CMP_ATAV_set0(OSSL_CMP_ATAV *itav, ASN1_OBJECT *type,
|
| 478 |
+
ASN1_TYPE *value);
|
| 479 |
+
ASN1_OBJECT *OSSL_CMP_ATAV_get0_type(const OSSL_CMP_ATAV *itav);
|
| 480 |
+
ASN1_TYPE *OSSL_CMP_ATAV_get0_value(const OSSL_CMP_ATAV *itav);
|
| 481 |
+
OSSL_CMP_ATAV *OSSL_CMP_ATAV_new_algId(const X509_ALGOR *alg);
|
| 482 |
+
X509_ALGOR *OSSL_CMP_ATAV_get0_algId(const OSSL_CMP_ATAV *atav);
|
| 483 |
+
OSSL_CMP_ATAV *OSSL_CMP_ATAV_new_rsaKeyLen(int len);
|
| 484 |
+
int OSSL_CMP_ATAV_get_rsaKeyLen(const OSSL_CMP_ATAV *atav);
|
| 485 |
+
int OSSL_CMP_ATAV_push1(OSSL_CMP_ATAVS **sk_p, const OSSL_CMP_ATAV *atav);
|
| 486 |
+
|
| 487 |
+
void OSSL_CMP_MSG_free(OSSL_CMP_MSG *msg);
|
| 488 |
+
|
| 489 |
+
/* from cmp_ctx.c */
|
| 490 |
+
OSSL_CMP_CTX *OSSL_CMP_CTX_new(OSSL_LIB_CTX *libctx, const char *propq);
|
| 491 |
+
void OSSL_CMP_CTX_free(OSSL_CMP_CTX *ctx);
|
| 492 |
+
int OSSL_CMP_CTX_reinit(OSSL_CMP_CTX *ctx);
|
| 493 |
+
OSSL_LIB_CTX *OSSL_CMP_CTX_get0_libctx(const OSSL_CMP_CTX *ctx);
|
| 494 |
+
const char *OSSL_CMP_CTX_get0_propq(const OSSL_CMP_CTX *ctx);
|
| 495 |
+
/* CMP general options: */
|
| 496 |
+
#define OSSL_CMP_OPT_LOG_VERBOSITY 0
|
| 497 |
+
/* CMP transfer options: */
|
| 498 |
+
#define OSSL_CMP_OPT_KEEP_ALIVE 10
|
| 499 |
+
#define OSSL_CMP_OPT_MSG_TIMEOUT 11
|
| 500 |
+
#define OSSL_CMP_OPT_TOTAL_TIMEOUT 12
|
| 501 |
+
#define OSSL_CMP_OPT_USE_TLS 13
|
| 502 |
+
/* CMP request options: */
|
| 503 |
+
#define OSSL_CMP_OPT_VALIDITY_DAYS 20
|
| 504 |
+
#define OSSL_CMP_OPT_SUBJECTALTNAME_NODEFAULT 21
|
| 505 |
+
#define OSSL_CMP_OPT_SUBJECTALTNAME_CRITICAL 22
|
| 506 |
+
#define OSSL_CMP_OPT_POLICIES_CRITICAL 23
|
| 507 |
+
#define OSSL_CMP_OPT_POPO_METHOD 24
|
| 508 |
+
#define OSSL_CMP_OPT_IMPLICIT_CONFIRM 25
|
| 509 |
+
#define OSSL_CMP_OPT_DISABLE_CONFIRM 26
|
| 510 |
+
#define OSSL_CMP_OPT_REVOCATION_REASON 27
|
| 511 |
+
/* CMP protection options: */
|
| 512 |
+
#define OSSL_CMP_OPT_UNPROTECTED_SEND 30
|
| 513 |
+
#define OSSL_CMP_OPT_UNPROTECTED_ERRORS 31
|
| 514 |
+
#define OSSL_CMP_OPT_OWF_ALGNID 32
|
| 515 |
+
#define OSSL_CMP_OPT_MAC_ALGNID 33
|
| 516 |
+
#define OSSL_CMP_OPT_DIGEST_ALGNID 34
|
| 517 |
+
#define OSSL_CMP_OPT_IGNORE_KEYUSAGE 35
|
| 518 |
+
#define OSSL_CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR 36
|
| 519 |
+
#define OSSL_CMP_OPT_NO_CACHE_EXTRACERTS 37
|
| 520 |
+
int OSSL_CMP_CTX_set_option(OSSL_CMP_CTX *ctx, int opt, int val);
|
| 521 |
+
int OSSL_CMP_CTX_get_option(const OSSL_CMP_CTX *ctx, int opt);
|
| 522 |
+
/* CMP-specific callback for logging and outputting the error queue: */
|
| 523 |
+
int OSSL_CMP_CTX_set_log_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_log_cb_t cb);
|
| 524 |
+
#define OSSL_CMP_CTX_set_log_verbosity(ctx, level) \
|
| 525 |
+
OSSL_CMP_CTX_set_option(ctx, OSSL_CMP_OPT_LOG_VERBOSITY, level)
|
| 526 |
+
void OSSL_CMP_CTX_print_errors(const OSSL_CMP_CTX *ctx);
|
| 527 |
+
/* message transfer: */
|
| 528 |
+
int OSSL_CMP_CTX_set1_serverPath(OSSL_CMP_CTX *ctx, const char *path);
|
| 529 |
+
int OSSL_CMP_CTX_set1_server(OSSL_CMP_CTX *ctx, const char *address);
|
| 530 |
+
int OSSL_CMP_CTX_set_serverPort(OSSL_CMP_CTX *ctx, int port);
|
| 531 |
+
int OSSL_CMP_CTX_set1_proxy(OSSL_CMP_CTX *ctx, const char *name);
|
| 532 |
+
int OSSL_CMP_CTX_set1_no_proxy(OSSL_CMP_CTX *ctx, const char *names);
|
| 533 |
+
#ifndef OPENSSL_NO_HTTP
|
| 534 |
+
int OSSL_CMP_CTX_set_http_cb(OSSL_CMP_CTX *ctx, OSSL_HTTP_bio_cb_t cb);
|
| 535 |
+
int OSSL_CMP_CTX_set_http_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
| 536 |
+
void *OSSL_CMP_CTX_get_http_cb_arg(const OSSL_CMP_CTX *ctx);
|
| 537 |
+
#endif
|
| 538 |
+
typedef OSSL_CMP_MSG *(*OSSL_CMP_transfer_cb_t)(OSSL_CMP_CTX *ctx,
|
| 539 |
+
const OSSL_CMP_MSG *req);
|
| 540 |
+
int OSSL_CMP_CTX_set_transfer_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_transfer_cb_t cb);
|
| 541 |
+
int OSSL_CMP_CTX_set_transfer_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
| 542 |
+
void *OSSL_CMP_CTX_get_transfer_cb_arg(const OSSL_CMP_CTX *ctx);
|
| 543 |
+
/* server authentication: */
|
| 544 |
+
int OSSL_CMP_CTX_set1_srvCert(OSSL_CMP_CTX *ctx, X509 *cert);
|
| 545 |
+
int OSSL_CMP_CTX_set1_expected_sender(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
| 546 |
+
int OSSL_CMP_CTX_set0_trustedStore(OSSL_CMP_CTX *ctx, X509_STORE *store);
|
| 547 |
+
#define OSSL_CMP_CTX_set0_trusted OSSL_CMP_CTX_set0_trustedStore
|
| 548 |
+
X509_STORE *OSSL_CMP_CTX_get0_trustedStore(const OSSL_CMP_CTX *ctx);
|
| 549 |
+
#define OSSL_CMP_CTX_get0_trusted OSSL_CMP_CTX_get0_trustedStore
|
| 550 |
+
int OSSL_CMP_CTX_set1_untrusted(OSSL_CMP_CTX *ctx, STACK_OF(X509) *certs);
|
| 551 |
+
STACK_OF(X509) *OSSL_CMP_CTX_get0_untrusted(const OSSL_CMP_CTX *ctx);
|
| 552 |
+
/* client authentication: */
|
| 553 |
+
int OSSL_CMP_CTX_set1_cert(OSSL_CMP_CTX *ctx, X509 *cert);
|
| 554 |
+
int OSSL_CMP_CTX_build_cert_chain(OSSL_CMP_CTX *ctx, X509_STORE *own_trusted,
|
| 555 |
+
STACK_OF(X509) *candidates);
|
| 556 |
+
int OSSL_CMP_CTX_set1_pkey(OSSL_CMP_CTX *ctx, EVP_PKEY *pkey);
|
| 557 |
+
int OSSL_CMP_CTX_set1_referenceValue(OSSL_CMP_CTX *ctx,
|
| 558 |
+
const unsigned char *ref, int len);
|
| 559 |
+
int OSSL_CMP_CTX_set1_secretValue(OSSL_CMP_CTX *ctx,
|
| 560 |
+
const unsigned char *sec, int len);
|
| 561 |
+
/* CMP message header and extra certificates: */
|
| 562 |
+
int OSSL_CMP_CTX_set1_recipient(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
| 563 |
+
int OSSL_CMP_CTX_push0_geninfo_ITAV(OSSL_CMP_CTX *ctx, OSSL_CMP_ITAV *itav);
|
| 564 |
+
int OSSL_CMP_CTX_reset_geninfo_ITAVs(OSSL_CMP_CTX *ctx);
|
| 565 |
+
STACK_OF(OSSL_CMP_ITAV)
|
| 566 |
+
*OSSL_CMP_CTX_get0_geninfo_ITAVs(const OSSL_CMP_CTX *ctx);
|
| 567 |
+
int OSSL_CMP_CTX_set1_extraCertsOut(OSSL_CMP_CTX *ctx,
|
| 568 |
+
STACK_OF(X509) *extraCertsOut);
|
| 569 |
+
/* certificate template: */
|
| 570 |
+
int OSSL_CMP_CTX_set0_newPkey(OSSL_CMP_CTX *ctx, int priv, EVP_PKEY *pkey);
|
| 571 |
+
EVP_PKEY *OSSL_CMP_CTX_get0_newPkey(const OSSL_CMP_CTX *ctx, int priv);
|
| 572 |
+
int OSSL_CMP_CTX_set1_issuer(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
| 573 |
+
int OSSL_CMP_CTX_set1_serialNumber(OSSL_CMP_CTX *ctx, const ASN1_INTEGER *sn);
|
| 574 |
+
int OSSL_CMP_CTX_set1_subjectName(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
| 575 |
+
int OSSL_CMP_CTX_push1_subjectAltName(OSSL_CMP_CTX *ctx,
|
| 576 |
+
const GENERAL_NAME *name);
|
| 577 |
+
int OSSL_CMP_CTX_set0_reqExtensions(OSSL_CMP_CTX *ctx, X509_EXTENSIONS *exts);
|
| 578 |
+
int OSSL_CMP_CTX_reqExtensions_have_SAN(OSSL_CMP_CTX *ctx);
|
| 579 |
+
int OSSL_CMP_CTX_push0_policy(OSSL_CMP_CTX *ctx, POLICYINFO *pinfo);
|
| 580 |
+
int OSSL_CMP_CTX_set1_oldCert(OSSL_CMP_CTX *ctx, X509 *cert);
|
| 581 |
+
int OSSL_CMP_CTX_set1_p10CSR(OSSL_CMP_CTX *ctx, const X509_REQ *csr);
|
| 582 |
+
/* misc body contents: */
|
| 583 |
+
int OSSL_CMP_CTX_push0_genm_ITAV(OSSL_CMP_CTX *ctx, OSSL_CMP_ITAV *itav);
|
| 584 |
+
/* certificate confirmation: */
|
| 585 |
+
typedef int (*OSSL_CMP_certConf_cb_t)(OSSL_CMP_CTX *ctx, X509 *cert,
|
| 586 |
+
int fail_info, const char **txt);
|
| 587 |
+
int OSSL_CMP_certConf_cb(OSSL_CMP_CTX *ctx, X509 *cert, int fail_info,
|
| 588 |
+
const char **text);
|
| 589 |
+
int OSSL_CMP_CTX_set_certConf_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_certConf_cb_t cb);
|
| 590 |
+
int OSSL_CMP_CTX_set_certConf_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
| 591 |
+
void *OSSL_CMP_CTX_get_certConf_cb_arg(const OSSL_CMP_CTX *ctx);
|
| 592 |
+
/* result fetching: */
|
| 593 |
+
int OSSL_CMP_CTX_get_status(const OSSL_CMP_CTX *ctx);
|
| 594 |
+
OSSL_CMP_PKIFREETEXT *OSSL_CMP_CTX_get0_statusString(const OSSL_CMP_CTX *ctx);
|
| 595 |
+
int OSSL_CMP_CTX_get_failInfoCode(const OSSL_CMP_CTX *ctx);
|
| 596 |
+
#define OSSL_CMP_PKISI_BUFLEN 1024
|
| 597 |
+
X509 *OSSL_CMP_CTX_get0_validatedSrvCert(const OSSL_CMP_CTX *ctx);
|
| 598 |
+
X509 *OSSL_CMP_CTX_get0_newCert(const OSSL_CMP_CTX *ctx);
|
| 599 |
+
STACK_OF(X509) *OSSL_CMP_CTX_get1_newChain(const OSSL_CMP_CTX *ctx);
|
| 600 |
+
STACK_OF(X509) *OSSL_CMP_CTX_get1_caPubs(const OSSL_CMP_CTX *ctx);
|
| 601 |
+
STACK_OF(X509) *OSSL_CMP_CTX_get1_extraCertsIn(const OSSL_CMP_CTX *ctx);
|
| 602 |
+
int OSSL_CMP_CTX_set1_transactionID(OSSL_CMP_CTX *ctx,
|
| 603 |
+
const ASN1_OCTET_STRING *id);
|
| 604 |
+
int OSSL_CMP_CTX_set1_senderNonce(OSSL_CMP_CTX *ctx,
|
| 605 |
+
const ASN1_OCTET_STRING *nonce);
|
| 606 |
+
|
| 607 |
+
/* from cmp_status.c */
|
| 608 |
+
char *OSSL_CMP_CTX_snprint_PKIStatus(const OSSL_CMP_CTX *ctx, char *buf,
|
| 609 |
+
size_t bufsize);
|
| 610 |
+
char *OSSL_CMP_snprint_PKIStatusInfo(const OSSL_CMP_PKISI *statusInfo,
|
| 611 |
+
char *buf, size_t bufsize);
|
| 612 |
+
OSSL_CMP_PKISI *
|
| 613 |
+
OSSL_CMP_STATUSINFO_new(int status, int fail_info, const char *text);
|
| 614 |
+
|
| 615 |
+
/* from cmp_hdr.c */
|
| 616 |
+
ASN1_OCTET_STRING *OSSL_CMP_HDR_get0_transactionID(const OSSL_CMP_PKIHEADER *hdr);
|
| 617 |
+
ASN1_OCTET_STRING *OSSL_CMP_HDR_get0_recipNonce(const OSSL_CMP_PKIHEADER *hdr);
|
| 618 |
+
STACK_OF(OSSL_CMP_ITAV)
|
| 619 |
+
*OSSL_CMP_HDR_get0_geninfo_ITAVs(const OSSL_CMP_PKIHEADER *hdr);
|
| 620 |
+
|
| 621 |
+
/* from cmp_msg.c */
|
| 622 |
+
OSSL_CMP_PKIHEADER *OSSL_CMP_MSG_get0_header(const OSSL_CMP_MSG *msg);
|
| 623 |
+
int OSSL_CMP_MSG_get_bodytype(const OSSL_CMP_MSG *msg);
|
| 624 |
+
X509_PUBKEY *OSSL_CMP_MSG_get0_certreq_publickey(const OSSL_CMP_MSG *msg);
|
| 625 |
+
int OSSL_CMP_MSG_update_transactionID(OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg);
|
| 626 |
+
int OSSL_CMP_MSG_update_recipNonce(OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg);
|
| 627 |
+
OSSL_CRMF_MSG *OSSL_CMP_CTX_setup_CRM(OSSL_CMP_CTX *ctx, int for_KUR, int rid);
|
| 628 |
+
OSSL_CMP_MSG *OSSL_CMP_MSG_read(const char *file, OSSL_LIB_CTX *libctx,
|
| 629 |
+
const char *propq);
|
| 630 |
+
int OSSL_CMP_MSG_write(const char *file, const OSSL_CMP_MSG *msg);
|
| 631 |
+
OSSL_CMP_MSG *d2i_OSSL_CMP_MSG_bio(BIO *bio, OSSL_CMP_MSG **msg);
|
| 632 |
+
int i2d_OSSL_CMP_MSG_bio(BIO *bio, const OSSL_CMP_MSG *msg);
|
| 633 |
+
|
| 634 |
+
/* from cmp_vfy.c */
|
| 635 |
+
int OSSL_CMP_validate_msg(OSSL_CMP_CTX *ctx, const OSSL_CMP_MSG *msg);
|
| 636 |
+
int OSSL_CMP_validate_cert_path(const OSSL_CMP_CTX *ctx,
|
| 637 |
+
X509_STORE *trusted_store, X509 *cert);
|
| 638 |
+
|
| 639 |
+
/* from cmp_http.c */
|
| 640 |
+
#ifndef OPENSSL_NO_HTTP
|
| 641 |
+
OSSL_CMP_MSG *OSSL_CMP_MSG_http_perform(OSSL_CMP_CTX *ctx,
|
| 642 |
+
const OSSL_CMP_MSG *req);
|
| 643 |
+
#endif
|
| 644 |
+
|
| 645 |
+
/* from cmp_server.c */
|
| 646 |
+
typedef struct ossl_cmp_srv_ctx_st OSSL_CMP_SRV_CTX;
|
| 647 |
+
OSSL_CMP_MSG *OSSL_CMP_SRV_process_request(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 648 |
+
const OSSL_CMP_MSG *req);
|
| 649 |
+
OSSL_CMP_MSG *OSSL_CMP_CTX_server_perform(OSSL_CMP_CTX *client_ctx,
|
| 650 |
+
const OSSL_CMP_MSG *req);
|
| 651 |
+
OSSL_CMP_SRV_CTX *OSSL_CMP_SRV_CTX_new(OSSL_LIB_CTX *libctx, const char *propq);
|
| 652 |
+
void OSSL_CMP_SRV_CTX_free(OSSL_CMP_SRV_CTX *srv_ctx);
|
| 653 |
+
typedef OSSL_CMP_PKISI *(*OSSL_CMP_SRV_cert_request_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx, const OSSL_CMP_MSG *req, int certReqId,
|
| 654 |
+
const OSSL_CRMF_MSG *crm, const X509_REQ *p10cr,
|
| 655 |
+
X509 **certOut, STACK_OF(X509) **chainOut, STACK_OF(X509) **caPubs);
|
| 656 |
+
typedef OSSL_CMP_PKISI *(*OSSL_CMP_SRV_rr_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 657 |
+
const OSSL_CMP_MSG *req,
|
| 658 |
+
const X509_NAME *issuer,
|
| 659 |
+
const ASN1_INTEGER *serial);
|
| 660 |
+
typedef int (*OSSL_CMP_SRV_genm_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 661 |
+
const OSSL_CMP_MSG *req,
|
| 662 |
+
const STACK_OF(OSSL_CMP_ITAV) *in,
|
| 663 |
+
STACK_OF(OSSL_CMP_ITAV) **out);
|
| 664 |
+
typedef void (*OSSL_CMP_SRV_error_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 665 |
+
const OSSL_CMP_MSG *req,
|
| 666 |
+
const OSSL_CMP_PKISI *statusInfo,
|
| 667 |
+
const ASN1_INTEGER *errorCode,
|
| 668 |
+
const OSSL_CMP_PKIFREETEXT *errDetails);
|
| 669 |
+
typedef int (*OSSL_CMP_SRV_certConf_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 670 |
+
const OSSL_CMP_MSG *req,
|
| 671 |
+
int certReqId,
|
| 672 |
+
const ASN1_OCTET_STRING *certHash,
|
| 673 |
+
const OSSL_CMP_PKISI *si);
|
| 674 |
+
typedef int (*OSSL_CMP_SRV_pollReq_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 675 |
+
const OSSL_CMP_MSG *req, int certReqId,
|
| 676 |
+
OSSL_CMP_MSG **certReq,
|
| 677 |
+
int64_t *check_after);
|
| 678 |
+
int OSSL_CMP_SRV_CTX_init(OSSL_CMP_SRV_CTX *srv_ctx, void *custom_ctx,
|
| 679 |
+
OSSL_CMP_SRV_cert_request_cb_t process_cert_request,
|
| 680 |
+
OSSL_CMP_SRV_rr_cb_t process_rr,
|
| 681 |
+
OSSL_CMP_SRV_genm_cb_t process_genm,
|
| 682 |
+
OSSL_CMP_SRV_error_cb_t process_error,
|
| 683 |
+
OSSL_CMP_SRV_certConf_cb_t process_certConf,
|
| 684 |
+
OSSL_CMP_SRV_pollReq_cb_t process_pollReq);
|
| 685 |
+
typedef int (*OSSL_CMP_SRV_delayed_delivery_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 686 |
+
const OSSL_CMP_MSG *req);
|
| 687 |
+
typedef int (*OSSL_CMP_SRV_clean_transaction_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 688 |
+
const ASN1_OCTET_STRING *id);
|
| 689 |
+
int OSSL_CMP_SRV_CTX_init_trans(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 690 |
+
OSSL_CMP_SRV_delayed_delivery_cb_t delay,
|
| 691 |
+
OSSL_CMP_SRV_clean_transaction_cb_t clean);
|
| 692 |
+
OSSL_CMP_CTX *OSSL_CMP_SRV_CTX_get0_cmp_ctx(const OSSL_CMP_SRV_CTX *srv_ctx);
|
| 693 |
+
void *OSSL_CMP_SRV_CTX_get0_custom_ctx(const OSSL_CMP_SRV_CTX *srv_ctx);
|
| 694 |
+
int OSSL_CMP_SRV_CTX_set_send_unprotected_errors(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 695 |
+
int val);
|
| 696 |
+
int OSSL_CMP_SRV_CTX_set_accept_unprotected(OSSL_CMP_SRV_CTX *srv_ctx, int val);
|
| 697 |
+
int OSSL_CMP_SRV_CTX_set_accept_raverified(OSSL_CMP_SRV_CTX *srv_ctx, int val);
|
| 698 |
+
int OSSL_CMP_SRV_CTX_set_grant_implicit_confirm(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 699 |
+
int val);
|
| 700 |
+
|
| 701 |
+
/* from cmp_client.c */
|
| 702 |
+
X509 *OSSL_CMP_exec_certreq(OSSL_CMP_CTX *ctx, int req_type,
|
| 703 |
+
const OSSL_CRMF_MSG *crm);
|
| 704 |
+
#define OSSL_CMP_IR 0
|
| 705 |
+
#define OSSL_CMP_CR 2
|
| 706 |
+
#define OSSL_CMP_P10CR 4
|
| 707 |
+
#define OSSL_CMP_KUR 7
|
| 708 |
+
#define OSSL_CMP_GENM 21
|
| 709 |
+
#define OSSL_CMP_ERROR 23
|
| 710 |
+
#define OSSL_CMP_exec_IR_ses(ctx) \
|
| 711 |
+
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_IR, NULL)
|
| 712 |
+
#define OSSL_CMP_exec_CR_ses(ctx) \
|
| 713 |
+
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_CR, NULL)
|
| 714 |
+
#define OSSL_CMP_exec_P10CR_ses(ctx) \
|
| 715 |
+
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_P10CR, NULL)
|
| 716 |
+
#define OSSL_CMP_exec_KUR_ses(ctx) \
|
| 717 |
+
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_KUR, NULL)
|
| 718 |
+
int OSSL_CMP_try_certreq(OSSL_CMP_CTX *ctx, int req_type,
|
| 719 |
+
const OSSL_CRMF_MSG *crm, int *checkAfter);
|
| 720 |
+
int OSSL_CMP_exec_RR_ses(OSSL_CMP_CTX *ctx);
|
| 721 |
+
STACK_OF(OSSL_CMP_ITAV) *OSSL_CMP_exec_GENM_ses(OSSL_CMP_CTX *ctx);
|
| 722 |
+
|
| 723 |
+
/* from cmp_genm.c */
|
| 724 |
+
int OSSL_CMP_get1_caCerts(OSSL_CMP_CTX *ctx, STACK_OF(X509) **out);
|
| 725 |
+
int OSSL_CMP_get1_rootCaKeyUpdate(OSSL_CMP_CTX *ctx,
|
| 726 |
+
const X509 *oldWithOld, X509 **newWithNew,
|
| 727 |
+
X509 **newWithOld, X509 **oldWithNew);
|
| 728 |
+
int OSSL_CMP_get1_crlUpdate(OSSL_CMP_CTX *ctx, const X509 *crlcert,
|
| 729 |
+
const X509_CRL *last_crl,
|
| 730 |
+
X509_CRL **crl);
|
| 731 |
+
int OSSL_CMP_get1_certReqTemplate(OSSL_CMP_CTX *ctx,
|
| 732 |
+
OSSL_CRMF_CERTTEMPLATE **certTemplate,
|
| 733 |
+
OSSL_CMP_ATAVS **keySpec);
|
| 734 |
+
|
| 735 |
+
#ifdef __cplusplus
|
| 736 |
+
}
|
| 737 |
+
#endif
|
| 738 |
+
#endif /* !defined(OPENSSL_NO_CMP) */
|
| 739 |
+
#endif /* !defined(OPENSSL_CMP_H) */
|
miniconda3/envs/active_proaction/include/openssl/cmp_util.h
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2007-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
* Copyright Nokia 2007-2019
|
| 4 |
+
* Copyright Siemens AG 2015-2019
|
| 5 |
+
*
|
| 6 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 7 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 8 |
+
* in the file LICENSE in the source distribution or at
|
| 9 |
+
* https://www.openssl.org/source/license.html
|
| 10 |
+
*/
|
| 11 |
+
|
| 12 |
+
#ifndef OPENSSL_CMP_UTIL_H
|
| 13 |
+
#define OPENSSL_CMP_UTIL_H
|
| 14 |
+
#pragma once
|
| 15 |
+
|
| 16 |
+
#include <openssl/opensslconf.h>
|
| 17 |
+
#ifndef OPENSSL_NO_CMP
|
| 18 |
+
|
| 19 |
+
#include <openssl/macros.h>
|
| 20 |
+
#include <openssl/trace.h>
|
| 21 |
+
|
| 22 |
+
#ifdef __cplusplus
|
| 23 |
+
extern "C" {
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
int OSSL_CMP_log_open(void);
|
| 27 |
+
void OSSL_CMP_log_close(void);
|
| 28 |
+
#define OSSL_CMP_LOG_PREFIX "CMP "
|
| 29 |
+
|
| 30 |
+
/*
|
| 31 |
+
* generalized logging/error callback mirroring the severity levels of syslog.h
|
| 32 |
+
*/
|
| 33 |
+
typedef int OSSL_CMP_severity;
|
| 34 |
+
#define OSSL_CMP_LOG_EMERG 0
|
| 35 |
+
#define OSSL_CMP_LOG_ALERT 1
|
| 36 |
+
#define OSSL_CMP_LOG_CRIT 2
|
| 37 |
+
#define OSSL_CMP_LOG_ERR 3
|
| 38 |
+
#define OSSL_CMP_LOG_WARNING 4
|
| 39 |
+
#define OSSL_CMP_LOG_NOTICE 5
|
| 40 |
+
#define OSSL_CMP_LOG_INFO 6
|
| 41 |
+
#define OSSL_CMP_LOG_DEBUG 7
|
| 42 |
+
#define OSSL_CMP_LOG_TRACE 8
|
| 43 |
+
#define OSSL_CMP_LOG_MAX OSSL_CMP_LOG_TRACE
|
| 44 |
+
typedef int (*OSSL_CMP_log_cb_t)(const char *func, const char *file, int line,
|
| 45 |
+
OSSL_CMP_severity level, const char *msg);
|
| 46 |
+
|
| 47 |
+
int OSSL_CMP_print_to_bio(BIO *bio, const char *component, const char *file,
|
| 48 |
+
int line, OSSL_CMP_severity level, const char *msg);
|
| 49 |
+
/* use of the logging callback for outputting error queue */
|
| 50 |
+
void OSSL_CMP_print_errors_cb(OSSL_CMP_log_cb_t log_fn);
|
| 51 |
+
|
| 52 |
+
#ifdef __cplusplus
|
| 53 |
+
}
|
| 54 |
+
#endif
|
| 55 |
+
#endif /* !defined(OPENSSL_NO_CMP) */
|
| 56 |
+
#endif /* !defined(OPENSSL_CMP_UTIL_H) */
|
miniconda3/envs/active_proaction/include/openssl/cmperr.h
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_CMPERR_H
|
| 12 |
+
#define OPENSSL_CMPERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
#ifndef OPENSSL_NO_CMP
|
| 20 |
+
|
| 21 |
+
/*
|
| 22 |
+
* CMP reason codes.
|
| 23 |
+
*/
|
| 24 |
+
#define CMP_R_ALGORITHM_NOT_SUPPORTED 139
|
| 25 |
+
#define CMP_R_BAD_CHECKAFTER_IN_POLLREP 167
|
| 26 |
+
#define CMP_R_BAD_REQUEST_ID 108
|
| 27 |
+
#define CMP_R_CERTHASH_UNMATCHED 156
|
| 28 |
+
#define CMP_R_CERTID_NOT_FOUND 109
|
| 29 |
+
#define CMP_R_CERTIFICATE_NOT_ACCEPTED 169
|
| 30 |
+
#define CMP_R_CERTIFICATE_NOT_FOUND 112
|
| 31 |
+
#define CMP_R_CERTREQMSG_NOT_FOUND 157
|
| 32 |
+
#define CMP_R_CERTRESPONSE_NOT_FOUND 113
|
| 33 |
+
#define CMP_R_CERT_AND_KEY_DO_NOT_MATCH 114
|
| 34 |
+
#define CMP_R_CHECKAFTER_OUT_OF_RANGE 181
|
| 35 |
+
#define CMP_R_ENCOUNTERED_KEYUPDATEWARNING 176
|
| 36 |
+
#define CMP_R_ENCOUNTERED_WAITING 162
|
| 37 |
+
#define CMP_R_ERROR_CALCULATING_PROTECTION 115
|
| 38 |
+
#define CMP_R_ERROR_CREATING_CERTCONF 116
|
| 39 |
+
#define CMP_R_ERROR_CREATING_CERTREP 117
|
| 40 |
+
#define CMP_R_ERROR_CREATING_CERTREQ 163
|
| 41 |
+
#define CMP_R_ERROR_CREATING_ERROR 118
|
| 42 |
+
#define CMP_R_ERROR_CREATING_GENM 119
|
| 43 |
+
#define CMP_R_ERROR_CREATING_GENP 120
|
| 44 |
+
#define CMP_R_ERROR_CREATING_PKICONF 122
|
| 45 |
+
#define CMP_R_ERROR_CREATING_POLLREP 123
|
| 46 |
+
#define CMP_R_ERROR_CREATING_POLLREQ 124
|
| 47 |
+
#define CMP_R_ERROR_CREATING_RP 125
|
| 48 |
+
#define CMP_R_ERROR_CREATING_RR 126
|
| 49 |
+
#define CMP_R_ERROR_PARSING_PKISTATUS 107
|
| 50 |
+
#define CMP_R_ERROR_PROCESSING_MESSAGE 158
|
| 51 |
+
#define CMP_R_ERROR_PROTECTING_MESSAGE 127
|
| 52 |
+
#define CMP_R_ERROR_SETTING_CERTHASH 128
|
| 53 |
+
#define CMP_R_ERROR_UNEXPECTED_CERTCONF 160
|
| 54 |
+
#define CMP_R_ERROR_VALIDATING_PROTECTION 140
|
| 55 |
+
#define CMP_R_ERROR_VALIDATING_SIGNATURE 171
|
| 56 |
+
#define CMP_R_EXPECTED_POLLREQ 104
|
| 57 |
+
#define CMP_R_FAILED_BUILDING_OWN_CHAIN 164
|
| 58 |
+
#define CMP_R_FAILED_EXTRACTING_CENTRAL_GEN_KEY 203
|
| 59 |
+
#define CMP_R_FAILED_EXTRACTING_PUBKEY 141
|
| 60 |
+
#define CMP_R_FAILURE_OBTAINING_RANDOM 110
|
| 61 |
+
#define CMP_R_FAIL_INFO_OUT_OF_RANGE 129
|
| 62 |
+
#define CMP_R_GENERATE_CERTREQTEMPLATE 197
|
| 63 |
+
#define CMP_R_GENERATE_CRLSTATUS 198
|
| 64 |
+
#define CMP_R_GETTING_GENP 192
|
| 65 |
+
#define CMP_R_GET_ITAV 199
|
| 66 |
+
#define CMP_R_INVALID_ARGS 100
|
| 67 |
+
#define CMP_R_INVALID_GENP 193
|
| 68 |
+
#define CMP_R_INVALID_KEYSPEC 202
|
| 69 |
+
#define CMP_R_INVALID_OPTION 174
|
| 70 |
+
#define CMP_R_INVALID_ROOTCAKEYUPDATE 195
|
| 71 |
+
#define CMP_R_MISSING_CENTRAL_GEN_KEY 204
|
| 72 |
+
#define CMP_R_MISSING_CERTID 165
|
| 73 |
+
#define CMP_R_MISSING_KEY_INPUT_FOR_CREATING_PROTECTION 130
|
| 74 |
+
#define CMP_R_MISSING_KEY_USAGE_DIGITALSIGNATURE 142
|
| 75 |
+
#define CMP_R_MISSING_P10CSR 121
|
| 76 |
+
#define CMP_R_MISSING_PBM_SECRET 166
|
| 77 |
+
#define CMP_R_MISSING_PRIVATE_KEY 131
|
| 78 |
+
#define CMP_R_MISSING_PRIVATE_KEY_FOR_POPO 190
|
| 79 |
+
#define CMP_R_MISSING_PROTECTION 143
|
| 80 |
+
#define CMP_R_MISSING_PUBLIC_KEY 183
|
| 81 |
+
#define CMP_R_MISSING_REFERENCE_CERT 168
|
| 82 |
+
#define CMP_R_MISSING_SECRET 178
|
| 83 |
+
#define CMP_R_MISSING_SENDER_IDENTIFICATION 111
|
| 84 |
+
#define CMP_R_MISSING_TRUST_ANCHOR 179
|
| 85 |
+
#define CMP_R_MISSING_TRUST_STORE 144
|
| 86 |
+
#define CMP_R_MULTIPLE_REQUESTS_NOT_SUPPORTED 161
|
| 87 |
+
#define CMP_R_MULTIPLE_RESPONSES_NOT_SUPPORTED 170
|
| 88 |
+
#define CMP_R_MULTIPLE_SAN_SOURCES 102
|
| 89 |
+
#define CMP_R_NO_STDIO 194
|
| 90 |
+
#define CMP_R_NO_SUITABLE_SENDER_CERT 145
|
| 91 |
+
#define CMP_R_NULL_ARGUMENT 103
|
| 92 |
+
#define CMP_R_PKIBODY_ERROR 146
|
| 93 |
+
#define CMP_R_PKISTATUSINFO_NOT_FOUND 132
|
| 94 |
+
#define CMP_R_POLLING_FAILED 172
|
| 95 |
+
#define CMP_R_POTENTIALLY_INVALID_CERTIFICATE 147
|
| 96 |
+
#define CMP_R_RECEIVED_ERROR 180
|
| 97 |
+
#define CMP_R_RECIPNONCE_UNMATCHED 148
|
| 98 |
+
#define CMP_R_REQUEST_NOT_ACCEPTED 149
|
| 99 |
+
#define CMP_R_REQUEST_REJECTED_BY_SERVER 182
|
| 100 |
+
#define CMP_R_SENDER_GENERALNAME_TYPE_NOT_SUPPORTED 150
|
| 101 |
+
#define CMP_R_SRVCERT_DOES_NOT_VALIDATE_MSG 151
|
| 102 |
+
#define CMP_R_TOTAL_TIMEOUT 184
|
| 103 |
+
#define CMP_R_TRANSACTIONID_UNMATCHED 152
|
| 104 |
+
#define CMP_R_TRANSFER_ERROR 159
|
| 105 |
+
#define CMP_R_UNCLEAN_CTX 191
|
| 106 |
+
#define CMP_R_UNEXPECTED_CENTRAL_GEN_KEY 205
|
| 107 |
+
#define CMP_R_UNEXPECTED_CERTPROFILE 196
|
| 108 |
+
#define CMP_R_UNEXPECTED_CRLSTATUSLIST 201
|
| 109 |
+
#define CMP_R_UNEXPECTED_PKIBODY 133
|
| 110 |
+
#define CMP_R_UNEXPECTED_PKISTATUS 185
|
| 111 |
+
#define CMP_R_UNEXPECTED_POLLREQ 105
|
| 112 |
+
#define CMP_R_UNEXPECTED_PVNO 153
|
| 113 |
+
#define CMP_R_UNEXPECTED_SENDER 106
|
| 114 |
+
#define CMP_R_UNKNOWN_ALGORITHM_ID 134
|
| 115 |
+
#define CMP_R_UNKNOWN_CERT_TYPE 135
|
| 116 |
+
#define CMP_R_UNKNOWN_CRL_ISSUER 200
|
| 117 |
+
#define CMP_R_UNKNOWN_PKISTATUS 186
|
| 118 |
+
#define CMP_R_UNSUPPORTED_ALGORITHM 136
|
| 119 |
+
#define CMP_R_UNSUPPORTED_KEY_TYPE 137
|
| 120 |
+
#define CMP_R_UNSUPPORTED_PKIBODY 101
|
| 121 |
+
#define CMP_R_UNSUPPORTED_PROTECTION_ALG_DHBASEDMAC 154
|
| 122 |
+
#define CMP_R_VALUE_TOO_LARGE 175
|
| 123 |
+
#define CMP_R_VALUE_TOO_SMALL 177
|
| 124 |
+
#define CMP_R_WRONG_ALGORITHM_OID 138
|
| 125 |
+
#define CMP_R_WRONG_CERTID 189
|
| 126 |
+
#define CMP_R_WRONG_CERTID_IN_RP 187
|
| 127 |
+
#define CMP_R_WRONG_PBM_VALUE 155
|
| 128 |
+
#define CMP_R_WRONG_RP_COMPONENT_COUNT 188
|
| 129 |
+
#define CMP_R_WRONG_SERIAL_IN_RP 173
|
| 130 |
+
|
| 131 |
+
#endif
|
| 132 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/cms.h
ADDED
|
@@ -0,0 +1,515 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/cms.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2008-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
/* clang-format off */
|
| 14 |
+
|
| 15 |
+
/* clang-format on */
|
| 16 |
+
|
| 17 |
+
#ifndef OPENSSL_CMS_H
|
| 18 |
+
#define OPENSSL_CMS_H
|
| 19 |
+
#pragma once
|
| 20 |
+
|
| 21 |
+
#include <openssl/macros.h>
|
| 22 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 23 |
+
#define HEADER_CMS_H
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
#include <openssl/opensslconf.h>
|
| 27 |
+
|
| 28 |
+
#ifndef OPENSSL_NO_CMS
|
| 29 |
+
#include <openssl/x509.h>
|
| 30 |
+
#include <openssl/x509v3.h>
|
| 31 |
+
#include <openssl/cmserr.h>
|
| 32 |
+
#ifdef __cplusplus
|
| 33 |
+
extern "C" {
|
| 34 |
+
#endif
|
| 35 |
+
|
| 36 |
+
typedef struct CMS_EnvelopedData_st CMS_EnvelopedData;
|
| 37 |
+
typedef struct CMS_ContentInfo_st CMS_ContentInfo;
|
| 38 |
+
typedef struct CMS_SignerInfo_st CMS_SignerInfo;
|
| 39 |
+
typedef struct CMS_SignedData_st CMS_SignedData;
|
| 40 |
+
typedef struct CMS_CertificateChoices CMS_CertificateChoices;
|
| 41 |
+
typedef struct CMS_RevocationInfoChoice_st CMS_RevocationInfoChoice;
|
| 42 |
+
typedef struct CMS_RecipientInfo_st CMS_RecipientInfo;
|
| 43 |
+
typedef struct CMS_ReceiptRequest_st CMS_ReceiptRequest;
|
| 44 |
+
typedef struct CMS_Receipt_st CMS_Receipt;
|
| 45 |
+
typedef struct CMS_RecipientEncryptedKey_st CMS_RecipientEncryptedKey;
|
| 46 |
+
typedef struct CMS_OtherKeyAttribute_st CMS_OtherKeyAttribute;
|
| 47 |
+
|
| 48 |
+
/* clang-format off */
|
| 49 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CMS_SignerInfo, CMS_SignerInfo, CMS_SignerInfo)
|
| 50 |
+
#define sk_CMS_SignerInfo_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_SignerInfo_sk_type(sk))
|
| 51 |
+
#define sk_CMS_SignerInfo_value(sk, idx) ((CMS_SignerInfo *)OPENSSL_sk_value(ossl_check_const_CMS_SignerInfo_sk_type(sk), (idx)))
|
| 52 |
+
#define sk_CMS_SignerInfo_new(cmp) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_new(ossl_check_CMS_SignerInfo_compfunc_type(cmp)))
|
| 53 |
+
#define sk_CMS_SignerInfo_new_null() ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_new_null())
|
| 54 |
+
#define sk_CMS_SignerInfo_new_reserve(cmp, n) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_new_reserve(ossl_check_CMS_SignerInfo_compfunc_type(cmp), (n)))
|
| 55 |
+
#define sk_CMS_SignerInfo_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_SignerInfo_sk_type(sk), (n))
|
| 56 |
+
#define sk_CMS_SignerInfo_free(sk) OPENSSL_sk_free(ossl_check_CMS_SignerInfo_sk_type(sk))
|
| 57 |
+
#define sk_CMS_SignerInfo_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_SignerInfo_sk_type(sk))
|
| 58 |
+
#define sk_CMS_SignerInfo_delete(sk, i) ((CMS_SignerInfo *)OPENSSL_sk_delete(ossl_check_CMS_SignerInfo_sk_type(sk), (i)))
|
| 59 |
+
#define sk_CMS_SignerInfo_delete_ptr(sk, ptr) ((CMS_SignerInfo *)OPENSSL_sk_delete_ptr(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr)))
|
| 60 |
+
#define sk_CMS_SignerInfo_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
| 61 |
+
#define sk_CMS_SignerInfo_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
| 62 |
+
#define sk_CMS_SignerInfo_pop(sk) ((CMS_SignerInfo *)OPENSSL_sk_pop(ossl_check_CMS_SignerInfo_sk_type(sk)))
|
| 63 |
+
#define sk_CMS_SignerInfo_shift(sk) ((CMS_SignerInfo *)OPENSSL_sk_shift(ossl_check_CMS_SignerInfo_sk_type(sk)))
|
| 64 |
+
#define sk_CMS_SignerInfo_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_SignerInfo_sk_type(sk),ossl_check_CMS_SignerInfo_freefunc_type(freefunc))
|
| 65 |
+
#define sk_CMS_SignerInfo_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr), (idx))
|
| 66 |
+
#define sk_CMS_SignerInfo_set(sk, idx, ptr) ((CMS_SignerInfo *)OPENSSL_sk_set(ossl_check_CMS_SignerInfo_sk_type(sk), (idx), ossl_check_CMS_SignerInfo_type(ptr)))
|
| 67 |
+
#define sk_CMS_SignerInfo_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
| 68 |
+
#define sk_CMS_SignerInfo_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
| 69 |
+
#define sk_CMS_SignerInfo_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr), pnum)
|
| 70 |
+
#define sk_CMS_SignerInfo_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_SignerInfo_sk_type(sk))
|
| 71 |
+
#define sk_CMS_SignerInfo_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_SignerInfo_sk_type(sk))
|
| 72 |
+
#define sk_CMS_SignerInfo_dup(sk) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_dup(ossl_check_const_CMS_SignerInfo_sk_type(sk)))
|
| 73 |
+
#define sk_CMS_SignerInfo_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_copyfunc_type(copyfunc), ossl_check_CMS_SignerInfo_freefunc_type(freefunc)))
|
| 74 |
+
#define sk_CMS_SignerInfo_set_cmp_func(sk, cmp) ((sk_CMS_SignerInfo_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_compfunc_type(cmp)))
|
| 75 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CMS_RecipientEncryptedKey, CMS_RecipientEncryptedKey, CMS_RecipientEncryptedKey)
|
| 76 |
+
#define sk_CMS_RecipientEncryptedKey_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 77 |
+
#define sk_CMS_RecipientEncryptedKey_value(sk, idx) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_value(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk), (idx)))
|
| 78 |
+
#define sk_CMS_RecipientEncryptedKey_new(cmp) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_new(ossl_check_CMS_RecipientEncryptedKey_compfunc_type(cmp)))
|
| 79 |
+
#define sk_CMS_RecipientEncryptedKey_new_null() ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_new_null())
|
| 80 |
+
#define sk_CMS_RecipientEncryptedKey_new_reserve(cmp, n) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_new_reserve(ossl_check_CMS_RecipientEncryptedKey_compfunc_type(cmp), (n)))
|
| 81 |
+
#define sk_CMS_RecipientEncryptedKey_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), (n))
|
| 82 |
+
#define sk_CMS_RecipientEncryptedKey_free(sk) OPENSSL_sk_free(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 83 |
+
#define sk_CMS_RecipientEncryptedKey_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 84 |
+
#define sk_CMS_RecipientEncryptedKey_delete(sk, i) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_delete(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), (i)))
|
| 85 |
+
#define sk_CMS_RecipientEncryptedKey_delete_ptr(sk, ptr) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_delete_ptr(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr)))
|
| 86 |
+
#define sk_CMS_RecipientEncryptedKey_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
| 87 |
+
#define sk_CMS_RecipientEncryptedKey_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
| 88 |
+
#define sk_CMS_RecipientEncryptedKey_pop(sk) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_pop(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk)))
|
| 89 |
+
#define sk_CMS_RecipientEncryptedKey_shift(sk) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_shift(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk)))
|
| 90 |
+
#define sk_CMS_RecipientEncryptedKey_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk),ossl_check_CMS_RecipientEncryptedKey_freefunc_type(freefunc))
|
| 91 |
+
#define sk_CMS_RecipientEncryptedKey_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr), (idx))
|
| 92 |
+
#define sk_CMS_RecipientEncryptedKey_set(sk, idx, ptr) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_set(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), (idx), ossl_check_CMS_RecipientEncryptedKey_type(ptr)))
|
| 93 |
+
#define sk_CMS_RecipientEncryptedKey_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
| 94 |
+
#define sk_CMS_RecipientEncryptedKey_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
| 95 |
+
#define sk_CMS_RecipientEncryptedKey_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr), pnum)
|
| 96 |
+
#define sk_CMS_RecipientEncryptedKey_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 97 |
+
#define sk_CMS_RecipientEncryptedKey_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 98 |
+
#define sk_CMS_RecipientEncryptedKey_dup(sk) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_dup(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk)))
|
| 99 |
+
#define sk_CMS_RecipientEncryptedKey_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_copyfunc_type(copyfunc), ossl_check_CMS_RecipientEncryptedKey_freefunc_type(freefunc)))
|
| 100 |
+
#define sk_CMS_RecipientEncryptedKey_set_cmp_func(sk, cmp) ((sk_CMS_RecipientEncryptedKey_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_compfunc_type(cmp)))
|
| 101 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CMS_RecipientInfo, CMS_RecipientInfo, CMS_RecipientInfo)
|
| 102 |
+
#define sk_CMS_RecipientInfo_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_RecipientInfo_sk_type(sk))
|
| 103 |
+
#define sk_CMS_RecipientInfo_value(sk, idx) ((CMS_RecipientInfo *)OPENSSL_sk_value(ossl_check_const_CMS_RecipientInfo_sk_type(sk), (idx)))
|
| 104 |
+
#define sk_CMS_RecipientInfo_new(cmp) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_new(ossl_check_CMS_RecipientInfo_compfunc_type(cmp)))
|
| 105 |
+
#define sk_CMS_RecipientInfo_new_null() ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_new_null())
|
| 106 |
+
#define sk_CMS_RecipientInfo_new_reserve(cmp, n) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_new_reserve(ossl_check_CMS_RecipientInfo_compfunc_type(cmp), (n)))
|
| 107 |
+
#define sk_CMS_RecipientInfo_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_RecipientInfo_sk_type(sk), (n))
|
| 108 |
+
#define sk_CMS_RecipientInfo_free(sk) OPENSSL_sk_free(ossl_check_CMS_RecipientInfo_sk_type(sk))
|
| 109 |
+
#define sk_CMS_RecipientInfo_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_RecipientInfo_sk_type(sk))
|
| 110 |
+
#define sk_CMS_RecipientInfo_delete(sk, i) ((CMS_RecipientInfo *)OPENSSL_sk_delete(ossl_check_CMS_RecipientInfo_sk_type(sk), (i)))
|
| 111 |
+
#define sk_CMS_RecipientInfo_delete_ptr(sk, ptr) ((CMS_RecipientInfo *)OPENSSL_sk_delete_ptr(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr)))
|
| 112 |
+
#define sk_CMS_RecipientInfo_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
| 113 |
+
#define sk_CMS_RecipientInfo_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
| 114 |
+
#define sk_CMS_RecipientInfo_pop(sk) ((CMS_RecipientInfo *)OPENSSL_sk_pop(ossl_check_CMS_RecipientInfo_sk_type(sk)))
|
| 115 |
+
#define sk_CMS_RecipientInfo_shift(sk) ((CMS_RecipientInfo *)OPENSSL_sk_shift(ossl_check_CMS_RecipientInfo_sk_type(sk)))
|
| 116 |
+
#define sk_CMS_RecipientInfo_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_RecipientInfo_sk_type(sk),ossl_check_CMS_RecipientInfo_freefunc_type(freefunc))
|
| 117 |
+
#define sk_CMS_RecipientInfo_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr), (idx))
|
| 118 |
+
#define sk_CMS_RecipientInfo_set(sk, idx, ptr) ((CMS_RecipientInfo *)OPENSSL_sk_set(ossl_check_CMS_RecipientInfo_sk_type(sk), (idx), ossl_check_CMS_RecipientInfo_type(ptr)))
|
| 119 |
+
#define sk_CMS_RecipientInfo_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
| 120 |
+
#define sk_CMS_RecipientInfo_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
| 121 |
+
#define sk_CMS_RecipientInfo_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr), pnum)
|
| 122 |
+
#define sk_CMS_RecipientInfo_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_RecipientInfo_sk_type(sk))
|
| 123 |
+
#define sk_CMS_RecipientInfo_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_RecipientInfo_sk_type(sk))
|
| 124 |
+
#define sk_CMS_RecipientInfo_dup(sk) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_dup(ossl_check_const_CMS_RecipientInfo_sk_type(sk)))
|
| 125 |
+
#define sk_CMS_RecipientInfo_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_copyfunc_type(copyfunc), ossl_check_CMS_RecipientInfo_freefunc_type(freefunc)))
|
| 126 |
+
#define sk_CMS_RecipientInfo_set_cmp_func(sk, cmp) ((sk_CMS_RecipientInfo_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_compfunc_type(cmp)))
|
| 127 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CMS_RevocationInfoChoice, CMS_RevocationInfoChoice, CMS_RevocationInfoChoice)
|
| 128 |
+
#define sk_CMS_RevocationInfoChoice_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk))
|
| 129 |
+
#define sk_CMS_RevocationInfoChoice_value(sk, idx) ((CMS_RevocationInfoChoice *)OPENSSL_sk_value(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk), (idx)))
|
| 130 |
+
#define sk_CMS_RevocationInfoChoice_new(cmp) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_new(ossl_check_CMS_RevocationInfoChoice_compfunc_type(cmp)))
|
| 131 |
+
#define sk_CMS_RevocationInfoChoice_new_null() ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_new_null())
|
| 132 |
+
#define sk_CMS_RevocationInfoChoice_new_reserve(cmp, n) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_new_reserve(ossl_check_CMS_RevocationInfoChoice_compfunc_type(cmp), (n)))
|
| 133 |
+
#define sk_CMS_RevocationInfoChoice_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), (n))
|
| 134 |
+
#define sk_CMS_RevocationInfoChoice_free(sk) OPENSSL_sk_free(ossl_check_CMS_RevocationInfoChoice_sk_type(sk))
|
| 135 |
+
#define sk_CMS_RevocationInfoChoice_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_RevocationInfoChoice_sk_type(sk))
|
| 136 |
+
#define sk_CMS_RevocationInfoChoice_delete(sk, i) ((CMS_RevocationInfoChoice *)OPENSSL_sk_delete(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), (i)))
|
| 137 |
+
#define sk_CMS_RevocationInfoChoice_delete_ptr(sk, ptr) ((CMS_RevocationInfoChoice *)OPENSSL_sk_delete_ptr(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr)))
|
| 138 |
+
#define sk_CMS_RevocationInfoChoice_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
| 139 |
+
#define sk_CMS_RevocationInfoChoice_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
| 140 |
+
#define sk_CMS_RevocationInfoChoice_pop(sk) ((CMS_RevocationInfoChoice *)OPENSSL_sk_pop(ossl_check_CMS_RevocationInfoChoice_sk_type(sk)))
|
| 141 |
+
#define sk_CMS_RevocationInfoChoice_shift(sk) ((CMS_RevocationInfoChoice *)OPENSSL_sk_shift(ossl_check_CMS_RevocationInfoChoice_sk_type(sk)))
|
| 142 |
+
#define sk_CMS_RevocationInfoChoice_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_RevocationInfoChoice_sk_type(sk),ossl_check_CMS_RevocationInfoChoice_freefunc_type(freefunc))
|
| 143 |
+
#define sk_CMS_RevocationInfoChoice_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr), (idx))
|
| 144 |
+
#define sk_CMS_RevocationInfoChoice_set(sk, idx, ptr) ((CMS_RevocationInfoChoice *)OPENSSL_sk_set(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), (idx), ossl_check_CMS_RevocationInfoChoice_type(ptr)))
|
| 145 |
+
#define sk_CMS_RevocationInfoChoice_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
| 146 |
+
#define sk_CMS_RevocationInfoChoice_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
| 147 |
+
#define sk_CMS_RevocationInfoChoice_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr), pnum)
|
| 148 |
+
#define sk_CMS_RevocationInfoChoice_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_RevocationInfoChoice_sk_type(sk))
|
| 149 |
+
#define sk_CMS_RevocationInfoChoice_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk))
|
| 150 |
+
#define sk_CMS_RevocationInfoChoice_dup(sk) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_dup(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk)))
|
| 151 |
+
#define sk_CMS_RevocationInfoChoice_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_copyfunc_type(copyfunc), ossl_check_CMS_RevocationInfoChoice_freefunc_type(freefunc)))
|
| 152 |
+
#define sk_CMS_RevocationInfoChoice_set_cmp_func(sk, cmp) ((sk_CMS_RevocationInfoChoice_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_compfunc_type(cmp)))
|
| 153 |
+
|
| 154 |
+
/* clang-format on */
|
| 155 |
+
|
| 156 |
+
DECLARE_ASN1_ITEM(CMS_EnvelopedData)
|
| 157 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS(CMS_SignedData)
|
| 158 |
+
DECLARE_ASN1_FUNCTIONS(CMS_ContentInfo)
|
| 159 |
+
DECLARE_ASN1_FUNCTIONS(CMS_ReceiptRequest)
|
| 160 |
+
DECLARE_ASN1_PRINT_FUNCTION(CMS_ContentInfo)
|
| 161 |
+
|
| 162 |
+
DECLARE_ASN1_DUP_FUNCTION(CMS_EnvelopedData)
|
| 163 |
+
|
| 164 |
+
CMS_ContentInfo *CMS_ContentInfo_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
|
| 165 |
+
|
| 166 |
+
#define CMS_SIGNERINFO_ISSUER_SERIAL 0
|
| 167 |
+
#define CMS_SIGNERINFO_KEYIDENTIFIER 1
|
| 168 |
+
|
| 169 |
+
#define CMS_RECIPINFO_NONE -1
|
| 170 |
+
#define CMS_RECIPINFO_TRANS 0
|
| 171 |
+
#define CMS_RECIPINFO_AGREE 1
|
| 172 |
+
#define CMS_RECIPINFO_KEK 2
|
| 173 |
+
#define CMS_RECIPINFO_PASS 3
|
| 174 |
+
#define CMS_RECIPINFO_OTHER 4
|
| 175 |
+
|
| 176 |
+
/* S/MIME related flags */
|
| 177 |
+
|
| 178 |
+
#define CMS_TEXT 0x1
|
| 179 |
+
#define CMS_NOCERTS 0x2
|
| 180 |
+
#define CMS_NO_CONTENT_VERIFY 0x4
|
| 181 |
+
#define CMS_NO_ATTR_VERIFY 0x8
|
| 182 |
+
#define CMS_NOSIGS \
|
| 183 |
+
(CMS_NO_CONTENT_VERIFY | CMS_NO_ATTR_VERIFY)
|
| 184 |
+
#define CMS_NOINTERN 0x10
|
| 185 |
+
#define CMS_NO_SIGNER_CERT_VERIFY 0x20
|
| 186 |
+
#define CMS_NOVERIFY 0x20
|
| 187 |
+
#define CMS_DETACHED 0x40
|
| 188 |
+
#define CMS_BINARY 0x80
|
| 189 |
+
#define CMS_NOATTR 0x100
|
| 190 |
+
#define CMS_NOSMIMECAP 0x200
|
| 191 |
+
#define CMS_NOOLDMIMETYPE 0x400
|
| 192 |
+
#define CMS_CRLFEOL 0x800
|
| 193 |
+
#define CMS_STREAM 0x1000
|
| 194 |
+
#define CMS_NOCRL 0x2000
|
| 195 |
+
#define CMS_PARTIAL 0x4000
|
| 196 |
+
#define CMS_REUSE_DIGEST 0x8000
|
| 197 |
+
#define CMS_USE_KEYID 0x10000
|
| 198 |
+
#define CMS_DEBUG_DECRYPT 0x20000
|
| 199 |
+
#define CMS_KEY_PARAM 0x40000
|
| 200 |
+
#define CMS_ASCIICRLF 0x80000
|
| 201 |
+
#define CMS_CADES 0x100000
|
| 202 |
+
#define CMS_USE_ORIGINATOR_KEYID 0x200000
|
| 203 |
+
#define CMS_NO_SIGNING_TIME 0x400000
|
| 204 |
+
|
| 205 |
+
const ASN1_OBJECT *CMS_get0_type(const CMS_ContentInfo *cms);
|
| 206 |
+
|
| 207 |
+
BIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont);
|
| 208 |
+
int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio);
|
| 209 |
+
|
| 210 |
+
ASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms);
|
| 211 |
+
int CMS_is_detached(CMS_ContentInfo *cms);
|
| 212 |
+
int CMS_set_detached(CMS_ContentInfo *cms, int detached);
|
| 213 |
+
|
| 214 |
+
#ifdef OPENSSL_PEM_H
|
| 215 |
+
DECLARE_PEM_rw(CMS, CMS_ContentInfo)
|
| 216 |
+
#endif
|
| 217 |
+
int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms);
|
| 218 |
+
CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms);
|
| 219 |
+
int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms);
|
| 220 |
+
|
| 221 |
+
BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms);
|
| 222 |
+
int i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags);
|
| 223 |
+
int PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in,
|
| 224 |
+
int flags);
|
| 225 |
+
CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont);
|
| 226 |
+
CMS_ContentInfo *SMIME_read_CMS_ex(BIO *bio, int flags, BIO **bcont, CMS_ContentInfo **ci);
|
| 227 |
+
int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags);
|
| 228 |
+
|
| 229 |
+
int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont,
|
| 230 |
+
unsigned int flags);
|
| 231 |
+
int CMS_final_digest(CMS_ContentInfo *cms,
|
| 232 |
+
const unsigned char *md, unsigned int mdlen, BIO *dcont,
|
| 233 |
+
unsigned int flags);
|
| 234 |
+
|
| 235 |
+
CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey,
|
| 236 |
+
STACK_OF(X509) *certs, BIO *data,
|
| 237 |
+
unsigned int flags);
|
| 238 |
+
CMS_ContentInfo *CMS_sign_ex(X509 *signcert, EVP_PKEY *pkey,
|
| 239 |
+
STACK_OF(X509) *certs, BIO *data,
|
| 240 |
+
unsigned int flags, OSSL_LIB_CTX *libctx,
|
| 241 |
+
const char *propq);
|
| 242 |
+
|
| 243 |
+
CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si,
|
| 244 |
+
X509 *signcert, EVP_PKEY *pkey,
|
| 245 |
+
STACK_OF(X509) *certs, unsigned int flags);
|
| 246 |
+
|
| 247 |
+
int CMS_data(CMS_ContentInfo *cms, BIO *out, unsigned int flags);
|
| 248 |
+
CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags);
|
| 249 |
+
CMS_ContentInfo *CMS_data_create_ex(BIO *in, unsigned int flags,
|
| 250 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 251 |
+
|
| 252 |
+
int CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
|
| 253 |
+
unsigned int flags);
|
| 254 |
+
CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md,
|
| 255 |
+
unsigned int flags);
|
| 256 |
+
CMS_ContentInfo *CMS_digest_create_ex(BIO *in, const EVP_MD *md,
|
| 257 |
+
unsigned int flags, OSSL_LIB_CTX *libctx,
|
| 258 |
+
const char *propq);
|
| 259 |
+
|
| 260 |
+
int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms,
|
| 261 |
+
const unsigned char *key, size_t keylen,
|
| 262 |
+
BIO *dcont, BIO *out, unsigned int flags);
|
| 263 |
+
CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher,
|
| 264 |
+
const unsigned char *key,
|
| 265 |
+
size_t keylen, unsigned int flags);
|
| 266 |
+
CMS_ContentInfo *CMS_EncryptedData_encrypt_ex(BIO *in, const EVP_CIPHER *cipher,
|
| 267 |
+
const unsigned char *key,
|
| 268 |
+
size_t keylen, unsigned int flags,
|
| 269 |
+
OSSL_LIB_CTX *libctx,
|
| 270 |
+
const char *propq);
|
| 271 |
+
|
| 272 |
+
int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph,
|
| 273 |
+
const unsigned char *key, size_t keylen);
|
| 274 |
+
|
| 275 |
+
int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
|
| 276 |
+
X509_STORE *store, BIO *dcont, BIO *out, unsigned int flags);
|
| 277 |
+
|
| 278 |
+
int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms,
|
| 279 |
+
STACK_OF(X509) *certs,
|
| 280 |
+
X509_STORE *store, unsigned int flags);
|
| 281 |
+
|
| 282 |
+
STACK_OF(X509) *CMS_get0_signers(CMS_ContentInfo *cms);
|
| 283 |
+
|
| 284 |
+
CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in,
|
| 285 |
+
const EVP_CIPHER *cipher, unsigned int flags);
|
| 286 |
+
CMS_ContentInfo *CMS_encrypt_ex(STACK_OF(X509) *certs, BIO *in,
|
| 287 |
+
const EVP_CIPHER *cipher, unsigned int flags,
|
| 288 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 289 |
+
|
| 290 |
+
int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert,
|
| 291 |
+
BIO *dcont, BIO *out, unsigned int flags);
|
| 292 |
+
|
| 293 |
+
int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert);
|
| 294 |
+
int CMS_decrypt_set1_pkey_and_peer(CMS_ContentInfo *cms, EVP_PKEY *pk,
|
| 295 |
+
X509 *cert, X509 *peer);
|
| 296 |
+
int CMS_decrypt_set1_key(CMS_ContentInfo *cms,
|
| 297 |
+
unsigned char *key, size_t keylen,
|
| 298 |
+
const unsigned char *id, size_t idlen);
|
| 299 |
+
int CMS_decrypt_set1_password(CMS_ContentInfo *cms,
|
| 300 |
+
unsigned char *pass, ossl_ssize_t passlen);
|
| 301 |
+
|
| 302 |
+
STACK_OF(CMS_RecipientInfo) *CMS_get0_RecipientInfos(CMS_ContentInfo *cms);
|
| 303 |
+
int CMS_RecipientInfo_type(CMS_RecipientInfo *ri);
|
| 304 |
+
EVP_PKEY_CTX *CMS_RecipientInfo_get0_pkey_ctx(CMS_RecipientInfo *ri);
|
| 305 |
+
CMS_ContentInfo *CMS_AuthEnvelopedData_create(const EVP_CIPHER *cipher);
|
| 306 |
+
CMS_ContentInfo *
|
| 307 |
+
CMS_AuthEnvelopedData_create_ex(const EVP_CIPHER *cipher, OSSL_LIB_CTX *libctx,
|
| 308 |
+
const char *propq);
|
| 309 |
+
CMS_ContentInfo *CMS_EnvelopedData_create(const EVP_CIPHER *cipher);
|
| 310 |
+
CMS_ContentInfo *CMS_EnvelopedData_create_ex(const EVP_CIPHER *cipher,
|
| 311 |
+
OSSL_LIB_CTX *libctx,
|
| 312 |
+
const char *propq);
|
| 313 |
+
BIO *CMS_EnvelopedData_decrypt(CMS_EnvelopedData *env, BIO *detached_data,
|
| 314 |
+
EVP_PKEY *pkey, X509 *cert,
|
| 315 |
+
ASN1_OCTET_STRING *secret, unsigned int flags,
|
| 316 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 317 |
+
|
| 318 |
+
CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms,
|
| 319 |
+
X509 *recip, unsigned int flags);
|
| 320 |
+
CMS_RecipientInfo *CMS_add1_recipient(CMS_ContentInfo *cms, X509 *recip,
|
| 321 |
+
EVP_PKEY *originatorPrivKey, X509 *originator, unsigned int flags);
|
| 322 |
+
int CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey);
|
| 323 |
+
int CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert);
|
| 324 |
+
int CMS_RecipientInfo_ktri_get0_algs(CMS_RecipientInfo *ri,
|
| 325 |
+
EVP_PKEY **pk, X509 **recip,
|
| 326 |
+
X509_ALGOR **palg);
|
| 327 |
+
int CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri,
|
| 328 |
+
ASN1_OCTET_STRING **keyid,
|
| 329 |
+
X509_NAME **issuer,
|
| 330 |
+
ASN1_INTEGER **sno);
|
| 331 |
+
|
| 332 |
+
CMS_RecipientInfo *CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid,
|
| 333 |
+
unsigned char *key, size_t keylen,
|
| 334 |
+
unsigned char *id, size_t idlen,
|
| 335 |
+
ASN1_GENERALIZEDTIME *date,
|
| 336 |
+
ASN1_OBJECT *otherTypeId,
|
| 337 |
+
ASN1_TYPE *otherType);
|
| 338 |
+
|
| 339 |
+
int CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri,
|
| 340 |
+
X509_ALGOR **palg,
|
| 341 |
+
ASN1_OCTET_STRING **pid,
|
| 342 |
+
ASN1_GENERALIZEDTIME **pdate,
|
| 343 |
+
ASN1_OBJECT **potherid,
|
| 344 |
+
ASN1_TYPE **pothertype);
|
| 345 |
+
|
| 346 |
+
int CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri,
|
| 347 |
+
unsigned char *key, size_t keylen);
|
| 348 |
+
|
| 349 |
+
int CMS_RecipientInfo_kekri_id_cmp(CMS_RecipientInfo *ri,
|
| 350 |
+
const unsigned char *id, size_t idlen);
|
| 351 |
+
|
| 352 |
+
int CMS_RecipientInfo_set0_password(CMS_RecipientInfo *ri,
|
| 353 |
+
unsigned char *pass,
|
| 354 |
+
ossl_ssize_t passlen);
|
| 355 |
+
|
| 356 |
+
CMS_RecipientInfo *CMS_add0_recipient_password(CMS_ContentInfo *cms,
|
| 357 |
+
int iter, int wrap_nid,
|
| 358 |
+
int pbe_nid,
|
| 359 |
+
unsigned char *pass,
|
| 360 |
+
ossl_ssize_t passlen,
|
| 361 |
+
const EVP_CIPHER *kekciph);
|
| 362 |
+
|
| 363 |
+
int CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
|
| 364 |
+
int CMS_RecipientInfo_encrypt(const CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
|
| 365 |
+
|
| 366 |
+
int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
|
| 367 |
+
unsigned int flags);
|
| 368 |
+
CMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags);
|
| 369 |
+
|
| 370 |
+
int CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid);
|
| 371 |
+
const ASN1_OBJECT *CMS_get0_eContentType(CMS_ContentInfo *cms);
|
| 372 |
+
|
| 373 |
+
CMS_CertificateChoices *CMS_add0_CertificateChoices(CMS_ContentInfo *cms);
|
| 374 |
+
int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert);
|
| 375 |
+
int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert);
|
| 376 |
+
STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms);
|
| 377 |
+
|
| 378 |
+
CMS_RevocationInfoChoice *CMS_add0_RevocationInfoChoice(CMS_ContentInfo *cms);
|
| 379 |
+
int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl);
|
| 380 |
+
int CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl);
|
| 381 |
+
STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms);
|
| 382 |
+
|
| 383 |
+
int CMS_SignedData_init(CMS_ContentInfo *cms);
|
| 384 |
+
CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms,
|
| 385 |
+
X509 *signer, EVP_PKEY *pk, const EVP_MD *md,
|
| 386 |
+
unsigned int flags);
|
| 387 |
+
EVP_PKEY_CTX *CMS_SignerInfo_get0_pkey_ctx(CMS_SignerInfo *si);
|
| 388 |
+
EVP_MD_CTX *CMS_SignerInfo_get0_md_ctx(CMS_SignerInfo *si);
|
| 389 |
+
STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms);
|
| 390 |
+
|
| 391 |
+
void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer);
|
| 392 |
+
int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si,
|
| 393 |
+
ASN1_OCTET_STRING **keyid,
|
| 394 |
+
X509_NAME **issuer, ASN1_INTEGER **sno);
|
| 395 |
+
int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert);
|
| 396 |
+
int CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
|
| 397 |
+
unsigned int flags);
|
| 398 |
+
void CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk,
|
| 399 |
+
X509 **signer, X509_ALGOR **pdig,
|
| 400 |
+
X509_ALGOR **psig);
|
| 401 |
+
ASN1_OCTET_STRING *CMS_SignerInfo_get0_signature(CMS_SignerInfo *si);
|
| 402 |
+
int CMS_SignerInfo_sign(CMS_SignerInfo *si);
|
| 403 |
+
int CMS_SignerInfo_verify(CMS_SignerInfo *si);
|
| 404 |
+
int CMS_SignerInfo_verify_content(CMS_SignerInfo *si, BIO *chain);
|
| 405 |
+
BIO *CMS_SignedData_verify(CMS_SignedData *sd, BIO *detached_data,
|
| 406 |
+
STACK_OF(X509) *scerts, X509_STORE *store,
|
| 407 |
+
STACK_OF(X509) *extra, STACK_OF(X509_CRL) *crls,
|
| 408 |
+
unsigned int flags,
|
| 409 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 410 |
+
|
| 411 |
+
int CMS_add_smimecap(CMS_SignerInfo *si, STACK_OF(X509_ALGOR) *algs);
|
| 412 |
+
int CMS_add_simple_smimecap(STACK_OF(X509_ALGOR) **algs,
|
| 413 |
+
int algnid, int keysize);
|
| 414 |
+
int CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap);
|
| 415 |
+
|
| 416 |
+
int CMS_signed_get_attr_count(const CMS_SignerInfo *si);
|
| 417 |
+
int CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
|
| 418 |
+
int lastpos);
|
| 419 |
+
int CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj,
|
| 420 |
+
int lastpos);
|
| 421 |
+
X509_ATTRIBUTE *CMS_signed_get_attr(const CMS_SignerInfo *si, int loc);
|
| 422 |
+
X509_ATTRIBUTE *CMS_signed_delete_attr(CMS_SignerInfo *si, int loc);
|
| 423 |
+
int CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
|
| 424 |
+
int CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si,
|
| 425 |
+
const ASN1_OBJECT *obj, int type,
|
| 426 |
+
const void *bytes, int len);
|
| 427 |
+
int CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si,
|
| 428 |
+
int nid, int type,
|
| 429 |
+
const void *bytes, int len);
|
| 430 |
+
int CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si,
|
| 431 |
+
const char *attrname, int type,
|
| 432 |
+
const void *bytes, int len);
|
| 433 |
+
void *CMS_signed_get0_data_by_OBJ(const CMS_SignerInfo *si,
|
| 434 |
+
const ASN1_OBJECT *oid,
|
| 435 |
+
int lastpos, int type);
|
| 436 |
+
|
| 437 |
+
int CMS_unsigned_get_attr_count(const CMS_SignerInfo *si);
|
| 438 |
+
int CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
|
| 439 |
+
int lastpos);
|
| 440 |
+
int CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si,
|
| 441 |
+
const ASN1_OBJECT *obj, int lastpos);
|
| 442 |
+
X509_ATTRIBUTE *CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc);
|
| 443 |
+
X509_ATTRIBUTE *CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc);
|
| 444 |
+
int CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
|
| 445 |
+
int CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si,
|
| 446 |
+
const ASN1_OBJECT *obj, int type,
|
| 447 |
+
const void *bytes, int len);
|
| 448 |
+
int CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si,
|
| 449 |
+
int nid, int type,
|
| 450 |
+
const void *bytes, int len);
|
| 451 |
+
int CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si,
|
| 452 |
+
const char *attrname, int type,
|
| 453 |
+
const void *bytes, int len);
|
| 454 |
+
void *CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid,
|
| 455 |
+
int lastpos, int type);
|
| 456 |
+
|
| 457 |
+
int CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr);
|
| 458 |
+
CMS_ReceiptRequest *CMS_ReceiptRequest_create0(
|
| 459 |
+
unsigned char *id, int idlen, int allorfirst,
|
| 460 |
+
STACK_OF(GENERAL_NAMES) *receiptList,
|
| 461 |
+
STACK_OF(GENERAL_NAMES) *receiptsTo);
|
| 462 |
+
CMS_ReceiptRequest *CMS_ReceiptRequest_create0_ex(
|
| 463 |
+
unsigned char *id, int idlen, int allorfirst,
|
| 464 |
+
STACK_OF(GENERAL_NAMES) *receiptList,
|
| 465 |
+
STACK_OF(GENERAL_NAMES) *receiptsTo,
|
| 466 |
+
OSSL_LIB_CTX *libctx);
|
| 467 |
+
|
| 468 |
+
int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr);
|
| 469 |
+
void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr,
|
| 470 |
+
ASN1_STRING **pcid,
|
| 471 |
+
int *pallorfirst,
|
| 472 |
+
STACK_OF(GENERAL_NAMES) **plist,
|
| 473 |
+
STACK_OF(GENERAL_NAMES) **prto);
|
| 474 |
+
int CMS_RecipientInfo_kari_get0_alg(CMS_RecipientInfo *ri,
|
| 475 |
+
X509_ALGOR **palg,
|
| 476 |
+
ASN1_OCTET_STRING **pukm);
|
| 477 |
+
STACK_OF(CMS_RecipientEncryptedKey)
|
| 478 |
+
*CMS_RecipientInfo_kari_get0_reks(CMS_RecipientInfo *ri);
|
| 479 |
+
|
| 480 |
+
int CMS_RecipientInfo_kari_get0_orig_id(CMS_RecipientInfo *ri,
|
| 481 |
+
X509_ALGOR **pubalg,
|
| 482 |
+
ASN1_BIT_STRING **pubkey,
|
| 483 |
+
ASN1_OCTET_STRING **keyid,
|
| 484 |
+
X509_NAME **issuer,
|
| 485 |
+
ASN1_INTEGER **sno);
|
| 486 |
+
|
| 487 |
+
int CMS_RecipientInfo_kari_orig_id_cmp(CMS_RecipientInfo *ri, X509 *cert);
|
| 488 |
+
|
| 489 |
+
int CMS_RecipientEncryptedKey_get0_id(CMS_RecipientEncryptedKey *rek,
|
| 490 |
+
ASN1_OCTET_STRING **keyid,
|
| 491 |
+
ASN1_GENERALIZEDTIME **tm,
|
| 492 |
+
CMS_OtherKeyAttribute **other,
|
| 493 |
+
X509_NAME **issuer, ASN1_INTEGER **sno);
|
| 494 |
+
int CMS_RecipientEncryptedKey_cert_cmp(CMS_RecipientEncryptedKey *rek,
|
| 495 |
+
X509 *cert);
|
| 496 |
+
int CMS_RecipientInfo_kari_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk);
|
| 497 |
+
int CMS_RecipientInfo_kari_set0_pkey_and_peer(CMS_RecipientInfo *ri, EVP_PKEY *pk, X509 *peer);
|
| 498 |
+
EVP_CIPHER_CTX *CMS_RecipientInfo_kari_get0_ctx(CMS_RecipientInfo *ri);
|
| 499 |
+
int CMS_RecipientInfo_kari_decrypt(CMS_ContentInfo *cms,
|
| 500 |
+
CMS_RecipientInfo *ri,
|
| 501 |
+
CMS_RecipientEncryptedKey *rek);
|
| 502 |
+
|
| 503 |
+
int CMS_SharedInfo_encode(unsigned char **pder, X509_ALGOR *kekalg,
|
| 504 |
+
ASN1_OCTET_STRING *ukm, int keylen);
|
| 505 |
+
|
| 506 |
+
/* Backward compatibility for spelling errors. */
|
| 507 |
+
#define CMS_R_UNKNOWN_DIGEST_ALGORITM CMS_R_UN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* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_CMSERR_H
|
| 12 |
+
#define OPENSSL_CMSERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
#ifndef OPENSSL_NO_CMS
|
| 20 |
+
|
| 21 |
+
/*
|
| 22 |
+
* CMS reason codes.
|
| 23 |
+
*/
|
| 24 |
+
#define CMS_R_ADD_SIGNER_ERROR 99
|
| 25 |
+
#define CMS_R_ATTRIBUTE_ERROR 161
|
| 26 |
+
#define CMS_R_CERTIFICATE_ALREADY_PRESENT 175
|
| 27 |
+
#define CMS_R_CERTIFICATE_HAS_NO_KEYID 160
|
| 28 |
+
#define CMS_R_CERTIFICATE_VERIFY_ERROR 100
|
| 29 |
+
#define CMS_R_CIPHER_AEAD_IN_ENVELOPED_DATA 200
|
| 30 |
+
#define CMS_R_CIPHER_AEAD_SET_TAG_ERROR 184
|
| 31 |
+
#define CMS_R_CIPHER_GET_TAG 185
|
| 32 |
+
#define CMS_R_CIPHER_INITIALISATION_ERROR 101
|
| 33 |
+
#define CMS_R_CIPHER_PARAMETER_INITIALISATION_ERROR 102
|
| 34 |
+
#define CMS_R_CMS_DATAFINAL_ERROR 103
|
| 35 |
+
#define CMS_R_CMS_LIB 104
|
| 36 |
+
#define CMS_R_CONTENTIDENTIFIER_MISMATCH 170
|
| 37 |
+
#define CMS_R_CONTENT_NOT_FOUND 105
|
| 38 |
+
#define CMS_R_CONTENT_TYPE_MISMATCH 171
|
| 39 |
+
#define CMS_R_CONTENT_TYPE_NOT_COMPRESSED_DATA 106
|
| 40 |
+
#define CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA 107
|
| 41 |
+
#define CMS_R_CONTENT_TYPE_NOT_SIGNED_DATA 108
|
| 42 |
+
#define CMS_R_CONTENT_VERIFY_ERROR 109
|
| 43 |
+
#define CMS_R_CTRL_ERROR 110
|
| 44 |
+
#define CMS_R_CTRL_FAILURE 111
|
| 45 |
+
#define CMS_R_DECODE_ERROR 187
|
| 46 |
+
#define CMS_R_DECRYPT_ERROR 112
|
| 47 |
+
#define CMS_R_ERROR_GETTING_PUBLIC_KEY 113
|
| 48 |
+
#define CMS_R_ERROR_READING_MESSAGEDIGEST_ATTRIBUTE 114
|
| 49 |
+
#define CMS_R_ERROR_SETTING_KEY 115
|
| 50 |
+
#define CMS_R_ERROR_SETTING_RECIPIENTINFO 116
|
| 51 |
+
#define CMS_R_ERROR_UNSUPPORTED_STATIC_KEY_AGREEMENT 196
|
| 52 |
+
#define CMS_R_ESS_SIGNING_CERTID_MISMATCH_ERROR 183
|
| 53 |
+
#define CMS_R_INVALID_ENCRYPTED_KEY_LENGTH 117
|
| 54 |
+
#define CMS_R_INVALID_KEY_ENCRYPTION_PARAMETER 176
|
| 55 |
+
#define CMS_R_INVALID_KEY_LENGTH 118
|
| 56 |
+
#define CMS_R_INVALID_LABEL 190
|
| 57 |
+
#define CMS_R_INVALID_OAEP_PARAMETERS 191
|
| 58 |
+
#define CMS_R_KDF_PARAMETER_ERROR 186
|
| 59 |
+
#define CMS_R_MD_BIO_INIT_ERROR 119
|
| 60 |
+
#define CMS_R_MESSAGEDIGEST_ATTRIBUTE_WRONG_LENGTH 120
|
| 61 |
+
#define CMS_R_MESSAGEDIGEST_WRONG_LENGTH 121
|
| 62 |
+
#define CMS_R_MSGSIGDIGEST_ERROR 172
|
| 63 |
+
#define CMS_R_MSGSIGDIGEST_VERIFICATION_FAILURE 162
|
| 64 |
+
#define CMS_R_MSGSIGDIGEST_WRONG_LENGTH 163
|
| 65 |
+
#define CMS_R_NEED_ONE_SIGNER 164
|
| 66 |
+
#define CMS_R_NOT_A_SIGNED_RECEIPT 165
|
| 67 |
+
#define CMS_R_NOT_ENCRYPTED_DATA 122
|
| 68 |
+
#define CMS_R_NOT_KEK 123
|
| 69 |
+
#define CMS_R_NOT_KEY_AGREEMENT 181
|
| 70 |
+
#define CMS_R_NOT_KEY_TRANSPORT 124
|
| 71 |
+
#define CMS_R_NOT_PWRI 177
|
| 72 |
+
#define CMS_R_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 125
|
| 73 |
+
#define CMS_R_NO_CIPHER 126
|
| 74 |
+
#define CMS_R_NO_CONTENT 127
|
| 75 |
+
#define CMS_R_NO_CONTENT_TYPE 173
|
| 76 |
+
#define CMS_R_NO_DEFAULT_DIGEST 128
|
| 77 |
+
#define CMS_R_NO_DIGEST_SET 129
|
| 78 |
+
#define CMS_R_NO_KEY 130
|
| 79 |
+
#define CMS_R_NO_KEY_OR_CERT 174
|
| 80 |
+
#define CMS_R_NO_MATCHING_DIGEST 131
|
| 81 |
+
#define CMS_R_NO_MATCHING_RECIPIENT 132
|
| 82 |
+
#define CMS_R_NO_MATCHING_SIGNATURE 166
|
| 83 |
+
#define CMS_R_NO_MSGSIGDIGEST 167
|
| 84 |
+
#define CMS_R_NO_PASSWORD 178
|
| 85 |
+
#define CMS_R_NO_PRIVATE_KEY 133
|
| 86 |
+
#define CMS_R_NO_PUBLIC_KEY 134
|
| 87 |
+
#define CMS_R_NO_RECEIPT_REQUEST 168
|
| 88 |
+
#define CMS_R_NO_SIGNERS 135
|
| 89 |
+
#define CMS_R_OPERATION_UNSUPPORTED 182
|
| 90 |
+
#define CMS_R_PEER_KEY_ERROR 188
|
| 91 |
+
#define CMS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 136
|
| 92 |
+
#define CMS_R_RECEIPT_DECODE_ERROR 169
|
| 93 |
+
#define CMS_R_RECIPIENT_ERROR 137
|
| 94 |
+
#define CMS_R_SHARED_INFO_ERROR 189
|
| 95 |
+
#define CMS_R_SIGNER_CERTIFICATE_NOT_FOUND 138
|
| 96 |
+
#define CMS_R_SIGNFINAL_ERROR 139
|
| 97 |
+
#define CMS_R_SMIME_TEXT_ERROR 140
|
| 98 |
+
#define CMS_R_STORE_INIT_ERROR 141
|
| 99 |
+
#define CMS_R_TYPE_NOT_COMPRESSED_DATA 142
|
| 100 |
+
#define CMS_R_TYPE_NOT_DATA 143
|
| 101 |
+
#define CMS_R_TYPE_NOT_DIGESTED_DATA 144
|
| 102 |
+
#define CMS_R_TYPE_NOT_ENCRYPTED_DATA 145
|
| 103 |
+
#define CMS_R_TYPE_NOT_ENVELOPED_DATA 146
|
| 104 |
+
#define CMS_R_UNABLE_TO_FINALIZE_CONTEXT 147
|
| 105 |
+
#define CMS_R_UNKNOWN_CIPHER 148
|
| 106 |
+
#define CMS_R_UNKNOWN_DIGEST_ALGORITHM 149
|
| 107 |
+
#define CMS_R_UNKNOWN_ID 150
|
| 108 |
+
#define CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM 151
|
| 109 |
+
#define CMS_R_UNSUPPORTED_CONTENT_ENCRYPTION_ALGORITHM 194
|
| 110 |
+
#define CMS_R_UNSUPPORTED_CONTENT_TYPE 152
|
| 111 |
+
#define CMS_R_UNSUPPORTED_ENCRYPTION_TYPE 192
|
| 112 |
+
#define CMS_R_UNSUPPORTED_KEK_ALGORITHM 153
|
| 113 |
+
#define CMS_R_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM 179
|
| 114 |
+
#define CMS_R_UNSUPPORTED_LABEL_SOURCE 193
|
| 115 |
+
#define CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE 155
|
| 116 |
+
#define CMS_R_UNSUPPORTED_RECIPIENT_TYPE 154
|
| 117 |
+
#define CMS_R_UNSUPPORTED_SIGNATURE_ALGORITHM 195
|
| 118 |
+
#define CMS_R_UNSUPPORTED_TYPE 156
|
| 119 |
+
#define CMS_R_UNWRAP_ERROR 157
|
| 120 |
+
#define CMS_R_UNWRAP_FAILURE 180
|
| 121 |
+
#define CMS_R_VERIFICATION_FAILURE 158
|
| 122 |
+
#define CMS_R_WRAP_ERROR 159
|
| 123 |
+
|
| 124 |
+
#endif
|
| 125 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/comp.h
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2015-2024 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 |
+
/* clang-format off */
|
| 11 |
+
|
| 12 |
+
/* clang-format on */
|
| 13 |
+
|
| 14 |
+
#ifndef OPENSSL_COMP_H
|
| 15 |
+
#define OPENSSL_COMP_H
|
| 16 |
+
#pragma once
|
| 17 |
+
|
| 18 |
+
#include <openssl/macros.h>
|
| 19 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 20 |
+
#define HEADER_COMP_H
|
| 21 |
+
#endif
|
| 22 |
+
|
| 23 |
+
#include <openssl/opensslconf.h>
|
| 24 |
+
|
| 25 |
+
#include <openssl/crypto.h>
|
| 26 |
+
#include <openssl/comperr.h>
|
| 27 |
+
#ifdef __cplusplus
|
| 28 |
+
extern "C" {
|
| 29 |
+
#endif
|
| 30 |
+
|
| 31 |
+
#ifndef OPENSSL_NO_COMP
|
| 32 |
+
|
| 33 |
+
COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
|
| 34 |
+
const COMP_METHOD *COMP_CTX_get_method(const COMP_CTX *ctx);
|
| 35 |
+
int COMP_CTX_get_type(const COMP_CTX *comp);
|
| 36 |
+
int COMP_get_type(const COMP_METHOD *meth);
|
| 37 |
+
const char *COMP_get_name(const COMP_METHOD *meth);
|
| 38 |
+
void COMP_CTX_free(COMP_CTX *ctx);
|
| 39 |
+
|
| 40 |
+
int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
|
| 41 |
+
unsigned char *in, int ilen);
|
| 42 |
+
int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
|
| 43 |
+
unsigned char *in, int ilen);
|
| 44 |
+
|
| 45 |
+
COMP_METHOD *COMP_zlib(void);
|
| 46 |
+
COMP_METHOD *COMP_zlib_oneshot(void);
|
| 47 |
+
COMP_METHOD *COMP_brotli(void);
|
| 48 |
+
COMP_METHOD *COMP_brotli_oneshot(void);
|
| 49 |
+
COMP_METHOD *COMP_zstd(void);
|
| 50 |
+
COMP_METHOD *COMP_zstd_oneshot(void);
|
| 51 |
+
|
| 52 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 53 |
+
#define COMP_zlib_cleanup() \
|
| 54 |
+
while (0) \
|
| 55 |
+
continue
|
| 56 |
+
#endif
|
| 57 |
+
|
| 58 |
+
#ifdef OPENSSL_BIO_H
|
| 59 |
+
const BIO_METHOD *BIO_f_zlib(void);
|
| 60 |
+
const BIO_METHOD *BIO_f_brotli(void);
|
| 61 |
+
const BIO_METHOD *BIO_f_zstd(void);
|
| 62 |
+
#endif
|
| 63 |
+
|
| 64 |
+
#endif
|
| 65 |
+
|
| 66 |
+
typedef struct ssl_comp_st SSL_COMP;
|
| 67 |
+
|
| 68 |
+
/* clang-format off */
|
| 69 |
+
SKM_DEFINE_STACK_OF_INTERNAL(SSL_COMP, SSL_COMP, SSL_COMP)
|
| 70 |
+
#define sk_SSL_COMP_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_COMP_sk_type(sk))
|
| 71 |
+
#define sk_SSL_COMP_value(sk, idx) ((SSL_COMP *)OPENSSL_sk_value(ossl_check_const_SSL_COMP_sk_type(sk), (idx)))
|
| 72 |
+
#define sk_SSL_COMP_new(cmp) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new(ossl_check_SSL_COMP_compfunc_type(cmp)))
|
| 73 |
+
#define sk_SSL_COMP_new_null() ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new_null())
|
| 74 |
+
#define sk_SSL_COMP_new_reserve(cmp, n) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new_reserve(ossl_check_SSL_COMP_compfunc_type(cmp), (n)))
|
| 75 |
+
#define sk_SSL_COMP_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SSL_COMP_sk_type(sk), (n))
|
| 76 |
+
#define sk_SSL_COMP_free(sk) OPENSSL_sk_free(ossl_check_SSL_COMP_sk_type(sk))
|
| 77 |
+
#define sk_SSL_COMP_zero(sk) OPENSSL_sk_zero(ossl_check_SSL_COMP_sk_type(sk))
|
| 78 |
+
#define sk_SSL_COMP_delete(sk, i) ((SSL_COMP *)OPENSSL_sk_delete(ossl_check_SSL_COMP_sk_type(sk), (i)))
|
| 79 |
+
#define sk_SSL_COMP_delete_ptr(sk, ptr) ((SSL_COMP *)OPENSSL_sk_delete_ptr(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr)))
|
| 80 |
+
#define sk_SSL_COMP_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 81 |
+
#define sk_SSL_COMP_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 82 |
+
#define sk_SSL_COMP_pop(sk) ((SSL_COMP *)OPENSSL_sk_pop(ossl_check_SSL_COMP_sk_type(sk)))
|
| 83 |
+
#define sk_SSL_COMP_shift(sk) ((SSL_COMP *)OPENSSL_sk_shift(ossl_check_SSL_COMP_sk_type(sk)))
|
| 84 |
+
#define sk_SSL_COMP_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SSL_COMP_sk_type(sk),ossl_check_SSL_COMP_freefunc_type(freefunc))
|
| 85 |
+
#define sk_SSL_COMP_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr), (idx))
|
| 86 |
+
#define sk_SSL_COMP_set(sk, idx, ptr) ((SSL_COMP *)OPENSSL_sk_set(ossl_check_SSL_COMP_sk_type(sk), (idx), ossl_check_SSL_COMP_type(ptr)))
|
| 87 |
+
#define sk_SSL_COMP_find(sk, ptr) OPENSSL_sk_find(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 88 |
+
#define sk_SSL_COMP_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 89 |
+
#define sk_SSL_COMP_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr), pnum)
|
| 90 |
+
#define sk_SSL_COMP_sort(sk) OPENSSL_sk_sort(ossl_check_SSL_COMP_sk_type(sk))
|
| 91 |
+
#define sk_SSL_COMP_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SSL_COMP_sk_type(sk))
|
| 92 |
+
#define sk_SSL_COMP_dup(sk) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_dup(ossl_check_const_SSL_COMP_sk_type(sk)))
|
| 93 |
+
#define sk_SSL_COMP_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_deep_copy(ossl_check_const_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_copyfunc_type(copyfunc), ossl_check_SSL_COMP_freefunc_type(freefunc)))
|
| 94 |
+
#define sk_SSL_COMP_set_cmp_func(sk, cmp) ((sk_SSL_COMP_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_compfunc_type(cmp)))
|
| 95 |
+
|
| 96 |
+
/* clang-format on */
|
| 97 |
+
|
| 98 |
+
#ifdef __cplusplus
|
| 99 |
+
}
|
| 100 |
+
#endif
|
| 101 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/comperr.h
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_COMPERR_H
|
| 12 |
+
#define OPENSSL_COMPERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
#ifndef OPENSSL_NO_COMP
|
| 20 |
+
|
| 21 |
+
/*
|
| 22 |
+
* COMP reason codes.
|
| 23 |
+
*/
|
| 24 |
+
#define COMP_R_BROTLI_DECODE_ERROR 102
|
| 25 |
+
#define COMP_R_BROTLI_ENCODE_ERROR 103
|
| 26 |
+
#define COMP_R_BROTLI_NOT_SUPPORTED 104
|
| 27 |
+
#define COMP_R_ZLIB_DEFLATE_ERROR 99
|
| 28 |
+
#define COMP_R_ZLIB_INFLATE_ERROR 100
|
| 29 |
+
#define COMP_R_ZLIB_NOT_SUPPORTED 101
|
| 30 |
+
#define COMP_R_ZSTD_COMPRESS_ERROR 105
|
| 31 |
+
#define COMP_R_ZSTD_DECODE_ERROR 106
|
| 32 |
+
#define COMP_R_ZSTD_DECOMPRESS_ERROR 107
|
| 33 |
+
#define COMP_R_ZSTD_NOT_SUPPORTED 108
|
| 34 |
+
|
| 35 |
+
#endif
|
| 36 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/conf.h
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/conf.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
/* clang-format off */
|
| 14 |
+
|
| 15 |
+
/* clang-format on */
|
| 16 |
+
|
| 17 |
+
#ifndef OPENSSL_CONF_H
|
| 18 |
+
#define OPENSSL_CONF_H
|
| 19 |
+
#pragma once
|
| 20 |
+
|
| 21 |
+
#include <openssl/macros.h>
|
| 22 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 23 |
+
#define HEADER_CONF_H
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
#include <openssl/bio.h>
|
| 27 |
+
#include <openssl/lhash.h>
|
| 28 |
+
#include <openssl/safestack.h>
|
| 29 |
+
#include <openssl/e_os2.h>
|
| 30 |
+
#include <openssl/types.h>
|
| 31 |
+
#include <openssl/conferr.h>
|
| 32 |
+
#ifndef OPENSSL_NO_STDIO
|
| 33 |
+
#include <stdio.h>
|
| 34 |
+
#endif
|
| 35 |
+
|
| 36 |
+
#ifdef __cplusplus
|
| 37 |
+
extern "C" {
|
| 38 |
+
#endif
|
| 39 |
+
|
| 40 |
+
typedef struct {
|
| 41 |
+
char *section;
|
| 42 |
+
char *name;
|
| 43 |
+
char *value;
|
| 44 |
+
} CONF_VALUE;
|
| 45 |
+
|
| 46 |
+
/* clang-format off */
|
| 47 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CONF_VALUE, CONF_VALUE, CONF_VALUE)
|
| 48 |
+
#define sk_CONF_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_CONF_VALUE_sk_type(sk))
|
| 49 |
+
#define sk_CONF_VALUE_value(sk, idx) ((CONF_VALUE *)OPENSSL_sk_value(ossl_check_const_CONF_VALUE_sk_type(sk), (idx)))
|
| 50 |
+
#define sk_CONF_VALUE_new(cmp) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_new(ossl_check_CONF_VALUE_compfunc_type(cmp)))
|
| 51 |
+
#define sk_CONF_VALUE_new_null() ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_new_null())
|
| 52 |
+
#define sk_CONF_VALUE_new_reserve(cmp, n) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_new_reserve(ossl_check_CONF_VALUE_compfunc_type(cmp), (n)))
|
| 53 |
+
#define sk_CONF_VALUE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CONF_VALUE_sk_type(sk), (n))
|
| 54 |
+
#define sk_CONF_VALUE_free(sk) OPENSSL_sk_free(ossl_check_CONF_VALUE_sk_type(sk))
|
| 55 |
+
#define sk_CONF_VALUE_zero(sk) OPENSSL_sk_zero(ossl_check_CONF_VALUE_sk_type(sk))
|
| 56 |
+
#define sk_CONF_VALUE_delete(sk, i) ((CONF_VALUE *)OPENSSL_sk_delete(ossl_check_CONF_VALUE_sk_type(sk), (i)))
|
| 57 |
+
#define sk_CONF_VALUE_delete_ptr(sk, ptr) ((CONF_VALUE *)OPENSSL_sk_delete_ptr(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr)))
|
| 58 |
+
#define sk_CONF_VALUE_push(sk, ptr) OPENSSL_sk_push(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
| 59 |
+
#define sk_CONF_VALUE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
| 60 |
+
#define sk_CONF_VALUE_pop(sk) ((CONF_VALUE *)OPENSSL_sk_pop(ossl_check_CONF_VALUE_sk_type(sk)))
|
| 61 |
+
#define sk_CONF_VALUE_shift(sk) ((CONF_VALUE *)OPENSSL_sk_shift(ossl_check_CONF_VALUE_sk_type(sk)))
|
| 62 |
+
#define sk_CONF_VALUE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CONF_VALUE_sk_type(sk),ossl_check_CONF_VALUE_freefunc_type(freefunc))
|
| 63 |
+
#define sk_CONF_VALUE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr), (idx))
|
| 64 |
+
#define sk_CONF_VALUE_set(sk, idx, ptr) ((CONF_VALUE *)OPENSSL_sk_set(ossl_check_CONF_VALUE_sk_type(sk), (idx), ossl_check_CONF_VALUE_type(ptr)))
|
| 65 |
+
#define sk_CONF_VALUE_find(sk, ptr) OPENSSL_sk_find(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
| 66 |
+
#define sk_CONF_VALUE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
| 67 |
+
#define sk_CONF_VALUE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr), pnum)
|
| 68 |
+
#define sk_CONF_VALUE_sort(sk) OPENSSL_sk_sort(ossl_check_CONF_VALUE_sk_type(sk))
|
| 69 |
+
#define sk_CONF_VALUE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CONF_VALUE_sk_type(sk))
|
| 70 |
+
#define sk_CONF_VALUE_dup(sk) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_dup(ossl_check_const_CONF_VALUE_sk_type(sk)))
|
| 71 |
+
#define sk_CONF_VALUE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_deep_copy(ossl_check_const_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_copyfunc_type(copyfunc), ossl_check_CONF_VALUE_freefunc_type(freefunc)))
|
| 72 |
+
#define sk_CONF_VALUE_set_cmp_func(sk, cmp) ((sk_CONF_VALUE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_compfunc_type(cmp)))
|
| 73 |
+
DEFINE_LHASH_OF_INTERNAL(CONF_VALUE);
|
| 74 |
+
#define lh_CONF_VALUE_new(hfn, cmp) ((LHASH_OF(CONF_VALUE) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new(ossl_check_CONF_VALUE_lh_hashfunc_type(hfn), ossl_check_CONF_VALUE_lh_compfunc_type(cmp)), lh_CONF_VALUE_hash_thunk, lh_CONF_VALUE_comp_thunk, lh_CONF_VALUE_doall_thunk, lh_CONF_VALUE_doall_arg_thunk))
|
| 75 |
+
#define lh_CONF_VALUE_free(lh) OPENSSL_LH_free(ossl_check_CONF_VALUE_lh_type(lh))
|
| 76 |
+
#define lh_CONF_VALUE_flush(lh) OPENSSL_LH_flush(ossl_check_CONF_VALUE_lh_type(lh))
|
| 77 |
+
#define lh_CONF_VALUE_insert(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_insert(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_CONF_VALUE_lh_plain_type(ptr)))
|
| 78 |
+
#define lh_CONF_VALUE_delete(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_delete(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_const_CONF_VALUE_lh_plain_type(ptr)))
|
| 79 |
+
#define lh_CONF_VALUE_retrieve(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_retrieve(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_const_CONF_VALUE_lh_plain_type(ptr)))
|
| 80 |
+
#define lh_CONF_VALUE_error(lh) OPENSSL_LH_error(ossl_check_CONF_VALUE_lh_type(lh))
|
| 81 |
+
#define lh_CONF_VALUE_num_items(lh) OPENSSL_LH_num_items(ossl_check_CONF_VALUE_lh_type(lh))
|
| 82 |
+
#define lh_CONF_VALUE_node_stats_bio(lh, out) OPENSSL_LH_node_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out)
|
| 83 |
+
#define lh_CONF_VALUE_node_usage_stats_bio(lh, out) OPENSSL_LH_node_usage_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out)
|
| 84 |
+
#define lh_CONF_VALUE_stats_bio(lh, out) OPENSSL_LH_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out)
|
| 85 |
+
#define lh_CONF_VALUE_get_down_load(lh) OPENSSL_LH_get_down_load(ossl_check_CONF_VALUE_lh_type(lh))
|
| 86 |
+
#define lh_CONF_VALUE_set_down_load(lh, dl) OPENSSL_LH_set_down_load(ossl_check_CONF_VALUE_lh_type(lh), dl)
|
| 87 |
+
#define lh_CONF_VALUE_doall(lh, dfn) OPENSSL_LH_doall(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_CONF_VALUE_lh_doallfunc_type(dfn))
|
| 88 |
+
|
| 89 |
+
/* clang-format on */
|
| 90 |
+
|
| 91 |
+
struct conf_st;
|
| 92 |
+
struct conf_method_st;
|
| 93 |
+
typedef struct conf_method_st CONF_METHOD;
|
| 94 |
+
|
| 95 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 96 |
+
#include <openssl/conftypes.h>
|
| 97 |
+
#endif
|
| 98 |
+
|
| 99 |
+
/* Module definitions */
|
| 100 |
+
typedef struct conf_imodule_st CONF_IMODULE;
|
| 101 |
+
typedef struct conf_module_st CONF_MODULE;
|
| 102 |
+
|
| 103 |
+
STACK_OF(CONF_MODULE);
|
| 104 |
+
STACK_OF(CONF_IMODULE);
|
| 105 |
+
|
| 106 |
+
/* DSO module function typedefs */
|
| 107 |
+
typedef int conf_init_func(CONF_IMODULE *md, const CONF *cnf);
|
| 108 |
+
typedef void conf_finish_func(CONF_IMODULE *md);
|
| 109 |
+
|
| 110 |
+
#define CONF_MFLAGS_IGNORE_ERRORS 0x1
|
| 111 |
+
#define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2
|
| 112 |
+
#define CONF_MFLAGS_SILENT 0x4
|
| 113 |
+
#define CONF_MFLAGS_NO_DSO 0x8
|
| 114 |
+
#define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10
|
| 115 |
+
#define CONF_MFLAGS_DEFAULT_SECTION 0x20
|
| 116 |
+
|
| 117 |
+
int CONF_set_default_method(CONF_METHOD *meth);
|
| 118 |
+
void CONF_set_nconf(CONF *conf, LHASH_OF(CONF_VALUE) *hash);
|
| 119 |
+
LHASH_OF(CONF_VALUE) *CONF_load(LHASH_OF(CONF_VALUE) *conf, const char *file,
|
| 120 |
+
long *eline);
|
| 121 |
+
#ifndef OPENSSL_NO_STDIO
|
| 122 |
+
LHASH_OF(CONF_VALUE) *CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp,
|
| 123 |
+
long *eline);
|
| 124 |
+
#endif
|
| 125 |
+
LHASH_OF(CONF_VALUE) *CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp,
|
| 126 |
+
long *eline);
|
| 127 |
+
STACK_OF(CONF_VALUE) *CONF_get_section(LHASH_OF(CONF_VALUE) *conf,
|
| 128 |
+
const char *section);
|
| 129 |
+
char *CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group,
|
| 130 |
+
const char *name);
|
| 131 |
+
long CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group,
|
| 132 |
+
const char *name);
|
| 133 |
+
void CONF_free(LHASH_OF(CONF_VALUE) *conf);
|
| 134 |
+
#ifndef OPENSSL_NO_STDIO
|
| 135 |
+
int CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out);
|
| 136 |
+
#endif
|
| 137 |
+
int CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out);
|
| 138 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 139 |
+
OSSL_DEPRECATEDIN_1_1_0 void OPENSSL_config(const char *config_name);
|
| 140 |
+
#endif
|
| 141 |
+
|
| 142 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 143 |
+
#define OPENSSL_no_config() \
|
| 144 |
+
OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG, NULL)
|
| 145 |
+
#endif
|
| 146 |
+
|
| 147 |
+
/*
|
| 148 |
+
* New conf code. The semantics are different from the functions above. If
|
| 149 |
+
* that wasn't the case, the above functions would have been replaced
|
| 150 |
+
*/
|
| 151 |
+
|
| 152 |
+
CONF *NCONF_new_ex(OSSL_LIB_CTX *libctx, CONF_METHOD *meth);
|
| 153 |
+
OSSL_LIB_CTX *NCONF_get0_libctx(const CONF *conf);
|
| 154 |
+
CONF *NCONF_new(CONF_METHOD *meth);
|
| 155 |
+
CONF_METHOD *NCONF_default(void);
|
| 156 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 157 |
+
OSSL_DEPRECATEDIN_3_0 CONF_METHOD *NCONF_WIN32(void);
|
| 158 |
+
#endif
|
| 159 |
+
void NCONF_free(CONF *conf);
|
| 160 |
+
void NCONF_free_data(CONF *conf);
|
| 161 |
+
|
| 162 |
+
int NCONF_load(CONF *conf, const char *file, long *eline);
|
| 163 |
+
#ifndef OPENSSL_NO_STDIO
|
| 164 |
+
int NCONF_load_fp(CONF *conf, FILE *fp, long *eline);
|
| 165 |
+
#endif
|
| 166 |
+
int NCONF_load_bio(CONF *conf, BIO *bp, long *eline);
|
| 167 |
+
STACK_OF(OPENSSL_CSTRING) *NCONF_get_section_names(const CONF *conf);
|
| 168 |
+
STACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf,
|
| 169 |
+
const char *section);
|
| 170 |
+
char *NCONF_get_string(const CONF *conf, const char *group, const char *name);
|
| 171 |
+
int NCONF_get_number_e(const CONF *conf, const char *group, const char *name,
|
| 172 |
+
long *result);
|
| 173 |
+
#ifndef OPENSSL_NO_STDIO
|
| 174 |
+
int NCONF_dump_fp(const CONF *conf, FILE *out);
|
| 175 |
+
#endif
|
| 176 |
+
int NCONF_dump_bio(const CONF *conf, BIO *out);
|
| 177 |
+
|
| 178 |
+
#define NCONF_get_number(c, g, n, r) NCONF_get_number_e(c, g, n, r)
|
| 179 |
+
|
| 180 |
+
/* Module functions */
|
| 181 |
+
|
| 182 |
+
int CONF_modules_load(const CONF *cnf, const char *appname,
|
| 183 |
+
unsigned long flags);
|
| 184 |
+
int CONF_modules_load_file_ex(OSSL_LIB_CTX *libctx, const char *filename,
|
| 185 |
+
const char *appname, unsigned long flags);
|
| 186 |
+
int CONF_modules_load_file(const char *filename, const char *appname,
|
| 187 |
+
unsigned long flags);
|
| 188 |
+
void CONF_modules_unload(int all);
|
| 189 |
+
void CONF_modules_finish(void);
|
| 190 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 191 |
+
#define CONF_modules_free() \
|
| 192 |
+
while (0) \
|
| 193 |
+
continue
|
| 194 |
+
#endif
|
| 195 |
+
int CONF_module_add(const char *name, conf_init_func *ifunc,
|
| 196 |
+
conf_finish_func *ffunc);
|
| 197 |
+
|
| 198 |
+
const char *CONF_imodule_get_name(const CONF_IMODULE *md);
|
| 199 |
+
const char *CONF_imodule_get_value(const CONF_IMODULE *md);
|
| 200 |
+
void *CONF_imodule_get_usr_data(const CONF_IMODULE *md);
|
| 201 |
+
void CONF_imodule_set_usr_data(CONF_IMODULE *md, void *usr_data);
|
| 202 |
+
CONF_MODULE *CONF_imodule_get_module(const CONF_IMODULE *md);
|
| 203 |
+
unsigned long CONF_imodule_get_flags(const CONF_IMODULE *md);
|
| 204 |
+
void CONF_imodule_set_flags(CONF_IMODULE *md, unsigned long flags);
|
| 205 |
+
void *CONF_module_get_usr_data(CONF_MODULE *pmod);
|
| 206 |
+
void CONF_module_set_usr_data(CONF_MODULE *pmod, void *usr_data);
|
| 207 |
+
|
| 208 |
+
char *CONF_get1_default_config_file(void);
|
| 209 |
+
|
| 210 |
+
int CONF_parse_list(const char *list, int sep, int nospc,
|
| 211 |
+
int (*list_cb)(const char *elem, int len, void *usr),
|
| 212 |
+
void *arg);
|
| 213 |
+
|
| 214 |
+
void OPENSSL_load_builtin_modules(void);
|
| 215 |
+
|
| 216 |
+
#ifdef __cplusplus
|
| 217 |
+
}
|
| 218 |
+
#endif
|
| 219 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/conf_api.h
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-2016 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 OPENSSL_CONF_API_H
|
| 11 |
+
#define OPENSSL_CONF_API_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_CONF_API_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#include <openssl/lhash.h>
|
| 20 |
+
#include <openssl/conf.h>
|
| 21 |
+
|
| 22 |
+
#ifdef __cplusplus
|
| 23 |
+
extern "C" {
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
/* Up until OpenSSL 0.9.5a, this was new_section */
|
| 27 |
+
CONF_VALUE *_CONF_new_section(CONF *conf, const char *section);
|
| 28 |
+
/* Up until OpenSSL 0.9.5a, this was get_section */
|
| 29 |
+
CONF_VALUE *_CONF_get_section(const CONF *conf, const char *section);
|
| 30 |
+
/* Up until OpenSSL 0.9.5a, this was CONF_get_section */
|
| 31 |
+
STACK_OF(CONF_VALUE) *_CONF_get_section_values(const CONF *conf,
|
| 32 |
+
const char *section);
|
| 33 |
+
|
| 34 |
+
int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value);
|
| 35 |
+
char *_CONF_get_string(const CONF *conf, const char *section,
|
| 36 |
+
const char *name);
|
| 37 |
+
long _CONF_get_number(const CONF *conf, const char *section,
|
| 38 |
+
const char *name);
|
| 39 |
+
|
| 40 |
+
int _CONF_new_data(CONF *conf);
|
| 41 |
+
void _CONF_free_data(CONF *conf);
|
| 42 |
+
|
| 43 |
+
#ifdef __cplusplus
|
| 44 |
+
}
|
| 45 |
+
#endif
|
| 46 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/conferr.h
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_CONFERR_H
|
| 12 |
+
#define OPENSSL_CONFERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
/*
|
| 20 |
+
* CONF reason codes.
|
| 21 |
+
*/
|
| 22 |
+
#define CONF_R_ERROR_LOADING_DSO 110
|
| 23 |
+
#define CONF_R_INVALID_PRAGMA 122
|
| 24 |
+
#define CONF_R_LIST_CANNOT_BE_NULL 115
|
| 25 |
+
#define CONF_R_MANDATORY_BRACES_IN_VARIABLE_EXPANSION 123
|
| 26 |
+
#define CONF_R_MISSING_CLOSE_SQUARE_BRACKET 100
|
| 27 |
+
#define CONF_R_MISSING_EQUAL_SIGN 101
|
| 28 |
+
#define CONF_R_MISSING_INIT_FUNCTION 112
|
| 29 |
+
#define CONF_R_MODULE_INITIALIZATION_ERROR 109
|
| 30 |
+
#define CONF_R_NO_CLOSE_BRACE 102
|
| 31 |
+
#define CONF_R_NO_CONF 105
|
| 32 |
+
#define CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE 106
|
| 33 |
+
#define CONF_R_NO_SECTION 107
|
| 34 |
+
#define CONF_R_NO_SUCH_FILE 114
|
| 35 |
+
#define CONF_R_NO_VALUE 108
|
| 36 |
+
#define CONF_R_NUMBER_TOO_LARGE 121
|
| 37 |
+
#define CONF_R_OPENSSL_CONF_REFERENCES_MISSING_SECTION 124
|
| 38 |
+
#define CONF_R_RECURSIVE_DIRECTORY_INCLUDE 111
|
| 39 |
+
#define CONF_R_RECURSIVE_SECTION_REFERENCE 126
|
| 40 |
+
#define CONF_R_RELATIVE_PATH 125
|
| 41 |
+
#define CONF_R_SSL_COMMAND_SECTION_EMPTY 117
|
| 42 |
+
#define CONF_R_SSL_COMMAND_SECTION_NOT_FOUND 118
|
| 43 |
+
#define CONF_R_SSL_SECTION_EMPTY 119
|
| 44 |
+
#define CONF_R_SSL_SECTION_NOT_FOUND 120
|
| 45 |
+
#define CONF_R_UNABLE_TO_CREATE_NEW_SECTION 103
|
| 46 |
+
#define CONF_R_UNKNOWN_MODULE_NAME 113
|
| 47 |
+
#define CONF_R_VARIABLE_EXPANSION_TOO_LONG 116
|
| 48 |
+
#define CONF_R_VARIABLE_HAS_NO_VALUE 104
|
| 49 |
+
|
| 50 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/configuration.h
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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L Project Authors. All Rights Reserved.
|
| 7 |
+
*
|
| 8 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 9 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 10 |
+
* in the file LICENSE in the source distribution or at
|
| 11 |
+
* https://www.openssl.org/source/license.html
|
| 12 |
+
*/
|
| 13 |
+
|
| 14 |
+
#ifndef OPENSSL_CONFIGURATION_H
|
| 15 |
+
#define OPENSSL_CONFIGURATION_H
|
| 16 |
+
#pragma once
|
| 17 |
+
|
| 18 |
+
#ifdef __cplusplus
|
| 19 |
+
extern "C" {
|
| 20 |
+
#endif
|
| 21 |
+
|
| 22 |
+
#ifdef OPENSSL_ALGORITHM_DEFINES
|
| 23 |
+
#error OPENSSL_ALGORITHM_DEFINES no longer supported
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
/*
|
| 27 |
+
* OpenSSL was configured with the following options:
|
| 28 |
+
*/
|
| 29 |
+
|
| 30 |
+
/* clang-format off */
|
| 31 |
+
# define OPENSSL_CONFIGURED_API 30500
|
| 32 |
+
# ifndef OPENSSL_RAND_SEED_OS
|
| 33 |
+
# define OPENSSL_RAND_SEED_OS
|
| 34 |
+
# endif
|
| 35 |
+
# ifndef OPENSSL_THREADS
|
| 36 |
+
# define OPENSSL_THREADS
|
| 37 |
+
# endif
|
| 38 |
+
# ifndef OPENSSL_NO_ACVP_TESTS
|
| 39 |
+
# define OPENSSL_NO_ACVP_TESTS
|
| 40 |
+
# endif
|
| 41 |
+
# ifndef OPENSSL_NO_ASAN
|
| 42 |
+
# define OPENSSL_NO_ASAN
|
| 43 |
+
# endif
|
| 44 |
+
# ifndef OPENSSL_NO_BROTLI
|
| 45 |
+
# define OPENSSL_NO_BROTLI
|
| 46 |
+
# endif
|
| 47 |
+
# ifndef OPENSSL_NO_BROTLI_DYNAMIC
|
| 48 |
+
# define OPENSSL_NO_BROTLI_DYNAMIC
|
| 49 |
+
# endif
|
| 50 |
+
# ifndef OPENSSL_NO_CRYPTO_MDEBUG
|
| 51 |
+
# define OPENSSL_NO_CRYPTO_MDEBUG
|
| 52 |
+
# endif
|
| 53 |
+
# ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
|
| 54 |
+
# define OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
|
| 55 |
+
# endif
|
| 56 |
+
# ifndef OPENSSL_NO_DEMOS
|
| 57 |
+
# define OPENSSL_NO_DEMOS
|
| 58 |
+
# endif
|
| 59 |
+
# ifndef OPENSSL_NO_DEVCRYPTOENG
|
| 60 |
+
# define OPENSSL_NO_DEVCRYPTOENG
|
| 61 |
+
# endif
|
| 62 |
+
# ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
|
| 63 |
+
# define OPENSSL_NO_EC_NISTP_64_GCC_128
|
| 64 |
+
# endif
|
| 65 |
+
# ifndef OPENSSL_NO_EGD
|
| 66 |
+
# define OPENSSL_NO_EGD
|
| 67 |
+
# endif
|
| 68 |
+
# ifndef OPENSSL_NO_EXTERNAL_TESTS
|
| 69 |
+
# define OPENSSL_NO_EXTERNAL_TESTS
|
| 70 |
+
# endif
|
| 71 |
+
# ifndef OPENSSL_NO_FIPS_JITTER
|
| 72 |
+
# define OPENSSL_NO_FIPS_JITTER
|
| 73 |
+
# endif
|
| 74 |
+
# ifndef OPENSSL_NO_FIPS_POST
|
| 75 |
+
# define OPENSSL_NO_FIPS_POST
|
| 76 |
+
# endif
|
| 77 |
+
# ifndef OPENSSL_NO_FIPS_SECURITYCHECKS
|
| 78 |
+
# define OPENSSL_NO_FIPS_SECURITYCHECKS
|
| 79 |
+
# endif
|
| 80 |
+
# ifndef OPENSSL_NO_FUZZ_AFL
|
| 81 |
+
# define OPENSSL_NO_FUZZ_AFL
|
| 82 |
+
# endif
|
| 83 |
+
# ifndef OPENSSL_NO_FUZZ_LIBFUZZER
|
| 84 |
+
# define OPENSSL_NO_FUZZ_LIBFUZZER
|
| 85 |
+
# endif
|
| 86 |
+
# ifndef OPENSSL_NO_H3DEMO
|
| 87 |
+
# define OPENSSL_NO_H3DEMO
|
| 88 |
+
# endif
|
| 89 |
+
# ifndef OPENSSL_NO_HQINTEROP
|
| 90 |
+
# define OPENSSL_NO_HQINTEROP
|
| 91 |
+
# endif
|
| 92 |
+
# ifndef OPENSSL_NO_JITTER
|
| 93 |
+
# define OPENSSL_NO_JITTER
|
| 94 |
+
# endif
|
| 95 |
+
# ifndef OPENSSL_NO_LOADERENG
|
| 96 |
+
# define OPENSSL_NO_LOADERENG
|
| 97 |
+
# endif
|
| 98 |
+
# ifndef OPENSSL_NO_MD2
|
| 99 |
+
# define OPENSSL_NO_MD2
|
| 100 |
+
# endif
|
| 101 |
+
# ifndef OPENSSL_NO_MSAN
|
| 102 |
+
# define OPENSSL_NO_MSAN
|
| 103 |
+
# endif
|
| 104 |
+
# ifndef OPENSSL_NO_PIE
|
| 105 |
+
# define OPENSSL_NO_PIE
|
| 106 |
+
# endif
|
| 107 |
+
# ifndef OPENSSL_NO_RC5
|
| 108 |
+
# define OPENSSL_NO_RC5
|
| 109 |
+
# endif
|
| 110 |
+
# ifndef OPENSSL_NO_SCTP
|
| 111 |
+
# define OPENSSL_NO_SCTP
|
| 112 |
+
# endif
|
| 113 |
+
# ifndef OPENSSL_NO_SSL3
|
| 114 |
+
# define OPENSSL_NO_SSL3
|
| 115 |
+
# endif
|
| 116 |
+
# ifndef OPENSSL_NO_SSL3_METHOD
|
| 117 |
+
# define OPENSSL_NO_SSL3_METHOD
|
| 118 |
+
# endif
|
| 119 |
+
# ifndef OPENSSL_NO_SSLKEYLOG
|
| 120 |
+
# define OPENSSL_NO_SSLKEYLOG
|
| 121 |
+
# endif
|
| 122 |
+
# ifndef OPENSSL_NO_TFO
|
| 123 |
+
# define OPENSSL_NO_TFO
|
| 124 |
+
# endif
|
| 125 |
+
# ifndef OPENSSL_NO_TRACE
|
| 126 |
+
# define OPENSSL_NO_TRACE
|
| 127 |
+
# endif
|
| 128 |
+
# ifndef OPENSSL_NO_UBSAN
|
| 129 |
+
# define OPENSSL_NO_UBSAN
|
| 130 |
+
# endif
|
| 131 |
+
# ifndef OPENSSL_NO_UNIT_TEST
|
| 132 |
+
# define OPENSSL_NO_UNIT_TEST
|
| 133 |
+
# endif
|
| 134 |
+
# ifndef OPENSSL_NO_UPLINK
|
| 135 |
+
# define OPENSSL_NO_UPLINK
|
| 136 |
+
# endif
|
| 137 |
+
# ifndef OPENSSL_NO_WEAK_SSL_CIPHERS
|
| 138 |
+
# define OPENSSL_NO_WEAK_SSL_CIPHERS
|
| 139 |
+
# endif
|
| 140 |
+
# ifndef OPENSSL_NO_WINSTORE
|
| 141 |
+
# define OPENSSL_NO_WINSTORE
|
| 142 |
+
# endif
|
| 143 |
+
# ifndef OPENSSL_NO_ZLIB
|
| 144 |
+
# define OPENSSL_NO_ZLIB
|
| 145 |
+
# endif
|
| 146 |
+
# ifndef OPENSSL_NO_ZLIB_DYNAMIC
|
| 147 |
+
# define OPENSSL_NO_ZLIB_DYNAMIC
|
| 148 |
+
# endif
|
| 149 |
+
# ifndef OPENSSL_NO_ZSTD
|
| 150 |
+
# define OPENSSL_NO_ZSTD
|
| 151 |
+
# endif
|
| 152 |
+
# ifndef OPENSSL_NO_ZSTD_DYNAMIC
|
| 153 |
+
# define OPENSSL_NO_ZSTD_DYNAMIC
|
| 154 |
+
# endif
|
| 155 |
+
# ifndef OPENSSL_NO_DYNAMIC_ENGINE
|
| 156 |
+
# define OPENSSL_NO_DYNAMIC_ENGINE
|
| 157 |
+
# endif
|
| 158 |
+
|
| 159 |
+
/* clang-format on */
|
| 160 |
+
|
| 161 |
+
/* Generate 80386 code? */
|
| 162 |
+
/* clang-format off */
|
| 163 |
+
# undef I386_ONLY
|
| 164 |
+
/* clang-format on */
|
| 165 |
+
|
| 166 |
+
/*
|
| 167 |
+
* The following are cipher-specific, but are part of the public API.
|
| 168 |
+
*/
|
| 169 |
+
#if !defined(OPENSSL_SYS_UEFI)
|
| 170 |
+
/* clang-format off */
|
| 171 |
+
# undef BN_LLONG
|
| 172 |
+
/* clang-format on */
|
| 173 |
+
/* Only one for the following should be defined */
|
| 174 |
+
/* clang-format off */
|
| 175 |
+
# define SIXTY_FOUR_BIT_LONG
|
| 176 |
+
/* clang-format on */
|
| 177 |
+
/* clang-format off */
|
| 178 |
+
# undef SIXTY_FOUR_BIT
|
| 179 |
+
/* clang-format on */
|
| 180 |
+
/* clang-format off */
|
| 181 |
+
# undef THIRTY_TWO_BIT
|
| 182 |
+
/* clang-format on */
|
| 183 |
+
#endif
|
| 184 |
+
|
| 185 |
+
/* clang-format off */
|
| 186 |
+
# define RC4_INT unsigned int
|
| 187 |
+
/* clang-format on */
|
| 188 |
+
|
| 189 |
+
#if defined(OPENSSL_NO_COMP) || (defined(OPENSSL_NO_BROTLI) && defined(OPENSSL_NO_ZSTD) && defined(OPENSSL_NO_ZLIB))
|
| 190 |
+
#define OPENSSL_NO_COMP_ALG
|
| 191 |
+
#else
|
| 192 |
+
#undef OPENSSL_NO_COMP_ALG
|
| 193 |
+
#endif
|
| 194 |
+
|
| 195 |
+
#ifdef __cplusplus
|
| 196 |
+
}
|
| 197 |
+
#endif
|
| 198 |
+
|
| 199 |
+
#endif /* OPENSSL_CONFIGURATION_H */
|
miniconda3/envs/active_proaction/include/openssl/conftypes.h
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-2021 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 OPENSSL_CONFTYPES_H
|
| 11 |
+
#define OPENSSL_CONFTYPES_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#ifndef OPENSSL_CONF_H
|
| 15 |
+
#include <openssl/conf.h>
|
| 16 |
+
#endif
|
| 17 |
+
|
| 18 |
+
/*
|
| 19 |
+
* The contents of this file are deprecated and will be made opaque
|
| 20 |
+
*/
|
| 21 |
+
struct conf_method_st {
|
| 22 |
+
const char *name;
|
| 23 |
+
CONF *(*create)(CONF_METHOD *meth);
|
| 24 |
+
int (*init)(CONF *conf);
|
| 25 |
+
int (*destroy)(CONF *conf);
|
| 26 |
+
int (*destroy_data)(CONF *conf);
|
| 27 |
+
int (*load_bio)(CONF *conf, BIO *bp, long *eline);
|
| 28 |
+
int (*dump)(const CONF *conf, BIO *bp);
|
| 29 |
+
int (*is_number)(const CONF *conf, char c);
|
| 30 |
+
int (*to_int)(const CONF *conf, char c);
|
| 31 |
+
int (*load)(CONF *conf, const char *name, long *eline);
|
| 32 |
+
};
|
| 33 |
+
|
| 34 |
+
struct conf_st {
|
| 35 |
+
CONF_METHOD *meth;
|
| 36 |
+
void *meth_data;
|
| 37 |
+
LHASH_OF(CONF_VALUE) *data;
|
| 38 |
+
int flag_dollarid;
|
| 39 |
+
int flag_abspath;
|
| 40 |
+
char *includedir;
|
| 41 |
+
OSSL_LIB_CTX *libctx;
|
| 42 |
+
};
|
| 43 |
+
|
| 44 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/core.h
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2019-2023 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 OPENSSL_CORE_H
|
| 11 |
+
#define OPENSSL_CORE_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <stddef.h>
|
| 15 |
+
#include <openssl/types.h>
|
| 16 |
+
|
| 17 |
+
#ifdef __cplusplus
|
| 18 |
+
extern "C" {
|
| 19 |
+
#endif
|
| 20 |
+
|
| 21 |
+
/*-
|
| 22 |
+
* Base types
|
| 23 |
+
* ----------
|
| 24 |
+
*
|
| 25 |
+
* These are the types that the OpenSSL core and providers have in common
|
| 26 |
+
* to communicate data between them.
|
| 27 |
+
*/
|
| 28 |
+
|
| 29 |
+
/* Opaque handles to be used with core upcall functions from providers */
|
| 30 |
+
typedef struct ossl_core_handle_st OSSL_CORE_HANDLE;
|
| 31 |
+
typedef struct openssl_core_ctx_st OPENSSL_CORE_CTX;
|
| 32 |
+
typedef struct ossl_core_bio_st OSSL_CORE_BIO;
|
| 33 |
+
|
| 34 |
+
/*
|
| 35 |
+
* Dispatch table element. function_id numbers and the functions are defined
|
| 36 |
+
* in core_dispatch.h, see macros with 'OSSL_CORE_MAKE_FUNC' in their names.
|
| 37 |
+
*
|
| 38 |
+
* An array of these is always terminated by function_id == 0
|
| 39 |
+
*/
|
| 40 |
+
struct ossl_dispatch_st {
|
| 41 |
+
int function_id;
|
| 42 |
+
void (*function)(void);
|
| 43 |
+
};
|
| 44 |
+
|
| 45 |
+
#define OSSL_DISPATCH_END \
|
| 46 |
+
{ 0, NULL }
|
| 47 |
+
|
| 48 |
+
/*
|
| 49 |
+
* Other items, essentially an int<->pointer map element.
|
| 50 |
+
*
|
| 51 |
+
* We make this type distinct from OSSL_DISPATCH to ensure that dispatch
|
| 52 |
+
* tables remain tables with function pointers only.
|
| 53 |
+
*
|
| 54 |
+
* This is used whenever we need to pass things like a table of error reason
|
| 55 |
+
* codes <-> reason string maps, ...
|
| 56 |
+
*
|
| 57 |
+
* Usage determines which field works as key if any, rather than field order.
|
| 58 |
+
*
|
| 59 |
+
* An array of these is always terminated by id == 0 && ptr == NULL
|
| 60 |
+
*/
|
| 61 |
+
struct ossl_item_st {
|
| 62 |
+
unsigned int id;
|
| 63 |
+
void *ptr;
|
| 64 |
+
};
|
| 65 |
+
|
| 66 |
+
/*
|
| 67 |
+
* Type to tie together algorithm names, property definition string and
|
| 68 |
+
* the algorithm implementation in the form of a dispatch table.
|
| 69 |
+
*
|
| 70 |
+
* An array of these is always terminated by algorithm_names == NULL
|
| 71 |
+
*/
|
| 72 |
+
struct ossl_algorithm_st {
|
| 73 |
+
const char *algorithm_names; /* key */
|
| 74 |
+
const char *property_definition; /* key */
|
| 75 |
+
const OSSL_DISPATCH *implementation;
|
| 76 |
+
const char *algorithm_description;
|
| 77 |
+
};
|
| 78 |
+
|
| 79 |
+
/*
|
| 80 |
+
* Type to pass object data in a uniform way, without exposing the object
|
| 81 |
+
* structure.
|
| 82 |
+
*
|
| 83 |
+
* An array of these is always terminated by key == NULL
|
| 84 |
+
*/
|
| 85 |
+
struct ossl_param_st {
|
| 86 |
+
const char *key; /* the name of the parameter */
|
| 87 |
+
unsigned int data_type; /* declare what kind of content is in buffer */
|
| 88 |
+
void *data; /* value being passed in or out */
|
| 89 |
+
size_t data_size; /* data size */
|
| 90 |
+
size_t return_size; /* returned content size */
|
| 91 |
+
};
|
| 92 |
+
|
| 93 |
+
/* Currently supported OSSL_PARAM data types */
|
| 94 |
+
/*
|
| 95 |
+
* OSSL_PARAM_INTEGER and OSSL_PARAM_UNSIGNED_INTEGER
|
| 96 |
+
* are arbitrary length and therefore require an arbitrarily sized buffer,
|
| 97 |
+
* since they may be used to pass numbers larger than what is natively
|
| 98 |
+
* available.
|
| 99 |
+
*
|
| 100 |
+
* The number must be buffered in native form, i.e. MSB first on B_ENDIAN
|
| 101 |
+
* systems and LSB first on L_ENDIAN systems. This means that arbitrary
|
| 102 |
+
* native integers can be stored in the buffer, just make sure that the
|
| 103 |
+
* buffer size is correct and the buffer itself is properly aligned (for
|
| 104 |
+
* example by having the buffer field point at a C integer).
|
| 105 |
+
*/
|
| 106 |
+
#define OSSL_PARAM_INTEGER 1
|
| 107 |
+
#define OSSL_PARAM_UNSIGNED_INTEGER 2
|
| 108 |
+
/*-
|
| 109 |
+
* OSSL_PARAM_REAL
|
| 110 |
+
* is a C binary floating point values in native form and alignment.
|
| 111 |
+
*/
|
| 112 |
+
#define OSSL_PARAM_REAL 3
|
| 113 |
+
/*-
|
| 114 |
+
* OSSL_PARAM_UTF8_STRING
|
| 115 |
+
* is a printable string. It is expected to be printed as it is.
|
| 116 |
+
*/
|
| 117 |
+
#define OSSL_PARAM_UTF8_STRING 4
|
| 118 |
+
/*-
|
| 119 |
+
* OSSL_PARAM_OCTET_STRING
|
| 120 |
+
* is a string of bytes with no further specification. It is expected to be
|
| 121 |
+
* printed as a hexdump.
|
| 122 |
+
*/
|
| 123 |
+
#define OSSL_PARAM_OCTET_STRING 5
|
| 124 |
+
/*-
|
| 125 |
+
* OSSL_PARAM_UTF8_PTR
|
| 126 |
+
* is a pointer to a printable string. It is expected to be printed as it is.
|
| 127 |
+
*
|
| 128 |
+
* The difference between this and OSSL_PARAM_UTF8_STRING is that only pointers
|
| 129 |
+
* are manipulated for this type.
|
| 130 |
+
*
|
| 131 |
+
* This is more relevant for parameter requests, where the responding
|
| 132 |
+
* function doesn't need to copy the data to the provided buffer, but
|
| 133 |
+
* sets the provided buffer to point at the actual data instead.
|
| 134 |
+
*
|
| 135 |
+
* WARNING! Using these is FRAGILE, as it assumes that the actual
|
| 136 |
+
* data and its location are constant.
|
| 137 |
+
*
|
| 138 |
+
* EXTRA WARNING! If you are not completely sure you most likely want
|
| 139 |
+
* to use the OSSL_PARAM_UTF8_STRING type.
|
| 140 |
+
*/
|
| 141 |
+
#define OSSL_PARAM_UTF8_PTR 6
|
| 142 |
+
/*-
|
| 143 |
+
* OSSL_PARAM_OCTET_PTR
|
| 144 |
+
* is a pointer to a string of bytes with no further specification. It is
|
| 145 |
+
* expected to be printed as a hexdump.
|
| 146 |
+
*
|
| 147 |
+
* The difference between this and OSSL_PARAM_OCTET_STRING is that only pointers
|
| 148 |
+
* are manipulated for this type.
|
| 149 |
+
*
|
| 150 |
+
* This is more relevant for parameter requests, where the responding
|
| 151 |
+
* function doesn't need to copy the data to the provided buffer, but
|
| 152 |
+
* sets the provided buffer to point at the actual data instead.
|
| 153 |
+
*
|
| 154 |
+
* WARNING! Using these is FRAGILE, as it assumes that the actual
|
| 155 |
+
* data and its location are constant.
|
| 156 |
+
*
|
| 157 |
+
* EXTRA WARNING! If you are not completely sure you most likely want
|
| 158 |
+
* to use the OSSL_PARAM_OCTET_STRING type.
|
| 159 |
+
*/
|
| 160 |
+
#define OSSL_PARAM_OCTET_PTR 7
|
| 161 |
+
|
| 162 |
+
/*
|
| 163 |
+
* Typedef for the thread stop handling callback. Used both internally and by
|
| 164 |
+
* providers.
|
| 165 |
+
*
|
| 166 |
+
* Providers may register for notifications about threads stopping by
|
| 167 |
+
* registering a callback to hear about such events. Providers register the
|
| 168 |
+
* callback using the OSSL_FUNC_CORE_THREAD_START function in the |in| dispatch
|
| 169 |
+
* table passed to OSSL_provider_init(). The arg passed back to a provider will
|
| 170 |
+
* be the provider side context object.
|
| 171 |
+
*/
|
| 172 |
+
typedef void (*OSSL_thread_stop_handler_fn)(void *arg);
|
| 173 |
+
|
| 174 |
+
/*-
|
| 175 |
+
* Provider entry point
|
| 176 |
+
* --------------------
|
| 177 |
+
*
|
| 178 |
+
* This function is expected to be present in any dynamically loadable
|
| 179 |
+
* provider module. By definition, if this function doesn't exist in a
|
| 180 |
+
* module, that module is not an OpenSSL provider module.
|
| 181 |
+
*/
|
| 182 |
+
/*-
|
| 183 |
+
* |handle| pointer to opaque type OSSL_CORE_HANDLE. This can be used
|
| 184 |
+
* together with some functions passed via |in| to query data.
|
| 185 |
+
* |in| is the array of functions that the Core passes to the provider.
|
| 186 |
+
* |out| will be the array of base functions that the provider passes
|
| 187 |
+
* back to the Core.
|
| 188 |
+
* |provctx| a provider side context object, optionally created if the
|
| 189 |
+
* provider needs it. This value is passed to other provider
|
| 190 |
+
* functions, notably other context constructors.
|
| 191 |
+
*/
|
| 192 |
+
typedef int(OSSL_provider_init_fn)(const OSSL_CORE_HANDLE *handle,
|
| 193 |
+
const OSSL_DISPATCH *in,
|
| 194 |
+
const OSSL_DISPATCH **out,
|
| 195 |
+
void **provctx);
|
| 196 |
+
#ifdef __VMS
|
| 197 |
+
#pragma names save
|
| 198 |
+
#pragma names uppercase, truncated
|
| 199 |
+
#endif
|
| 200 |
+
OPENSSL_EXPORT OSSL_provider_init_fn OSSL_provider_init;
|
| 201 |
+
#ifdef __VMS
|
| 202 |
+
#pragma names restore
|
| 203 |
+
#endif
|
| 204 |
+
|
| 205 |
+
/*
|
| 206 |
+
* Generic callback function signature.
|
| 207 |
+
*
|
| 208 |
+
* The expectation is that any provider function that wants to offer
|
| 209 |
+
* a callback / hook can do so by taking an argument with this type,
|
| 210 |
+
* as well as a pointer to caller-specific data. When calling the
|
| 211 |
+
* callback, the provider function can populate an OSSL_PARAM array
|
| 212 |
+
* with data of its choice and pass that in the callback call, along
|
| 213 |
+
* with the caller data argument.
|
| 214 |
+
*
|
| 215 |
+
* libcrypto may use the OSSL_PARAM array to create arguments for an
|
| 216 |
+
* application callback it knows about.
|
| 217 |
+
*/
|
| 218 |
+
typedef int(OSSL_CALLBACK)(const OSSL_PARAM params[], void *arg);
|
| 219 |
+
typedef int(OSSL_INOUT_CALLBACK)(const OSSL_PARAM in_params[],
|
| 220 |
+
OSSL_PARAM out_params[], void *arg);
|
| 221 |
+
/*
|
| 222 |
+
* Passphrase callback function signature
|
| 223 |
+
*
|
| 224 |
+
* This is similar to the generic callback function above, but adds a
|
| 225 |
+
* result parameter.
|
| 226 |
+
*/
|
| 227 |
+
typedef int(OSSL_PASSPHRASE_CALLBACK)(char *pass, size_t pass_size,
|
| 228 |
+
size_t *pass_len,
|
| 229 |
+
const OSSL_PARAM params[], void *arg);
|
| 230 |
+
|
| 231 |
+
#ifdef __cplusplus
|
| 232 |
+
}
|
| 233 |
+
#endif
|
| 234 |
+
|
| 235 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/core_dispatch.h
ADDED
|
@@ -0,0 +1,1054 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2019-2025 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 OPENSSL_CORE_NUMBERS_H
|
| 11 |
+
#define OPENSSL_CORE_NUMBERS_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <stdarg.h>
|
| 15 |
+
#include <openssl/core.h>
|
| 16 |
+
#include <openssl/indicator.h>
|
| 17 |
+
|
| 18 |
+
#ifdef __cplusplus
|
| 19 |
+
extern "C" {
|
| 20 |
+
#endif
|
| 21 |
+
|
| 22 |
+
/*
|
| 23 |
+
* Generic function pointer for provider method arrays, or other contexts where
|
| 24 |
+
* functions of various signatures must occupy a common slot in an array of
|
| 25 |
+
* structures.
|
| 26 |
+
*/
|
| 27 |
+
typedef void (*OSSL_FUNC)(void);
|
| 28 |
+
|
| 29 |
+
/*-
|
| 30 |
+
* Identities
|
| 31 |
+
* ----------
|
| 32 |
+
*
|
| 33 |
+
* All series start with 1, to allow 0 to be an array terminator.
|
| 34 |
+
* For any FUNC identity, we also provide a function signature typedef
|
| 35 |
+
* and a static inline function to extract a function pointer from a
|
| 36 |
+
* OSSL_DISPATCH element in a type safe manner.
|
| 37 |
+
*
|
| 38 |
+
* Names:
|
| 39 |
+
* for any function base name 'foo' (uppercase form 'FOO'), we will have
|
| 40 |
+
* the following:
|
| 41 |
+
* - a macro for the identity with the name OSSL_FUNC_'FOO' or derivatives
|
| 42 |
+
* thereof (to be specified further down)
|
| 43 |
+
* - a function signature typedef with the name OSSL_FUNC_'foo'_fn
|
| 44 |
+
* - a function pointer extractor function with the name OSSL_FUNC_'foo'
|
| 45 |
+
*/
|
| 46 |
+
|
| 47 |
+
/*
|
| 48 |
+
* Helper macro to create the function signature typedef and the extractor
|
| 49 |
+
* |type| is the return-type of the function, |name| is the name of the
|
| 50 |
+
* function to fetch, and |args| is a parenthesized list of parameters
|
| 51 |
+
* for the function (that is, it is |name|'s function signature).
|
| 52 |
+
* Note: This is considered a "reserved" internal macro. Applications should
|
| 53 |
+
* not use this or assume its existence.
|
| 54 |
+
*/
|
| 55 |
+
#define OSSL_CORE_MAKE_FUNC(type, name, args) \
|
| 56 |
+
typedef type(OSSL_FUNC_##name##_fn) args; \
|
| 57 |
+
static ossl_unused ossl_inline \
|
| 58 |
+
OSSL_FUNC_##name##_fn * \
|
| 59 |
+
OSSL_FUNC_##name(const OSSL_DISPATCH *opf) \
|
| 60 |
+
{ \
|
| 61 |
+
return (OSSL_FUNC_##name##_fn *)opf->function; \
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
/*
|
| 65 |
+
* Core function identities, for the two OSSL_DISPATCH tables being passed
|
| 66 |
+
* in the OSSL_provider_init call.
|
| 67 |
+
*
|
| 68 |
+
* 0 serves as a marker for the end of the OSSL_DISPATCH array, and must
|
| 69 |
+
* therefore NEVER be used as a function identity.
|
| 70 |
+
*/
|
| 71 |
+
/* Functions provided by the Core to the provider, reserved numbers 1-1023 */
|
| 72 |
+
#define OSSL_FUNC_CORE_GETTABLE_PARAMS 1
|
| 73 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
|
| 74 |
+
core_gettable_params, (const OSSL_CORE_HANDLE *prov))
|
| 75 |
+
#define OSSL_FUNC_CORE_GET_PARAMS 2
|
| 76 |
+
OSSL_CORE_MAKE_FUNC(int, core_get_params, (const OSSL_CORE_HANDLE *prov, OSSL_PARAM params[]))
|
| 77 |
+
#define OSSL_FUNC_CORE_THREAD_START 3
|
| 78 |
+
OSSL_CORE_MAKE_FUNC(int, core_thread_start, (const OSSL_CORE_HANDLE *prov, OSSL_thread_stop_handler_fn handfn, void *arg))
|
| 79 |
+
#define OSSL_FUNC_CORE_GET_LIBCTX 4
|
| 80 |
+
OSSL_CORE_MAKE_FUNC(OPENSSL_CORE_CTX *, core_get_libctx,
|
| 81 |
+
(const OSSL_CORE_HANDLE *prov))
|
| 82 |
+
#define OSSL_FUNC_CORE_NEW_ERROR 5
|
| 83 |
+
OSSL_CORE_MAKE_FUNC(void, core_new_error, (const OSSL_CORE_HANDLE *prov))
|
| 84 |
+
#define OSSL_FUNC_CORE_SET_ERROR_DEBUG 6
|
| 85 |
+
OSSL_CORE_MAKE_FUNC(void, core_set_error_debug,
|
| 86 |
+
(const OSSL_CORE_HANDLE *prov,
|
| 87 |
+
const char *file, int line, const char *func))
|
| 88 |
+
#define OSSL_FUNC_CORE_VSET_ERROR 7
|
| 89 |
+
OSSL_CORE_MAKE_FUNC(void, core_vset_error,
|
| 90 |
+
(const OSSL_CORE_HANDLE *prov,
|
| 91 |
+
uint32_t reason, const char *fmt, va_list args))
|
| 92 |
+
#define OSSL_FUNC_CORE_SET_ERROR_MARK 8
|
| 93 |
+
OSSL_CORE_MAKE_FUNC(int, core_set_error_mark, (const OSSL_CORE_HANDLE *prov))
|
| 94 |
+
#define OSSL_FUNC_CORE_CLEAR_LAST_ERROR_MARK 9
|
| 95 |
+
OSSL_CORE_MAKE_FUNC(int, core_clear_last_error_mark,
|
| 96 |
+
(const OSSL_CORE_HANDLE *prov))
|
| 97 |
+
#define OSSL_FUNC_CORE_POP_ERROR_TO_MARK 10
|
| 98 |
+
OSSL_CORE_MAKE_FUNC(int, core_pop_error_to_mark, (const OSSL_CORE_HANDLE *prov))
|
| 99 |
+
|
| 100 |
+
/* Functions to access the OBJ database */
|
| 101 |
+
|
| 102 |
+
#define OSSL_FUNC_CORE_OBJ_ADD_SIGID 11
|
| 103 |
+
#define OSSL_FUNC_CORE_OBJ_CREATE 12
|
| 104 |
+
|
| 105 |
+
OSSL_CORE_MAKE_FUNC(int, core_obj_add_sigid,
|
| 106 |
+
(const OSSL_CORE_HANDLE *prov, const char *sign_name,
|
| 107 |
+
const char *digest_name, const char *pkey_name))
|
| 108 |
+
OSSL_CORE_MAKE_FUNC(int, core_obj_create,
|
| 109 |
+
(const OSSL_CORE_HANDLE *prov, const char *oid,
|
| 110 |
+
const char *sn, const char *ln))
|
| 111 |
+
|
| 112 |
+
/* Memory allocation, freeing, clearing. */
|
| 113 |
+
#define OSSL_FUNC_CRYPTO_MALLOC 20
|
| 114 |
+
OSSL_CORE_MAKE_FUNC(void *,
|
| 115 |
+
CRYPTO_malloc, (size_t num, const char *file, int line))
|
| 116 |
+
#define OSSL_FUNC_CRYPTO_ZALLOC 21
|
| 117 |
+
OSSL_CORE_MAKE_FUNC(void *,
|
| 118 |
+
CRYPTO_zalloc, (size_t num, const char *file, int line))
|
| 119 |
+
#define OSSL_FUNC_CRYPTO_FREE 22
|
| 120 |
+
OSSL_CORE_MAKE_FUNC(void,
|
| 121 |
+
CRYPTO_free, (void *ptr, const char *file, int line))
|
| 122 |
+
#define OSSL_FUNC_CRYPTO_CLEAR_FREE 23
|
| 123 |
+
OSSL_CORE_MAKE_FUNC(void,
|
| 124 |
+
CRYPTO_clear_free, (void *ptr, size_t num, const char *file, int line))
|
| 125 |
+
#define OSSL_FUNC_CRYPTO_REALLOC 24
|
| 126 |
+
OSSL_CORE_MAKE_FUNC(void *,
|
| 127 |
+
CRYPTO_realloc, (void *addr, size_t num, const char *file, int line))
|
| 128 |
+
#define OSSL_FUNC_CRYPTO_CLEAR_REALLOC 25
|
| 129 |
+
OSSL_CORE_MAKE_FUNC(void *,
|
| 130 |
+
CRYPTO_clear_realloc, (void *addr, size_t old_num, size_t num, const char *file, int line))
|
| 131 |
+
#define OSSL_FUNC_CRYPTO_SECURE_MALLOC 26
|
| 132 |
+
OSSL_CORE_MAKE_FUNC(void *,
|
| 133 |
+
CRYPTO_secure_malloc, (size_t num, const char *file, int line))
|
| 134 |
+
#define OSSL_FUNC_CRYPTO_SECURE_ZALLOC 27
|
| 135 |
+
OSSL_CORE_MAKE_FUNC(void *,
|
| 136 |
+
CRYPTO_secure_zalloc, (size_t num, const char *file, int line))
|
| 137 |
+
#define OSSL_FUNC_CRYPTO_SECURE_FREE 28
|
| 138 |
+
OSSL_CORE_MAKE_FUNC(void,
|
| 139 |
+
CRYPTO_secure_free, (void *ptr, const char *file, int line))
|
| 140 |
+
#define OSSL_FUNC_CRYPTO_SECURE_CLEAR_FREE 29
|
| 141 |
+
OSSL_CORE_MAKE_FUNC(void,
|
| 142 |
+
CRYPTO_secure_clear_free, (void *ptr, size_t num, const char *file, int line))
|
| 143 |
+
#define OSSL_FUNC_CRYPTO_SECURE_ALLOCATED 30
|
| 144 |
+
OSSL_CORE_MAKE_FUNC(int,
|
| 145 |
+
CRYPTO_secure_allocated, (const void *ptr))
|
| 146 |
+
#define OSSL_FUNC_OPENSSL_CLEANSE 31
|
| 147 |
+
OSSL_CORE_MAKE_FUNC(void,
|
| 148 |
+
OPENSSL_cleanse, (void *ptr, size_t len))
|
| 149 |
+
|
| 150 |
+
/* Bio functions provided by the core */
|
| 151 |
+
#define OSSL_FUNC_BIO_NEW_FILE 40
|
| 152 |
+
#define OSSL_FUNC_BIO_NEW_MEMBUF 41
|
| 153 |
+
#define OSSL_FUNC_BIO_READ_EX 42
|
| 154 |
+
#define OSSL_FUNC_BIO_WRITE_EX 43
|
| 155 |
+
#define OSSL_FUNC_BIO_UP_REF 44
|
| 156 |
+
#define OSSL_FUNC_BIO_FREE 45
|
| 157 |
+
#define OSSL_FUNC_BIO_VPRINTF 46
|
| 158 |
+
#define OSSL_FUNC_BIO_VSNPRINTF 47
|
| 159 |
+
#define OSSL_FUNC_BIO_PUTS 48
|
| 160 |
+
#define OSSL_FUNC_BIO_GETS 49
|
| 161 |
+
#define OSSL_FUNC_BIO_CTRL 50
|
| 162 |
+
|
| 163 |
+
OSSL_CORE_MAKE_FUNC(OSSL_CORE_BIO *, BIO_new_file, (const char *filename, const char *mode))
|
| 164 |
+
OSSL_CORE_MAKE_FUNC(OSSL_CORE_BIO *, BIO_new_membuf, (const void *buf, int len))
|
| 165 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_read_ex, (OSSL_CORE_BIO * bio, void *data, size_t data_len, size_t *bytes_read))
|
| 166 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_write_ex, (OSSL_CORE_BIO * bio, const void *data, size_t data_len, size_t *written))
|
| 167 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_gets, (OSSL_CORE_BIO * bio, char *buf, int size))
|
| 168 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_puts, (OSSL_CORE_BIO * bio, const char *str))
|
| 169 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_up_ref, (OSSL_CORE_BIO * bio))
|
| 170 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_free, (OSSL_CORE_BIO * bio))
|
| 171 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_vprintf, (OSSL_CORE_BIO * bio, const char *format, va_list args))
|
| 172 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_vsnprintf,
|
| 173 |
+
(char *buf, size_t n, const char *fmt, va_list args))
|
| 174 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_ctrl, (OSSL_CORE_BIO * bio, int cmd, long num, void *ptr))
|
| 175 |
+
|
| 176 |
+
/* New seeding functions prototypes with the 101-104 series */
|
| 177 |
+
#define OSSL_FUNC_CLEANUP_USER_ENTROPY 96
|
| 178 |
+
#define OSSL_FUNC_CLEANUP_USER_NONCE 97
|
| 179 |
+
#define OSSL_FUNC_GET_USER_ENTROPY 98
|
| 180 |
+
#define OSSL_FUNC_GET_USER_NONCE 99
|
| 181 |
+
|
| 182 |
+
#define OSSL_FUNC_INDICATOR_CB 95
|
| 183 |
+
OSSL_CORE_MAKE_FUNC(void, indicator_cb, (OPENSSL_CORE_CTX * ctx, OSSL_INDICATOR_CALLBACK **cb))
|
| 184 |
+
#define OSSL_FUNC_SELF_TEST_CB 100
|
| 185 |
+
OSSL_CORE_MAKE_FUNC(void, self_test_cb, (OPENSSL_CORE_CTX * ctx, OSSL_CALLBACK **cb, void **cbarg))
|
| 186 |
+
|
| 187 |
+
/* Functions to get seed material from the operating system */
|
| 188 |
+
#define OSSL_FUNC_GET_ENTROPY 101
|
| 189 |
+
#define OSSL_FUNC_CLEANUP_ENTROPY 102
|
| 190 |
+
#define OSSL_FUNC_GET_NONCE 103
|
| 191 |
+
#define OSSL_FUNC_CLEANUP_NONCE 104
|
| 192 |
+
OSSL_CORE_MAKE_FUNC(size_t, get_entropy, (const OSSL_CORE_HANDLE *handle, unsigned char **pout, int entropy, size_t min_len, size_t max_len))
|
| 193 |
+
OSSL_CORE_MAKE_FUNC(size_t, get_user_entropy, (const OSSL_CORE_HANDLE *handle, unsigned char **pout, int entropy, size_t min_len, size_t max_len))
|
| 194 |
+
OSSL_CORE_MAKE_FUNC(void, cleanup_entropy, (const OSSL_CORE_HANDLE *handle, unsigned char *buf, size_t len))
|
| 195 |
+
OSSL_CORE_MAKE_FUNC(void, cleanup_user_entropy, (const OSSL_CORE_HANDLE *handle, unsigned char *buf, size_t len))
|
| 196 |
+
OSSL_CORE_MAKE_FUNC(size_t, get_nonce, (const OSSL_CORE_HANDLE *handle, unsigned char **pout, size_t min_len, size_t max_len, const void *salt, size_t salt_len))
|
| 197 |
+
OSSL_CORE_MAKE_FUNC(size_t, get_user_nonce, (const OSSL_CORE_HANDLE *handle, unsigned char **pout, size_t min_len, size_t max_len, const void *salt, size_t salt_len))
|
| 198 |
+
OSSL_CORE_MAKE_FUNC(void, cleanup_nonce, (const OSSL_CORE_HANDLE *handle, unsigned char *buf, size_t len))
|
| 199 |
+
OSSL_CORE_MAKE_FUNC(void, cleanup_user_nonce, (const OSSL_CORE_HANDLE *handle, unsigned char *buf, size_t len))
|
| 200 |
+
|
| 201 |
+
/* Functions to access the core's providers */
|
| 202 |
+
#define OSSL_FUNC_PROVIDER_REGISTER_CHILD_CB 105
|
| 203 |
+
#define OSSL_FUNC_PROVIDER_DEREGISTER_CHILD_CB 106
|
| 204 |
+
#define OSSL_FUNC_PROVIDER_NAME 107
|
| 205 |
+
#define OSSL_FUNC_PROVIDER_GET0_PROVIDER_CTX 108
|
| 206 |
+
#define OSSL_FUNC_PROVIDER_GET0_DISPATCH 109
|
| 207 |
+
#define OSSL_FUNC_PROVIDER_UP_REF 110
|
| 208 |
+
#define OSSL_FUNC_PROVIDER_FREE 111
|
| 209 |
+
|
| 210 |
+
OSSL_CORE_MAKE_FUNC(int, provider_register_child_cb,
|
| 211 |
+
(const OSSL_CORE_HANDLE *handle,
|
| 212 |
+
int (*create_cb)(const OSSL_CORE_HANDLE *provider, void *cbdata),
|
| 213 |
+
int (*remove_cb)(const OSSL_CORE_HANDLE *provider, void *cbdata),
|
| 214 |
+
int (*global_props_cb)(const char *props, void *cbdata),
|
| 215 |
+
void *cbdata))
|
| 216 |
+
OSSL_CORE_MAKE_FUNC(void, provider_deregister_child_cb,
|
| 217 |
+
(const OSSL_CORE_HANDLE *handle))
|
| 218 |
+
OSSL_CORE_MAKE_FUNC(const char *, provider_name,
|
| 219 |
+
(const OSSL_CORE_HANDLE *prov))
|
| 220 |
+
OSSL_CORE_MAKE_FUNC(void *, provider_get0_provider_ctx,
|
| 221 |
+
(const OSSL_CORE_HANDLE *prov))
|
| 222 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_DISPATCH *, provider_get0_dispatch,
|
| 223 |
+
(const OSSL_CORE_HANDLE *prov))
|
| 224 |
+
OSSL_CORE_MAKE_FUNC(int, provider_up_ref,
|
| 225 |
+
(const OSSL_CORE_HANDLE *prov, int activate))
|
| 226 |
+
OSSL_CORE_MAKE_FUNC(int, provider_free,
|
| 227 |
+
(const OSSL_CORE_HANDLE *prov, int deactivate))
|
| 228 |
+
|
| 229 |
+
/* Additional error functions provided by the core */
|
| 230 |
+
#define OSSL_FUNC_CORE_COUNT_TO_MARK 120
|
| 231 |
+
OSSL_CORE_MAKE_FUNC(int, core_count_to_mark, (const OSSL_CORE_HANDLE *prov))
|
| 232 |
+
|
| 233 |
+
/* Functions provided by the provider to the Core, reserved numbers 1024-1535 */
|
| 234 |
+
#define OSSL_FUNC_PROVIDER_TEARDOWN 1024
|
| 235 |
+
OSSL_CORE_MAKE_FUNC(void, provider_teardown, (void *provctx))
|
| 236 |
+
#define OSSL_FUNC_PROVIDER_GETTABLE_PARAMS 1025
|
| 237 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
|
| 238 |
+
provider_gettable_params, (void *provctx))
|
| 239 |
+
#define OSSL_FUNC_PROVIDER_GET_PARAMS 1026
|
| 240 |
+
OSSL_CORE_MAKE_FUNC(int, provider_get_params, (void *provctx, OSSL_PARAM params[]))
|
| 241 |
+
#define OSSL_FUNC_PROVIDER_QUERY_OPERATION 1027
|
| 242 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_ALGORITHM *, provider_query_operation,
|
| 243 |
+
(void *provctx, int operation_id, int *no_store))
|
| 244 |
+
#define OSSL_FUNC_PROVIDER_UNQUERY_OPERATION 1028
|
| 245 |
+
OSSL_CORE_MAKE_FUNC(void, provider_unquery_operation,
|
| 246 |
+
(void *provctx, int operation_id, const OSSL_ALGORITHM *))
|
| 247 |
+
#define OSSL_FUNC_PROVIDER_GET_REASON_STRINGS 1029
|
| 248 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_ITEM *, provider_get_reason_strings,
|
| 249 |
+
(void *provctx))
|
| 250 |
+
#define OSSL_FUNC_PROVIDER_GET_CAPABILITIES 1030
|
| 251 |
+
OSSL_CORE_MAKE_FUNC(int, provider_get_capabilities, (void *provctx, const char *capability, OSSL_CALLBACK *cb, void *arg))
|
| 252 |
+
#define OSSL_FUNC_PROVIDER_SELF_TEST 1031
|
| 253 |
+
OSSL_CORE_MAKE_FUNC(int, provider_self_test, (void *provctx))
|
| 254 |
+
#define OSSL_FUNC_PROVIDER_RANDOM_BYTES 1032
|
| 255 |
+
OSSL_CORE_MAKE_FUNC(int, provider_random_bytes, (void *provctx, int which, void *buf, size_t n, unsigned int strength))
|
| 256 |
+
|
| 257 |
+
/* Libssl related functions */
|
| 258 |
+
#define OSSL_FUNC_SSL_QUIC_TLS_CRYPTO_SEND 2001
|
| 259 |
+
OSSL_CORE_MAKE_FUNC(int, SSL_QUIC_TLS_crypto_send,
|
| 260 |
+
(SSL * s, const unsigned char *buf, size_t buf_len,
|
| 261 |
+
size_t *consumed, void *arg))
|
| 262 |
+
#define OSSL_FUNC_SSL_QUIC_TLS_CRYPTO_RECV_RCD 2002
|
| 263 |
+
OSSL_CORE_MAKE_FUNC(int, SSL_QUIC_TLS_crypto_recv_rcd,
|
| 264 |
+
(SSL * s, const unsigned char **buf, size_t *bytes_read,
|
| 265 |
+
void *arg))
|
| 266 |
+
#define OSSL_FUNC_SSL_QUIC_TLS_CRYPTO_RELEASE_RCD 2003
|
| 267 |
+
OSSL_CORE_MAKE_FUNC(int, SSL_QUIC_TLS_crypto_release_rcd,
|
| 268 |
+
(SSL * s, size_t bytes_read, void *arg))
|
| 269 |
+
#define OSSL_FUNC_SSL_QUIC_TLS_YIELD_SECRET 2004
|
| 270 |
+
OSSL_CORE_MAKE_FUNC(int, SSL_QUIC_TLS_yield_secret,
|
| 271 |
+
(SSL * s, uint32_t prot_level, int direction,
|
| 272 |
+
const unsigned char *secret, size_t secret_len, void *arg))
|
| 273 |
+
#define OSSL_FUNC_SSL_QUIC_TLS_GOT_TRANSPORT_PARAMS 2005
|
| 274 |
+
OSSL_CORE_MAKE_FUNC(int, SSL_QUIC_TLS_got_transport_params,
|
| 275 |
+
(SSL * s, const unsigned char *params, size_t params_len,
|
| 276 |
+
void *arg))
|
| 277 |
+
#define OSSL_FUNC_SSL_QUIC_TLS_ALERT 2006
|
| 278 |
+
OSSL_CORE_MAKE_FUNC(int, SSL_QUIC_TLS_alert,
|
| 279 |
+
(SSL * s, unsigned char alert_code, void *arg))
|
| 280 |
+
|
| 281 |
+
/* Operations */
|
| 282 |
+
|
| 283 |
+
#define OSSL_OP_DIGEST 1
|
| 284 |
+
#define OSSL_OP_CIPHER 2 /* Symmetric Ciphers */
|
| 285 |
+
#define OSSL_OP_MAC 3
|
| 286 |
+
#define OSSL_OP_KDF 4
|
| 287 |
+
#define OSSL_OP_RAND 5
|
| 288 |
+
#define OSSL_OP_KEYMGMT 10
|
| 289 |
+
#define OSSL_OP_KEYEXCH 11
|
| 290 |
+
#define OSSL_OP_SIGNATURE 12
|
| 291 |
+
#define OSSL_OP_ASYM_CIPHER 13
|
| 292 |
+
#define OSSL_OP_KEM 14
|
| 293 |
+
#define OSSL_OP_SKEYMGMT 15
|
| 294 |
+
/* New section for non-EVP operations */
|
| 295 |
+
#define OSSL_OP_ENCODER 20
|
| 296 |
+
#define OSSL_OP_DECODER 21
|
| 297 |
+
#define OSSL_OP_STORE 22
|
| 298 |
+
/* Highest known operation number */
|
| 299 |
+
#define OSSL_OP__HIGHEST 22
|
| 300 |
+
|
| 301 |
+
/* Digests */
|
| 302 |
+
|
| 303 |
+
#define OSSL_FUNC_DIGEST_NEWCTX 1
|
| 304 |
+
#define OSSL_FUNC_DIGEST_INIT 2
|
| 305 |
+
#define OSSL_FUNC_DIGEST_UPDATE 3
|
| 306 |
+
#define OSSL_FUNC_DIGEST_FINAL 4
|
| 307 |
+
#define OSSL_FUNC_DIGEST_DIGEST 5
|
| 308 |
+
#define OSSL_FUNC_DIGEST_FREECTX 6
|
| 309 |
+
#define OSSL_FUNC_DIGEST_DUPCTX 7
|
| 310 |
+
#define OSSL_FUNC_DIGEST_GET_PARAMS 8
|
| 311 |
+
#define OSSL_FUNC_DIGEST_SET_CTX_PARAMS 9
|
| 312 |
+
#define OSSL_FUNC_DIGEST_GET_CTX_PARAMS 10
|
| 313 |
+
#define OSSL_FUNC_DIGEST_GETTABLE_PARAMS 11
|
| 314 |
+
#define OSSL_FUNC_DIGEST_SETTABLE_CTX_PARAMS 12
|
| 315 |
+
#define OSSL_FUNC_DIGEST_GETTABLE_CTX_PARAMS 13
|
| 316 |
+
#define OSSL_FUNC_DIGEST_SQUEEZE 14
|
| 317 |
+
#define OSSL_FUNC_DIGEST_COPYCTX 15
|
| 318 |
+
|
| 319 |
+
OSSL_CORE_MAKE_FUNC(void *, digest_newctx, (void *provctx))
|
| 320 |
+
OSSL_CORE_MAKE_FUNC(int, digest_init, (void *dctx, const OSSL_PARAM params[]))
|
| 321 |
+
OSSL_CORE_MAKE_FUNC(int, digest_update,
|
| 322 |
+
(void *dctx, const unsigned char *in, size_t inl))
|
| 323 |
+
OSSL_CORE_MAKE_FUNC(int, digest_final,
|
| 324 |
+
(void *dctx,
|
| 325 |
+
unsigned char *out, size_t *outl, size_t outsz))
|
| 326 |
+
OSSL_CORE_MAKE_FUNC(int, digest_squeeze,
|
| 327 |
+
(void *dctx,
|
| 328 |
+
unsigned char *out, size_t *outl, size_t outsz))
|
| 329 |
+
OSSL_CORE_MAKE_FUNC(int, digest_digest,
|
| 330 |
+
(void *provctx, const unsigned char *in, size_t inl,
|
| 331 |
+
unsigned char *out, size_t *outl, size_t outsz))
|
| 332 |
+
|
| 333 |
+
OSSL_CORE_MAKE_FUNC(void, digest_freectx, (void *dctx))
|
| 334 |
+
OSSL_CORE_MAKE_FUNC(void *, digest_dupctx, (void *dctx))
|
| 335 |
+
OSSL_CORE_MAKE_FUNC(void, digest_copyctx, (void *outctx, void *inctx))
|
| 336 |
+
|
| 337 |
+
OSSL_CORE_MAKE_FUNC(int, digest_get_params, (OSSL_PARAM params[]))
|
| 338 |
+
OSSL_CORE_MAKE_FUNC(int, digest_set_ctx_params,
|
| 339 |
+
(void *vctx, const OSSL_PARAM params[]))
|
| 340 |
+
OSSL_CORE_MAKE_FUNC(int, digest_get_ctx_params,
|
| 341 |
+
(void *vctx, OSSL_PARAM params[]))
|
| 342 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, digest_gettable_params,
|
| 343 |
+
(void *provctx))
|
| 344 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, digest_settable_ctx_params,
|
| 345 |
+
(void *dctx, void *provctx))
|
| 346 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, digest_gettable_ctx_params,
|
| 347 |
+
(void *dctx, void *provctx))
|
| 348 |
+
|
| 349 |
+
/* Symmetric Ciphers */
|
| 350 |
+
|
| 351 |
+
#define OSSL_FUNC_CIPHER_NEWCTX 1
|
| 352 |
+
#define OSSL_FUNC_CIPHER_ENCRYPT_INIT 2
|
| 353 |
+
#define OSSL_FUNC_CIPHER_DECRYPT_INIT 3
|
| 354 |
+
#define OSSL_FUNC_CIPHER_UPDATE 4
|
| 355 |
+
#define OSSL_FUNC_CIPHER_FINAL 5
|
| 356 |
+
#define OSSL_FUNC_CIPHER_CIPHER 6
|
| 357 |
+
#define OSSL_FUNC_CIPHER_FREECTX 7
|
| 358 |
+
#define OSSL_FUNC_CIPHER_DUPCTX 8
|
| 359 |
+
#define OSSL_FUNC_CIPHER_GET_PARAMS 9
|
| 360 |
+
#define OSSL_FUNC_CIPHER_GET_CTX_PARAMS 10
|
| 361 |
+
#define OSSL_FUNC_CIPHER_SET_CTX_PARAMS 11
|
| 362 |
+
#define OSSL_FUNC_CIPHER_GETTABLE_PARAMS 12
|
| 363 |
+
#define OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS 13
|
| 364 |
+
#define OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS 14
|
| 365 |
+
#define OSSL_FUNC_CIPHER_PIPELINE_ENCRYPT_INIT 15
|
| 366 |
+
#define OSSL_FUNC_CIPHER_PIPELINE_DECRYPT_INIT 16
|
| 367 |
+
#define OSSL_FUNC_CIPHER_PIPELINE_UPDATE 17
|
| 368 |
+
#define OSSL_FUNC_CIPHER_PIPELINE_FINAL 18
|
| 369 |
+
#define OSSL_FUNC_CIPHER_ENCRYPT_SKEY_INIT 19
|
| 370 |
+
#define OSSL_FUNC_CIPHER_DECRYPT_SKEY_INIT 20
|
| 371 |
+
|
| 372 |
+
OSSL_CORE_MAKE_FUNC(void *, cipher_newctx, (void *provctx))
|
| 373 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_encrypt_init, (void *cctx, const unsigned char *key, size_t keylen, const unsigned char *iv, size_t ivlen, const OSSL_PARAM params[]))
|
| 374 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_decrypt_init, (void *cctx, const unsigned char *key, size_t keylen, const unsigned char *iv, size_t ivlen, const OSSL_PARAM params[]))
|
| 375 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_update,
|
| 376 |
+
(void *cctx,
|
| 377 |
+
unsigned char *out, size_t *outl, size_t outsize,
|
| 378 |
+
const unsigned char *in, size_t inl))
|
| 379 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_final,
|
| 380 |
+
(void *cctx,
|
| 381 |
+
unsigned char *out, size_t *outl, size_t outsize))
|
| 382 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_cipher,
|
| 383 |
+
(void *cctx,
|
| 384 |
+
unsigned char *out, size_t *outl, size_t outsize,
|
| 385 |
+
const unsigned char *in, size_t inl))
|
| 386 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_pipeline_encrypt_init,
|
| 387 |
+
(void *cctx,
|
| 388 |
+
const unsigned char *key, size_t keylen,
|
| 389 |
+
size_t numpipes, const unsigned char **iv, size_t ivlen,
|
| 390 |
+
const OSSL_PARAM params[]))
|
| 391 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_pipeline_decrypt_init,
|
| 392 |
+
(void *cctx,
|
| 393 |
+
const unsigned char *key, size_t keylen,
|
| 394 |
+
size_t numpipes, const unsigned char **iv, size_t ivlen,
|
| 395 |
+
const OSSL_PARAM params[]))
|
| 396 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_pipeline_update,
|
| 397 |
+
(void *cctx, size_t numpipes,
|
| 398 |
+
unsigned char **out, size_t *outl, const size_t *outsize,
|
| 399 |
+
const unsigned char **in, const size_t *inl))
|
| 400 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_pipeline_final,
|
| 401 |
+
(void *cctx, size_t numpipes,
|
| 402 |
+
unsigned char **out, size_t *outl, const size_t *outsize))
|
| 403 |
+
OSSL_CORE_MAKE_FUNC(void, cipher_freectx, (void *cctx))
|
| 404 |
+
OSSL_CORE_MAKE_FUNC(void *, cipher_dupctx, (void *cctx))
|
| 405 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_get_params, (OSSL_PARAM params[]))
|
| 406 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_get_ctx_params, (void *cctx, OSSL_PARAM params[]))
|
| 407 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_set_ctx_params, (void *cctx, const OSSL_PARAM params[]))
|
| 408 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, cipher_gettable_params,
|
| 409 |
+
(void *provctx))
|
| 410 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, cipher_settable_ctx_params,
|
| 411 |
+
(void *cctx, void *provctx))
|
| 412 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, cipher_gettable_ctx_params,
|
| 413 |
+
(void *cctx, void *provctx))
|
| 414 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_encrypt_skey_init, (void *cctx, void *skeydata, const unsigned char *iv, size_t ivlen, const OSSL_PARAM params[]))
|
| 415 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_decrypt_skey_init, (void *cctx, void *skeydata, const unsigned char *iv, size_t ivlen, const OSSL_PARAM params[]))
|
| 416 |
+
|
| 417 |
+
/* MACs */
|
| 418 |
+
|
| 419 |
+
#define OSSL_FUNC_MAC_NEWCTX 1
|
| 420 |
+
#define OSSL_FUNC_MAC_DUPCTX 2
|
| 421 |
+
#define OSSL_FUNC_MAC_FREECTX 3
|
| 422 |
+
#define OSSL_FUNC_MAC_INIT 4
|
| 423 |
+
#define OSSL_FUNC_MAC_UPDATE 5
|
| 424 |
+
#define OSSL_FUNC_MAC_FINAL 6
|
| 425 |
+
#define OSSL_FUNC_MAC_GET_PARAMS 7
|
| 426 |
+
#define OSSL_FUNC_MAC_GET_CTX_PARAMS 8
|
| 427 |
+
#define OSSL_FUNC_MAC_SET_CTX_PARAMS 9
|
| 428 |
+
#define OSSL_FUNC_MAC_GETTABLE_PARAMS 10
|
| 429 |
+
#define OSSL_FUNC_MAC_GETTABLE_CTX_PARAMS 11
|
| 430 |
+
#define OSSL_FUNC_MAC_SETTABLE_CTX_PARAMS 12
|
| 431 |
+
#define OSSL_FUNC_MAC_INIT_SKEY 13
|
| 432 |
+
|
| 433 |
+
OSSL_CORE_MAKE_FUNC(void *, mac_newctx, (void *provctx))
|
| 434 |
+
OSSL_CORE_MAKE_FUNC(void *, mac_dupctx, (void *src))
|
| 435 |
+
OSSL_CORE_MAKE_FUNC(void, mac_freectx, (void *mctx))
|
| 436 |
+
OSSL_CORE_MAKE_FUNC(int, mac_init, (void *mctx, const unsigned char *key, size_t keylen, const OSSL_PARAM params[]))
|
| 437 |
+
OSSL_CORE_MAKE_FUNC(int, mac_update,
|
| 438 |
+
(void *mctx, const unsigned char *in, size_t inl))
|
| 439 |
+
OSSL_CORE_MAKE_FUNC(int, mac_final,
|
| 440 |
+
(void *mctx,
|
| 441 |
+
unsigned char *out, size_t *outl, size_t outsize))
|
| 442 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, mac_gettable_params, (void *provctx))
|
| 443 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, mac_gettable_ctx_params,
|
| 444 |
+
(void *mctx, void *provctx))
|
| 445 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, mac_settable_ctx_params,
|
| 446 |
+
(void *mctx, void *provctx))
|
| 447 |
+
OSSL_CORE_MAKE_FUNC(int, mac_get_params, (OSSL_PARAM params[]))
|
| 448 |
+
OSSL_CORE_MAKE_FUNC(int, mac_get_ctx_params,
|
| 449 |
+
(void *mctx, OSSL_PARAM params[]))
|
| 450 |
+
OSSL_CORE_MAKE_FUNC(int, mac_set_ctx_params,
|
| 451 |
+
(void *mctx, const OSSL_PARAM params[]))
|
| 452 |
+
OSSL_CORE_MAKE_FUNC(int, mac_init_skey, (void *mctx, void *key, const OSSL_PARAM params[]))
|
| 453 |
+
|
| 454 |
+
/* KDFs and PRFs */
|
| 455 |
+
|
| 456 |
+
#define OSSL_FUNC_KDF_NEWCTX 1
|
| 457 |
+
#define OSSL_FUNC_KDF_DUPCTX 2
|
| 458 |
+
#define OSSL_FUNC_KDF_FREECTX 3
|
| 459 |
+
#define OSSL_FUNC_KDF_RESET 4
|
| 460 |
+
#define OSSL_FUNC_KDF_DERIVE 5
|
| 461 |
+
#define OSSL_FUNC_KDF_GETTABLE_PARAMS 6
|
| 462 |
+
#define OSSL_FUNC_KDF_GETTABLE_CTX_PARAMS 7
|
| 463 |
+
#define OSSL_FUNC_KDF_SETTABLE_CTX_PARAMS 8
|
| 464 |
+
#define OSSL_FUNC_KDF_GET_PARAMS 9
|
| 465 |
+
#define OSSL_FUNC_KDF_GET_CTX_PARAMS 10
|
| 466 |
+
#define OSSL_FUNC_KDF_SET_CTX_PARAMS 11
|
| 467 |
+
|
| 468 |
+
OSSL_CORE_MAKE_FUNC(void *, kdf_newctx, (void *provctx))
|
| 469 |
+
OSSL_CORE_MAKE_FUNC(void *, kdf_dupctx, (void *src))
|
| 470 |
+
OSSL_CORE_MAKE_FUNC(void, kdf_freectx, (void *kctx))
|
| 471 |
+
OSSL_CORE_MAKE_FUNC(void, kdf_reset, (void *kctx))
|
| 472 |
+
OSSL_CORE_MAKE_FUNC(int, kdf_derive, (void *kctx, unsigned char *key, size_t keylen, const OSSL_PARAM params[]))
|
| 473 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kdf_gettable_params, (void *provctx))
|
| 474 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kdf_gettable_ctx_params,
|
| 475 |
+
(void *kctx, void *provctx))
|
| 476 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kdf_settable_ctx_params,
|
| 477 |
+
(void *kctx, void *provctx))
|
| 478 |
+
OSSL_CORE_MAKE_FUNC(int, kdf_get_params, (OSSL_PARAM params[]))
|
| 479 |
+
OSSL_CORE_MAKE_FUNC(int, kdf_get_ctx_params,
|
| 480 |
+
(void *kctx, OSSL_PARAM params[]))
|
| 481 |
+
OSSL_CORE_MAKE_FUNC(int, kdf_set_ctx_params,
|
| 482 |
+
(void *kctx, const OSSL_PARAM params[]))
|
| 483 |
+
|
| 484 |
+
/* RAND */
|
| 485 |
+
|
| 486 |
+
#define OSSL_FUNC_RAND_NEWCTX 1
|
| 487 |
+
#define OSSL_FUNC_RAND_FREECTX 2
|
| 488 |
+
#define OSSL_FUNC_RAND_INSTANTIATE 3
|
| 489 |
+
#define OSSL_FUNC_RAND_UNINSTANTIATE 4
|
| 490 |
+
#define OSSL_FUNC_RAND_GENERATE 5
|
| 491 |
+
#define OSSL_FUNC_RAND_RESEED 6
|
| 492 |
+
#define OSSL_FUNC_RAND_NONCE 7
|
| 493 |
+
#define OSSL_FUNC_RAND_ENABLE_LOCKING 8
|
| 494 |
+
#define OSSL_FUNC_RAND_LOCK 9
|
| 495 |
+
#define OSSL_FUNC_RAND_UNLOCK 10
|
| 496 |
+
#define OSSL_FUNC_RAND_GETTABLE_PARAMS 11
|
| 497 |
+
#define OSSL_FUNC_RAND_GETTABLE_CTX_PARAMS 12
|
| 498 |
+
#define OSSL_FUNC_RAND_SETTABLE_CTX_PARAMS 13
|
| 499 |
+
#define OSSL_FUNC_RAND_GET_PARAMS 14
|
| 500 |
+
#define OSSL_FUNC_RAND_GET_CTX_PARAMS 15
|
| 501 |
+
#define OSSL_FUNC_RAND_SET_CTX_PARAMS 16
|
| 502 |
+
#define OSSL_FUNC_RAND_VERIFY_ZEROIZATION 17
|
| 503 |
+
#define OSSL_FUNC_RAND_GET_SEED 18
|
| 504 |
+
#define OSSL_FUNC_RAND_CLEAR_SEED 19
|
| 505 |
+
|
| 506 |
+
OSSL_CORE_MAKE_FUNC(void *, rand_newctx,
|
| 507 |
+
(void *provctx, void *parent,
|
| 508 |
+
const OSSL_DISPATCH *parent_calls))
|
| 509 |
+
OSSL_CORE_MAKE_FUNC(void, rand_freectx, (void *vctx))
|
| 510 |
+
OSSL_CORE_MAKE_FUNC(int, rand_instantiate,
|
| 511 |
+
(void *vdrbg, unsigned int strength,
|
| 512 |
+
int prediction_resistance,
|
| 513 |
+
const unsigned char *pstr, size_t pstr_len,
|
| 514 |
+
const OSSL_PARAM params[]))
|
| 515 |
+
OSSL_CORE_MAKE_FUNC(int, rand_uninstantiate, (void *vdrbg))
|
| 516 |
+
OSSL_CORE_MAKE_FUNC(int, rand_generate,
|
| 517 |
+
(void *vctx, unsigned char *out, size_t outlen,
|
| 518 |
+
unsigned int strength, int prediction_resistance,
|
| 519 |
+
const unsigned char *addin, size_t addin_len))
|
| 520 |
+
OSSL_CORE_MAKE_FUNC(int, rand_reseed,
|
| 521 |
+
(void *vctx, int prediction_resistance,
|
| 522 |
+
const unsigned char *ent, size_t ent_len,
|
| 523 |
+
const unsigned char *addin, size_t addin_len))
|
| 524 |
+
OSSL_CORE_MAKE_FUNC(size_t, rand_nonce,
|
| 525 |
+
(void *vctx, unsigned char *out, unsigned int strength,
|
| 526 |
+
size_t min_noncelen, size_t max_noncelen))
|
| 527 |
+
OSSL_CORE_MAKE_FUNC(int, rand_enable_locking, (void *vctx))
|
| 528 |
+
OSSL_CORE_MAKE_FUNC(int, rand_lock, (void *vctx))
|
| 529 |
+
OSSL_CORE_MAKE_FUNC(void, rand_unlock, (void *vctx))
|
| 530 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, rand_gettable_params, (void *provctx))
|
| 531 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, rand_gettable_ctx_params,
|
| 532 |
+
(void *vctx, void *provctx))
|
| 533 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, rand_settable_ctx_params,
|
| 534 |
+
(void *vctx, void *provctx))
|
| 535 |
+
OSSL_CORE_MAKE_FUNC(int, rand_get_params, (OSSL_PARAM params[]))
|
| 536 |
+
OSSL_CORE_MAKE_FUNC(int, rand_get_ctx_params,
|
| 537 |
+
(void *vctx, OSSL_PARAM params[]))
|
| 538 |
+
OSSL_CORE_MAKE_FUNC(int, rand_set_ctx_params,
|
| 539 |
+
(void *vctx, const OSSL_PARAM params[]))
|
| 540 |
+
OSSL_CORE_MAKE_FUNC(void, rand_set_callbacks,
|
| 541 |
+
(void *vctx, OSSL_INOUT_CALLBACK *get_entropy,
|
| 542 |
+
OSSL_CALLBACK *cleanup_entropy,
|
| 543 |
+
OSSL_INOUT_CALLBACK *get_nonce,
|
| 544 |
+
OSSL_CALLBACK *cleanup_nonce, void *arg))
|
| 545 |
+
OSSL_CORE_MAKE_FUNC(int, rand_verify_zeroization,
|
| 546 |
+
(void *vctx))
|
| 547 |
+
OSSL_CORE_MAKE_FUNC(size_t, rand_get_seed,
|
| 548 |
+
(void *vctx, unsigned char **buffer,
|
| 549 |
+
int entropy, size_t min_len, size_t max_len,
|
| 550 |
+
int prediction_resistance,
|
| 551 |
+
const unsigned char *adin, size_t adin_len))
|
| 552 |
+
OSSL_CORE_MAKE_FUNC(void, rand_clear_seed,
|
| 553 |
+
(void *vctx, unsigned char *buffer, size_t b_len))
|
| 554 |
+
|
| 555 |
+
/*-
|
| 556 |
+
* Key management
|
| 557 |
+
*
|
| 558 |
+
* The Key Management takes care of provider side key objects, and includes
|
| 559 |
+
* all current functionality to create them, destroy them, set parameters
|
| 560 |
+
* and key material, etc, essentially everything that manipulates the keys
|
| 561 |
+
* themselves and their parameters.
|
| 562 |
+
*
|
| 563 |
+
* The key objects are commonly referred to as |keydata|, and it MUST be able
|
| 564 |
+
* to contain parameters if the key has any, the public key and the private
|
| 565 |
+
* key. All parts are optional, but their presence determines what can be
|
| 566 |
+
* done with the key object in terms of encryption, signature, and so on.
|
| 567 |
+
* The assumption from libcrypto is that the key object contains any of the
|
| 568 |
+
* following data combinations:
|
| 569 |
+
*
|
| 570 |
+
* - parameters only
|
| 571 |
+
* - public key only
|
| 572 |
+
* - public key + private key
|
| 573 |
+
* - parameters + public key
|
| 574 |
+
* - parameters + public key + private key
|
| 575 |
+
*
|
| 576 |
+
* What "parameters", "public key" and "private key" means in detail is left
|
| 577 |
+
* to the implementation. In the case of DH and DSA, they would typically
|
| 578 |
+
* include domain parameters, while for certain variants of RSA, they would
|
| 579 |
+
* typically include PSS or OAEP parameters.
|
| 580 |
+
*
|
| 581 |
+
* Key objects are created with OSSL_FUNC_keymgmt_new() and destroyed with
|
| 582 |
+
* OSSL_FUNC_keymgmt_free(). Key objects can have data filled in with
|
| 583 |
+
* OSSL_FUNC_keymgmt_import().
|
| 584 |
+
*
|
| 585 |
+
* Three functions are made available to check what selection of data is
|
| 586 |
+
* present in a key object: OSSL_FUNC_keymgmt_has_parameters(),
|
| 587 |
+
* OSSL_FUNC_keymgmt_has_public_key(), and OSSL_FUNC_keymgmt_has_private_key(),
|
| 588 |
+
*/
|
| 589 |
+
|
| 590 |
+
/* Key data subset selection - individual bits */
|
| 591 |
+
#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
|
| 592 |
+
#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
|
| 593 |
+
#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
|
| 594 |
+
#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
|
| 595 |
+
|
| 596 |
+
/* Key data subset selection - combinations */
|
| 597 |
+
#define OSSL_KEYMGMT_SELECT_ALL_PARAMETERS \
|
| 598 |
+
(OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
|
| 599 |
+
| OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
|
| 600 |
+
#define OSSL_KEYMGMT_SELECT_KEYPAIR \
|
| 601 |
+
(OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
|
| 602 |
+
#define OSSL_KEYMGMT_SELECT_ALL \
|
| 603 |
+
(OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
|
| 604 |
+
|
| 605 |
+
#define OSSL_KEYMGMT_VALIDATE_FULL_CHECK 0
|
| 606 |
+
#define OSSL_KEYMGMT_VALIDATE_QUICK_CHECK 1
|
| 607 |
+
|
| 608 |
+
/* Basic key object creation */
|
| 609 |
+
#define OSSL_FUNC_KEYMGMT_NEW 1
|
| 610 |
+
OSSL_CORE_MAKE_FUNC(void *, keymgmt_new, (void *provctx))
|
| 611 |
+
|
| 612 |
+
/* Generation, a more complex constructor */
|
| 613 |
+
#define OSSL_FUNC_KEYMGMT_GEN_INIT 2
|
| 614 |
+
#define OSSL_FUNC_KEYMGMT_GEN_SET_TEMPLATE 3
|
| 615 |
+
#define OSSL_FUNC_KEYMGMT_GEN_SET_PARAMS 4
|
| 616 |
+
#define OSSL_FUNC_KEYMGMT_GEN_SETTABLE_PARAMS 5
|
| 617 |
+
#define OSSL_FUNC_KEYMGMT_GEN 6
|
| 618 |
+
#define OSSL_FUNC_KEYMGMT_GEN_CLEANUP 7
|
| 619 |
+
#define OSSL_FUNC_KEYMGMT_GEN_GET_PARAMS 15
|
| 620 |
+
#define OSSL_FUNC_KEYMGMT_GEN_GETTABLE_PARAMS 16
|
| 621 |
+
|
| 622 |
+
OSSL_CORE_MAKE_FUNC(void *, keymgmt_gen_init,
|
| 623 |
+
(void *provctx, int selection, const OSSL_PARAM params[]))
|
| 624 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_gen_set_template,
|
| 625 |
+
(void *genctx, void *templ))
|
| 626 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_gen_set_params,
|
| 627 |
+
(void *genctx, const OSSL_PARAM params[]))
|
| 628 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
|
| 629 |
+
keymgmt_gen_settable_params,
|
| 630 |
+
(void *genctx, void *provctx))
|
| 631 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_gen_get_params,
|
| 632 |
+
(void *genctx, OSSL_PARAM params[]))
|
| 633 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_gen_gettable_params,
|
| 634 |
+
(void *genctx, void *provctx))
|
| 635 |
+
OSSL_CORE_MAKE_FUNC(void *, keymgmt_gen,
|
| 636 |
+
(void *genctx, OSSL_CALLBACK *cb, void *cbarg))
|
| 637 |
+
OSSL_CORE_MAKE_FUNC(void, keymgmt_gen_cleanup, (void *genctx))
|
| 638 |
+
|
| 639 |
+
/* Key loading by object reference */
|
| 640 |
+
#define OSSL_FUNC_KEYMGMT_LOAD 8
|
| 641 |
+
OSSL_CORE_MAKE_FUNC(void *, keymgmt_load,
|
| 642 |
+
(const void *reference, size_t reference_sz))
|
| 643 |
+
|
| 644 |
+
/* Basic key object destruction */
|
| 645 |
+
#define OSSL_FUNC_KEYMGMT_FREE 10
|
| 646 |
+
OSSL_CORE_MAKE_FUNC(void, keymgmt_free, (void *keydata))
|
| 647 |
+
|
| 648 |
+
/* Key object information, with discovery */
|
| 649 |
+
#define OSSL_FUNC_KEYMGMT_GET_PARAMS 11
|
| 650 |
+
#define OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS 12
|
| 651 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_get_params,
|
| 652 |
+
(void *keydata, OSSL_PARAM params[]))
|
| 653 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_gettable_params,
|
| 654 |
+
(void *provctx))
|
| 655 |
+
|
| 656 |
+
#define OSSL_FUNC_KEYMGMT_SET_PARAMS 13
|
| 657 |
+
#define OSSL_FUNC_KEYMGMT_SETTABLE_PARAMS 14
|
| 658 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_set_params,
|
| 659 |
+
(void *keydata, const OSSL_PARAM params[]))
|
| 660 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_settable_params,
|
| 661 |
+
(void *provctx))
|
| 662 |
+
|
| 663 |
+
/* Key checks - discovery of supported operations */
|
| 664 |
+
#define OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME 20
|
| 665 |
+
OSSL_CORE_MAKE_FUNC(const char *, keymgmt_query_operation_name,
|
| 666 |
+
(int operation_id))
|
| 667 |
+
|
| 668 |
+
/* Key checks - key data content checks */
|
| 669 |
+
#define OSSL_FUNC_KEYMGMT_HAS 21
|
| 670 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_has, (const void *keydata, int selection))
|
| 671 |
+
|
| 672 |
+
/* Key checks - validation */
|
| 673 |
+
#define OSSL_FUNC_KEYMGMT_VALIDATE 22
|
| 674 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_validate, (const void *keydata, int selection, int checktype))
|
| 675 |
+
|
| 676 |
+
/* Key checks - matching */
|
| 677 |
+
#define OSSL_FUNC_KEYMGMT_MATCH 23
|
| 678 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_match,
|
| 679 |
+
(const void *keydata1, const void *keydata2,
|
| 680 |
+
int selection))
|
| 681 |
+
|
| 682 |
+
/* Import and export functions, with discovery */
|
| 683 |
+
#define OSSL_FUNC_KEYMGMT_IMPORT 40
|
| 684 |
+
#define OSSL_FUNC_KEYMGMT_IMPORT_TYPES 41
|
| 685 |
+
#define OSSL_FUNC_KEYMGMT_EXPORT 42
|
| 686 |
+
#define OSSL_FUNC_KEYMGMT_EXPORT_TYPES 43
|
| 687 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_import,
|
| 688 |
+
(void *keydata, int selection, const OSSL_PARAM params[]))
|
| 689 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_import_types,
|
| 690 |
+
(int selection))
|
| 691 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_export,
|
| 692 |
+
(void *keydata, int selection,
|
| 693 |
+
OSSL_CALLBACK *param_cb, void *cbarg))
|
| 694 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_export_types,
|
| 695 |
+
(int selection))
|
| 696 |
+
|
| 697 |
+
/* Dup function, constructor */
|
| 698 |
+
#define OSSL_FUNC_KEYMGMT_DUP 44
|
| 699 |
+
OSSL_CORE_MAKE_FUNC(void *, keymgmt_dup,
|
| 700 |
+
(const void *keydata_from, int selection))
|
| 701 |
+
|
| 702 |
+
/* Extended import and export functions */
|
| 703 |
+
#define OSSL_FUNC_KEYMGMT_IMPORT_TYPES_EX 45
|
| 704 |
+
#define OSSL_FUNC_KEYMGMT_EXPORT_TYPES_EX 46
|
| 705 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_import_types_ex,
|
| 706 |
+
(void *provctx, int selection))
|
| 707 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_export_types_ex,
|
| 708 |
+
(void *provctx, int selection))
|
| 709 |
+
|
| 710 |
+
/* Key Exchange */
|
| 711 |
+
|
| 712 |
+
#define OSSL_FUNC_KEYEXCH_NEWCTX 1
|
| 713 |
+
#define OSSL_FUNC_KEYEXCH_INIT 2
|
| 714 |
+
#define OSSL_FUNC_KEYEXCH_DERIVE 3
|
| 715 |
+
#define OSSL_FUNC_KEYEXCH_SET_PEER 4
|
| 716 |
+
#define OSSL_FUNC_KEYEXCH_FREECTX 5
|
| 717 |
+
#define OSSL_FUNC_KEYEXCH_DUPCTX 6
|
| 718 |
+
#define OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS 7
|
| 719 |
+
#define OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS 8
|
| 720 |
+
#define OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS 9
|
| 721 |
+
#define OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS 10
|
| 722 |
+
|
| 723 |
+
OSSL_CORE_MAKE_FUNC(void *, keyexch_newctx, (void *provctx))
|
| 724 |
+
OSSL_CORE_MAKE_FUNC(int, keyexch_init, (void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 725 |
+
OSSL_CORE_MAKE_FUNC(int, keyexch_derive, (void *ctx, unsigned char *secret, size_t *secretlen, size_t outlen))
|
| 726 |
+
OSSL_CORE_MAKE_FUNC(int, keyexch_set_peer, (void *ctx, void *provkey))
|
| 727 |
+
OSSL_CORE_MAKE_FUNC(void, keyexch_freectx, (void *ctx))
|
| 728 |
+
OSSL_CORE_MAKE_FUNC(void *, keyexch_dupctx, (void *ctx))
|
| 729 |
+
OSSL_CORE_MAKE_FUNC(int, keyexch_set_ctx_params, (void *ctx, const OSSL_PARAM params[]))
|
| 730 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keyexch_settable_ctx_params,
|
| 731 |
+
(void *ctx, void *provctx))
|
| 732 |
+
OSSL_CORE_MAKE_FUNC(int, keyexch_get_ctx_params, (void *ctx, OSSL_PARAM params[]))
|
| 733 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keyexch_gettable_ctx_params,
|
| 734 |
+
(void *ctx, void *provctx))
|
| 735 |
+
|
| 736 |
+
/* Signature */
|
| 737 |
+
|
| 738 |
+
#define OSSL_FUNC_SIGNATURE_NEWCTX 1
|
| 739 |
+
#define OSSL_FUNC_SIGNATURE_SIGN_INIT 2
|
| 740 |
+
#define OSSL_FUNC_SIGNATURE_SIGN 3
|
| 741 |
+
#define OSSL_FUNC_SIGNATURE_VERIFY_INIT 4
|
| 742 |
+
#define OSSL_FUNC_SIGNATURE_VERIFY 5
|
| 743 |
+
#define OSSL_FUNC_SIGNATURE_VERIFY_RECOVER_INIT 6
|
| 744 |
+
#define OSSL_FUNC_SIGNATURE_VERIFY_RECOVER 7
|
| 745 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_INIT 8
|
| 746 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_UPDATE 9
|
| 747 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_FINAL 10
|
| 748 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN 11
|
| 749 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_INIT 12
|
| 750 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_UPDATE 13
|
| 751 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_FINAL 14
|
| 752 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY 15
|
| 753 |
+
#define OSSL_FUNC_SIGNATURE_FREECTX 16
|
| 754 |
+
#define OSSL_FUNC_SIGNATURE_DUPCTX 17
|
| 755 |
+
#define OSSL_FUNC_SIGNATURE_GET_CTX_PARAMS 18
|
| 756 |
+
#define OSSL_FUNC_SIGNATURE_GETTABLE_CTX_PARAMS 19
|
| 757 |
+
#define OSSL_FUNC_SIGNATURE_SET_CTX_PARAMS 20
|
| 758 |
+
#define OSSL_FUNC_SIGNATURE_SETTABLE_CTX_PARAMS 21
|
| 759 |
+
#define OSSL_FUNC_SIGNATURE_GET_CTX_MD_PARAMS 22
|
| 760 |
+
#define OSSL_FUNC_SIGNATURE_GETTABLE_CTX_MD_PARAMS 23
|
| 761 |
+
#define OSSL_FUNC_SIGNATURE_SET_CTX_MD_PARAMS 24
|
| 762 |
+
#define OSSL_FUNC_SIGNATURE_SETTABLE_CTX_MD_PARAMS 25
|
| 763 |
+
#define OSSL_FUNC_SIGNATURE_QUERY_KEY_TYPES 26
|
| 764 |
+
#define OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_INIT 27
|
| 765 |
+
#define OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_UPDATE 28
|
| 766 |
+
#define OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_FINAL 29
|
| 767 |
+
#define OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_INIT 30
|
| 768 |
+
#define OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_UPDATE 31
|
| 769 |
+
#define OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_FINAL 32
|
| 770 |
+
|
| 771 |
+
OSSL_CORE_MAKE_FUNC(void *, signature_newctx, (void *provctx, const char *propq))
|
| 772 |
+
OSSL_CORE_MAKE_FUNC(int, signature_sign_init, (void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 773 |
+
OSSL_CORE_MAKE_FUNC(int, signature_sign, (void *ctx, unsigned char *sig, size_t *siglen, size_t sigsize, const unsigned char *tbs, size_t tbslen))
|
| 774 |
+
OSSL_CORE_MAKE_FUNC(int, signature_sign_message_init,
|
| 775 |
+
(void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 776 |
+
OSSL_CORE_MAKE_FUNC(int, signature_sign_message_update,
|
| 777 |
+
(void *ctx, const unsigned char *in, size_t inlen))
|
| 778 |
+
OSSL_CORE_MAKE_FUNC(int, signature_sign_message_final,
|
| 779 |
+
(void *ctx, unsigned char *sig,
|
| 780 |
+
size_t *siglen, size_t sigsize))
|
| 781 |
+
OSSL_CORE_MAKE_FUNC(int, signature_verify_init, (void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 782 |
+
OSSL_CORE_MAKE_FUNC(int, signature_verify, (void *ctx, const unsigned char *sig, size_t siglen, const unsigned char *tbs, size_t tbslen))
|
| 783 |
+
OSSL_CORE_MAKE_FUNC(int, signature_verify_message_init,
|
| 784 |
+
(void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 785 |
+
OSSL_CORE_MAKE_FUNC(int, signature_verify_message_update,
|
| 786 |
+
(void *ctx, const unsigned char *in, size_t inlen))
|
| 787 |
+
/*
|
| 788 |
+
* signature_verify_final requires that the signature to be verified against
|
| 789 |
+
* is specified via an OSSL_PARAM.
|
| 790 |
+
*/
|
| 791 |
+
OSSL_CORE_MAKE_FUNC(int, signature_verify_message_final, (void *ctx))
|
| 792 |
+
OSSL_CORE_MAKE_FUNC(int, signature_verify_recover_init,
|
| 793 |
+
(void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 794 |
+
OSSL_CORE_MAKE_FUNC(int, signature_verify_recover,
|
| 795 |
+
(void *ctx, unsigned char *rout, size_t *routlen,
|
| 796 |
+
size_t routsize, const unsigned char *sig, size_t siglen))
|
| 797 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_sign_init,
|
| 798 |
+
(void *ctx, const char *mdname, void *provkey,
|
| 799 |
+
const OSSL_PARAM params[]))
|
| 800 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_sign_update,
|
| 801 |
+
(void *ctx, const unsigned char *data, size_t datalen))
|
| 802 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_sign_final,
|
| 803 |
+
(void *ctx, unsigned char *sig, size_t *siglen,
|
| 804 |
+
size_t sigsize))
|
| 805 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_sign,
|
| 806 |
+
(void *ctx, unsigned char *sigret, size_t *siglen,
|
| 807 |
+
size_t sigsize, const unsigned char *tbs, size_t tbslen))
|
| 808 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_verify_init,
|
| 809 |
+
(void *ctx, const char *mdname, void *provkey,
|
| 810 |
+
const OSSL_PARAM params[]))
|
| 811 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_verify_update,
|
| 812 |
+
(void *ctx, const unsigned char *data, size_t datalen))
|
| 813 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_verify_final,
|
| 814 |
+
(void *ctx, const unsigned char *sig, size_t siglen))
|
| 815 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_verify,
|
| 816 |
+
(void *ctx, const unsigned char *sig, size_t siglen,
|
| 817 |
+
const unsigned char *tbs, size_t tbslen))
|
| 818 |
+
OSSL_CORE_MAKE_FUNC(void, signature_freectx, (void *ctx))
|
| 819 |
+
OSSL_CORE_MAKE_FUNC(void *, signature_dupctx, (void *ctx))
|
| 820 |
+
OSSL_CORE_MAKE_FUNC(int, signature_get_ctx_params,
|
| 821 |
+
(void *ctx, OSSL_PARAM params[]))
|
| 822 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, signature_gettable_ctx_params,
|
| 823 |
+
(void *ctx, void *provctx))
|
| 824 |
+
OSSL_CORE_MAKE_FUNC(int, signature_set_ctx_params,
|
| 825 |
+
(void *ctx, const OSSL_PARAM params[]))
|
| 826 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, signature_settable_ctx_params,
|
| 827 |
+
(void *ctx, void *provctx))
|
| 828 |
+
OSSL_CORE_MAKE_FUNC(int, signature_get_ctx_md_params,
|
| 829 |
+
(void *ctx, OSSL_PARAM params[]))
|
| 830 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, signature_gettable_ctx_md_params,
|
| 831 |
+
(void *ctx))
|
| 832 |
+
OSSL_CORE_MAKE_FUNC(int, signature_set_ctx_md_params,
|
| 833 |
+
(void *ctx, const OSSL_PARAM params[]))
|
| 834 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, signature_settable_ctx_md_params,
|
| 835 |
+
(void *ctx))
|
| 836 |
+
OSSL_CORE_MAKE_FUNC(const char **, signature_query_key_types, (void))
|
| 837 |
+
|
| 838 |
+
/*-
|
| 839 |
+
* Symmetric key management
|
| 840 |
+
*
|
| 841 |
+
* The Key Management takes care of provider side of symmetric key objects, and
|
| 842 |
+
* includes essentially everything that manipulates the keys themselves and
|
| 843 |
+
* their parameters.
|
| 844 |
+
*
|
| 845 |
+
* The key objects are commonly referred to as |keydata|, and it MUST be able
|
| 846 |
+
* to contain parameters if the key has any, and the secret key.
|
| 847 |
+
*
|
| 848 |
+
* Key objects are created with OSSL_FUNC_skeymgmt_import() (there is no
|
| 849 |
+
* dedicated memory allocation function), exported with
|
| 850 |
+
* OSSL_FUNC_skeymgmt_export() and destroyed with OSSL_FUNC_keymgmt_free().
|
| 851 |
+
*
|
| 852 |
+
*/
|
| 853 |
+
|
| 854 |
+
/* Key data subset selection - individual bits */
|
| 855 |
+
#define OSSL_SKEYMGMT_SELECT_PARAMETERS 0x01
|
| 856 |
+
#define OSSL_SKEYMGMT_SELECT_SECRET_KEY 0x02
|
| 857 |
+
|
| 858 |
+
/* Key data subset selection - combinations */
|
| 859 |
+
#define OSSL_SKEYMGMT_SELECT_ALL \
|
| 860 |
+
(OSSL_SKEYMGMT_SELECT_PARAMETERS | OSSL_SKEYMGMT_SELECT_SECRET_KEY)
|
| 861 |
+
|
| 862 |
+
#define OSSL_FUNC_SKEYMGMT_FREE 1
|
| 863 |
+
#define OSSL_FUNC_SKEYMGMT_IMPORT 2
|
| 864 |
+
#define OSSL_FUNC_SKEYMGMT_EXPORT 3
|
| 865 |
+
#define OSSL_FUNC_SKEYMGMT_GENERATE 4
|
| 866 |
+
#define OSSL_FUNC_SKEYMGMT_GET_KEY_ID 5
|
| 867 |
+
#define OSSL_FUNC_SKEYMGMT_IMP_SETTABLE_PARAMS 6
|
| 868 |
+
#define OSSL_FUNC_SKEYMGMT_GEN_SETTABLE_PARAMS 7
|
| 869 |
+
|
| 870 |
+
OSSL_CORE_MAKE_FUNC(void, skeymgmt_free, (void *keydata))
|
| 871 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
|
| 872 |
+
skeymgmt_imp_settable_params, (void *provctx))
|
| 873 |
+
OSSL_CORE_MAKE_FUNC(void *, skeymgmt_import, (void *provctx, int selection, const OSSL_PARAM params[]))
|
| 874 |
+
OSSL_CORE_MAKE_FUNC(int, skeymgmt_export,
|
| 875 |
+
(void *keydata, int selection,
|
| 876 |
+
OSSL_CALLBACK *param_cb, void *cbarg))
|
| 877 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
|
| 878 |
+
skeymgmt_gen_settable_params, (void *provctx))
|
| 879 |
+
OSSL_CORE_MAKE_FUNC(void *, skeymgmt_generate, (void *provctx, const OSSL_PARAM params[]))
|
| 880 |
+
OSSL_CORE_MAKE_FUNC(const char *, skeymgmt_get_key_id, (void *keydata))
|
| 881 |
+
|
| 882 |
+
/* Asymmetric Ciphers */
|
| 883 |
+
|
| 884 |
+
#define OSSL_FUNC_ASYM_CIPHER_NEWCTX 1
|
| 885 |
+
#define OSSL_FUNC_ASYM_CIPHER_ENCRYPT_INIT 2
|
| 886 |
+
#define OSSL_FUNC_ASYM_CIPHER_ENCRYPT 3
|
| 887 |
+
#define OSSL_FUNC_ASYM_CIPHER_DECRYPT_INIT 4
|
| 888 |
+
#define OSSL_FUNC_ASYM_CIPHER_DECRYPT 5
|
| 889 |
+
#define OSSL_FUNC_ASYM_CIPHER_FREECTX 6
|
| 890 |
+
#define OSSL_FUNC_ASYM_CIPHER_DUPCTX 7
|
| 891 |
+
#define OSSL_FUNC_ASYM_CIPHER_GET_CTX_PARAMS 8
|
| 892 |
+
#define OSSL_FUNC_ASYM_CIPHER_GETTABLE_CTX_PARAMS 9
|
| 893 |
+
#define OSSL_FUNC_ASYM_CIPHER_SET_CTX_PARAMS 10
|
| 894 |
+
#define OSSL_FUNC_ASYM_CIPHER_SETTABLE_CTX_PARAMS 11
|
| 895 |
+
|
| 896 |
+
OSSL_CORE_MAKE_FUNC(void *, asym_cipher_newctx, (void *provctx))
|
| 897 |
+
OSSL_CORE_MAKE_FUNC(int, asym_cipher_encrypt_init, (void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 898 |
+
OSSL_CORE_MAKE_FUNC(int, asym_cipher_encrypt, (void *ctx, unsigned char *out, size_t *outlen, size_t outsize, const unsigned char *in, size_t inlen))
|
| 899 |
+
OSSL_CORE_MAKE_FUNC(int, asym_cipher_decrypt_init, (void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 900 |
+
OSSL_CORE_MAKE_FUNC(int, asym_cipher_decrypt, (void *ctx, unsigned char *out, size_t *outlen, size_t outsize, const unsigned char *in, size_t inlen))
|
| 901 |
+
OSSL_CORE_MAKE_FUNC(void, asym_cipher_freectx, (void *ctx))
|
| 902 |
+
OSSL_CORE_MAKE_FUNC(void *, asym_cipher_dupctx, (void *ctx))
|
| 903 |
+
OSSL_CORE_MAKE_FUNC(int, asym_cipher_get_ctx_params,
|
| 904 |
+
(void *ctx, OSSL_PARAM params[]))
|
| 905 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, asym_cipher_gettable_ctx_params,
|
| 906 |
+
(void *ctx, void *provctx))
|
| 907 |
+
OSSL_CORE_MAKE_FUNC(int, asym_cipher_set_ctx_params,
|
| 908 |
+
(void *ctx, const OSSL_PARAM params[]))
|
| 909 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, asym_cipher_settable_ctx_params,
|
| 910 |
+
(void *ctx, void *provctx))
|
| 911 |
+
|
| 912 |
+
/* Asymmetric Key encapsulation */
|
| 913 |
+
#define OSSL_FUNC_KEM_NEWCTX 1
|
| 914 |
+
#define OSSL_FUNC_KEM_ENCAPSULATE_INIT 2
|
| 915 |
+
#define OSSL_FUNC_KEM_ENCAPSULATE 3
|
| 916 |
+
#define OSSL_FUNC_KEM_DECAPSULATE_INIT 4
|
| 917 |
+
#define OSSL_FUNC_KEM_DECAPSULATE 5
|
| 918 |
+
#define OSSL_FUNC_KEM_FREECTX 6
|
| 919 |
+
#define OSSL_FUNC_KEM_DUPCTX 7
|
| 920 |
+
#define OSSL_FUNC_KEM_GET_CTX_PARAMS 8
|
| 921 |
+
#define OSSL_FUNC_KEM_GETTABLE_CTX_PARAMS 9
|
| 922 |
+
#define OSSL_FUNC_KEM_SET_CTX_PARAMS 10
|
| 923 |
+
#define OSSL_FUNC_KEM_SETTABLE_CTX_PARAMS 11
|
| 924 |
+
#define OSSL_FUNC_KEM_AUTH_ENCAPSULATE_INIT 12
|
| 925 |
+
#define OSSL_FUNC_KEM_AUTH_DECAPSULATE_INIT 13
|
| 926 |
+
|
| 927 |
+
OSSL_CORE_MAKE_FUNC(void *, kem_newctx, (void *provctx))
|
| 928 |
+
OSSL_CORE_MAKE_FUNC(int, kem_encapsulate_init, (void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 929 |
+
OSSL_CORE_MAKE_FUNC(int, kem_auth_encapsulate_init, (void *ctx, void *provkey, void *authprivkey, const OSSL_PARAM params[]))
|
| 930 |
+
OSSL_CORE_MAKE_FUNC(int, kem_encapsulate, (void *ctx, unsigned char *out, size_t *outlen, unsigned char *secret, size_t *secretlen))
|
| 931 |
+
OSSL_CORE_MAKE_FUNC(int, kem_decapsulate_init, (void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 932 |
+
OSSL_CORE_MAKE_FUNC(int, kem_auth_decapsulate_init, (void *ctx, void *provkey, void *authpubkey, const OSSL_PARAM params[]))
|
| 933 |
+
OSSL_CORE_MAKE_FUNC(int, kem_decapsulate, (void *ctx, unsigned char *out, size_t *outlen, const unsigned char *in, size_t inlen))
|
| 934 |
+
OSSL_CORE_MAKE_FUNC(void, kem_freectx, (void *ctx))
|
| 935 |
+
OSSL_CORE_MAKE_FUNC(void *, kem_dupctx, (void *ctx))
|
| 936 |
+
OSSL_CORE_MAKE_FUNC(int, kem_get_ctx_params, (void *ctx, OSSL_PARAM params[]))
|
| 937 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kem_gettable_ctx_params,
|
| 938 |
+
(void *ctx, void *provctx))
|
| 939 |
+
OSSL_CORE_MAKE_FUNC(int, kem_set_ctx_params,
|
| 940 |
+
(void *ctx, const OSSL_PARAM params[]))
|
| 941 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kem_settable_ctx_params,
|
| 942 |
+
(void *ctx, void *provctx))
|
| 943 |
+
|
| 944 |
+
/* Encoders and decoders */
|
| 945 |
+
#define OSSL_FUNC_ENCODER_NEWCTX 1
|
| 946 |
+
#define OSSL_FUNC_ENCODER_FREECTX 2
|
| 947 |
+
#define OSSL_FUNC_ENCODER_GET_PARAMS 3
|
| 948 |
+
#define OSSL_FUNC_ENCODER_GETTABLE_PARAMS 4
|
| 949 |
+
#define OSSL_FUNC_ENCODER_SET_CTX_PARAMS 5
|
| 950 |
+
#define OSSL_FUNC_ENCODER_SETTABLE_CTX_PARAMS 6
|
| 951 |
+
#define OSSL_FUNC_ENCODER_DOES_SELECTION 10
|
| 952 |
+
#define OSSL_FUNC_ENCODER_ENCODE 11
|
| 953 |
+
#define OSSL_FUNC_ENCODER_IMPORT_OBJECT 20
|
| 954 |
+
#define OSSL_FUNC_ENCODER_FREE_OBJECT 21
|
| 955 |
+
OSSL_CORE_MAKE_FUNC(void *, encoder_newctx, (void *provctx))
|
| 956 |
+
OSSL_CORE_MAKE_FUNC(void, encoder_freectx, (void *ctx))
|
| 957 |
+
OSSL_CORE_MAKE_FUNC(int, encoder_get_params, (OSSL_PARAM params[]))
|
| 958 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, encoder_gettable_params,
|
| 959 |
+
(void *provctx))
|
| 960 |
+
OSSL_CORE_MAKE_FUNC(int, encoder_set_ctx_params,
|
| 961 |
+
(void *ctx, const OSSL_PARAM params[]))
|
| 962 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, encoder_settable_ctx_params,
|
| 963 |
+
(void *provctx))
|
| 964 |
+
|
| 965 |
+
OSSL_CORE_MAKE_FUNC(int, encoder_does_selection,
|
| 966 |
+
(void *provctx, int selection))
|
| 967 |
+
OSSL_CORE_MAKE_FUNC(int, encoder_encode,
|
| 968 |
+
(void *ctx, OSSL_CORE_BIO *out,
|
| 969 |
+
const void *obj_raw, const OSSL_PARAM obj_abstract[],
|
| 970 |
+
int selection,
|
| 971 |
+
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg))
|
| 972 |
+
|
| 973 |
+
OSSL_CORE_MAKE_FUNC(void *, encoder_import_object,
|
| 974 |
+
(void *ctx, int selection, const OSSL_PARAM params[]))
|
| 975 |
+
OSSL_CORE_MAKE_FUNC(void, encoder_free_object, (void *obj))
|
| 976 |
+
|
| 977 |
+
#define OSSL_FUNC_DECODER_NEWCTX 1
|
| 978 |
+
#define OSSL_FUNC_DECODER_FREECTX 2
|
| 979 |
+
#define OSSL_FUNC_DECODER_GET_PARAMS 3
|
| 980 |
+
#define OSSL_FUNC_DECODER_GETTABLE_PARAMS 4
|
| 981 |
+
#define OSSL_FUNC_DECODER_SET_CTX_PARAMS 5
|
| 982 |
+
#define OSSL_FUNC_DECODER_SETTABLE_CTX_PARAMS 6
|
| 983 |
+
#define OSSL_FUNC_DECODER_DOES_SELECTION 10
|
| 984 |
+
#define OSSL_FUNC_DECODER_DECODE 11
|
| 985 |
+
#define OSSL_FUNC_DECODER_EXPORT_OBJECT 20
|
| 986 |
+
OSSL_CORE_MAKE_FUNC(void *, decoder_newctx, (void *provctx))
|
| 987 |
+
OSSL_CORE_MAKE_FUNC(void, decoder_freectx, (void *ctx))
|
| 988 |
+
OSSL_CORE_MAKE_FUNC(int, decoder_get_params, (OSSL_PARAM params[]))
|
| 989 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, decoder_gettable_params,
|
| 990 |
+
(void *provctx))
|
| 991 |
+
OSSL_CORE_MAKE_FUNC(int, decoder_set_ctx_params,
|
| 992 |
+
(void *ctx, const OSSL_PARAM params[]))
|
| 993 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, decoder_settable_ctx_params,
|
| 994 |
+
(void *provctx))
|
| 995 |
+
|
| 996 |
+
OSSL_CORE_MAKE_FUNC(int, decoder_does_selection,
|
| 997 |
+
(void *provctx, int selection))
|
| 998 |
+
OSSL_CORE_MAKE_FUNC(int, decoder_decode,
|
| 999 |
+
(void *ctx, OSSL_CORE_BIO *in, int selection,
|
| 1000 |
+
OSSL_CALLBACK *data_cb, void *data_cbarg,
|
| 1001 |
+
OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg))
|
| 1002 |
+
OSSL_CORE_MAKE_FUNC(int, decoder_export_object,
|
| 1003 |
+
(void *ctx, const void *objref, size_t objref_sz,
|
| 1004 |
+
OSSL_CALLBACK *export_cb, void *export_cbarg))
|
| 1005 |
+
|
| 1006 |
+
/*-
|
| 1007 |
+
* Store
|
| 1008 |
+
*
|
| 1009 |
+
* Objects are scanned by using the 'open', 'load', 'eof' and 'close'
|
| 1010 |
+
* functions, which implement an OSSL_STORE loader.
|
| 1011 |
+
*
|
| 1012 |
+
* store_load() works in a way that's very similar to the decoders, in
|
| 1013 |
+
* that they pass an abstract object through a callback, either as a DER
|
| 1014 |
+
* octet string or as an object reference, which libcrypto will have to
|
| 1015 |
+
* deal with.
|
| 1016 |
+
*/
|
| 1017 |
+
|
| 1018 |
+
#define OSSL_FUNC_STORE_OPEN 1
|
| 1019 |
+
#define OSSL_FUNC_STORE_ATTACH 2
|
| 1020 |
+
#define OSSL_FUNC_STORE_SETTABLE_CTX_PARAMS 3
|
| 1021 |
+
#define OSSL_FUNC_STORE_SET_CTX_PARAMS 4
|
| 1022 |
+
#define OSSL_FUNC_STORE_LOAD 5
|
| 1023 |
+
#define OSSL_FUNC_STORE_EOF 6
|
| 1024 |
+
#define OSSL_FUNC_STORE_CLOSE 7
|
| 1025 |
+
#define OSSL_FUNC_STORE_EXPORT_OBJECT 8
|
| 1026 |
+
#define OSSL_FUNC_STORE_DELETE 9
|
| 1027 |
+
#define OSSL_FUNC_STORE_OPEN_EX 10
|
| 1028 |
+
OSSL_CORE_MAKE_FUNC(void *, store_open, (void *provctx, const char *uri))
|
| 1029 |
+
OSSL_CORE_MAKE_FUNC(void *, store_attach, (void *provctx, OSSL_CORE_BIO *in))
|
| 1030 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, store_settable_ctx_params,
|
| 1031 |
+
(void *provctx))
|
| 1032 |
+
OSSL_CORE_MAKE_FUNC(int, store_set_ctx_params,
|
| 1033 |
+
(void *loaderctx, const OSSL_PARAM params[]))
|
| 1034 |
+
OSSL_CORE_MAKE_FUNC(int, store_load,
|
| 1035 |
+
(void *loaderctx,
|
| 1036 |
+
OSSL_CALLBACK *object_cb, void *object_cbarg,
|
| 1037 |
+
OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg))
|
| 1038 |
+
OSSL_CORE_MAKE_FUNC(int, store_eof, (void *loaderctx))
|
| 1039 |
+
OSSL_CORE_MAKE_FUNC(int, store_close, (void *loaderctx))
|
| 1040 |
+
OSSL_CORE_MAKE_FUNC(int, store_export_object,
|
| 1041 |
+
(void *loaderctx, const void *objref, size_t objref_sz,
|
| 1042 |
+
OSSL_CALLBACK *export_cb, void *export_cbarg))
|
| 1043 |
+
OSSL_CORE_MAKE_FUNC(int, store_delete,
|
| 1044 |
+
(void *provctx, const char *uri, const OSSL_PARAM params[],
|
| 1045 |
+
OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg))
|
| 1046 |
+
OSSL_CORE_MAKE_FUNC(void *, store_open_ex,
|
| 1047 |
+
(void *provctx, const char *uri, const OSSL_PARAM params[],
|
| 1048 |
+
OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg))
|
| 1049 |
+
|
| 1050 |
+
#ifdef __cplusplus
|
| 1051 |
+
}
|
| 1052 |
+
#endif
|
| 1053 |
+
|
| 1054 |
+
#endif
|
miniconda3/envs/active_proaction/include/openssl/core_names.h
ADDED
|
@@ -0,0 +1,579 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/core_names.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2019-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
/* clang-format off */
|
| 13 |
+
|
| 14 |
+
/* clang-format on */
|
| 15 |
+
|
| 16 |
+
#ifndef OPENSSL_CORE_NAMES_H
|
| 17 |
+
#define OPENSSL_CORE_NAMES_H
|
| 18 |
+
#pragma once
|
| 19 |
+
|
| 20 |
+
#ifdef __cplusplus
|
| 21 |
+
extern "C" {
|
| 22 |
+
#endif
|
| 23 |
+
|
| 24 |
+
/* OSSL_CIPHER_PARAM_CTS_MODE Values */
|
| 25 |
+
#define OSSL_CIPHER_CTS_MODE_CS1 "CS1"
|
| 26 |
+
#define OSSL_CIPHER_CTS_MODE_CS2 "CS2"
|
| 27 |
+
#define OSSL_CIPHER_CTS_MODE_CS3 "CS3"
|
| 28 |
+
|
| 29 |
+
/* Known CIPHER names (not a complete list) */
|
| 30 |
+
#define OSSL_CIPHER_NAME_AES_128_GCM_SIV "AES-128-GCM-SIV"
|
| 31 |
+
#define OSSL_CIPHER_NAME_AES_192_GCM_SIV "AES-192-GCM-SIV"
|
| 32 |
+
#define OSSL_CIPHER_NAME_AES_256_GCM_SIV "AES-256-GCM-SIV"
|
| 33 |
+
|
| 34 |
+
/* Known DIGEST names (not a complete list) */
|
| 35 |
+
#define OSSL_DIGEST_NAME_MD5 "MD5"
|
| 36 |
+
#define OSSL_DIGEST_NAME_MD5_SHA1 "MD5-SHA1"
|
| 37 |
+
#define OSSL_DIGEST_NAME_SHA1 "SHA1"
|
| 38 |
+
#define OSSL_DIGEST_NAME_SHA2_224 "SHA2-224"
|
| 39 |
+
#define OSSL_DIGEST_NAME_SHA2_256 "SHA2-256"
|
| 40 |
+
#define OSSL_DIGEST_NAME_SHA2_256_192 "SHA2-256/192"
|
| 41 |
+
#define OSSL_DIGEST_NAME_SHA2_384 "SHA2-384"
|
| 42 |
+
#define OSSL_DIGEST_NAME_SHA2_512 "SHA2-512"
|
| 43 |
+
#define OSSL_DIGEST_NAME_SHA2_512_224 "SHA2-512/224"
|
| 44 |
+
#define OSSL_DIGEST_NAME_SHA2_512_256 "SHA2-512/256"
|
| 45 |
+
#define OSSL_DIGEST_NAME_MD2 "MD2"
|
| 46 |
+
#define OSSL_DIGEST_NAME_MD4 "MD4"
|
| 47 |
+
#define OSSL_DIGEST_NAME_MDC2 "MDC2"
|
| 48 |
+
#define OSSL_DIGEST_NAME_RIPEMD160 "RIPEMD160"
|
| 49 |
+
#define OSSL_DIGEST_NAME_SHA3_224 "SHA3-224"
|
| 50 |
+
#define OSSL_DIGEST_NAME_SHA3_256 "SHA3-256"
|
| 51 |
+
#define OSSL_DIGEST_NAME_SHA3_384 "SHA3-384"
|
| 52 |
+
#define OSSL_DIGEST_NAME_SHA3_512 "SHA3-512"
|
| 53 |
+
#define OSSL_DIGEST_NAME_KECCAK_KMAC128 "KECCAK-KMAC-128"
|
| 54 |
+
#define OSSL_DIGEST_NAME_KECCAK_KMAC256 "KECCAK-KMAC-256"
|
| 55 |
+
#define OSSL_DIGEST_NAME_SM3 "SM3"
|
| 56 |
+
|
| 57 |
+
/* Known MAC names */
|
| 58 |
+
#define OSSL_MAC_NAME_BLAKE2BMAC "BLAKE2BMAC"
|
| 59 |
+
#define OSSL_MAC_NAME_BLAKE2SMAC "BLAKE2SMAC"
|
| 60 |
+
#define OSSL_MAC_NAME_CMAC "CMAC"
|
| 61 |
+
#define OSSL_MAC_NAME_GMAC "GMAC"
|
| 62 |
+
#define OSSL_MAC_NAME_HMAC "HMAC"
|
| 63 |
+
#define OSSL_MAC_NAME_KMAC128 "KMAC128"
|
| 64 |
+
#define OSSL_MAC_NAME_KMAC256 "KMAC256"
|
| 65 |
+
#define OSSL_MAC_NAME_POLY1305 "POLY1305"
|
| 66 |
+
#define OSSL_MAC_NAME_SIPHASH "SIPHASH"
|
| 67 |
+
|
| 68 |
+
/* Known KDF names */
|
| 69 |
+
#define OSSL_KDF_NAME_HKDF "HKDF"
|
| 70 |
+
#define OSSL_KDF_NAME_TLS1_3_KDF "TLS13-KDF"
|
| 71 |
+
#define OSSL_KDF_NAME_PBKDF1 "PBKDF1"
|
| 72 |
+
#define OSSL_KDF_NAME_PBKDF2 "PBKDF2"
|
| 73 |
+
#define OSSL_KDF_NAME_SCRYPT "SCRYPT"
|
| 74 |
+
#define OSSL_KDF_NAME_SSHKDF "SSHKDF"
|
| 75 |
+
#define OSSL_KDF_NAME_SSKDF "SSKDF"
|
| 76 |
+
#define OSSL_KDF_NAME_TLS1_PRF "TLS1-PRF"
|
| 77 |
+
#define OSSL_KDF_NAME_X942KDF_ASN1 "X942KDF-ASN1"
|
| 78 |
+
#define OSSL_KDF_NAME_X942KDF_CONCAT "X942KDF-CONCAT"
|
| 79 |
+
#define OSSL_KDF_NAME_X963KDF "X963KDF"
|
| 80 |
+
#define OSSL_KDF_NAME_KBKDF "KBKDF"
|
| 81 |
+
#define OSSL_KDF_NAME_KRB5KDF "KRB5KDF"
|
| 82 |
+
#define OSSL_KDF_NAME_HMACDRBGKDF "HMAC-DRBG-KDF"
|
| 83 |
+
|
| 84 |
+
/* RSA padding modes */
|
| 85 |
+
#define OSSL_PKEY_RSA_PAD_MODE_NONE "none"
|
| 86 |
+
#define OSSL_PKEY_RSA_PAD_MODE_PKCSV15 "pkcs1"
|
| 87 |
+
#define OSSL_PKEY_RSA_PAD_MODE_OAEP "oaep"
|
| 88 |
+
#define OSSL_PKEY_RSA_PAD_MODE_X931 "x931"
|
| 89 |
+
#define OSSL_PKEY_RSA_PAD_MODE_PSS "pss"
|
| 90 |
+
|
| 91 |
+
/* RSA pss padding salt length */
|
| 92 |
+
#define OSSL_PKEY_RSA_PSS_SALT_LEN_DIGEST "digest"
|
| 93 |
+
#define OSSL_PKEY_RSA_PSS_SALT_LEN_MAX "max"
|
| 94 |
+
#define OSSL_PKEY_RSA_PSS_SALT_LEN_AUTO "auto"
|
| 95 |
+
#define OSSL_PKEY_RSA_PSS_SALT_LEN_AUTO_DIGEST_MAX "auto-digestmax"
|
| 96 |
+
|
| 97 |
+
/* OSSL_PKEY_PARAM_EC_ENCODING values */
|
| 98 |
+
#define OSSL_PKEY_EC_ENCODING_EXPLICIT "explicit"
|
| 99 |
+
#define OSSL_PKEY_EC_ENCODING_GROUP "named_curve"
|
| 100 |
+
|
| 101 |
+
#define OSSL_PKEY_EC_POINT_CONVERSION_FORMAT_UNCOMPRESSED "uncompressed"
|
| 102 |
+
#define OSSL_PKEY_EC_POINT_CONVERSION_FORMAT_COMPRESSED "compressed"
|
| 103 |
+
#define OSSL_PKEY_EC_POINT_CONVERSION_FORMAT_HYBRID "hybrid"
|
| 104 |
+
|
| 105 |
+
#define OSSL_PKEY_EC_GROUP_CHECK_DEFAULT "default"
|
| 106 |
+
#define OSSL_PKEY_EC_GROUP_CHECK_NAMED "named"
|
| 107 |
+
#define OSSL_PKEY_EC_GROUP_CHECK_NAMED_NIST "named-nist"
|
| 108 |
+
|
| 109 |
+
/* PROV_SKEY well known key types */
|
| 110 |
+
#define OSSL_SKEY_TYPE_GENERIC "GENERIC-SECRET"
|
| 111 |
+
#define OSSL_SKEY_TYPE_AES "AES"
|
| 112 |
+
|
| 113 |
+
/* OSSL_KEM_PARAM_OPERATION values */
|
| 114 |
+
#define OSSL_KEM_PARAM_OPERATION_RSASVE "RSASVE"
|
| 115 |
+
#define OSSL_KEM_PARAM_OPERATION_DHKEM "DHKEM"
|
| 116 |
+
|
| 117 |
+
/* Provider configuration variables */
|
| 118 |
+
#define OSSL_PKEY_RETAIN_SEED "pkey_retain_seed"
|
| 119 |
+
|
| 120 |
+
/* Parameter name definitions - generated by util/perl/OpenSSL/paramnames.pm */
|
| 121 |
+
/* clang-format off */
|
| 122 |
+
# define OSSL_ALG_PARAM_ALGORITHM_ID "algorithm-id"
|
| 123 |
+
# define OSSL_ALG_PARAM_ALGORITHM_ID_PARAMS "algorithm-id-params"
|
| 124 |
+
# define OSSL_ALG_PARAM_CIPHER "cipher"
|
| 125 |
+
# define OSSL_ALG_PARAM_DIGEST "digest"
|
| 126 |
+
# define OSSL_ALG_PARAM_ENGINE "engine"
|
| 127 |
+
# define OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR "fips-indicator"
|
| 128 |
+
# define OSSL_ALG_PARAM_MAC "mac"
|
| 129 |
+
# define OSSL_ALG_PARAM_PROPERTIES "properties"
|
| 130 |
+
# define OSSL_ASYM_CIPHER_PARAM_DIGEST OSSL_PKEY_PARAM_DIGEST
|
| 131 |
+
# define OSSL_ASYM_CIPHER_PARAM_ENGINE OSSL_PKEY_PARAM_ENGINE
|
| 132 |
+
# define OSSL_ASYM_CIPHER_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 133 |
+
# define OSSL_ASYM_CIPHER_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
| 134 |
+
# define OSSL_ASYM_CIPHER_PARAM_FIPS_RSA_PKCS15_PAD_DISABLED OSSL_PROV_PARAM_RSA_PKCS15_PAD_DISABLED
|
| 135 |
+
# define OSSL_ASYM_CIPHER_PARAM_IMPLICIT_REJECTION "implicit-rejection"
|
| 136 |
+
# define OSSL_ASYM_CIPHER_PARAM_MGF1_DIGEST OSSL_PKEY_PARAM_MGF1_DIGEST
|
| 137 |
+
# define OSSL_ASYM_CIPHER_PARAM_MGF1_DIGEST_PROPS OSSL_PKEY_PARAM_MGF1_PROPERTIES
|
| 138 |
+
# define OSSL_ASYM_CIPHER_PARAM_OAEP_DIGEST OSSL_ALG_PARAM_DIGEST
|
| 139 |
+
# define OSSL_ASYM_CIPHER_PARAM_OAEP_DIGEST_PROPS "digest-props"
|
| 140 |
+
# define OSSL_ASYM_CIPHER_PARAM_OAEP_LABEL "oaep-label"
|
| 141 |
+
# define OSSL_ASYM_CIPHER_PARAM_PAD_MODE OSSL_PKEY_PARAM_PAD_MODE
|
| 142 |
+
# define OSSL_ASYM_CIPHER_PARAM_PROPERTIES OSSL_PKEY_PARAM_PROPERTIES
|
| 143 |
+
# define OSSL_ASYM_CIPHER_PARAM_TLS_CLIENT_VERSION "tls-client-version"
|
| 144 |
+
# define OSSL_ASYM_CIPHER_PARAM_TLS_NEGOTIATED_VERSION "tls-negotiated-version"
|
| 145 |
+
# define OSSL_CAPABILITY_TLS_GROUP_ALG "tls-group-alg"
|
| 146 |
+
# define OSSL_CAPABILITY_TLS_GROUP_ID "tls-group-id"
|
| 147 |
+
# define OSSL_CAPABILITY_TLS_GROUP_IS_KEM "tls-group-is-kem"
|
| 148 |
+
# define OSSL_CAPABILITY_TLS_GROUP_MAX_DTLS "tls-max-dtls"
|
| 149 |
+
# define OSSL_CAPABILITY_TLS_GROUP_MAX_TLS "tls-max-tls"
|
| 150 |
+
# define OSSL_CAPABILITY_TLS_GROUP_MIN_DTLS "tls-min-dtls"
|
| 151 |
+
# define OSSL_CAPABILITY_TLS_GROUP_MIN_TLS "tls-min-tls"
|
| 152 |
+
# define OSSL_CAPABILITY_TLS_GROUP_NAME "tls-group-name"
|
| 153 |
+
# define OSSL_CAPABILITY_TLS_GROUP_NAME_INTERNAL "tls-group-name-internal"
|
| 154 |
+
# define OSSL_CAPABILITY_TLS_GROUP_SECURITY_BITS "tls-group-sec-bits"
|
| 155 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_CODE_POINT "tls-sigalg-code-point"
|
| 156 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_HASH_NAME "tls-sigalg-hash-name"
|
| 157 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_HASH_OID "tls-sigalg-hash-oid"
|
| 158 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_IANA_NAME "tls-sigalg-iana-name"
|
| 159 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE "tls-sigalg-keytype"
|
| 160 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE_OID "tls-sigalg-keytype-oid"
|
| 161 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_MAX_DTLS "tls-max-dtls"
|
| 162 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_MAX_TLS "tls-max-tls"
|
| 163 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_MIN_DTLS "tls-min-dtls"
|
| 164 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_MIN_TLS "tls-min-tls"
|
| 165 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_NAME "tls-sigalg-name"
|
| 166 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_OID "tls-sigalg-oid"
|
| 167 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_SECURITY_BITS "tls-sigalg-sec-bits"
|
| 168 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_SIG_NAME "tls-sigalg-sig-name"
|
| 169 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_SIG_OID "tls-sigalg-sig-oid"
|
| 170 |
+
# define OSSL_CIPHER_PARAM_AEAD "aead"
|
| 171 |
+
# define OSSL_CIPHER_PARAM_AEAD_IVLEN OSSL_CIPHER_PARAM_IVLEN
|
| 172 |
+
# define OSSL_CIPHER_PARAM_AEAD_IV_GENERATED "iv-generated"
|
| 173 |
+
# define OSSL_CIPHER_PARAM_AEAD_MAC_KEY "mackey"
|
| 174 |
+
# define OSSL_CIPHER_PARAM_AEAD_TAG "tag"
|
| 175 |
+
# define OSSL_CIPHER_PARAM_AEAD_TAGLEN "taglen"
|
| 176 |
+
# define OSSL_CIPHER_PARAM_AEAD_TLS1_AAD "tlsaad"
|
| 177 |
+
# define OSSL_CIPHER_PARAM_AEAD_TLS1_AAD_PAD "tlsaadpad"
|
| 178 |
+
# define OSSL_CIPHER_PARAM_AEAD_TLS1_GET_IV_GEN "tlsivgen"
|
| 179 |
+
# define OSSL_CIPHER_PARAM_AEAD_TLS1_IV_FIXED "tlsivfixed"
|
| 180 |
+
# define OSSL_CIPHER_PARAM_AEAD_TLS1_SET_IV_INV "tlsivinv"
|
| 181 |
+
# define OSSL_CIPHER_PARAM_ALGORITHM_ID OSSL_ALG_PARAM_ALGORITHM_ID
|
| 182 |
+
# define OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS OSSL_ALG_PARAM_ALGORITHM_ID_PARAMS
|
| 183 |
+
# define OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS_OLD "alg_id_param"
|
| 184 |
+
# define OSSL_CIPHER_PARAM_BLOCK_SIZE "blocksize"
|
| 185 |
+
# define OSSL_CIPHER_PARAM_CTS "cts"
|
| 186 |
+
# define OSSL_CIPHER_PARAM_CTS_MODE "cts_mode"
|
| 187 |
+
# define OSSL_CIPHER_PARAM_CUSTOM_IV "custom-iv"
|
| 188 |
+
# define OSSL_CIPHER_PARAM_DECRYPT_ONLY "decrypt-only"
|
| 189 |
+
# define OSSL_CIPHER_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 190 |
+
# define OSSL_CIPHER_PARAM_FIPS_ENCRYPT_CHECK "encrypt-check"
|
| 191 |
+
# define OSSL_CIPHER_PARAM_HAS_RAND_KEY "has-randkey"
|
| 192 |
+
# define OSSL_CIPHER_PARAM_IV "iv"
|
| 193 |
+
# define OSSL_CIPHER_PARAM_IVLEN "ivlen"
|
| 194 |
+
# define OSSL_CIPHER_PARAM_KEYLEN "keylen"
|
| 195 |
+
# define OSSL_CIPHER_PARAM_MODE "mode"
|
| 196 |
+
# define OSSL_CIPHER_PARAM_NUM "num"
|
| 197 |
+
# define OSSL_CIPHER_PARAM_PADDING "padding"
|
| 198 |
+
# define OSSL_CIPHER_PARAM_PIPELINE_AEAD_TAG "pipeline-tag"
|
| 199 |
+
# define OSSL_CIPHER_PARAM_RANDOM_KEY "randkey"
|
| 200 |
+
# define OSSL_CIPHER_PARAM_RC2_KEYBITS "keybits"
|
| 201 |
+
# define OSSL_CIPHER_PARAM_ROUNDS "rounds"
|
| 202 |
+
# define OSSL_CIPHER_PARAM_SPEED "speed"
|
| 203 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK "tls-multi"
|
| 204 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD "tls1multi_aad"
|
| 205 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD_PACKLEN "tls1multi_aadpacklen"
|
| 206 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC "tls1multi_enc"
|
| 207 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_IN "tls1multi_encin"
|
| 208 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_LEN "tls1multi_enclen"
|
| 209 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_INTERLEAVE "tls1multi_interleave"
|
| 210 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_BUFSIZE "tls1multi_maxbufsz"
|
| 211 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_SEND_FRAGMENT "tls1multi_maxsndfrag"
|
| 212 |
+
# define OSSL_CIPHER_PARAM_TLS_MAC "tls-mac"
|
| 213 |
+
# define OSSL_CIPHER_PARAM_TLS_MAC_SIZE "tls-mac-size"
|
| 214 |
+
# define OSSL_CIPHER_PARAM_TLS_VERSION "tls-version"
|
| 215 |
+
# define OSSL_CIPHER_PARAM_UPDATED_IV "updated-iv"
|
| 216 |
+
# define OSSL_CIPHER_PARAM_USE_BITS "use-bits"
|
| 217 |
+
# define OSSL_CIPHER_PARAM_XTS_STANDARD "xts_standard"
|
| 218 |
+
# define OSSL_DECODER_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
| 219 |
+
# define OSSL_DIGEST_PARAM_ALGID_ABSENT "algid-absent"
|
| 220 |
+
# define OSSL_DIGEST_PARAM_BLOCK_SIZE "blocksize"
|
| 221 |
+
# define OSSL_DIGEST_PARAM_MICALG "micalg"
|
| 222 |
+
# define OSSL_DIGEST_PARAM_PAD_TYPE "pad-type"
|
| 223 |
+
# define OSSL_DIGEST_PARAM_SIZE "size"
|
| 224 |
+
# define OSSL_DIGEST_PARAM_SSL3_MS "ssl3-ms"
|
| 225 |
+
# define OSSL_DIGEST_PARAM_XOF "xof"
|
| 226 |
+
# define OSSL_DIGEST_PARAM_XOFLEN "xoflen"
|
| 227 |
+
# define OSSL_DRBG_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
|
| 228 |
+
# define OSSL_DRBG_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
|
| 229 |
+
# define OSSL_DRBG_PARAM_ENTROPY_REQUIRED "entropy_required"
|
| 230 |
+
# define OSSL_DRBG_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 231 |
+
# define OSSL_DRBG_PARAM_FIPS_DIGEST_CHECK OSSL_PKEY_PARAM_FIPS_DIGEST_CHECK
|
| 232 |
+
# define OSSL_DRBG_PARAM_MAC OSSL_ALG_PARAM_MAC
|
| 233 |
+
# define OSSL_DRBG_PARAM_MAX_ADINLEN "max_adinlen"
|
| 234 |
+
# define OSSL_DRBG_PARAM_MAX_ENTROPYLEN "max_entropylen"
|
| 235 |
+
# define OSSL_DRBG_PARAM_MAX_LENGTH "maxium_length"
|
| 236 |
+
# define OSSL_DRBG_PARAM_MAX_NONCELEN "max_noncelen"
|
| 237 |
+
# define OSSL_DRBG_PARAM_MAX_PERSLEN "max_perslen"
|
| 238 |
+
# define OSSL_DRBG_PARAM_MIN_ENTROPYLEN "min_entropylen"
|
| 239 |
+
# define OSSL_DRBG_PARAM_MIN_LENGTH "minium_length"
|
| 240 |
+
# define OSSL_DRBG_PARAM_MIN_NONCELEN "min_noncelen"
|
| 241 |
+
# define OSSL_DRBG_PARAM_PREDICTION_RESISTANCE "prediction_resistance"
|
| 242 |
+
# define OSSL_DRBG_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
| 243 |
+
# define OSSL_DRBG_PARAM_RANDOM_DATA "random_data"
|
| 244 |
+
# define OSSL_DRBG_PARAM_RESEED_COUNTER "reseed_counter"
|
| 245 |
+
# define OSSL_DRBG_PARAM_RESEED_REQUESTS "reseed_requests"
|
| 246 |
+
# define OSSL_DRBG_PARAM_RESEED_TIME "reseed_time"
|
| 247 |
+
# define OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL "reseed_time_interval"
|
| 248 |
+
# define OSSL_DRBG_PARAM_SIZE "size"
|
| 249 |
+
# define OSSL_DRBG_PARAM_USE_DF "use_derivation_function"
|
| 250 |
+
# define OSSL_ENCODER_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
|
| 251 |
+
# define OSSL_ENCODER_PARAM_ENCRYPT_LEVEL "encrypt-level"
|
| 252 |
+
# define OSSL_ENCODER_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
| 253 |
+
# define OSSL_ENCODER_PARAM_SAVE_PARAMETERS "save-parameters"
|
| 254 |
+
# define OSSL_EXCHANGE_PARAM_EC_ECDH_COFACTOR_MODE "ecdh-cofactor-mode"
|
| 255 |
+
# define OSSL_EXCHANGE_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 256 |
+
# define OSSL_EXCHANGE_PARAM_FIPS_DIGEST_CHECK OSSL_PKEY_PARAM_FIPS_DIGEST_CHECK
|
| 257 |
+
# define OSSL_EXCHANGE_PARAM_FIPS_ECDH_COFACTOR_CHECK OSSL_PROV_PARAM_ECDH_COFACTOR_CHECK
|
| 258 |
+
# define OSSL_EXCHANGE_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
| 259 |
+
# define OSSL_EXCHANGE_PARAM_KDF_DIGEST "kdf-digest"
|
| 260 |
+
# define OSSL_EXCHANGE_PARAM_KDF_DIGEST_PROPS "kdf-digest-props"
|
| 261 |
+
# define OSSL_EXCHANGE_PARAM_KDF_OUTLEN "kdf-outlen"
|
| 262 |
+
# define OSSL_EXCHANGE_PARAM_KDF_TYPE "kdf-type"
|
| 263 |
+
# define OSSL_EXCHANGE_PARAM_KDF_UKM "kdf-ukm"
|
| 264 |
+
# define OSSL_EXCHANGE_PARAM_PAD "pad"
|
| 265 |
+
# define OSSL_GEN_PARAM_ITERATION "iteration"
|
| 266 |
+
# define OSSL_GEN_PARAM_POTENTIAL "potential"
|
| 267 |
+
# define OSSL_KDF_PARAM_ARGON2_AD "ad"
|
| 268 |
+
# define OSSL_KDF_PARAM_ARGON2_LANES "lanes"
|
| 269 |
+
# define OSSL_KDF_PARAM_ARGON2_MEMCOST "memcost"
|
| 270 |
+
# define OSSL_KDF_PARAM_ARGON2_VERSION "version"
|
| 271 |
+
# define OSSL_KDF_PARAM_CEK_ALG "cekalg"
|
| 272 |
+
# define OSSL_KDF_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
|
| 273 |
+
# define OSSL_KDF_PARAM_CONSTANT "constant"
|
| 274 |
+
# define OSSL_KDF_PARAM_DATA "data"
|
| 275 |
+
# define OSSL_KDF_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
|
| 276 |
+
# define OSSL_KDF_PARAM_EARLY_CLEAN "early_clean"
|
| 277 |
+
# define OSSL_KDF_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 278 |
+
# define OSSL_KDF_PARAM_FIPS_DIGEST_CHECK OSSL_PKEY_PARAM_FIPS_DIGEST_CHECK
|
| 279 |
+
# define OSSL_KDF_PARAM_FIPS_EMS_CHECK "ems_check"
|
| 280 |
+
# define OSSL_KDF_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
| 281 |
+
# define OSSL_KDF_PARAM_HMACDRBG_ENTROPY "entropy"
|
| 282 |
+
# define OSSL_KDF_PARAM_HMACDRBG_NONCE "nonce"
|
| 283 |
+
# define OSSL_KDF_PARAM_INFO "info"
|
| 284 |
+
# define OSSL_KDF_PARAM_ITER "iter"
|
| 285 |
+
# define OSSL_KDF_PARAM_KBKDF_R "r"
|
| 286 |
+
# define OSSL_KDF_PARAM_KBKDF_USE_L "use-l"
|
| 287 |
+
# define OSSL_KDF_PARAM_KBKDF_USE_SEPARATOR "use-separator"
|
| 288 |
+
# define OSSL_KDF_PARAM_KEY "key"
|
| 289 |
+
# define OSSL_KDF_PARAM_LABEL "label"
|
| 290 |
+
# define OSSL_KDF_PARAM_MAC OSSL_ALG_PARAM_MAC
|
| 291 |
+
# define OSSL_KDF_PARAM_MAC_SIZE "maclen"
|
| 292 |
+
# define OSSL_KDF_PARAM_MODE "mode"
|
| 293 |
+
# define OSSL_KDF_PARAM_PASSWORD "pass"
|
| 294 |
+
# define OSSL_KDF_PARAM_PKCS12_ID "id"
|
| 295 |
+
# define OSSL_KDF_PARAM_PKCS5 "pkcs5"
|
| 296 |
+
# define OSSL_KDF_PARAM_PREFIX "prefix"
|
| 297 |
+
# define OSSL_KDF_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
| 298 |
+
# define OSSL_KDF_PARAM_SALT "salt"
|
| 299 |
+
# define OSSL_KDF_PARAM_SCRYPT_MAXMEM "maxmem_bytes"
|
| 300 |
+
# define OSSL_KDF_PARAM_SCRYPT_N "n"
|
| 301 |
+
# define OSSL_KDF_PARAM_SCRYPT_P "p"
|
| 302 |
+
# define OSSL_KDF_PARAM_SCRYPT_R "r"
|
| 303 |
+
# define OSSL_KDF_PARAM_SECRET "secret"
|
| 304 |
+
# define OSSL_KDF_PARAM_SEED "seed"
|
| 305 |
+
# define OSSL_KDF_PARAM_SIZE "size"
|
| 306 |
+
# define OSSL_KDF_PARAM_SSHKDF_SESSION_ID "session_id"
|
| 307 |
+
# define OSSL_KDF_PARAM_SSHKDF_TYPE "type"
|
| 308 |
+
# define OSSL_KDF_PARAM_SSHKDF_XCGHASH "xcghash"
|
| 309 |
+
# define OSSL_KDF_PARAM_THREADS "threads"
|
| 310 |
+
# define OSSL_KDF_PARAM_UKM "ukm"
|
| 311 |
+
# define OSSL_KDF_PARAM_X942_ACVPINFO "acvp-info"
|
| 312 |
+
# define OSSL_KDF_PARAM_X942_PARTYUINFO "partyu-info"
|
| 313 |
+
# define OSSL_KDF_PARAM_X942_PARTYVINFO "partyv-info"
|
| 314 |
+
# define OSSL_KDF_PARAM_X942_SUPP_PRIVINFO "supp-privinfo"
|
| 315 |
+
# define OSSL_KDF_PARAM_X942_SUPP_PUBINFO "supp-pubinfo"
|
| 316 |
+
# define OSSL_KDF_PARAM_X942_USE_KEYBITS "use-keybits"
|
| 317 |
+
# define OSSL_KEM_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 318 |
+
# define OSSL_KEM_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
| 319 |
+
# define OSSL_KEM_PARAM_IKME "ikme"
|
| 320 |
+
# define OSSL_KEM_PARAM_OPERATION "operation"
|
| 321 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_BLOCK_PADDING "block_padding"
|
| 322 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_HS_PADDING "hs_padding"
|
| 323 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_EARLY_DATA "max_early_data"
|
| 324 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_FRAG_LEN "max_frag_len"
|
| 325 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE "mode"
|
| 326 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_OPTIONS "options"
|
| 327 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_READ_AHEAD "read_ahead"
|
| 328 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_STREAM_MAC "stream_mac"
|
| 329 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_TLSTREE "tlstree"
|
| 330 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_USE_ETM "use_etm"
|
| 331 |
+
# define OSSL_LIBSSL_RECORD_LAYER_READ_BUFFER_LEN "read_buffer_len"
|
| 332 |
+
# define OSSL_MAC_PARAM_BLOCK_SIZE "block-size"
|
| 333 |
+
# define OSSL_MAC_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
|
| 334 |
+
# define OSSL_MAC_PARAM_CUSTOM "custom"
|
| 335 |
+
# define OSSL_MAC_PARAM_C_ROUNDS "c-rounds"
|
| 336 |
+
# define OSSL_MAC_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
|
| 337 |
+
# define OSSL_MAC_PARAM_DIGEST_NOINIT "digest-noinit"
|
| 338 |
+
# define OSSL_MAC_PARAM_DIGEST_ONESHOT "digest-oneshot"
|
| 339 |
+
# define OSSL_MAC_PARAM_D_ROUNDS "d-rounds"
|
| 340 |
+
# define OSSL_MAC_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 341 |
+
# define OSSL_MAC_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
| 342 |
+
# define OSSL_MAC_PARAM_FIPS_NO_SHORT_MAC OSSL_PROV_PARAM_NO_SHORT_MAC
|
| 343 |
+
# define OSSL_MAC_PARAM_IV "iv"
|
| 344 |
+
# define OSSL_MAC_PARAM_KEY "key"
|
| 345 |
+
# define OSSL_MAC_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
| 346 |
+
# define OSSL_MAC_PARAM_SALT "salt"
|
| 347 |
+
# define OSSL_MAC_PARAM_SIZE "size"
|
| 348 |
+
# define OSSL_MAC_PARAM_TLS_DATA_SIZE "tls-data-size"
|
| 349 |
+
# define OSSL_MAC_PARAM_XOF "xof"
|
| 350 |
+
# define OSSL_OBJECT_PARAM_DATA "data"
|
| 351 |
+
# define OSSL_OBJECT_PARAM_DATA_STRUCTURE "data-structure"
|
| 352 |
+
# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
|
| 353 |
+
# define OSSL_OBJECT_PARAM_DESC "desc"
|
| 354 |
+
# define OSSL_OBJECT_PARAM_INPUT_TYPE "input-type"
|
| 355 |
+
# define OSSL_OBJECT_PARAM_REFERENCE "reference"
|
| 356 |
+
# define OSSL_OBJECT_PARAM_TYPE "type"
|
| 357 |
+
# define OSSL_PASSPHRASE_PARAM_INFO "info"
|
| 358 |
+
# define OSSL_PKEY_PARAM_ALGORITHM_ID OSSL_ALG_PARAM_ALGORITHM_ID
|
| 359 |
+
# define OSSL_PKEY_PARAM_ALGORITHM_ID_PARAMS OSSL_ALG_PARAM_ALGORITHM_ID_PARAMS
|
| 360 |
+
# define OSSL_PKEY_PARAM_BITS "bits"
|
| 361 |
+
# define OSSL_PKEY_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
|
| 362 |
+
# define OSSL_PKEY_PARAM_DEFAULT_DIGEST "default-digest"
|
| 363 |
+
# define OSSL_PKEY_PARAM_DHKEM_IKM "dhkem-ikm"
|
| 364 |
+
# define OSSL_PKEY_PARAM_DH_GENERATOR "safeprime-generator"
|
| 365 |
+
# define OSSL_PKEY_PARAM_DH_PRIV_LEN "priv_len"
|
| 366 |
+
# define OSSL_PKEY_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
|
| 367 |
+
# define OSSL_PKEY_PARAM_DIGEST_SIZE "digest-size"
|
| 368 |
+
# define OSSL_PKEY_PARAM_DIST_ID "distid"
|
| 369 |
+
# define OSSL_PKEY_PARAM_EC_A "a"
|
| 370 |
+
# define OSSL_PKEY_PARAM_EC_B "b"
|
| 371 |
+
# define OSSL_PKEY_PARAM_EC_CHAR2_M "m"
|
| 372 |
+
# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K1 "k1"
|
| 373 |
+
# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K2 "k2"
|
| 374 |
+
# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K3 "k3"
|
| 375 |
+
# define OSSL_PKEY_PARAM_EC_CHAR2_TP_BASIS "tp"
|
| 376 |
+
# define OSSL_PKEY_PARAM_EC_CHAR2_TYPE "basis-type"
|
| 377 |
+
# define OSSL_PKEY_PARAM_EC_COFACTOR "cofactor"
|
| 378 |
+
# define OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS "decoded-from-explicit"
|
| 379 |
+
# define OSSL_PKEY_PARAM_EC_ENCODING "encoding"
|
| 380 |
+
# define OSSL_PKEY_PARAM_EC_FIELD_TYPE "field-type"
|
| 381 |
+
# define OSSL_PKEY_PARAM_EC_GENERATOR "generator"
|
| 382 |
+
# define OSSL_PKEY_PARAM_EC_GROUP_CHECK_TYPE "group-check"
|
| 383 |
+
# define OSSL_PKEY_PARAM_EC_INCLUDE_PUBLIC "include-public"
|
| 384 |
+
# define OSSL_PKEY_PARAM_EC_ORDER "order"
|
| 385 |
+
# define OSSL_PKEY_PARAM_EC_P "p"
|
| 386 |
+
# define OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT "point-format"
|
| 387 |
+
# define OSSL_PKEY_PARAM_EC_PUB_X "qx"
|
| 388 |
+
# define OSSL_PKEY_PARAM_EC_PUB_Y "qy"
|
| 389 |
+
# define OSSL_PKEY_PARAM_EC_SEED "seed"
|
| 390 |
+
# define OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY "encoded-pub-key"
|
| 391 |
+
# define OSSL_PKEY_PARAM_ENGINE OSSL_ALG_PARAM_ENGINE
|
| 392 |
+
# define OSSL_PKEY_PARAM_FFC_COFACTOR "j"
|
| 393 |
+
# define OSSL_PKEY_PARAM_FFC_DIGEST OSSL_PKEY_PARAM_DIGEST
|
| 394 |
+
# define OSSL_PKEY_PARAM_FFC_DIGEST_PROPS OSSL_PKEY_PARAM_PROPERTIES
|
| 395 |
+
# define OSSL_PKEY_PARAM_FFC_G "g"
|
| 396 |
+
# define OSSL_PKEY_PARAM_FFC_GINDEX "gindex"
|
| 397 |
+
# define OSSL_PKEY_PARAM_FFC_H "hindex"
|
| 398 |
+
# define OSSL_PKEY_PARAM_FFC_P "p"
|
| 399 |
+
# define OSSL_PKEY_PARAM_FFC_PBITS "pbits"
|
| 400 |
+
# define OSSL_PKEY_PARAM_FFC_PCOUNTER "pcounter"
|
| 401 |
+
# define OSSL_PKEY_PARAM_FFC_Q "q"
|
| 402 |
+
# define OSSL_PKEY_PARAM_FFC_QBITS "qbits"
|
| 403 |
+
# define OSSL_PKEY_PARAM_FFC_SEED "seed"
|
| 404 |
+
# define OSSL_PKEY_PARAM_FFC_TYPE "type"
|
| 405 |
+
# define OSSL_PKEY_PARAM_FFC_VALIDATE_G "validate-g"
|
| 406 |
+
# define OSSL_PKEY_PARAM_FFC_VALIDATE_LEGACY "validate-legacy"
|
| 407 |
+
# define OSSL_PKEY_PARAM_FFC_VALIDATE_PQ "validate-pq"
|
| 408 |
+
# define OSSL_PKEY_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 409 |
+
# define OSSL_PKEY_PARAM_FIPS_DIGEST_CHECK "digest-check"
|
| 410 |
+
# define OSSL_PKEY_PARAM_FIPS_KEY_CHECK "key-check"
|
| 411 |
+
# define OSSL_PKEY_PARAM_FIPS_SIGN_CHECK "sign-check"
|
| 412 |
+
# define OSSL_PKEY_PARAM_GROUP_NAME "group"
|
| 413 |
+
# define OSSL_PKEY_PARAM_IMPLICIT_REJECTION "implicit-rejection"
|
| 414 |
+
# define OSSL_PKEY_PARAM_MANDATORY_DIGEST "mandatory-digest"
|
| 415 |
+
# define OSSL_PKEY_PARAM_MASKGENFUNC "mgf"
|
| 416 |
+
# define OSSL_PKEY_PARAM_MAX_SIZE "max-size"
|
| 417 |
+
# define OSSL_PKEY_PARAM_MGF1_DIGEST "mgf1-digest"
|
| 418 |
+
# define OSSL_PKEY_PARAM_MGF1_PROPERTIES "mgf1-properties"
|
| 419 |
+
# define OSSL_PKEY_PARAM_ML_DSA_INPUT_FORMATS "ml-dsa.input_formats"
|
| 420 |
+
# define OSSL_PKEY_PARAM_ML_DSA_OUTPUT_FORMATS "ml-dsa.output_formats"
|
| 421 |
+
# define OSSL_PKEY_PARAM_ML_DSA_PREFER_SEED "ml-dsa.prefer_seed"
|
| 422 |
+
# define OSSL_PKEY_PARAM_ML_DSA_RETAIN_SEED "ml-dsa.retain_seed"
|
| 423 |
+
# define OSSL_PKEY_PARAM_ML_DSA_SEED "seed"
|
| 424 |
+
# define OSSL_PKEY_PARAM_ML_KEM_IMPORT_PCT_TYPE "ml-kem.import_pct_type"
|
| 425 |
+
# define OSSL_PKEY_PARAM_ML_KEM_INPUT_FORMATS "ml-kem.input_formats"
|
| 426 |
+
# define OSSL_PKEY_PARAM_ML_KEM_OUTPUT_FORMATS "ml-kem.output_formats"
|
| 427 |
+
# define OSSL_PKEY_PARAM_ML_KEM_PREFER_SEED "ml-kem.prefer_seed"
|
| 428 |
+
# define OSSL_PKEY_PARAM_ML_KEM_RETAIN_SEED "ml-kem.retain_seed"
|
| 429 |
+
# define OSSL_PKEY_PARAM_ML_KEM_SEED "seed"
|
| 430 |
+
# define OSSL_PKEY_PARAM_PAD_MODE "pad-mode"
|
| 431 |
+
# define OSSL_PKEY_PARAM_PRIV_KEY "priv"
|
| 432 |
+
# define OSSL_PKEY_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
| 433 |
+
# define OSSL_PKEY_PARAM_PUB_KEY "pub"
|
| 434 |
+
# define OSSL_PKEY_PARAM_RSA_BITS OSSL_PKEY_PARAM_BITS
|
| 435 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT "rsa-coefficient"
|
| 436 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT1 "rsa-coefficient1"
|
| 437 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT2 "rsa-coefficient2"
|
| 438 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT3 "rsa-coefficient3"
|
| 439 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT4 "rsa-coefficient4"
|
| 440 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT5 "rsa-coefficient5"
|
| 441 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT6 "rsa-coefficient6"
|
| 442 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT7 "rsa-coefficient7"
|
| 443 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT8 "rsa-coefficient8"
|
| 444 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT9 "rsa-coefficient9"
|
| 445 |
+
# define OSSL_PKEY_PARAM_RSA_D "d"
|
| 446 |
+
# define OSSL_PKEY_PARAM_RSA_DERIVE_FROM_PQ "rsa-derive-from-pq"
|
| 447 |
+
# define OSSL_PKEY_PARAM_RSA_DIGEST OSSL_PKEY_PARAM_DIGEST
|
| 448 |
+
# define OSSL_PKEY_PARAM_RSA_DIGEST_PROPS OSSL_PKEY_PARAM_PROPERTIES
|
| 449 |
+
# define OSSL_PKEY_PARAM_RSA_E "e"
|
| 450 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT "rsa-exponent"
|
| 451 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT1 "rsa-exponent1"
|
| 452 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT10 "rsa-exponent10"
|
| 453 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT2 "rsa-exponent2"
|
| 454 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT3 "rsa-exponent3"
|
| 455 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT4 "rsa-exponent4"
|
| 456 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT5 "rsa-exponent5"
|
| 457 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT6 "rsa-exponent6"
|
| 458 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT7 "rsa-exponent7"
|
| 459 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT8 "rsa-exponent8"
|
| 460 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT9 "rsa-exponent9"
|
| 461 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR "rsa-factor"
|
| 462 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR1 "rsa-factor1"
|
| 463 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR10 "rsa-factor10"
|
| 464 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR2 "rsa-factor2"
|
| 465 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR3 "rsa-factor3"
|
| 466 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR4 "rsa-factor4"
|
| 467 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR5 "rsa-factor5"
|
| 468 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR6 "rsa-factor6"
|
| 469 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR7 "rsa-factor7"
|
| 470 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR8 "rsa-factor8"
|
| 471 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR9 "rsa-factor9"
|
| 472 |
+
# define OSSL_PKEY_PARAM_RSA_MASKGENFUNC OSSL_PKEY_PARAM_MASKGENFUNC
|
| 473 |
+
# define OSSL_PKEY_PARAM_RSA_MGF1_DIGEST OSSL_PKEY_PARAM_MGF1_DIGEST
|
| 474 |
+
# define OSSL_PKEY_PARAM_RSA_N "n"
|
| 475 |
+
# define OSSL_PKEY_PARAM_RSA_PRIMES "primes"
|
| 476 |
+
# define OSSL_PKEY_PARAM_RSA_PSS_SALTLEN "saltlen"
|
| 477 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_P1 "p1"
|
| 478 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_P2 "p2"
|
| 479 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_Q1 "q1"
|
| 480 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_Q2 "q2"
|
| 481 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_XP "xp"
|
| 482 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_XP1 "xp1"
|
| 483 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_XP2 "xp2"
|
| 484 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_XQ "xq"
|
| 485 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_XQ1 "xq1"
|
| 486 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_XQ2 "xq2"
|
| 487 |
+
# define OSSL_PKEY_PARAM_SECURITY_BITS "security-bits"
|
| 488 |
+
# define OSSL_PKEY_PARAM_SLH_DSA_SEED "seed"
|
| 489 |
+
# define OSSL_PKEY_PARAM_USE_COFACTOR_ECDH OSSL_PKEY_PARAM_USE_COFACTOR_FLAG
|
| 490 |
+
# define OSSL_PKEY_PARAM_USE_COFACTOR_FLAG "use-cofactor-flag"
|
| 491 |
+
# define OSSL_PROV_PARAM_BUILDINFO "buildinfo"
|
| 492 |
+
# define OSSL_PROV_PARAM_CORE_MODULE_FILENAME "module-filename"
|
| 493 |
+
# define OSSL_PROV_PARAM_CORE_PROV_NAME "provider-name"
|
| 494 |
+
# define OSSL_PROV_PARAM_CORE_VERSION "openssl-version"
|
| 495 |
+
# define OSSL_PROV_PARAM_DRBG_TRUNC_DIGEST "drbg-no-trunc-md"
|
| 496 |
+
# define OSSL_PROV_PARAM_DSA_SIGN_DISABLED "dsa-sign-disabled"
|
| 497 |
+
# define OSSL_PROV_PARAM_ECDH_COFACTOR_CHECK "ecdh-cofactor-check"
|
| 498 |
+
# define OSSL_PROV_PARAM_HKDF_DIGEST_CHECK "hkdf-digest-check"
|
| 499 |
+
# define OSSL_PROV_PARAM_HKDF_KEY_CHECK "hkdf-key-check"
|
| 500 |
+
# define OSSL_PROV_PARAM_HMAC_KEY_CHECK "hmac-key-check"
|
| 501 |
+
# define OSSL_PROV_PARAM_KBKDF_KEY_CHECK "kbkdf-key-check"
|
| 502 |
+
# define OSSL_PROV_PARAM_KMAC_KEY_CHECK "kmac-key-check"
|
| 503 |
+
# define OSSL_PROV_PARAM_NAME "name"
|
| 504 |
+
# define OSSL_PROV_PARAM_NO_SHORT_MAC "no-short-mac"
|
| 505 |
+
# define OSSL_PROV_PARAM_PBKDF2_LOWER_BOUND_CHECK "pbkdf2-lower-bound-check"
|
| 506 |
+
# define OSSL_PROV_PARAM_RSA_PKCS15_PAD_DISABLED "rsa-pkcs15-pad-disabled"
|
| 507 |
+
# define OSSL_PROV_PARAM_RSA_PSS_SALTLEN_CHECK "rsa-pss-saltlen-check"
|
| 508 |
+
# define OSSL_PROV_PARAM_RSA_SIGN_X931_PAD_DISABLED "rsa-sign-x931-pad-disabled"
|
| 509 |
+
# define OSSL_PROV_PARAM_SECURITY_CHECKS "security-checks"
|
| 510 |
+
# define OSSL_PROV_PARAM_SELF_TEST_DESC "st-desc"
|
| 511 |
+
# define OSSL_PROV_PARAM_SELF_TEST_PHASE "st-phase"
|
| 512 |
+
# define OSSL_PROV_PARAM_SELF_TEST_TYPE "st-type"
|
| 513 |
+
# define OSSL_PROV_PARAM_SIGNATURE_DIGEST_CHECK "signature-digest-check"
|
| 514 |
+
# define OSSL_PROV_PARAM_SSHKDF_DIGEST_CHECK "sshkdf-digest-check"
|
| 515 |
+
# define OSSL_PROV_PARAM_SSHKDF_KEY_CHECK "sshkdf-key-check"
|
| 516 |
+
# define OSSL_PROV_PARAM_SSKDF_DIGEST_CHECK "sskdf-digest-check"
|
| 517 |
+
# define OSSL_PROV_PARAM_SSKDF_KEY_CHECK "sskdf-key-check"
|
| 518 |
+
# define OSSL_PROV_PARAM_STATUS "status"
|
| 519 |
+
# define OSSL_PROV_PARAM_TDES_ENCRYPT_DISABLED "tdes-encrypt-disabled"
|
| 520 |
+
# define OSSL_PROV_PARAM_TLS13_KDF_DIGEST_CHECK "tls13-kdf-digest-check"
|
| 521 |
+
# define OSSL_PROV_PARAM_TLS13_KDF_KEY_CHECK "tls13-kdf-key-check"
|
| 522 |
+
# define OSSL_PROV_PARAM_TLS1_PRF_DIGEST_CHECK "tls1-prf-digest-check"
|
| 523 |
+
# define OSSL_PROV_PARAM_TLS1_PRF_EMS_CHECK "tls1-prf-ems-check"
|
| 524 |
+
# define OSSL_PROV_PARAM_TLS1_PRF_KEY_CHECK "tls1-prf-key-check"
|
| 525 |
+
# define OSSL_PROV_PARAM_VERSION "version"
|
| 526 |
+
# define OSSL_PROV_PARAM_X942KDF_KEY_CHECK "x942kdf-key-check"
|
| 527 |
+
# define OSSL_PROV_PARAM_X963KDF_DIGEST_CHECK "x963kdf-digest-check"
|
| 528 |
+
# define OSSL_PROV_PARAM_X963KDF_KEY_CHECK "x963kdf-key-check"
|
| 529 |
+
# define OSSL_RAND_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 530 |
+
# define OSSL_RAND_PARAM_GENERATE "generate"
|
| 531 |
+
# define OSSL_RAND_PARAM_MAX_REQUEST "max_request"
|
| 532 |
+
# define OSSL_RAND_PARAM_STATE "state"
|
| 533 |
+
# define OSSL_RAND_PARAM_STRENGTH "strength"
|
| 534 |
+
# define OSSL_RAND_PARAM_TEST_ENTROPY "test_entropy"
|
| 535 |
+
# define OSSL_RAND_PARAM_TEST_NONCE "test_nonce"
|
| 536 |
+
# define OSSL_SIGNATURE_PARAM_ADD_RANDOM "additional-random"
|
| 537 |
+
# define OSSL_SIGNATURE_PARAM_ALGORITHM_ID OSSL_PKEY_PARAM_ALGORITHM_ID
|
| 538 |
+
# define OSSL_SIGNATURE_PARAM_ALGORITHM_ID_PARAMS OSSL_PKEY_PARAM_ALGORITHM_ID_PARAMS
|
| 539 |
+
# define OSSL_SIGNATURE_PARAM_CONTEXT_STRING "context-string"
|
| 540 |
+
# define OSSL_SIGNATURE_PARAM_DETERMINISTIC "deterministic"
|
| 541 |
+
# define OSSL_SIGNATURE_PARAM_DIGEST OSSL_PKEY_PARAM_DIGEST
|
| 542 |
+
# define OSSL_SIGNATURE_PARAM_DIGEST_SIZE OSSL_PKEY_PARAM_DIGEST_SIZE
|
| 543 |
+
# define OSSL_SIGNATURE_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 544 |
+
# define OSSL_SIGNATURE_PARAM_FIPS_DIGEST_CHECK OSSL_PKEY_PARAM_FIPS_DIGEST_CHECK
|
| 545 |
+
# define OSSL_SIGNATURE_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
| 546 |
+
# define OSSL_SIGNATURE_PARAM_FIPS_RSA_PSS_SALTLEN_CHECK "rsa-pss-saltlen-check"
|
| 547 |
+
# define OSSL_SIGNATURE_PARAM_FIPS_SIGN_CHECK OSSL_PKEY_PARAM_FIPS_SIGN_CHECK
|
| 548 |
+
# define OSSL_SIGNATURE_PARAM_FIPS_SIGN_X931_PAD_CHECK "sign-x931-pad-check"
|
| 549 |
+
# define OSSL_SIGNATURE_PARAM_FIPS_VERIFY_MESSAGE "verify-message"
|
| 550 |
+
# define OSSL_SIGNATURE_PARAM_INSTANCE "instance"
|
| 551 |
+
# define OSSL_SIGNATURE_PARAM_KAT "kat"
|
| 552 |
+
# define OSSL_SIGNATURE_PARAM_MESSAGE_ENCODING "message-encoding"
|
| 553 |
+
# define OSSL_SIGNATURE_PARAM_MGF1_DIGEST OSSL_PKEY_PARAM_MGF1_DIGEST
|
| 554 |
+
# define OSSL_SIGNATURE_PARAM_MGF1_PROPERTIES OSSL_PKEY_PARAM_MGF1_PROPERTIES
|
| 555 |
+
# define OSSL_SIGNATURE_PARAM_MU "mu"
|
| 556 |
+
# define OSSL_SIGNATURE_PARAM_NONCE_TYPE "nonce-type"
|
| 557 |
+
# define OSSL_SIGNATURE_PARAM_PAD_MODE OSSL_PKEY_PARAM_PAD_MODE
|
| 558 |
+
# define OSSL_SIGNATURE_PARAM_PROPERTIES OSSL_PKEY_PARAM_PROPERTIES
|
| 559 |
+
# define OSSL_SIGNATURE_PARAM_PSS_SALTLEN "saltlen"
|
| 560 |
+
# define OSSL_SIGNATURE_PARAM_SIGNATURE "signature"
|
| 561 |
+
# define OSSL_SIGNATURE_PARAM_TEST_ENTROPY "test-entropy"
|
| 562 |
+
# define OSSL_SKEY_PARAM_KEY_LENGTH "key-length"
|
| 563 |
+
# define OSSL_SKEY_PARAM_RAW_BYTES "raw-bytes"
|
| 564 |
+
# define OSSL_STORE_PARAM_ALIAS "alias"
|
| 565 |
+
# define OSSL_STORE_PARAM_DIGEST "digest"
|
| 566 |
+
# define OSSL_STORE_PARAM_EXPECT "expect"
|
| 567 |
+
# define OSSL_STORE_PARAM_FINGERPRINT "fingerprint"
|
| 568 |
+
# define OSSL_STORE_PARAM_INPUT_TYPE "input-type"
|
| 569 |
+
# define OSSL_STORE_PARAM_ISSUER "name"
|
| 570 |
+
# define OSSL_STORE_PARAM_PROPERTIES "properties"
|
| 571 |
+
# define OSSL_STORE_PARAM_SERIAL "serial"
|
| 572 |
+
# define OSSL_STORE_PARAM_SUBJECT "subject"
|
| 573 |
+
/* clang-format on */
|
| 574 |
+
|
| 575 |
+
#ifdef __cplusplus
|
| 576 |
+
}
|
| 577 |
+
#endif
|
| 578 |
+
|
| 579 |
+
#endif
|