licentivo-launch 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +35 -0
  4. data/ext/launch_native/extconf.rb +28 -0
  5. data/lib/licentivo_launch/vendor/licentivo.rb +262 -0
  6. data/lib/licentivo_launch.rb +352 -0
  7. data/vendor/LICENSE +21 -0
  8. data/vendor/NOTICE +17 -0
  9. data/vendor/VERSION +1 -0
  10. data/vendor/c/app.c +33 -0
  11. data/vendor/c/demo.c +77 -0
  12. data/vendor/c/feature_tasks.h +72 -0
  13. data/vendor/c/licentivo.c +382 -0
  14. data/vendor/c/licentivo.h +67 -0
  15. data/vendor/c/quickstart.c +51 -0
  16. data/vendor/c/test_vectors.c +4 -0
  17. data/vendor/c/vendor/Monocypher-LICENCE.md +173 -0
  18. data/vendor/c/vendor/cJSON-LICENSE +20 -0
  19. data/vendor/c/vendor/cJSON.c +3191 -0
  20. data/vendor/c/vendor/cJSON.h +306 -0
  21. data/vendor/c/vendor/monocypher-ed25519.c +500 -0
  22. data/vendor/c/vendor/monocypher-ed25519.h +140 -0
  23. data/vendor/c/vendor/monocypher.c +2956 -0
  24. data/vendor/c/vendor/monocypher.h +321 -0
  25. data/vendor/curl/COPYING.txt +22 -0
  26. data/vendor/curl/bin/libcurl-x64.dll +0 -0
  27. data/vendor/curl/include/brotli/decode.h +409 -0
  28. data/vendor/curl/include/brotli/encode.h +505 -0
  29. data/vendor/curl/include/brotli/port.h +302 -0
  30. data/vendor/curl/include/brotli/shared_dictionary.h +100 -0
  31. data/vendor/curl/include/brotli/types.h +83 -0
  32. data/vendor/curl/include/curl/curl.h +3374 -0
  33. data/vendor/curl/include/curl/curlver.h +77 -0
  34. data/vendor/curl/include/curl/easy.h +123 -0
  35. data/vendor/curl/include/curl/header.h +74 -0
  36. data/vendor/curl/include/curl/mprintf.h +85 -0
  37. data/vendor/curl/include/curl/multi.h +561 -0
  38. data/vendor/curl/include/curl/options.h +70 -0
  39. data/vendor/curl/include/curl/stdcheaders.h +35 -0
  40. data/vendor/curl/include/curl/system.h +399 -0
  41. data/vendor/curl/include/curl/typecheck-gcc.h +964 -0
  42. data/vendor/curl/include/curl/urlapi.h +156 -0
  43. data/vendor/curl/include/curl/websockets.h +98 -0
  44. data/vendor/curl/include/libpsl.h +207 -0
  45. data/vendor/curl/include/libssh2.h +1516 -0
  46. data/vendor/curl/include/libssh2_publickey.h +128 -0
  47. data/vendor/curl/include/libssh2_sftp.h +382 -0
  48. data/vendor/curl/include/nghttp2/nghttp2.h +6878 -0
  49. data/vendor/curl/include/nghttp2/nghttp2ver.h +42 -0
  50. data/vendor/curl/include/nghttp3/nghttp3.h +3704 -0
  51. data/vendor/curl/include/nghttp3/version.h +46 -0
  52. data/vendor/curl/include/ngtcp2/ngtcp2.h +7485 -0
  53. data/vendor/curl/include/ngtcp2/ngtcp2_crypto.h +1071 -0
  54. data/vendor/curl/include/ngtcp2/ngtcp2_crypto_quictls.h +147 -0
  55. data/vendor/curl/include/ngtcp2/version.h +51 -0
  56. data/vendor/curl/include/openssl/aes.h +120 -0
  57. data/vendor/curl/include/openssl/asn1.h +1121 -0
  58. data/vendor/curl/include/openssl/asn1t.h +996 -0
  59. data/vendor/curl/include/openssl/bio.h +716 -0
  60. data/vendor/curl/include/openssl/blowfish.h +106 -0
  61. data/vendor/curl/include/openssl/bn.h +480 -0
  62. data/vendor/curl/include/openssl/buffer.h +102 -0
  63. data/vendor/curl/include/openssl/camellia.h +121 -0
  64. data/vendor/curl/include/openssl/cast.h +99 -0
  65. data/vendor/curl/include/openssl/chacha.h +54 -0
  66. data/vendor/curl/include/openssl/cmac.h +81 -0
  67. data/vendor/curl/include/openssl/cms.h +541 -0
  68. data/vendor/curl/include/openssl/comp.h +7 -0
  69. data/vendor/curl/include/openssl/conf.h +189 -0
  70. data/vendor/curl/include/openssl/crypto.h +458 -0
  71. data/vendor/curl/include/openssl/ct.h +567 -0
  72. data/vendor/curl/include/openssl/curve25519.h +104 -0
  73. data/vendor/curl/include/openssl/des.h +215 -0
  74. data/vendor/curl/include/openssl/dh.h +245 -0
  75. data/vendor/curl/include/openssl/dsa.h +263 -0
  76. data/vendor/curl/include/openssl/dtls1.h +107 -0
  77. data/vendor/curl/include/openssl/ec.h +675 -0
  78. data/vendor/curl/include/openssl/ecdh.h +6 -0
  79. data/vendor/curl/include/openssl/ecdsa.h +6 -0
  80. data/vendor/curl/include/openssl/engine.h +215 -0
  81. data/vendor/curl/include/openssl/err.h +325 -0
  82. data/vendor/curl/include/openssl/evp.h +1288 -0
  83. data/vendor/curl/include/openssl/hkdf.h +65 -0
  84. data/vendor/curl/include/openssl/hmac.h +101 -0
  85. data/vendor/curl/include/openssl/idea.h +99 -0
  86. data/vendor/curl/include/openssl/kdf.h +137 -0
  87. data/vendor/curl/include/openssl/lhash.h +179 -0
  88. data/vendor/curl/include/openssl/md4.h +105 -0
  89. data/vendor/curl/include/openssl/md5.h +99 -0
  90. data/vendor/curl/include/openssl/mlkem.h +236 -0
  91. data/vendor/curl/include/openssl/modes.h +118 -0
  92. data/vendor/curl/include/openssl/obj_mac.h +4646 -0
  93. data/vendor/curl/include/openssl/objects.h +137 -0
  94. data/vendor/curl/include/openssl/ocsp.h +484 -0
  95. data/vendor/curl/include/openssl/opensslconf.h +16 -0
  96. data/vendor/curl/include/openssl/opensslfeatures.h +153 -0
  97. data/vendor/curl/include/openssl/opensslv.h +18 -0
  98. data/vendor/curl/include/openssl/ossl_typ.h +196 -0
  99. data/vendor/curl/include/openssl/pem.h +542 -0
  100. data/vendor/curl/include/openssl/pkcs12.h +284 -0
  101. data/vendor/curl/include/openssl/pkcs7.h +523 -0
  102. data/vendor/curl/include/openssl/poly1305.h +45 -0
  103. data/vendor/curl/include/openssl/posix_time.h +54 -0
  104. data/vendor/curl/include/openssl/rand.h +118 -0
  105. data/vendor/curl/include/openssl/rc2.h +101 -0
  106. data/vendor/curl/include/openssl/rc4.h +88 -0
  107. data/vendor/curl/include/openssl/ripemd.h +107 -0
  108. data/vendor/curl/include/openssl/rsa.h +603 -0
  109. data/vendor/curl/include/openssl/safestack.h +1739 -0
  110. data/vendor/curl/include/openssl/sha.h +190 -0
  111. data/vendor/curl/include/openssl/sm3.h +49 -0
  112. data/vendor/curl/include/openssl/sm4.h +47 -0
  113. data/vendor/curl/include/openssl/srtp.h +148 -0
  114. data/vendor/curl/include/openssl/ssl.h +2336 -0
  115. data/vendor/curl/include/openssl/ssl3.h +441 -0
  116. data/vendor/curl/include/openssl/stack.h +99 -0
  117. data/vendor/curl/include/openssl/tls1.h +764 -0
  118. data/vendor/curl/include/openssl/ts.h +660 -0
  119. data/vendor/curl/include/openssl/txt_db.h +112 -0
  120. data/vendor/curl/include/openssl/ui.h +397 -0
  121. data/vendor/curl/include/openssl/x509.h +1037 -0
  122. data/vendor/curl/include/openssl/x509_vfy.h +464 -0
  123. data/vendor/curl/include/openssl/x509v3.h +1039 -0
  124. data/vendor/curl/include/zconf.h +206 -0
  125. data/vendor/curl/include/zdict.h +481 -0
  126. data/vendor/curl/include/zlib.h +1859 -0
  127. data/vendor/curl/include/zlib_name_mangling.h +8 -0
  128. data/vendor/curl/include/zstd.h +3198 -0
  129. data/vendor/curl/include/zstd_errors.h +107 -0
  130. data/vendor/curl/lib/libcurl.dll.a +0 -0
  131. data/vendor/curl/licenses/brotli/LICENSE.txt +19 -0
  132. data/vendor/curl/licenses/certdata/LICENSE.url +2 -0
  133. data/vendor/curl/licenses/libpsl/COPYING.txt +20 -0
  134. data/vendor/curl/licenses/libressl/COPYING.txt +133 -0
  135. data/vendor/curl/licenses/libssh2/COPYING.txt +43 -0
  136. data/vendor/curl/licenses/nghttp2/COPYING.txt +23 -0
  137. data/vendor/curl/licenses/nghttp3/COPYING.txt +22 -0
  138. data/vendor/curl/licenses/ngtcp2/COPYING.txt +22 -0
  139. data/vendor/curl/licenses/psl/LICENSE.txt +373 -0
  140. data/vendor/curl/licenses/trurl/COPYING.txt +22 -0
  141. data/vendor/curl/licenses/zlibng/LICENSE.md +19 -0
  142. data/vendor/curl/licenses/zstd/LICENSE.txt +30 -0
  143. metadata +205 -0
@@ -0,0 +1,215 @@
1
+ /* $OpenBSD: engine.h,v 1.44 2024/03/02 10:22:07 tb Exp $ */
2
+ /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
3
+ * project 2000.
4
+ */
5
+ /* ====================================================================
6
+ * Copyright (c) 1999-2004 The OpenSSL Project. All rights reserved.
7
+ *
8
+ * Redistribution and use in source and binary forms, with or without
9
+ * modification, are permitted provided that the following conditions
10
+ * are met:
11
+ *
12
+ * 1. Redistributions of source code must retain the above copyright
13
+ * notice, this list of conditions and the following disclaimer.
14
+ *
15
+ * 2. Redistributions in binary form must reproduce the above copyright
16
+ * notice, this list of conditions and the following disclaimer in
17
+ * the documentation and/or other materials provided with the
18
+ * distribution.
19
+ *
20
+ * 3. All advertising materials mentioning features or use of this
21
+ * software must display the following acknowledgment:
22
+ * "This product includes software developed by the OpenSSL Project
23
+ * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
24
+ *
25
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
26
+ * endorse or promote products derived from this software without
27
+ * prior written permission. For written permission, please contact
28
+ * licensing@OpenSSL.org.
29
+ *
30
+ * 5. Products derived from this software may not be called "OpenSSL"
31
+ * nor may "OpenSSL" appear in their names without prior written
32
+ * permission of the OpenSSL Project.
33
+ *
34
+ * 6. Redistributions of any form whatsoever must retain the following
35
+ * acknowledgment:
36
+ * "This product includes software developed by the OpenSSL Project
37
+ * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
38
+ *
39
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
40
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
41
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
42
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
43
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
44
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
45
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
46
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
47
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
48
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
49
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
50
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
51
+ * ====================================================================
52
+ *
53
+ * This product includes cryptographic software written by Eric Young
54
+ * (eay@cryptsoft.com). This product includes software written by Tim
55
+ * Hudson (tjh@cryptsoft.com).
56
+ *
57
+ */
58
+ /* ====================================================================
59
+ * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
60
+ * ECDH support in OpenSSL originally developed by
61
+ * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
62
+ */
63
+
64
+ #ifndef HEADER_ENGINE_H
65
+ #define HEADER_ENGINE_H
66
+
67
+ #include <openssl/opensslconf.h>
68
+
69
+ #include <openssl/err.h>
70
+ #include <openssl/ui.h>
71
+
72
+ #include <openssl/ossl_typ.h>
73
+
74
+ #ifdef __cplusplus
75
+ extern "C" {
76
+ #endif
77
+
78
+ #define ENGINE_METHOD_RSA (unsigned int)0x0001
79
+ #define ENGINE_METHOD_DSA (unsigned int)0x0002
80
+ #define ENGINE_METHOD_DH (unsigned int)0x0004
81
+ #define ENGINE_METHOD_RAND (unsigned int)0x0008
82
+ #define ENGINE_METHOD_CIPHERS (unsigned int)0x0040
83
+ #define ENGINE_METHOD_DIGESTS (unsigned int)0x0080
84
+ #define ENGINE_METHOD_STORE (unsigned int)0x0100
85
+ #define ENGINE_METHOD_PKEY_METHS (unsigned int)0x0200
86
+ #define ENGINE_METHOD_PKEY_ASN1_METHS (unsigned int)0x0400
87
+ #define ENGINE_METHOD_EC (unsigned int)0x0800
88
+ #define ENGINE_METHOD_ALL (unsigned int)0xFFFF
89
+ #define ENGINE_METHOD_NONE (unsigned int)0x0000
90
+
91
+ /*
92
+ * Prototypes for the stub functions in engine_stubs.c. They are provided to
93
+ * build M2Crypto, Dovecot, apr-utils without patching.
94
+ */
95
+ void ENGINE_load_builtin_engines(void);
96
+ void ENGINE_load_dynamic(void);
97
+ void ENGINE_load_openssl(void);
98
+ int ENGINE_register_all_complete(void);
99
+
100
+ void ENGINE_cleanup(void);
101
+
102
+ ENGINE *ENGINE_new(void);
103
+ int ENGINE_free(ENGINE *engine);
104
+ int ENGINE_init(ENGINE *engine);
105
+ int ENGINE_finish(ENGINE *engine);
106
+
107
+ ENGINE *ENGINE_by_id(const char *id);
108
+ const char *ENGINE_get_id(const ENGINE *engine);
109
+ const char *ENGINE_get_name(const ENGINE *engine);
110
+
111
+ int ENGINE_set_default(ENGINE *engine, unsigned int flags);
112
+
113
+ ENGINE *ENGINE_get_default_RSA(void);
114
+ int ENGINE_set_default_RSA(ENGINE *engine);
115
+
116
+ int ENGINE_ctrl_cmd(ENGINE *engine, const char *cmd_name, long i, void *p,
117
+ void (*f)(void), int cmd_optional);
118
+ int ENGINE_ctrl_cmd_string(ENGINE *engine, const char *cmd, const char *arg,
119
+ int cmd_optional);
120
+
121
+ EVP_PKEY *ENGINE_load_private_key(ENGINE *engine, const char *key_id,
122
+ UI_METHOD *ui_method, void *callback_data);
123
+ EVP_PKEY *ENGINE_load_public_key(ENGINE *engine, const char *key_id,
124
+ UI_METHOD *ui_method, void *callback_data);
125
+
126
+ /* Error codes for the ENGINE functions. */
127
+
128
+ /* Function codes. */
129
+ #define ENGINE_F_DYNAMIC_CTRL 180
130
+ #define ENGINE_F_DYNAMIC_GET_DATA_CTX 181
131
+ #define ENGINE_F_DYNAMIC_LOAD 182
132
+ #define ENGINE_F_DYNAMIC_SET_DATA_CTX 183
133
+ #define ENGINE_F_ENGINE_ADD 105
134
+ #define ENGINE_F_ENGINE_BY_ID 106
135
+ #define ENGINE_F_ENGINE_CMD_IS_EXECUTABLE 170
136
+ #define ENGINE_F_ENGINE_CTRL 142
137
+ #define ENGINE_F_ENGINE_CTRL_CMD 178
138
+ #define ENGINE_F_ENGINE_CTRL_CMD_STRING 171
139
+ #define ENGINE_F_ENGINE_FINISH 107
140
+ #define ENGINE_F_ENGINE_FREE_UTIL 108
141
+ #define ENGINE_F_ENGINE_GET_CIPHER 185
142
+ #define ENGINE_F_ENGINE_GET_DEFAULT_TYPE 177
143
+ #define ENGINE_F_ENGINE_GET_DIGEST 186
144
+ #define ENGINE_F_ENGINE_GET_NEXT 115
145
+ #define ENGINE_F_ENGINE_GET_PKEY_ASN1_METH 193
146
+ #define ENGINE_F_ENGINE_GET_PKEY_METH 192
147
+ #define ENGINE_F_ENGINE_GET_PREV 116
148
+ #define ENGINE_F_ENGINE_INIT 119
149
+ #define ENGINE_F_ENGINE_LIST_ADD 120
150
+ #define ENGINE_F_ENGINE_LIST_REMOVE 121
151
+ #define ENGINE_F_ENGINE_LOAD_PRIVATE_KEY 150
152
+ #define ENGINE_F_ENGINE_LOAD_PUBLIC_KEY 151
153
+ #define ENGINE_F_ENGINE_LOAD_SSL_CLIENT_CERT 194
154
+ #define ENGINE_F_ENGINE_NEW 122
155
+ #define ENGINE_F_ENGINE_REMOVE 123
156
+ #define ENGINE_F_ENGINE_SET_DEFAULT_STRING 189
157
+ #define ENGINE_F_ENGINE_SET_DEFAULT_TYPE 126
158
+ #define ENGINE_F_ENGINE_SET_ID 129
159
+ #define ENGINE_F_ENGINE_SET_NAME 130
160
+ #define ENGINE_F_ENGINE_TABLE_REGISTER 184
161
+ #define ENGINE_F_ENGINE_UNLOAD_KEY 152
162
+ #define ENGINE_F_ENGINE_UNLOCKED_FINISH 191
163
+ #define ENGINE_F_ENGINE_UP_REF 190
164
+ #define ENGINE_F_INT_CTRL_HELPER 172
165
+ #define ENGINE_F_INT_ENGINE_CONFIGURE 188
166
+ #define ENGINE_F_INT_ENGINE_MODULE_INIT 187
167
+ #define ENGINE_F_LOG_MESSAGE 141
168
+
169
+ /* Reason codes. */
170
+ #define ENGINE_R_ALREADY_LOADED 100
171
+ #define ENGINE_R_ARGUMENT_IS_NOT_A_NUMBER 133
172
+ #define ENGINE_R_CMD_NOT_EXECUTABLE 134
173
+ #define ENGINE_R_COMMAND_TAKES_INPUT 135
174
+ #define ENGINE_R_COMMAND_TAKES_NO_INPUT 136
175
+ #define ENGINE_R_CONFLICTING_ENGINE_ID 103
176
+ #define ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED 119
177
+ #define ENGINE_R_DH_NOT_IMPLEMENTED 139
178
+ #define ENGINE_R_DSA_NOT_IMPLEMENTED 140
179
+ #define ENGINE_R_DSO_FAILURE 104
180
+ #define ENGINE_R_DSO_NOT_FOUND 132
181
+ #define ENGINE_R_ENGINES_SECTION_ERROR 148
182
+ #define ENGINE_R_ENGINE_CONFIGURATION_ERROR 102
183
+ #define ENGINE_R_ENGINE_IS_NOT_IN_LIST 105
184
+ #define ENGINE_R_ENGINE_SECTION_ERROR 149
185
+ #define ENGINE_R_FAILED_LOADING_PRIVATE_KEY 128
186
+ #define ENGINE_R_FAILED_LOADING_PUBLIC_KEY 129
187
+ #define ENGINE_R_FINISH_FAILED 106
188
+ #define ENGINE_R_GET_HANDLE_FAILED 107
189
+ #define ENGINE_R_ID_OR_NAME_MISSING 108
190
+ #define ENGINE_R_INIT_FAILED 109
191
+ #define ENGINE_R_INTERNAL_LIST_ERROR 110
192
+ #define ENGINE_R_INVALID_ARGUMENT 143
193
+ #define ENGINE_R_INVALID_CMD_NAME 137
194
+ #define ENGINE_R_INVALID_CMD_NUMBER 138
195
+ #define ENGINE_R_INVALID_INIT_VALUE 151
196
+ #define ENGINE_R_INVALID_STRING 150
197
+ #define ENGINE_R_NOT_INITIALISED 117
198
+ #define ENGINE_R_NOT_LOADED 112
199
+ #define ENGINE_R_NO_CONTROL_FUNCTION 120
200
+ #define ENGINE_R_NO_INDEX 144
201
+ #define ENGINE_R_NO_LOAD_FUNCTION 125
202
+ #define ENGINE_R_NO_REFERENCE 130
203
+ #define ENGINE_R_NO_SUCH_ENGINE 116
204
+ #define ENGINE_R_NO_UNLOAD_FUNCTION 126
205
+ #define ENGINE_R_PROVIDE_PARAMETERS 113
206
+ #define ENGINE_R_RSA_NOT_IMPLEMENTED 141
207
+ #define ENGINE_R_UNIMPLEMENTED_CIPHER 146
208
+ #define ENGINE_R_UNIMPLEMENTED_DIGEST 147
209
+ #define ENGINE_R_UNIMPLEMENTED_PUBLIC_KEY_METHOD 101
210
+ #define ENGINE_R_VERSION_INCOMPATIBILITY 145
211
+
212
+ #ifdef __cplusplus
213
+ }
214
+ #endif
215
+ #endif
@@ -0,0 +1,325 @@
1
+ /* $OpenBSD: err.h,v 1.38 2025/05/10 06:17:09 tb Exp $ */
2
+ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3
+ * All rights reserved.
4
+ *
5
+ * This package is an SSL implementation written
6
+ * by Eric Young (eay@cryptsoft.com).
7
+ * The implementation was written so as to conform with Netscapes SSL.
8
+ *
9
+ * This library is free for commercial and non-commercial use as long as
10
+ * the following conditions are aheared to. The following conditions
11
+ * apply to all code found in this distribution, be it the RC4, RSA,
12
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13
+ * included with this distribution is covered by the same copyright terms
14
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15
+ *
16
+ * Copyright remains Eric Young's, and as such any Copyright notices in
17
+ * the code are not to be removed.
18
+ * If this package is used in a product, Eric Young should be given attribution
19
+ * as the author of the parts of the library used.
20
+ * This can be in the form of a textual message at program startup or
21
+ * in documentation (online or textual) provided with the package.
22
+ *
23
+ * Redistribution and use in source and binary forms, with or without
24
+ * modification, are permitted provided that the following conditions
25
+ * are met:
26
+ * 1. Redistributions of source code must retain the copyright
27
+ * notice, this list of conditions and the following disclaimer.
28
+ * 2. Redistributions in binary form must reproduce the above copyright
29
+ * notice, this list of conditions and the following disclaimer in the
30
+ * documentation and/or other materials provided with the distribution.
31
+ * 3. All advertising materials mentioning features or use of this software
32
+ * must display the following acknowledgement:
33
+ * "This product includes cryptographic software written by
34
+ * Eric Young (eay@cryptsoft.com)"
35
+ * The word 'cryptographic' can be left out if the rouines from the library
36
+ * being used are not cryptographic related :-).
37
+ * 4. If you include any Windows specific code (or a derivative thereof) from
38
+ * the apps directory (application code) you must include an acknowledgement:
39
+ * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40
+ *
41
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51
+ * SUCH DAMAGE.
52
+ *
53
+ * The licence and distribution terms for any publically available version or
54
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
55
+ * copied and put under another distribution licence
56
+ * [including the GNU Public Licence.]
57
+ */
58
+ /* ====================================================================
59
+ * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
60
+ *
61
+ * Redistribution and use in source and binary forms, with or without
62
+ * modification, are permitted provided that the following conditions
63
+ * are met:
64
+ *
65
+ * 1. Redistributions of source code must retain the above copyright
66
+ * notice, this list of conditions and the following disclaimer.
67
+ *
68
+ * 2. Redistributions in binary form must reproduce the above copyright
69
+ * notice, this list of conditions and the following disclaimer in
70
+ * the documentation and/or other materials provided with the
71
+ * distribution.
72
+ *
73
+ * 3. All advertising materials mentioning features or use of this
74
+ * software must display the following acknowledgment:
75
+ * "This product includes software developed by the OpenSSL Project
76
+ * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
77
+ *
78
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
79
+ * endorse or promote products derived from this software without
80
+ * prior written permission. For written permission, please contact
81
+ * openssl-core@openssl.org.
82
+ *
83
+ * 5. Products derived from this software may not be called "OpenSSL"
84
+ * nor may "OpenSSL" appear in their names without prior written
85
+ * permission of the OpenSSL Project.
86
+ *
87
+ * 6. Redistributions of any form whatsoever must retain the following
88
+ * acknowledgment:
89
+ * "This product includes software developed by the OpenSSL Project
90
+ * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
91
+ *
92
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
93
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
94
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
95
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
96
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
97
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
98
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
99
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
100
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
101
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
102
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
103
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
104
+ * ====================================================================
105
+ *
106
+ * This product includes cryptographic software written by Eric Young
107
+ * (eay@cryptsoft.com). This product includes software written by Tim
108
+ * Hudson (tjh@cryptsoft.com).
109
+ *
110
+ */
111
+
112
+ #ifndef HEADER_ERR_H
113
+ #define HEADER_ERR_H
114
+
115
+ #include <openssl/opensslconf.h>
116
+
117
+ #include <stdio.h>
118
+ #include <stdlib.h>
119
+
120
+ #include <openssl/ossl_typ.h>
121
+ #ifndef OPENSSL_NO_BIO
122
+ #include <openssl/bio.h>
123
+ #endif
124
+ #ifndef OPENSSL_NO_LHASH
125
+ #include <openssl/lhash.h>
126
+ #endif
127
+
128
+ #ifdef __cplusplus
129
+ extern "C" {
130
+ #endif
131
+
132
+ #ifndef OPENSSL_NO_FILENAMES
133
+ #define ERR_PUT_error(a,b,c,d,e) ERR_put_error(a,b,c,d,e)
134
+ #else
135
+ #define ERR_PUT_error(a,b,c,d,e) ERR_put_error(a,b,c,NULL,0)
136
+ #endif
137
+
138
+ #include <errno.h>
139
+
140
+ #define ERR_TXT_MALLOCED 0x01
141
+ #define ERR_TXT_STRING 0x02
142
+
143
+ #define ERR_FLAG_MARK 0x01
144
+
145
+ #define ERR_NUM_ERRORS 16
146
+
147
+ /* library */
148
+ #define ERR_LIB_NONE 1
149
+ #define ERR_LIB_SYS 2
150
+ #define ERR_LIB_BN 3
151
+ #define ERR_LIB_RSA 4
152
+ #define ERR_LIB_DH 5
153
+ #define ERR_LIB_EVP 6
154
+ #define ERR_LIB_BUF 7
155
+ #define ERR_LIB_OBJ 8
156
+ #define ERR_LIB_PEM 9
157
+ #define ERR_LIB_DSA 10
158
+ #define ERR_LIB_X509 11
159
+ /* #define ERR_LIB_METH 12 */
160
+ #define ERR_LIB_ASN1 13
161
+ #define ERR_LIB_CONF 14
162
+ #define ERR_LIB_CRYPTO 15
163
+ #define ERR_LIB_EC 16
164
+ #define ERR_LIB_SSL 20
165
+ /* #define ERR_LIB_SSL23 21 */
166
+ /* #define ERR_LIB_SSL2 22 */
167
+ /* #define ERR_LIB_SSL3 23 */
168
+ /* #define ERR_LIB_RSAREF 30 */
169
+ /* #define ERR_LIB_PROXY 31 */
170
+ #define ERR_LIB_BIO 32
171
+ #define ERR_LIB_PKCS7 33
172
+ #define ERR_LIB_X509V3 34
173
+ #define ERR_LIB_PKCS12 35
174
+ #define ERR_LIB_RAND 36
175
+ #define ERR_LIB_DSO 37
176
+ #define ERR_LIB_ENGINE 38
177
+ #define ERR_LIB_OCSP 39
178
+ #define ERR_LIB_UI 40
179
+ #define ERR_LIB_COMP 41
180
+ #define ERR_LIB_ECDSA 42
181
+ #define ERR_LIB_ECDH 43
182
+ #define ERR_LIB_STORE 44
183
+ #define ERR_LIB_FIPS 45
184
+ #define ERR_LIB_CMS 46
185
+ #define ERR_LIB_TS 47
186
+ #define ERR_LIB_HMAC 48
187
+ #define ERR_LIB_JPAKE 49
188
+ #define ERR_LIB_GOST 50
189
+ #define ERR_LIB_CT 51
190
+ #define ERR_LIB_KDF 52
191
+
192
+ #define ERR_LIB_USER 128
193
+
194
+ #ifndef LIBRESSL_INTERNAL
195
+ #define PEMerr(f,r) ERR_PUT_error(ERR_LIB_PEM,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
196
+ #define RSAerr(f,r) ERR_PUT_error(ERR_LIB_RSA,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
197
+ #define SSLerr(f,r) ERR_PUT_error(ERR_LIB_SSL,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
198
+ #endif
199
+
200
+ #define ERR_PACK(l,f,r) (((((unsigned long)l)&0xffL)<<24L)| \
201
+ ((((unsigned long)f)&0xfffL)<<12L)| \
202
+ ((((unsigned long)r)&0xfffL)))
203
+ #define ERR_GET_LIB(l) (int)((((unsigned long)l)>>24L)&0xffL)
204
+ #define ERR_GET_FUNC(l) (int)((((unsigned long)l)>>12L)&0xfffL)
205
+ #define ERR_GET_REASON(l) (int)((l)&0xfffL)
206
+ #define ERR_FATAL_ERROR(l) (int)((l)&ERR_R_FATAL)
207
+
208
+
209
+ /* OS functions */
210
+ #define SYS_F_FOPEN 1
211
+ #define SYS_F_CONNECT 2
212
+ #define SYS_F_GETSERVBYNAME 3
213
+ #define SYS_F_SOCKET 4
214
+ #define SYS_F_IOCTLSOCKET 5
215
+ #define SYS_F_BIND 6
216
+ #define SYS_F_LISTEN 7
217
+ #define SYS_F_ACCEPT 8
218
+ #define SYS_F_WSASTARTUP 9 /* Winsock stuff */
219
+ #define SYS_F_OPENDIR 10
220
+ #define SYS_F_FREAD 11
221
+
222
+
223
+ /* reasons */
224
+ #define ERR_R_SYS_LIB ERR_LIB_SYS /* 2 */
225
+ #define ERR_R_BN_LIB ERR_LIB_BN /* 3 */
226
+ #define ERR_R_RSA_LIB ERR_LIB_RSA /* 4 */
227
+ #define ERR_R_DH_LIB ERR_LIB_DH /* 5 */
228
+ #define ERR_R_EVP_LIB ERR_LIB_EVP /* 6 */
229
+ #define ERR_R_BUF_LIB ERR_LIB_BUF /* 7 */
230
+ #define ERR_R_OBJ_LIB ERR_LIB_OBJ /* 8 */
231
+ #define ERR_R_PEM_LIB ERR_LIB_PEM /* 9 */
232
+ #define ERR_R_DSA_LIB ERR_LIB_DSA /* 10 */
233
+ #define ERR_R_X509_LIB ERR_LIB_X509 /* 11 */
234
+ #define ERR_R_ASN1_LIB ERR_LIB_ASN1 /* 13 */
235
+ #define ERR_R_CONF_LIB ERR_LIB_CONF /* 14 */
236
+ #define ERR_R_CRYPTO_LIB ERR_LIB_CRYPTO /* 15 */
237
+ #define ERR_R_EC_LIB ERR_LIB_EC /* 16 */
238
+ #define ERR_R_SSL_LIB ERR_LIB_SSL /* 20 */
239
+ #define ERR_R_BIO_LIB ERR_LIB_BIO /* 32 */
240
+ #define ERR_R_PKCS7_LIB ERR_LIB_PKCS7 /* 33 */
241
+ #define ERR_R_X509V3_LIB ERR_LIB_X509V3 /* 34 */
242
+ #define ERR_R_PKCS12_LIB ERR_LIB_PKCS12 /* 35 */
243
+ #define ERR_R_RAND_LIB ERR_LIB_RAND /* 36 */
244
+ #define ERR_R_DSO_LIB ERR_LIB_DSO /* 37 */
245
+ #define ERR_R_ENGINE_LIB ERR_LIB_ENGINE /* 38 */
246
+ #define ERR_R_OCSP_LIB ERR_LIB_OCSP /* 39 */
247
+ #define ERR_R_UI_LIB ERR_LIB_UI /* 40 */
248
+ #define ERR_R_COMP_LIB ERR_LIB_COMP /* 41 */
249
+ #define ERR_R_ECDSA_LIB ERR_LIB_ECDSA /* 42 */
250
+ #define ERR_R_ECDH_LIB ERR_LIB_ECDH /* 43 */
251
+ #define ERR_R_STORE_LIB ERR_LIB_STORE /* 44 */
252
+ #define ERR_R_TS_LIB ERR_LIB_TS /* 45 */
253
+
254
+ #define ERR_R_NESTED_ASN1_ERROR 58
255
+ #define ERR_R_BAD_ASN1_OBJECT_HEADER 59
256
+ #define ERR_R_BAD_GET_ASN1_OBJECT_CALL 60
257
+ #define ERR_R_EXPECTING_AN_ASN1_SEQUENCE 61
258
+ #define ERR_R_ASN1_LENGTH_MISMATCH 62
259
+ #define ERR_R_MISSING_ASN1_EOS 63
260
+
261
+ /* fatal error */
262
+ #define ERR_R_FATAL 64
263
+ #define ERR_R_MALLOC_FAILURE (1|ERR_R_FATAL)
264
+ #define ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED (2|ERR_R_FATAL)
265
+ #define ERR_R_PASSED_NULL_PARAMETER (3|ERR_R_FATAL)
266
+ #define ERR_R_INTERNAL_ERROR (4|ERR_R_FATAL)
267
+ #define ERR_R_DISABLED (5|ERR_R_FATAL)
268
+ #define ERR_R_INIT_FAIL (6|ERR_R_FATAL)
269
+
270
+ /* 99 is the maximum possible ERR_R_... code, higher values
271
+ * are reserved for the individual libraries */
272
+
273
+ typedef struct ERR_string_data_st {
274
+ unsigned long error;
275
+ const char *string;
276
+ } ERR_STRING_DATA;
277
+
278
+ void ERR_put_error(int lib, int func, int reason, const char *file, int line);
279
+ void ERR_set_error_data(char *data, int flags);
280
+
281
+ unsigned long ERR_get_error(void);
282
+ unsigned long ERR_get_error_line(const char **file, int *line);
283
+ unsigned long ERR_get_error_line_data(const char **file, int *line,
284
+ const char **data, int *flags);
285
+ unsigned long ERR_peek_error(void);
286
+ unsigned long ERR_peek_error_line(const char **file, int *line);
287
+ unsigned long ERR_peek_error_line_data(const char **file, int *line,
288
+ const char **data, int *flags);
289
+ unsigned long ERR_peek_last_error(void);
290
+ unsigned long ERR_peek_last_error_line(const char **file, int *line);
291
+ unsigned long ERR_peek_last_error_line_data(const char **file, int *line,
292
+ const char **data, int *flags);
293
+ void ERR_clear_error(void );
294
+ char *ERR_error_string(unsigned long e, char *buf);
295
+ void ERR_error_string_n(unsigned long e, char *buf, size_t len);
296
+ const char *ERR_lib_error_string(unsigned long e);
297
+ const char *ERR_func_error_string(unsigned long e);
298
+ const char *ERR_reason_error_string(unsigned long e);
299
+ void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u),
300
+ void *u);
301
+ void ERR_print_errors_fp(FILE *fp);
302
+ #ifndef OPENSSL_NO_BIO
303
+ void ERR_print_errors(BIO *bp);
304
+ #endif
305
+ void ERR_asprintf_error_data(char * format, ...);
306
+ void ERR_load_strings(int lib, ERR_STRING_DATA *str);
307
+ void ERR_unload_strings(int lib, ERR_STRING_DATA *str);
308
+ void ERR_load_ERR_strings(void);
309
+ void ERR_load_crypto_strings(void);
310
+ void ERR_free_strings(void);
311
+
312
+ void ERR_remove_thread_state(const CRYPTO_THREADID *tid);
313
+ /* Wrapped in OPENSSL_NO_DEPRECATED in 0.9.8. Still used in 2023. */
314
+ void ERR_remove_state(unsigned long pid);
315
+
316
+ int ERR_get_next_error_library(void);
317
+
318
+ int ERR_set_mark(void);
319
+ int ERR_pop_to_mark(void);
320
+
321
+ #ifdef __cplusplus
322
+ }
323
+ #endif
324
+
325
+ #endif