Nuitka-winsvc 2.3.2__cp311-cp311-win_amd64.whl → 2.3.9__cp311-cp311-win_amd64.whl
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.
Potentially problematic release.
This version of Nuitka-winsvc might be problematic. Click here for more details.
- {Nuitka_winsvc-2.3.2.dist-info → Nuitka_winsvc-2.3.9.dist-info}/METADATA +1 -1
- {Nuitka_winsvc-2.3.2.dist-info → Nuitka_winsvc-2.3.9.dist-info}/RECORD +53 -32
- {Nuitka_winsvc-2.3.2.dist-info → Nuitka_winsvc-2.3.9.dist-info}/WHEEL +1 -1
- nuitka/Options.py +1 -1
- nuitka/PythonFlavors.py +21 -1
- nuitka/Version.py +1 -1
- nuitka/build/Backend.scons +11 -30
- nuitka/build/include/nuitka/compiled_function.h +2 -0
- nuitka/build/inline_copy/python_hacl/LICENSE.txt +201 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_MD5.c +1430 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_MD5.h +66 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA1.c +463 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA1.h +66 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA2.c +1273 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA2.h +204 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA3.c +734 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA3.h +131 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Streaming_Types.h +83 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/FStar_UInt128_Verified.h +346 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/FStar_UInt_8_16_32_64.h +107 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/fstar_uint128_struct_endianness.h +68 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/internal/target.h +293 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/lowstar_endianness.h +231 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/types.h +14 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_MD5.h +56 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA1.h +56 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA2.h +164 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA3.h +65 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/python_hacl_namespaces.h +89 -0
- nuitka/build/static_src/CompiledCodeHelpers.c +4 -0
- nuitka/build/static_src/CompiledFrameType.c +2 -5
- nuitka/build/static_src/CompiledFunctionType.c +43 -4
- nuitka/build/static_src/HelpersAllocator.c +0 -2
- nuitka/build/static_src/MainProgram.c +17 -0
- nuitka/build/static_src/MetaPathBasedLoader.c +75 -46
- nuitka/code_generation/templates/CodeTemplatesModules.py +1 -10
- nuitka/freezer/DllDependenciesCommon.py +28 -3
- nuitka/freezer/DllDependenciesWin32.py +6 -1
- nuitka/importing/Importing.py +5 -1
- nuitka/nodes/ModuleNodes.py +3 -4
- nuitka/plugins/PluginBase.py +11 -3
- nuitka/plugins/standard/KivyPlugin.py +10 -0
- nuitka/plugins/standard/standard.nuitka-package.config.yml +220 -21
- nuitka/plugins/standard/stdlib3.nuitka-package.config.yml +27 -2
- nuitka/tools/testing/Common.py +22 -2
- nuitka/tree/SourceHandling.py +4 -0
- nuitka/utils/FileOperations.py +38 -1
- nuitka/utils/SharedLibraries.py +1 -1
- {Nuitka_winsvc-2.3.2.data → Nuitka_winsvc-2.3.9.data}/scripts/nuitka-run.bat +0 -0
- {Nuitka_winsvc-2.3.2.data → Nuitka_winsvc-2.3.9.data}/scripts/nuitka.bat +0 -0
- {Nuitka_winsvc-2.3.2.dist-info → Nuitka_winsvc-2.3.9.dist-info}/LICENSE.txt +0 -0
- {Nuitka_winsvc-2.3.2.dist-info → Nuitka_winsvc-2.3.9.dist-info}/entry_points.txt +0 -0
- {Nuitka_winsvc-2.3.2.dist-info → Nuitka_winsvc-2.3.9.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/* MIT License
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) 2016-2022 INRIA, CMU and Microsoft Corporation
|
|
4
|
+
* Copyright (c) 2022-2023 HACL* Contributors
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, 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 in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
#ifndef __internal_Hacl_Hash_SHA1_H
|
|
27
|
+
#define __internal_Hacl_Hash_SHA1_H
|
|
28
|
+
|
|
29
|
+
#if defined(__cplusplus)
|
|
30
|
+
extern "C" {
|
|
31
|
+
#endif
|
|
32
|
+
|
|
33
|
+
#include <string.h>
|
|
34
|
+
#include "krml/types.h"
|
|
35
|
+
#include "krml/lowstar_endianness.h"
|
|
36
|
+
#include "krml/internal/target.h"
|
|
37
|
+
|
|
38
|
+
#include "../Hacl_Hash_SHA1.h"
|
|
39
|
+
|
|
40
|
+
void Hacl_Hash_SHA1_init(uint32_t *s);
|
|
41
|
+
|
|
42
|
+
void Hacl_Hash_SHA1_finish(uint32_t *s, uint8_t *dst);
|
|
43
|
+
|
|
44
|
+
void Hacl_Hash_SHA1_update_multi(uint32_t *s, uint8_t *blocks, uint32_t n_blocks);
|
|
45
|
+
|
|
46
|
+
void
|
|
47
|
+
Hacl_Hash_SHA1_update_last(uint32_t *s, uint64_t prev_len, uint8_t *input, uint32_t input_len);
|
|
48
|
+
|
|
49
|
+
void Hacl_Hash_SHA1_hash_oneshot(uint8_t *output, uint8_t *input, uint32_t input_len);
|
|
50
|
+
|
|
51
|
+
#if defined(__cplusplus)
|
|
52
|
+
}
|
|
53
|
+
#endif
|
|
54
|
+
|
|
55
|
+
#define __internal_Hacl_Hash_SHA1_H_DEFINED
|
|
56
|
+
#endif
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/* MIT License
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) 2016-2022 INRIA, CMU and Microsoft Corporation
|
|
4
|
+
* Copyright (c) 2022-2023 HACL* Contributors
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, 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 in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
#ifndef __internal_Hacl_Hash_SHA2_H
|
|
27
|
+
#define __internal_Hacl_Hash_SHA2_H
|
|
28
|
+
|
|
29
|
+
#if defined(__cplusplus)
|
|
30
|
+
extern "C" {
|
|
31
|
+
#endif
|
|
32
|
+
|
|
33
|
+
#include <string.h>
|
|
34
|
+
#include "krml/types.h"
|
|
35
|
+
#include "krml/lowstar_endianness.h"
|
|
36
|
+
#include "krml/internal/target.h"
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
#include "../Hacl_Hash_SHA2.h"
|
|
40
|
+
|
|
41
|
+
static const
|
|
42
|
+
uint32_t
|
|
43
|
+
Hacl_Hash_SHA2_h224[8U] =
|
|
44
|
+
{
|
|
45
|
+
0xc1059ed8U, 0x367cd507U, 0x3070dd17U, 0xf70e5939U, 0xffc00b31U, 0x68581511U, 0x64f98fa7U,
|
|
46
|
+
0xbefa4fa4U
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
static const
|
|
50
|
+
uint32_t
|
|
51
|
+
Hacl_Hash_SHA2_h256[8U] =
|
|
52
|
+
{
|
|
53
|
+
0x6a09e667U, 0xbb67ae85U, 0x3c6ef372U, 0xa54ff53aU, 0x510e527fU, 0x9b05688cU, 0x1f83d9abU,
|
|
54
|
+
0x5be0cd19U
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
static const
|
|
58
|
+
uint64_t
|
|
59
|
+
Hacl_Hash_SHA2_h384[8U] =
|
|
60
|
+
{
|
|
61
|
+
0xcbbb9d5dc1059ed8ULL, 0x629a292a367cd507ULL, 0x9159015a3070dd17ULL, 0x152fecd8f70e5939ULL,
|
|
62
|
+
0x67332667ffc00b31ULL, 0x8eb44a8768581511ULL, 0xdb0c2e0d64f98fa7ULL, 0x47b5481dbefa4fa4ULL
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
static const
|
|
66
|
+
uint64_t
|
|
67
|
+
Hacl_Hash_SHA2_h512[8U] =
|
|
68
|
+
{
|
|
69
|
+
0x6a09e667f3bcc908ULL, 0xbb67ae8584caa73bULL, 0x3c6ef372fe94f82bULL, 0xa54ff53a5f1d36f1ULL,
|
|
70
|
+
0x510e527fade682d1ULL, 0x9b05688c2b3e6c1fULL, 0x1f83d9abfb41bd6bULL, 0x5be0cd19137e2179ULL
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
static const
|
|
74
|
+
uint32_t
|
|
75
|
+
Hacl_Hash_SHA2_k224_256[64U] =
|
|
76
|
+
{
|
|
77
|
+
0x428a2f98U, 0x71374491U, 0xb5c0fbcfU, 0xe9b5dba5U, 0x3956c25bU, 0x59f111f1U, 0x923f82a4U,
|
|
78
|
+
0xab1c5ed5U, 0xd807aa98U, 0x12835b01U, 0x243185beU, 0x550c7dc3U, 0x72be5d74U, 0x80deb1feU,
|
|
79
|
+
0x9bdc06a7U, 0xc19bf174U, 0xe49b69c1U, 0xefbe4786U, 0x0fc19dc6U, 0x240ca1ccU, 0x2de92c6fU,
|
|
80
|
+
0x4a7484aaU, 0x5cb0a9dcU, 0x76f988daU, 0x983e5152U, 0xa831c66dU, 0xb00327c8U, 0xbf597fc7U,
|
|
81
|
+
0xc6e00bf3U, 0xd5a79147U, 0x06ca6351U, 0x14292967U, 0x27b70a85U, 0x2e1b2138U, 0x4d2c6dfcU,
|
|
82
|
+
0x53380d13U, 0x650a7354U, 0x766a0abbU, 0x81c2c92eU, 0x92722c85U, 0xa2bfe8a1U, 0xa81a664bU,
|
|
83
|
+
0xc24b8b70U, 0xc76c51a3U, 0xd192e819U, 0xd6990624U, 0xf40e3585U, 0x106aa070U, 0x19a4c116U,
|
|
84
|
+
0x1e376c08U, 0x2748774cU, 0x34b0bcb5U, 0x391c0cb3U, 0x4ed8aa4aU, 0x5b9cca4fU, 0x682e6ff3U,
|
|
85
|
+
0x748f82eeU, 0x78a5636fU, 0x84c87814U, 0x8cc70208U, 0x90befffaU, 0xa4506cebU, 0xbef9a3f7U,
|
|
86
|
+
0xc67178f2U
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
static const
|
|
90
|
+
uint64_t
|
|
91
|
+
Hacl_Hash_SHA2_k384_512[80U] =
|
|
92
|
+
{
|
|
93
|
+
0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL, 0xb5c0fbcfec4d3b2fULL, 0xe9b5dba58189dbbcULL,
|
|
94
|
+
0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL, 0x923f82a4af194f9bULL, 0xab1c5ed5da6d8118ULL,
|
|
95
|
+
0xd807aa98a3030242ULL, 0x12835b0145706fbeULL, 0x243185be4ee4b28cULL, 0x550c7dc3d5ffb4e2ULL,
|
|
96
|
+
0x72be5d74f27b896fULL, 0x80deb1fe3b1696b1ULL, 0x9bdc06a725c71235ULL, 0xc19bf174cf692694ULL,
|
|
97
|
+
0xe49b69c19ef14ad2ULL, 0xefbe4786384f25e3ULL, 0x0fc19dc68b8cd5b5ULL, 0x240ca1cc77ac9c65ULL,
|
|
98
|
+
0x2de92c6f592b0275ULL, 0x4a7484aa6ea6e483ULL, 0x5cb0a9dcbd41fbd4ULL, 0x76f988da831153b5ULL,
|
|
99
|
+
0x983e5152ee66dfabULL, 0xa831c66d2db43210ULL, 0xb00327c898fb213fULL, 0xbf597fc7beef0ee4ULL,
|
|
100
|
+
0xc6e00bf33da88fc2ULL, 0xd5a79147930aa725ULL, 0x06ca6351e003826fULL, 0x142929670a0e6e70ULL,
|
|
101
|
+
0x27b70a8546d22ffcULL, 0x2e1b21385c26c926ULL, 0x4d2c6dfc5ac42aedULL, 0x53380d139d95b3dfULL,
|
|
102
|
+
0x650a73548baf63deULL, 0x766a0abb3c77b2a8ULL, 0x81c2c92e47edaee6ULL, 0x92722c851482353bULL,
|
|
103
|
+
0xa2bfe8a14cf10364ULL, 0xa81a664bbc423001ULL, 0xc24b8b70d0f89791ULL, 0xc76c51a30654be30ULL,
|
|
104
|
+
0xd192e819d6ef5218ULL, 0xd69906245565a910ULL, 0xf40e35855771202aULL, 0x106aa07032bbd1b8ULL,
|
|
105
|
+
0x19a4c116b8d2d0c8ULL, 0x1e376c085141ab53ULL, 0x2748774cdf8eeb99ULL, 0x34b0bcb5e19b48a8ULL,
|
|
106
|
+
0x391c0cb3c5c95a63ULL, 0x4ed8aa4ae3418acbULL, 0x5b9cca4f7763e373ULL, 0x682e6ff3d6b2b8a3ULL,
|
|
107
|
+
0x748f82ee5defb2fcULL, 0x78a5636f43172f60ULL, 0x84c87814a1f0ab72ULL, 0x8cc702081a6439ecULL,
|
|
108
|
+
0x90befffa23631e28ULL, 0xa4506cebde82bde9ULL, 0xbef9a3f7b2c67915ULL, 0xc67178f2e372532bULL,
|
|
109
|
+
0xca273eceea26619cULL, 0xd186b8c721c0c207ULL, 0xeada7dd6cde0eb1eULL, 0xf57d4f7fee6ed178ULL,
|
|
110
|
+
0x06f067aa72176fbaULL, 0x0a637dc5a2c898a6ULL, 0x113f9804bef90daeULL, 0x1b710b35131c471bULL,
|
|
111
|
+
0x28db77f523047d84ULL, 0x32caab7b40c72493ULL, 0x3c9ebe0a15c9bebcULL, 0x431d67c49c100d4cULL,
|
|
112
|
+
0x4cc5d4becb3e42b6ULL, 0x597f299cfc657e2aULL, 0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
void Hacl_Hash_SHA2_sha256_init(uint32_t *hash);
|
|
116
|
+
|
|
117
|
+
void Hacl_Hash_SHA2_sha256_update_nblocks(uint32_t len, uint8_t *b, uint32_t *st);
|
|
118
|
+
|
|
119
|
+
void
|
|
120
|
+
Hacl_Hash_SHA2_sha256_update_last(uint64_t totlen, uint32_t len, uint8_t *b, uint32_t *hash);
|
|
121
|
+
|
|
122
|
+
void Hacl_Hash_SHA2_sha256_finish(uint32_t *st, uint8_t *h);
|
|
123
|
+
|
|
124
|
+
void Hacl_Hash_SHA2_sha224_init(uint32_t *hash);
|
|
125
|
+
|
|
126
|
+
void
|
|
127
|
+
Hacl_Hash_SHA2_sha224_update_last(uint64_t totlen, uint32_t len, uint8_t *b, uint32_t *st);
|
|
128
|
+
|
|
129
|
+
void Hacl_Hash_SHA2_sha224_finish(uint32_t *st, uint8_t *h);
|
|
130
|
+
|
|
131
|
+
void Hacl_Hash_SHA2_sha512_init(uint64_t *hash);
|
|
132
|
+
|
|
133
|
+
void Hacl_Hash_SHA2_sha512_update_nblocks(uint32_t len, uint8_t *b, uint64_t *st);
|
|
134
|
+
|
|
135
|
+
void
|
|
136
|
+
Hacl_Hash_SHA2_sha512_update_last(
|
|
137
|
+
FStar_UInt128_uint128 totlen,
|
|
138
|
+
uint32_t len,
|
|
139
|
+
uint8_t *b,
|
|
140
|
+
uint64_t *hash
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
void Hacl_Hash_SHA2_sha512_finish(uint64_t *st, uint8_t *h);
|
|
144
|
+
|
|
145
|
+
void Hacl_Hash_SHA2_sha384_init(uint64_t *hash);
|
|
146
|
+
|
|
147
|
+
void Hacl_Hash_SHA2_sha384_update_nblocks(uint32_t len, uint8_t *b, uint64_t *st);
|
|
148
|
+
|
|
149
|
+
void
|
|
150
|
+
Hacl_Hash_SHA2_sha384_update_last(
|
|
151
|
+
FStar_UInt128_uint128 totlen,
|
|
152
|
+
uint32_t len,
|
|
153
|
+
uint8_t *b,
|
|
154
|
+
uint64_t *st
|
|
155
|
+
);
|
|
156
|
+
|
|
157
|
+
void Hacl_Hash_SHA2_sha384_finish(uint64_t *st, uint8_t *h);
|
|
158
|
+
|
|
159
|
+
#if defined(__cplusplus)
|
|
160
|
+
}
|
|
161
|
+
#endif
|
|
162
|
+
|
|
163
|
+
#define __internal_Hacl_Hash_SHA2_H_DEFINED
|
|
164
|
+
#endif
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/* MIT License
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) 2016-2022 INRIA, CMU and Microsoft Corporation
|
|
4
|
+
* Copyright (c) 2022-2023 HACL* Contributors
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, 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 in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
#ifndef __internal_Hacl_Hash_SHA3_H
|
|
27
|
+
#define __internal_Hacl_Hash_SHA3_H
|
|
28
|
+
|
|
29
|
+
#if defined(__cplusplus)
|
|
30
|
+
extern "C" {
|
|
31
|
+
#endif
|
|
32
|
+
|
|
33
|
+
#include <string.h>
|
|
34
|
+
#include "krml/types.h"
|
|
35
|
+
#include "krml/lowstar_endianness.h"
|
|
36
|
+
#include "krml/internal/target.h"
|
|
37
|
+
|
|
38
|
+
#include "../Hacl_Hash_SHA3.h"
|
|
39
|
+
|
|
40
|
+
void
|
|
41
|
+
Hacl_Hash_SHA3_update_multi_sha3(
|
|
42
|
+
Spec_Hash_Definitions_hash_alg a,
|
|
43
|
+
uint64_t *s,
|
|
44
|
+
uint8_t *blocks,
|
|
45
|
+
uint32_t n_blocks
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
void
|
|
49
|
+
Hacl_Hash_SHA3_update_last_sha3(
|
|
50
|
+
Spec_Hash_Definitions_hash_alg a,
|
|
51
|
+
uint64_t *s,
|
|
52
|
+
uint8_t *input,
|
|
53
|
+
uint32_t input_len
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
void Hacl_Hash_SHA3_state_permute(uint64_t *s);
|
|
57
|
+
|
|
58
|
+
void Hacl_Hash_SHA3_loadState(uint32_t rateInBytes, uint8_t *input, uint64_t *s);
|
|
59
|
+
|
|
60
|
+
#if defined(__cplusplus)
|
|
61
|
+
}
|
|
62
|
+
#endif
|
|
63
|
+
|
|
64
|
+
#define __internal_Hacl_Hash_SHA3_H_DEFINED
|
|
65
|
+
#endif
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
#ifndef _PYTHON_HACL_NAMESPACES_H
|
|
2
|
+
#define _PYTHON_HACL_NAMESPACES_H
|
|
3
|
+
|
|
4
|
+
/*
|
|
5
|
+
* C's excuse for namespaces: Use globally unique names to avoid linkage
|
|
6
|
+
* conflicts with builds linking or dynamically loading other code potentially
|
|
7
|
+
* using HACL* libraries.
|
|
8
|
+
*
|
|
9
|
+
* To make sure this is effective: cd Modules && nm -a *.o | grep Hacl
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
#define Hacl_Hash_SHA2_state_sha2_224_s python_hashlib_Hacl_Hash_SHA2_state_sha2_224_s
|
|
13
|
+
#define Hacl_Hash_SHA2_state_sha2_224 python_hashlib_Hacl_Hash_SHA2_state_sha2_224
|
|
14
|
+
#define Hacl_Hash_SHA2_state_sha2_256 python_hashlib_Hacl_Hash_SHA2_state_sha2_256
|
|
15
|
+
#define Hacl_Hash_SHA2_state_sha2_384_s python_hashlib_Hacl_Hash_SHA2_state_sha2_384_s
|
|
16
|
+
#define Hacl_Hash_SHA2_state_sha2_384 python_hashlib_Hacl_Hash_SHA2_state_sha2_384
|
|
17
|
+
#define Hacl_Hash_SHA2_state_sha2_512 python_hashlib_Hacl_Hash_SHA2_state_sha2_512
|
|
18
|
+
#define Hacl_Hash_SHA2_malloc_256 python_hashlib_Hacl_Hash_SHA2_malloc_256
|
|
19
|
+
#define Hacl_Hash_SHA2_malloc_224 python_hashlib_Hacl_Hash_SHA2_malloc_224
|
|
20
|
+
#define Hacl_Hash_SHA2_malloc_512 python_hashlib_Hacl_Hash_SHA2_malloc_512
|
|
21
|
+
#define Hacl_Hash_SHA2_malloc_384 python_hashlib_Hacl_Hash_SHA2_malloc_384
|
|
22
|
+
#define Hacl_Hash_SHA2_copy_256 python_hashlib_Hacl_Hash_SHA2_copy_256
|
|
23
|
+
#define Hacl_Hash_SHA2_copy_224 python_hashlib_Hacl_Hash_SHA2_copy_224
|
|
24
|
+
#define Hacl_Hash_SHA2_copy_512 python_hashlib_Hacl_Hash_SHA2_copy_512
|
|
25
|
+
#define Hacl_Hash_SHA2_copy_384 python_hashlib_Hacl_Hash_SHA2_copy_384
|
|
26
|
+
#define Hacl_Hash_SHA2_init_256 python_hashlib_Hacl_Hash_SHA2_init_256
|
|
27
|
+
#define Hacl_Hash_SHA2_init_224 python_hashlib_Hacl_Hash_SHA2_init_224
|
|
28
|
+
#define Hacl_Hash_SHA2_init_512 python_hashlib_Hacl_Hash_SHA2_init_512
|
|
29
|
+
#define Hacl_Hash_SHA2_init_384 python_hashlib_Hacl_Hash_SHA2_init_384
|
|
30
|
+
#define Hacl_SHA2_Scalar32_sha512_init python_hashlib_Hacl_SHA2_Scalar32_sha512_init
|
|
31
|
+
#define Hacl_Hash_SHA2_update_256 python_hashlib_Hacl_Hash_SHA2_update_256
|
|
32
|
+
#define Hacl_Hash_SHA2_update_224 python_hashlib_Hacl_Hash_SHA2_update_224
|
|
33
|
+
#define Hacl_Hash_SHA2_update_512 python_hashlib_Hacl_Hash_SHA2_update_512
|
|
34
|
+
#define Hacl_Hash_SHA2_update_384 python_hashlib_Hacl_Hash_SHA2_update_384
|
|
35
|
+
#define Hacl_Hash_SHA2_digest_256 python_hashlib_Hacl_Hash_SHA2_digest_256
|
|
36
|
+
#define Hacl_Hash_SHA2_digest_224 python_hashlib_Hacl_Hash_SHA2_digest_224
|
|
37
|
+
#define Hacl_Hash_SHA2_digest_512 python_hashlib_Hacl_Hash_SHA2_digest_512
|
|
38
|
+
#define Hacl_Hash_SHA2_digest_384 python_hashlib_Hacl_Hash_SHA2_digest_384
|
|
39
|
+
#define Hacl_Hash_SHA2_free_256 python_hashlib_Hacl_Hash_SHA2_free_256
|
|
40
|
+
#define Hacl_Hash_SHA2_free_224 python_hashlib_Hacl_Hash_SHA2_free_224
|
|
41
|
+
#define Hacl_Hash_SHA2_free_512 python_hashlib_Hacl_Hash_SHA2_free_512
|
|
42
|
+
#define Hacl_Hash_SHA2_free_384 python_hashlib_Hacl_Hash_SHA2_free_384
|
|
43
|
+
#define Hacl_Hash_SHA2_sha256 python_hashlib_Hacl_Hash_SHA2_sha256
|
|
44
|
+
#define Hacl_Hash_SHA2_sha224 python_hashlib_Hacl_Hash_SHA2_sha224
|
|
45
|
+
#define Hacl_Hash_SHA2_sha512 python_hashlib_Hacl_Hash_SHA2_sha512
|
|
46
|
+
#define Hacl_Hash_SHA2_sha384 python_hashlib_Hacl_Hash_SHA2_sha384
|
|
47
|
+
|
|
48
|
+
#define Hacl_Hash_MD5_malloc python_hashlib_Hacl_Hash_MD5_malloc
|
|
49
|
+
#define Hacl_Hash_MD5_init python_hashlib_Hacl_Hash_MD5_init
|
|
50
|
+
#define Hacl_Hash_MD5_update python_hashlib_Hacl_Hash_MD5_update
|
|
51
|
+
#define Hacl_Hash_MD5_digest python_hashlib_Hacl_Hash_MD5_digest
|
|
52
|
+
#define Hacl_Hash_MD5_free python_hashlib_Hacl_Hash_MD5_free
|
|
53
|
+
#define Hacl_Hash_MD5_copy python_hashlib_Hacl_Hash_MD5_copy
|
|
54
|
+
#define Hacl_Hash_MD5_hash python_hashlib_Hacl_Hash_MD5_hash
|
|
55
|
+
|
|
56
|
+
#define Hacl_Hash_SHA1_malloc python_hashlib_Hacl_Hash_SHA1_malloc
|
|
57
|
+
#define Hacl_Hash_SHA1_init python_hashlib_Hacl_Hash_SHA1_init
|
|
58
|
+
#define Hacl_Hash_SHA1_update python_hashlib_Hacl_Hash_SHA1_update
|
|
59
|
+
#define Hacl_Hash_SHA1_digest python_hashlib_Hacl_Hash_SHA1_digest
|
|
60
|
+
#define Hacl_Hash_SHA1_free python_hashlib_Hacl_Hash_SHA1_free
|
|
61
|
+
#define Hacl_Hash_SHA1_copy python_hashlib_Hacl_Hash_SHA1_copy
|
|
62
|
+
#define Hacl_Hash_SHA1_hash python_hashlib_Hacl_Hash_SHA1_hash
|
|
63
|
+
|
|
64
|
+
#define Hacl_Hash_SHA3_update_last_sha3 python_hashlib_Hacl_Hash_SHA3_update_last_sha3
|
|
65
|
+
#define Hacl_Hash_SHA3_update_multi_sha3 python_hashlib_Hacl_Hash_SHA3_update_multi_sha3
|
|
66
|
+
#define Hacl_Impl_SHA3_absorb_inner python_hashlib_Hacl_Impl_SHA3_absorb_inner
|
|
67
|
+
#define Hacl_Impl_SHA3_keccak python_hashlib_Hacl_Impl_SHA3_keccak
|
|
68
|
+
#define Hacl_Impl_SHA3_loadState python_hashlib_Hacl_Impl_SHA3_loadState
|
|
69
|
+
#define Hacl_Impl_SHA3_squeeze python_hashlib_Hacl_Impl_SHA3_squeeze
|
|
70
|
+
#define Hacl_Impl_SHA3_state_permute python_hashlib_Hacl_Impl_SHA3_state_permute
|
|
71
|
+
#define Hacl_SHA3_sha3_224 python_hashlib_Hacl_SHA3_sha3_224
|
|
72
|
+
#define Hacl_SHA3_sha3_256 python_hashlib_Hacl_SHA3_sha3_256
|
|
73
|
+
#define Hacl_SHA3_sha3_384 python_hashlib_Hacl_SHA3_sha3_384
|
|
74
|
+
#define Hacl_SHA3_sha3_512 python_hashlib_Hacl_SHA3_sha3_512
|
|
75
|
+
#define Hacl_SHA3_shake128_hacl python_hashlib_Hacl_SHA3_shake128_hacl
|
|
76
|
+
#define Hacl_SHA3_shake256_hacl python_hashlib_Hacl_SHA3_shake256_hacl
|
|
77
|
+
#define Hacl_Hash_SHA3_block_len python_hashlib_Hacl_Hash_SHA3_block_len
|
|
78
|
+
#define Hacl_Hash_SHA3_copy python_hashlib_Hacl_Hash_SHA3_copy
|
|
79
|
+
#define Hacl_Hash_SHA3_digest python_hashlib_Hacl_Hash_SHA3_digest
|
|
80
|
+
#define Hacl_Hash_SHA3_free python_hashlib_Hacl_Hash_SHA3_free
|
|
81
|
+
#define Hacl_Hash_SHA3_get_alg python_hashlib_Hacl_Hash_SHA3_get_alg
|
|
82
|
+
#define Hacl_Hash_SHA3_hash_len python_hashlib_Hacl_Hash_SHA3_hash_len
|
|
83
|
+
#define Hacl_Hash_SHA3_is_shake python_hashlib_Hacl_Hash_SHA3_is_shake
|
|
84
|
+
#define Hacl_Hash_SHA3_malloc python_hashlib_Hacl_Hash_SHA3_malloc
|
|
85
|
+
#define Hacl_Hash_SHA3_reset python_hashlib_Hacl_Hash_SHA3_reset
|
|
86
|
+
#define Hacl_Hash_SHA3_update python_hashlib_Hacl_Hash_SHA3_update
|
|
87
|
+
#define Hacl_Hash_SHA3_squeeze python_hashlib_Hacl_Hash_SHA3_squeeze
|
|
88
|
+
|
|
89
|
+
#endif // _PYTHON_HACL_NAMESPACES_H
|
|
@@ -2117,6 +2117,10 @@ PyObject *MAKE_UNION_TYPE(PyObject *args) {
|
|
|
2117
2117
|
#include "HelpersDumpBacktraces.c"
|
|
2118
2118
|
#endif
|
|
2119
2119
|
|
|
2120
|
+
#ifdef _NUITKA_INLINE_COPY_HACL
|
|
2121
|
+
#include "Hacl_Hash_SHA2.c"
|
|
2122
|
+
#endif
|
|
2123
|
+
|
|
2120
2124
|
#include "HelpersJitSources.c"
|
|
2121
2125
|
|
|
2122
2126
|
// Part of "Nuitka", an optimizing Python compiler that is compatible and
|
|
@@ -811,6 +811,8 @@ static struct Nuitka_FrameObject *_MAKE_COMPILED_FRAME(PyCodeObject *code, PyObj
|
|
|
811
811
|
result->m_interpreter_frame.f_funcobj = NULL;
|
|
812
812
|
#else
|
|
813
813
|
result->m_interpreter_frame.f_func = NULL;
|
|
814
|
+
#endif
|
|
815
|
+
#if PYTHON_VERSION < 0x3d0
|
|
814
816
|
result->m_interpreter_frame.prev_instr = _PyCode_CODE(code);
|
|
815
817
|
#endif
|
|
816
818
|
result->m_frame.f_frame = &result->m_interpreter_frame;
|
|
@@ -986,11 +988,6 @@ PyCodeObject *makeCodeObject(PyObject *filename, int line, int flags, PyObject *
|
|
|
986
988
|
Py_DECREF(filename_str);
|
|
987
989
|
#endif
|
|
988
990
|
|
|
989
|
-
if (result == NULL) {
|
|
990
|
-
PyErr_PrintEx(0);
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
CHECK_OBJECT(result);
|
|
994
991
|
return result;
|
|
995
992
|
}
|
|
996
993
|
|
|
@@ -1151,13 +1151,21 @@ Nuitka_Function_CreateFunctionViaCodeIndex(PyObject *module, PyObject *function_
|
|
|
1151
1151
|
int flags_int = PyLong_AsLong(flags);
|
|
1152
1152
|
assert(flags_int != -1);
|
|
1153
1153
|
|
|
1154
|
+
PyObject *kw_only_count = PyTuple_GET_ITEM(code_object_desc, 6);
|
|
1155
|
+
int kw_only_count_int = PyLong_AsLong(kw_only_count);
|
|
1156
|
+
assert(kw_only_count_int != -1);
|
|
1157
|
+
|
|
1158
|
+
PyObject *pos_only_count = PyTuple_GET_ITEM(code_object_desc, 7);
|
|
1159
|
+
int pos_only_count_int = PyLong_AsLong(pos_only_count);
|
|
1160
|
+
assert(pos_only_count_int != -1);
|
|
1161
|
+
|
|
1154
1162
|
PyCodeObject *code_object =
|
|
1155
1163
|
MAKE_CODE_OBJECT(filename, line_int, flags_int, function_name, function_qualname, arg_names,
|
|
1156
1164
|
NULL, // freevars
|
|
1157
|
-
arg_count_int,
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1165
|
+
arg_count_int, kw_only_count_int, pos_only_count_int);
|
|
1166
|
+
if (unlikely(code_object == NULL)) {
|
|
1167
|
+
return NULL;
|
|
1168
|
+
}
|
|
1161
1169
|
|
|
1162
1170
|
Py_ssize_t closure_size;
|
|
1163
1171
|
|
|
@@ -1209,6 +1217,37 @@ Nuitka_Function_CreateFunctionViaCodeIndex(PyObject *module, PyObject *function_
|
|
|
1209
1217
|
return result;
|
|
1210
1218
|
}
|
|
1211
1219
|
|
|
1220
|
+
PyObject *Nuitka_Function_ExtractCodeObjectDescription(PyThreadState *tstate, struct Nuitka_FunctionObject *function) {
|
|
1221
|
+
PyObject *code_object_desc = MAKE_TUPLE_EMPTY(tstate, 8);
|
|
1222
|
+
|
|
1223
|
+
PyTuple_SET_ITEM0(code_object_desc, 0, function->m_code_object->co_filename);
|
|
1224
|
+
PyTuple_SET_ITEM0(code_object_desc, 1, function->m_code_object->co_name);
|
|
1225
|
+
PyTuple_SET_ITEM(code_object_desc, 2, PyLong_FromLong(function->m_code_object->co_firstlineno));
|
|
1226
|
+
#if PYTHON_VERSION < 0x3b0
|
|
1227
|
+
PyTuple_SET_ITEM0(code_object_desc, 3, function->m_code_object->co_varnames);
|
|
1228
|
+
#else
|
|
1229
|
+
// spell-checker: ignore PyCode_GetVarnames
|
|
1230
|
+
PyTuple_SET_ITEM(code_object_desc, 3, PyCode_GetVarnames(function->m_code_object));
|
|
1231
|
+
#endif
|
|
1232
|
+
PyTuple_SET_ITEM(code_object_desc, 4, PyLong_FromLong(function->m_code_object->co_argcount));
|
|
1233
|
+
PyTuple_SET_ITEM(code_object_desc, 5, PyLong_FromLong(function->m_code_object->co_flags));
|
|
1234
|
+
|
|
1235
|
+
#if PYTHON_VERSION < 0x380
|
|
1236
|
+
PyTuple_SET_ITEM(code_object_desc, 6, const_int_0);
|
|
1237
|
+
#else
|
|
1238
|
+
PyTuple_SET_ITEM(code_object_desc, 6, PyLong_FromLong(function->m_code_object->co_posonlyargcount));
|
|
1239
|
+
#endif
|
|
1240
|
+
|
|
1241
|
+
#if PYTHON_VERSION < 0x3b0
|
|
1242
|
+
PyTuple_SET_ITEM(code_object_desc, 7, const_int_0);
|
|
1243
|
+
#else
|
|
1244
|
+
PyTuple_SET_ITEM(code_object_desc, 7, PyLong_FromLong(function->m_code_object->co_kwonlyargcount));
|
|
1245
|
+
#endif
|
|
1246
|
+
|
|
1247
|
+
CHECK_OBJECT_DEEP(code_object_desc);
|
|
1248
|
+
|
|
1249
|
+
return code_object_desc;
|
|
1250
|
+
}
|
|
1212
1251
|
#endif
|
|
1213
1252
|
|
|
1214
1253
|
#if PYTHON_VERSION >= 0x380 && !defined(_NUITKA_EXPERIMENTAL_DISABLE_VECTORCALL_SLOT)
|
|
@@ -82,8 +82,6 @@ static void Nuitka_invoke_gc_callback(PyThreadState *tstate, const char *phase,
|
|
|
82
82
|
PyObject *info = NULL;
|
|
83
83
|
|
|
84
84
|
if (PyList_GET_SIZE(gcstate->callbacks) != 0) {
|
|
85
|
-
assert(false);
|
|
86
|
-
|
|
87
85
|
info =
|
|
88
86
|
Py_BuildValue("{sisnsn}", "generation", generation, "collected", collected, "uncollectable", uncollectable);
|
|
89
87
|
|
|
@@ -1114,6 +1114,17 @@ static void changeStandardHandleTarget(FILE *std_handle, filename_char_t const *
|
|
|
1114
1114
|
static void Nuitka_at_exit(void) { NUITKA_PRINT_TIMING("Nuitka_at_exit(): Called by C exit()"); }
|
|
1115
1115
|
#endif
|
|
1116
1116
|
|
|
1117
|
+
#if !defined(_NUITKA_DEPLOYMENT_MODE) && !defined(_NUITKA_NO_DEPLOYMENT_SEGFAILT)
|
|
1118
|
+
#include <signal.h>
|
|
1119
|
+
static void nuitka_segfault_handler(int sig) {
|
|
1120
|
+
puts("Nuitka: A segmentation fault has occurred. This is highly unusual and can");
|
|
1121
|
+
puts("have multiple reasons. Please check https://nuitka.net/info/segfault.html");
|
|
1122
|
+
puts("for solutions.");
|
|
1123
|
+
|
|
1124
|
+
exit(-SIGSEGV);
|
|
1125
|
+
}
|
|
1126
|
+
#endif
|
|
1127
|
+
|
|
1117
1128
|
#ifdef _NUITKA_WINMAIN_ENTRY_POINT
|
|
1118
1129
|
int __stdcall wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpCmdLine, int nCmdShow) {
|
|
1119
1130
|
/* MSVC, MINGW64 */
|
|
@@ -1126,6 +1137,12 @@ int wmain(int argc, wchar_t **argv) {
|
|
|
1126
1137
|
int main(int argc, char **argv) {
|
|
1127
1138
|
#endif
|
|
1128
1139
|
#endif
|
|
1140
|
+
|
|
1141
|
+
// Installer a segfault handler that outputs a helpful message.
|
|
1142
|
+
#if !defined(_NUITKA_DEPLOYMENT_MODE) && !defined(_NUITKA_NO_DEPLOYMENT_SEGFAILT)
|
|
1143
|
+
signal(SIGSEGV, nuitka_segfault_handler);
|
|
1144
|
+
#endif
|
|
1145
|
+
|
|
1129
1146
|
#ifdef _NUITKA_EXPERIMENTAL_DUMP_C_TRACEBACKS
|
|
1130
1147
|
INIT_C_BACKTRACES();
|
|
1131
1148
|
DUMP_C_BACKTRACE();
|