mirror of
https://github.com/house-of-vanity/fesmoo_perdoliq.git
synced 2025-08-21 16:17:15 +00:00
1873 lines
63 KiB
C
1873 lines
63 KiB
C
![]() |
/* Generated code for Python source for module 'cryptography.hazmat.backends.openssl.utils'
|
||
|
* created by Nuitka version 0.6.0
|
||
|
*
|
||
|
* This code is in part copyright 2018 Kay Hayen.
|
||
|
*
|
||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
|
* you may not use this file except in compliance with the License.
|
||
|
* You may obtain a copy of the License at
|
||
|
*
|
||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||
|
*
|
||
|
* Unless required by applicable law or agreed to in writing, software
|
||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
* See the License for the specific language governing permissions and
|
||
|
* limitations under the License.
|
||
|
*/
|
||
|
|
||
|
#include "nuitka/prelude.h"
|
||
|
|
||
|
#include "__helpers.h"
|
||
|
|
||
|
/* The _module_cryptography$hazmat$backends$openssl$utils is a Python object pointer of module type. */
|
||
|
|
||
|
/* Note: For full compatibility with CPython, every module variable access
|
||
|
* needs to go through it except for cases where the module cannot possibly
|
||
|
* have changed in the mean time.
|
||
|
*/
|
||
|
|
||
|
PyObject *module_cryptography$hazmat$backends$openssl$utils;
|
||
|
PyDictObject *moduledict_cryptography$hazmat$backends$openssl$utils;
|
||
|
|
||
|
/* The module constants used, if any. */
|
||
|
extern PyObject *const_str_plain_warn;
|
||
|
static PyObject *const_str_digest_8a436d580746d7a07b8fac6ee560dece;
|
||
|
extern PyObject *const_str_plain_stacklevel;
|
||
|
extern PyObject *const_str_plain_data;
|
||
|
static PyObject *const_tuple_a1ff885ba1f99ea40e28f4932782aa6c_tuple;
|
||
|
static PyObject *const_str_digest_ce31019111b3ccfe7c1a48d878b2dab7;
|
||
|
extern PyObject *const_str_plain_absolute_import;
|
||
|
extern PyObject *const_str_plain_warnings;
|
||
|
extern PyObject *const_str_plain_cryptography;
|
||
|
static PyObject *const_tuple_str_plain_Prehashed_tuple;
|
||
|
extern PyObject *const_tuple_str_plain_signature_algorithm_tuple;
|
||
|
extern PyObject *const_str_plain_update;
|
||
|
extern PyObject *const_str_digest_626b18d63126fb4fc2b4b00829f745cc;
|
||
|
extern PyObject *const_str_plain_digest_size;
|
||
|
extern PyObject *const_str_plain___file__;
|
||
|
extern PyObject *const_str_plain_backend;
|
||
|
extern PyObject *const_str_plain_hashes;
|
||
|
extern PyObject *const_int_0;
|
||
|
extern PyObject *const_str_plain__algorithm;
|
||
|
extern PyObject *const_tuple_str_plain_hashes_tuple;
|
||
|
extern PyObject *const_int_pos_3;
|
||
|
extern PyObject *const_str_plain__calculate_digest_and_algorithm;
|
||
|
extern PyObject *const_str_plain_division;
|
||
|
extern PyObject *const_dict_2254aca578e492e580f4e46a40647b9b;
|
||
|
extern PyObject *const_str_plain_print_function;
|
||
|
static PyObject *const_str_plain_hash_ctx;
|
||
|
static PyObject *const_str_digest_ee6822ba158fbc94c25a6b301e592f99;
|
||
|
extern PyObject *const_str_plain_signature_algorithm;
|
||
|
extern PyObject *const_str_digest_9db3cdd3cd765463b4eec6754eb8e087;
|
||
|
extern PyObject *const_tuple_str_plain_utils_tuple;
|
||
|
extern PyObject *const_str_plain_finalize;
|
||
|
extern PyObject *const_str_plain__check_not_prehashed;
|
||
|
extern PyObject *const_tuple_empty;
|
||
|
extern PyObject *const_str_plain_Hash;
|
||
|
extern PyObject *const_str_digest_5158407475f7a1591cc2a47f66175afb;
|
||
|
extern PyObject *const_str_plain_Prehashed;
|
||
|
extern PyObject *const_str_plain_PersistentlyDeprecated;
|
||
|
extern PyObject *const_str_plain__warn_sign_verify_deprecated;
|
||
|
extern PyObject *const_str_plain_algorithm;
|
||
|
extern PyObject *const_str_plain_utils;
|
||
|
extern PyObject *const_str_plain___doc__;
|
||
|
extern PyObject *const_str_plain___cached__;
|
||
|
static PyObject *const_str_digest_5ce81634600177822ae5a0d5a4e46723;
|
||
|
static PyObject *const_str_digest_b5ff1ed078f6189b19f1987693fa19e0;
|
||
|
static PyObject *module_filename_obj;
|
||
|
|
||
|
static bool constants_created = false;
|
||
|
|
||
|
static void createModuleConstants( void )
|
||
|
{
|
||
|
const_str_digest_8a436d580746d7a07b8fac6ee560dece = UNSTREAM_STRING( &constant_bin[ 481259 ], 51, 0 );
|
||
|
const_tuple_a1ff885ba1f99ea40e28f4932782aa6c_tuple = PyTuple_New( 4 );
|
||
|
PyTuple_SET_ITEM( const_tuple_a1ff885ba1f99ea40e28f4932782aa6c_tuple, 0, const_str_plain_backend ); Py_INCREF( const_str_plain_backend );
|
||
|
PyTuple_SET_ITEM( const_tuple_a1ff885ba1f99ea40e28f4932782aa6c_tuple, 1, const_str_plain_data ); Py_INCREF( const_str_plain_data );
|
||
|
PyTuple_SET_ITEM( const_tuple_a1ff885ba1f99ea40e28f4932782aa6c_tuple, 2, const_str_plain_algorithm ); Py_INCREF( const_str_plain_algorithm );
|
||
|
const_str_plain_hash_ctx = UNSTREAM_STRING( &constant_bin[ 459506 ], 8, 1 );
|
||
|
PyTuple_SET_ITEM( const_tuple_a1ff885ba1f99ea40e28f4932782aa6c_tuple, 3, const_str_plain_hash_ctx ); Py_INCREF( const_str_plain_hash_ctx );
|
||
|
const_str_digest_ce31019111b3ccfe7c1a48d878b2dab7 = UNSTREAM_STRING( &constant_bin[ 481310 ], 78, 0 );
|
||
|
const_tuple_str_plain_Prehashed_tuple = PyTuple_New( 1 );
|
||
|
PyTuple_SET_ITEM( const_tuple_str_plain_Prehashed_tuple, 0, const_str_plain_Prehashed ); Py_INCREF( const_str_plain_Prehashed );
|
||
|
const_str_digest_ee6822ba158fbc94c25a6b301e592f99 = UNSTREAM_STRING( &constant_bin[ 481388 ], 102, 0 );
|
||
|
const_str_digest_5ce81634600177822ae5a0d5a4e46723 = UNSTREAM_STRING( &constant_bin[ 481490 ], 78, 0 );
|
||
|
const_str_digest_b5ff1ed078f6189b19f1987693fa19e0 = UNSTREAM_STRING( &constant_bin[ 481568 ], 77, 0 );
|
||
|
|
||
|
constants_created = true;
|
||
|
}
|
||
|
|
||
|
#ifndef __NUITKA_NO_ASSERT__
|
||
|
void checkModuleConstants_cryptography$hazmat$backends$openssl$utils( void )
|
||
|
{
|
||
|
// The module may not have been used at all.
|
||
|
if (constants_created == false) return;
|
||
|
|
||
|
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
// The module code objects.
|
||
|
static PyCodeObject *codeobj_25b4923fc1614ffb7728e8127dbf2224;
|
||
|
static PyCodeObject *codeobj_989b334c66e4296003f93ed3b6b1d7a7;
|
||
|
static PyCodeObject *codeobj_166691b41ca88268abd9861de93535aa;
|
||
|
static PyCodeObject *codeobj_adae0186e2e66f575bb528ec2b18b25f;
|
||
|
|
||
|
static void createModuleCodeObjects(void)
|
||
|
{
|
||
|
module_filename_obj = const_str_digest_ce31019111b3ccfe7c1a48d878b2dab7;
|
||
|
codeobj_25b4923fc1614ffb7728e8127dbf2224 = MAKE_CODEOBJ( module_filename_obj, const_str_digest_8a436d580746d7a07b8fac6ee560dece, 1, const_tuple_empty, 0, 0, CO_NOFREE );
|
||
|
codeobj_989b334c66e4296003f93ed3b6b1d7a7 = MAKE_CODEOBJ( module_filename_obj, const_str_plain__calculate_digest_and_algorithm, 14, const_tuple_a1ff885ba1f99ea40e28f4932782aa6c_tuple, 3, 0, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE );
|
||
|
codeobj_166691b41ca88268abd9861de93535aa = MAKE_CODEOBJ( module_filename_obj, const_str_plain__check_not_prehashed, 31, const_tuple_str_plain_signature_algorithm_tuple, 1, 0, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE );
|
||
|
codeobj_adae0186e2e66f575bb528ec2b18b25f = MAKE_CODEOBJ( module_filename_obj, const_str_plain__warn_sign_verify_deprecated, 39, const_tuple_empty, 0, 0, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE );
|
||
|
}
|
||
|
|
||
|
// The module function declarations.
|
||
|
static PyObject *MAKE_FUNCTION_cryptography$hazmat$backends$openssl$utils$$$function_1__calculate_digest_and_algorithm( );
|
||
|
|
||
|
|
||
|
static PyObject *MAKE_FUNCTION_cryptography$hazmat$backends$openssl$utils$$$function_2__check_not_prehashed( );
|
||
|
|
||
|
|
||
|
static PyObject *MAKE_FUNCTION_cryptography$hazmat$backends$openssl$utils$$$function_3__warn_sign_verify_deprecated( );
|
||
|
|
||
|
|
||
|
// The module function definitions.
|
||
|
static PyObject *impl_cryptography$hazmat$backends$openssl$utils$$$function_1__calculate_digest_and_algorithm( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
|
||
|
{
|
||
|
// Preserve error status for checks
|
||
|
#ifndef __NUITKA_NO_ASSERT__
|
||
|
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
|
||
|
#endif
|
||
|
|
||
|
// Local variable declarations.
|
||
|
PyObject *par_backend = python_pars[ 0 ];
|
||
|
PyObject *par_data = python_pars[ 1 ];
|
||
|
PyObject *par_algorithm = python_pars[ 2 ];
|
||
|
PyObject *var_hash_ctx = NULL;
|
||
|
struct Nuitka_FrameObject *frame_989b334c66e4296003f93ed3b6b1d7a7;
|
||
|
NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL;
|
||
|
PyObject *exception_type = NULL;
|
||
|
PyObject *exception_value = NULL;
|
||
|
PyTracebackObject *exception_tb = NULL;
|
||
|
NUITKA_MAY_BE_UNUSED int exception_lineno = 0;
|
||
|
int tmp_res;
|
||
|
NUITKA_MAY_BE_UNUSED PyObject *tmp_unused;
|
||
|
PyObject *tmp_return_value = NULL;
|
||
|
static struct Nuitka_FrameObject *cache_frame_989b334c66e4296003f93ed3b6b1d7a7 = NULL;
|
||
|
PyObject *exception_keeper_type_1;
|
||
|
PyObject *exception_keeper_value_1;
|
||
|
PyTracebackObject *exception_keeper_tb_1;
|
||
|
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
|
||
|
|
||
|
// Actual function code.
|
||
|
{
|
||
|
// Tried code:
|
||
|
MAKE_OR_REUSE_FRAME( cache_frame_989b334c66e4296003f93ed3b6b1d7a7, codeobj_989b334c66e4296003f93ed3b6b1d7a7, module_cryptography$hazmat$backends$openssl$utils, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *) );
|
||
|
frame_989b334c66e4296003f93ed3b6b1d7a7 = cache_frame_989b334c66e4296003f93ed3b6b1d7a7;
|
||
|
|
||
|
// Push the new frame as the currently active one.
|
||
|
pushFrameStack( frame_989b334c66e4296003f93ed3b6b1d7a7 );
|
||
|
|
||
|
// Mark the frame object as in use, ref count 1 will be up for reuse.
|
||
|
assert( Py_REFCNT( frame_989b334c66e4296003f93ed3b6b1d7a7 ) == 2 ); // Frame stack
|
||
|
|
||
|
// Framed code:
|
||
|
{
|
||
|
nuitka_bool tmp_condition_result_1;
|
||
|
PyObject *tmp_operand_name_1;
|
||
|
PyObject *tmp_isinstance_inst_1;
|
||
|
PyObject *tmp_isinstance_cls_1;
|
||
|
PyObject *tmp_mvar_value_1;
|
||
|
CHECK_OBJECT( par_algorithm );
|
||
|
tmp_isinstance_inst_1 = par_algorithm;
|
||
|
tmp_mvar_value_1 = GET_STRING_DICT_VALUE( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain_Prehashed );
|
||
|
|
||
|
if (unlikely( tmp_mvar_value_1 == NULL ))
|
||
|
{
|
||
|
tmp_mvar_value_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_Prehashed );
|
||
|
}
|
||
|
|
||
|
if ( tmp_mvar_value_1 == NULL )
|
||
|
{
|
||
|
|
||
|
exception_type = PyExc_NameError;
|
||
|
Py_INCREF( exception_type );
|
||
|
exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "Prehashed" );
|
||
|
exception_tb = NULL;
|
||
|
NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
|
||
|
CHAIN_EXCEPTION( exception_value );
|
||
|
|
||
|
exception_lineno = 15;
|
||
|
type_description_1 = "oooo";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
|
||
|
tmp_isinstance_cls_1 = tmp_mvar_value_1;
|
||
|
tmp_res = Nuitka_IsInstance( tmp_isinstance_inst_1, tmp_isinstance_cls_1 );
|
||
|
if ( tmp_res == -1 )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
|
||
|
|
||
|
exception_lineno = 15;
|
||
|
type_description_1 = "oooo";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
tmp_operand_name_1 = ( tmp_res != 0 ) ? Py_True : Py_False;
|
||
|
tmp_res = CHECK_IF_TRUE( tmp_operand_name_1 );
|
||
|
if ( tmp_res == -1 )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
|
||
|
|
||
|
exception_lineno = 15;
|
||
|
type_description_1 = "oooo";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
tmp_condition_result_1 = ( tmp_res == 0 ) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
|
||
|
if ( tmp_condition_result_1 == NUITKA_BOOL_TRUE )
|
||
|
{
|
||
|
goto branch_yes_1;
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
goto branch_no_1;
|
||
|
}
|
||
|
branch_yes_1:;
|
||
|
{
|
||
|
PyObject *tmp_assign_source_1;
|
||
|
PyObject *tmp_called_name_1;
|
||
|
PyObject *tmp_source_name_1;
|
||
|
PyObject *tmp_mvar_value_2;
|
||
|
PyObject *tmp_args_element_name_1;
|
||
|
PyObject *tmp_args_element_name_2;
|
||
|
tmp_mvar_value_2 = GET_STRING_DICT_VALUE( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain_hashes );
|
||
|
|
||
|
if (unlikely( tmp_mvar_value_2 == NULL ))
|
||
|
{
|
||
|
tmp_mvar_value_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_hashes );
|
||
|
}
|
||
|
|
||
|
if ( tmp_mvar_value_2 == NULL )
|
||
|
{
|
||
|
|
||
|
exception_type = PyExc_NameError;
|
||
|
Py_INCREF( exception_type );
|
||
|
exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "hashes" );
|
||
|
exception_tb = NULL;
|
||
|
NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
|
||
|
CHAIN_EXCEPTION( exception_value );
|
||
|
|
||
|
exception_lineno = 16;
|
||
|
type_description_1 = "oooo";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
|
||
|
tmp_source_name_1 = tmp_mvar_value_2;
|
||
|
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_Hash );
|
||
|
if ( tmp_called_name_1 == NULL )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
|
||
|
|
||
|
exception_lineno = 16;
|
||
|
type_description_1 = "oooo";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
if ( par_algorithm == NULL )
|
||
|
{
|
||
|
Py_DECREF( tmp_called_name_1 );
|
||
|
exception_type = PyExc_UnboundLocalError;
|
||
|
Py_INCREF( exception_type );
|
||
|
exception_value = PyUnicode_FromFormat( "local variable '%s' referenced before assignment", "algorithm" );
|
||
|
exception_tb = NULL;
|
||
|
NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
|
||
|
CHAIN_EXCEPTION( exception_value );
|
||
|
|
||
|
exception_lineno = 16;
|
||
|
type_description_1 = "oooo";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
|
||
|
tmp_args_element_name_1 = par_algorithm;
|
||
|
if ( par_backend == NULL )
|
||
|
{
|
||
|
Py_DECREF( tmp_called_name_1 );
|
||
|
exception_type = PyExc_UnboundLocalError;
|
||
|
Py_INCREF( exception_type );
|
||
|
exception_value = PyUnicode_FromFormat( "local variable '%s' referenced before assignment", "backend" );
|
||
|
exception_tb = NULL;
|
||
|
NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
|
||
|
CHAIN_EXCEPTION( exception_value );
|
||
|
|
||
|
exception_lineno = 16;
|
||
|
type_description_1 = "oooo";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
|
||
|
tmp_args_element_name_2 = par_backend;
|
||
|
frame_989b334c66e4296003f93ed3b6b1d7a7->m_frame.f_lineno = 16;
|
||
|
{
|
||
|
PyObject *call_args[] = { tmp_args_element_name_1, tmp_args_element_name_2 };
|
||
|
tmp_assign_source_1 = CALL_FUNCTION_WITH_ARGS2( tmp_called_name_1, call_args );
|
||
|
}
|
||
|
|
||
|
Py_DECREF( tmp_called_name_1 );
|
||
|
if ( tmp_assign_source_1 == NULL )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
|
||
|
|
||
|
exception_lineno = 16;
|
||
|
type_description_1 = "oooo";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
assert( var_hash_ctx == NULL );
|
||
|
var_hash_ctx = tmp_assign_source_1;
|
||
|
|
||
|
}
|
||
|
{
|
||
|
PyObject *tmp_called_name_2;
|
||
|
PyObject *tmp_source_name_2;
|
||
|
PyObject *tmp_args_element_name_3;
|
||
|
CHECK_OBJECT( var_hash_ctx );
|
||
|
tmp_source_name_2 = var_hash_ctx;
|
||
|
tmp_called_name_2 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_update );
|
||
|
if ( tmp_called_name_2 == NULL )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
|
||
|
|
||
|
exception_lineno = 17;
|
||
|
type_description_1 = "oooo";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
if ( par_data == NULL )
|
||
|
{
|
||
|
Py_DECREF( tmp_called_name_2 );
|
||
|
exception_type = PyExc_UnboundLocalError;
|
||
|
Py_INCREF( exception_type );
|
||
|
exception_value = PyUnicode_FromFormat( "local variable '%s' referenced before assignment", "data" );
|
||
|
exception_tb = NULL;
|
||
|
NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
|
||
|
CHAIN_EXCEPTION( exception_value );
|
||
|
|
||
|
exception_lineno = 17;
|
||
|
type_description_1 = "oooo";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
|
||
|
tmp_args_element_name_3 = par_data;
|
||
|
frame_989b334c66e4296003f93ed3b6b1d7a7->m_frame.f_lineno = 17;
|
||
|
{
|
||
|
PyObject *call_args[] = { tmp_args_element_name_3 };
|
||
|
tmp_unused = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_2, call_args );
|
||
|
}
|
||
|
|
||
|
Py_DECREF( tmp_called_name_2 );
|
||
|
if ( tmp_unused == NULL )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
|
||
|
|
||
|
exception_lineno = 17;
|
||
|
type_description_1 = "oooo";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
Py_DECREF( tmp_unused );
|
||
|
}
|
||
|
{
|
||
|
PyObject *tmp_assign_source_2;
|
||
|
PyObject *tmp_called_instance_1;
|
||
|
if ( var_hash_ctx == NULL )
|
||
|
{
|
||
|
|
||
|
exception_type = PyExc_UnboundLocalError;
|
||
|
Py_INCREF( exception_type );
|
||
|
exception_value = PyUnicode_FromFormat( "local variable '%s' referenced before assignment", "hash_ctx" );
|
||
|
exception_tb = NULL;
|
||
|
NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
|
||
|
CHAIN_EXCEPTION( exception_value );
|
||
|
|
||
|
exception_lineno = 18;
|
||
|
type_description_1 = "oooo";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
|
||
|
tmp_called_instance_1 = var_hash_ctx;
|
||
|
frame_989b334c66e4296003f93ed3b6b1d7a7->m_frame.f_lineno = 18;
|
||
|
tmp_assign_source_2 = CALL_METHOD_NO_ARGS( tmp_called_instance_1, const_str_plain_finalize );
|
||
|
if ( tmp_assign_source_2 == NULL )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
|
||
|
|
||
|
exception_lineno = 18;
|
||
|
type_description_1 = "oooo";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
{
|
||
|
PyObject *old = par_data;
|
||
|
par_data = tmp_assign_source_2;
|
||
|
Py_XDECREF( old );
|
||
|
}
|
||
|
|
||
|
}
|
||
|
goto branch_end_1;
|
||
|
branch_no_1:;
|
||
|
{
|
||
|
PyObject *tmp_assign_source_3;
|
||
|
PyObject *tmp_source_name_3;
|
||
|
if ( par_algorithm == NULL )
|
||
|
{
|
||
|
|
||
|
exception_type = PyExc_UnboundLocalError;
|
||
|
Py_INCREF( exception_type );
|
||
|
exception_value = PyUnicode_FromFormat( "local variable '%s' referenced before assignment", "algorithm" );
|
||
|
exception_tb = NULL;
|
||
|
NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
|
||
|
CHAIN_EXCEPTION( exception_value );
|
||
|
|
||
|
exception_lineno = 20;
|
||
|
type_description_1 = "oooo";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
|
||
|
tmp_source_name_3 = par_algorithm;
|
||
|
tmp_assign_source_3 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain__algorithm );
|
||
|
if ( tmp_assign_source_3 == NULL )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
|
||
|
|
||
|
exception_lineno = 20;
|
||
|
type_description_1 = "oooo";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
{
|
||
|
PyObject *old = par_algorithm;
|
||
|
par_algorithm = tmp_assign_source_3;
|
||
|
Py_XDECREF( old );
|
||
|
}
|
||
|
|
||
|
}
|
||
|
branch_end_1:;
|
||
|
}
|
||
|
{
|
||
|
nuitka_bool tmp_condition_result_2;
|
||
|
PyObject *tmp_compexpr_left_1;
|
||
|
PyObject *tmp_compexpr_right_1;
|
||
|
PyObject *tmp_len_arg_1;
|
||
|
PyObject *tmp_source_name_4;
|
||
|
if ( par_data == NULL )
|
||
|
{
|
||
|
|
||
|
exception_type = PyExc_UnboundLocalError;
|
||
|
Py_INCREF( exception_type );
|
||
|
exception_value = PyUnicode_FromFormat( "local variable '%s' referenced before assignment", "data" );
|
||
|
exception_tb = NULL;
|
||
|
NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
|
||
|
CHAIN_EXCEPTION( exception_value );
|
||
|
|
||
|
exception_lineno = 22;
|
||
|
type_description_1 = "oooo";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
|
||
|
tmp_len_arg_1 = par_data;
|
||
|
tmp_compexpr_left_1 = BUILTIN_LEN( tmp_len_arg_1 );
|
||
|
if ( tmp_compexpr_left_1 == NULL )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
|
||
|
|
||
|
exception_lineno = 22;
|
||
|
type_description_1 = "oooo";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
if ( par_algorithm == NULL )
|
||
|
{
|
||
|
Py_DECREF( tmp_compexpr_left_1 );
|
||
|
exception_type = PyExc_UnboundLocalError;
|
||
|
Py_INCREF( exception_type );
|
||
|
exception_value = PyUnicode_FromFormat( "local variable '%s' referenced before assignment", "algorithm" );
|
||
|
exception_tb = NULL;
|
||
|
NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
|
||
|
CHAIN_EXCEPTION( exception_value );
|
||
|
|
||
|
exception_lineno = 22;
|
||
|
type_description_1 = "oooo";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
|
||
|
tmp_source_name_4 = par_algorithm;
|
||
|
tmp_compexpr_right_1 = LOOKUP_ATTRIBUTE( tmp_source_name_4, const_str_plain_digest_size );
|
||
|
if ( tmp_compexpr_right_1 == NULL )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
Py_DECREF( tmp_compexpr_left_1 );
|
||
|
|
||
|
exception_lineno = 22;
|
||
|
type_description_1 = "oooo";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
tmp_res = RICH_COMPARE_BOOL_NE( tmp_compexpr_left_1, tmp_compexpr_right_1 );
|
||
|
Py_DECREF( tmp_compexpr_left_1 );
|
||
|
Py_DECREF( tmp_compexpr_right_1 );
|
||
|
if ( tmp_res == -1 )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
|
||
|
|
||
|
exception_lineno = 22;
|
||
|
type_description_1 = "oooo";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
tmp_condition_result_2 = ( tmp_res != 0 ) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
|
||
|
if ( tmp_condition_result_2 == NUITKA_BOOL_TRUE )
|
||
|
{
|
||
|
goto branch_yes_2;
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
goto branch_no_2;
|
||
|
}
|
||
|
branch_yes_2:;
|
||
|
{
|
||
|
PyObject *tmp_raise_type_1;
|
||
|
PyObject *tmp_make_exception_arg_1;
|
||
|
tmp_make_exception_arg_1 = const_str_digest_5ce81634600177822ae5a0d5a4e46723;
|
||
|
frame_989b334c66e4296003f93ed3b6b1d7a7->m_frame.f_lineno = 23;
|
||
|
{
|
||
|
PyObject *call_args[] = { tmp_make_exception_arg_1 };
|
||
|
tmp_raise_type_1 = CALL_FUNCTION_WITH_ARGS1( PyExc_ValueError, call_args );
|
||
|
}
|
||
|
|
||
|
assert( !(tmp_raise_type_1 == NULL) );
|
||
|
exception_type = tmp_raise_type_1;
|
||
|
exception_lineno = 23;
|
||
|
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
|
||
|
type_description_1 = "oooo";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
branch_no_2:;
|
||
|
}
|
||
|
{
|
||
|
PyObject *tmp_tuple_element_1;
|
||
|
if ( par_data == NULL )
|
||
|
{
|
||
|
|
||
|
exception_type = PyExc_UnboundLocalError;
|
||
|
Py_INCREF( exception_type );
|
||
|
exception_value = PyUnicode_FromFormat( "local variable '%s' referenced before assignment", "data" );
|
||
|
exception_tb = NULL;
|
||
|
NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
|
||
|
CHAIN_EXCEPTION( exception_value );
|
||
|
|
||
|
exception_lineno = 28;
|
||
|
type_description_1 = "oooo";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
|
||
|
tmp_tuple_element_1 = par_data;
|
||
|
tmp_return_value = PyTuple_New( 2 );
|
||
|
Py_INCREF( tmp_tuple_element_1 );
|
||
|
PyTuple_SET_ITEM( tmp_return_value, 0, tmp_tuple_element_1 );
|
||
|
if ( par_algorithm == NULL )
|
||
|
{
|
||
|
Py_DECREF( tmp_return_value );
|
||
|
exception_type = PyExc_UnboundLocalError;
|
||
|
Py_INCREF( exception_type );
|
||
|
exception_value = PyUnicode_FromFormat( "local variable '%s' referenced before assignment", "algorithm" );
|
||
|
exception_tb = NULL;
|
||
|
NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
|
||
|
CHAIN_EXCEPTION( exception_value );
|
||
|
|
||
|
exception_lineno = 28;
|
||
|
type_description_1 = "oooo";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
|
||
|
tmp_tuple_element_1 = par_algorithm;
|
||
|
Py_INCREF( tmp_tuple_element_1 );
|
||
|
PyTuple_SET_ITEM( tmp_return_value, 1, tmp_tuple_element_1 );
|
||
|
goto frame_return_exit_1;
|
||
|
}
|
||
|
|
||
|
#if 0
|
||
|
RESTORE_FRAME_EXCEPTION( frame_989b334c66e4296003f93ed3b6b1d7a7 );
|
||
|
#endif
|
||
|
|
||
|
// Put the previous frame back on top.
|
||
|
popFrameStack();
|
||
|
|
||
|
goto frame_no_exception_1;
|
||
|
|
||
|
frame_return_exit_1:;
|
||
|
#if 0
|
||
|
RESTORE_FRAME_EXCEPTION( frame_989b334c66e4296003f93ed3b6b1d7a7 );
|
||
|
#endif
|
||
|
|
||
|
// Put the previous frame back on top.
|
||
|
popFrameStack();
|
||
|
|
||
|
goto try_return_handler_1;
|
||
|
|
||
|
frame_exception_exit_1:;
|
||
|
|
||
|
#if 0
|
||
|
RESTORE_FRAME_EXCEPTION( frame_989b334c66e4296003f93ed3b6b1d7a7 );
|
||
|
#endif
|
||
|
|
||
|
if ( exception_tb == NULL )
|
||
|
{
|
||
|
exception_tb = MAKE_TRACEBACK( frame_989b334c66e4296003f93ed3b6b1d7a7, exception_lineno );
|
||
|
}
|
||
|
else if ( exception_tb->tb_frame != &frame_989b334c66e4296003f93ed3b6b1d7a7->m_frame )
|
||
|
{
|
||
|
exception_tb = ADD_TRACEBACK( exception_tb, frame_989b334c66e4296003f93ed3b6b1d7a7, exception_lineno );
|
||
|
}
|
||
|
|
||
|
// Attachs locals to frame if any.
|
||
|
Nuitka_Frame_AttachLocals(
|
||
|
(struct Nuitka_FrameObject *)frame_989b334c66e4296003f93ed3b6b1d7a7,
|
||
|
type_description_1,
|
||
|
par_backend,
|
||
|
par_data,
|
||
|
par_algorithm,
|
||
|
var_hash_ctx
|
||
|
);
|
||
|
|
||
|
|
||
|
// Release cached frame.
|
||
|
if ( frame_989b334c66e4296003f93ed3b6b1d7a7 == cache_frame_989b334c66e4296003f93ed3b6b1d7a7 )
|
||
|
{
|
||
|
Py_DECREF( frame_989b334c66e4296003f93ed3b6b1d7a7 );
|
||
|
}
|
||
|
cache_frame_989b334c66e4296003f93ed3b6b1d7a7 = NULL;
|
||
|
|
||
|
assertFrameObject( frame_989b334c66e4296003f93ed3b6b1d7a7 );
|
||
|
|
||
|
// Put the previous frame back on top.
|
||
|
popFrameStack();
|
||
|
|
||
|
// Return the error.
|
||
|
goto try_except_handler_1;
|
||
|
|
||
|
frame_no_exception_1:;
|
||
|
// tried codes exits in all cases
|
||
|
NUITKA_CANNOT_GET_HERE( cryptography$hazmat$backends$openssl$utils$$$function_1__calculate_digest_and_algorithm );
|
||
|
return NULL;
|
||
|
// Return handler code:
|
||
|
try_return_handler_1:;
|
||
|
{
|
||
|
Py_XDECREF( par_backend );
|
||
|
par_backend = NULL;
|
||
|
|
||
|
}
|
||
|
{
|
||
|
Py_XDECREF( par_data );
|
||
|
par_data = NULL;
|
||
|
|
||
|
}
|
||
|
{
|
||
|
Py_XDECREF( par_algorithm );
|
||
|
par_algorithm = NULL;
|
||
|
|
||
|
}
|
||
|
{
|
||
|
Py_XDECREF( var_hash_ctx );
|
||
|
var_hash_ctx = NULL;
|
||
|
|
||
|
}
|
||
|
{
|
||
|
goto function_return_exit;
|
||
|
}
|
||
|
// Exception handler code:
|
||
|
try_except_handler_1:;
|
||
|
exception_keeper_type_1 = exception_type;
|
||
|
exception_keeper_value_1 = exception_value;
|
||
|
exception_keeper_tb_1 = exception_tb;
|
||
|
exception_keeper_lineno_1 = exception_lineno;
|
||
|
exception_type = NULL;
|
||
|
exception_value = NULL;
|
||
|
exception_tb = NULL;
|
||
|
exception_lineno = 0;
|
||
|
|
||
|
{
|
||
|
Py_XDECREF( par_backend );
|
||
|
par_backend = NULL;
|
||
|
|
||
|
}
|
||
|
{
|
||
|
Py_XDECREF( par_data );
|
||
|
par_data = NULL;
|
||
|
|
||
|
}
|
||
|
{
|
||
|
Py_XDECREF( par_algorithm );
|
||
|
par_algorithm = NULL;
|
||
|
|
||
|
}
|
||
|
{
|
||
|
Py_XDECREF( var_hash_ctx );
|
||
|
var_hash_ctx = NULL;
|
||
|
|
||
|
}
|
||
|
{
|
||
|
// Re-raise.
|
||
|
exception_type = exception_keeper_type_1;
|
||
|
exception_value = exception_keeper_value_1;
|
||
|
exception_tb = exception_keeper_tb_1;
|
||
|
exception_lineno = exception_keeper_lineno_1;
|
||
|
|
||
|
goto function_exception_exit;
|
||
|
}
|
||
|
// End of try:
|
||
|
}
|
||
|
|
||
|
// Return statement must have exited already.
|
||
|
NUITKA_CANNOT_GET_HERE( cryptography$hazmat$backends$openssl$utils$$$function_1__calculate_digest_and_algorithm );
|
||
|
return NULL;
|
||
|
|
||
|
function_exception_exit:
|
||
|
assert( exception_type );
|
||
|
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
|
||
|
|
||
|
return NULL;
|
||
|
function_return_exit:
|
||
|
|
||
|
CHECK_OBJECT( tmp_return_value );
|
||
|
assert( had_error || !ERROR_OCCURRED() );
|
||
|
return tmp_return_value;
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
static PyObject *impl_cryptography$hazmat$backends$openssl$utils$$$function_2__check_not_prehashed( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
|
||
|
{
|
||
|
// Preserve error status for checks
|
||
|
#ifndef __NUITKA_NO_ASSERT__
|
||
|
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
|
||
|
#endif
|
||
|
|
||
|
// Local variable declarations.
|
||
|
PyObject *par_signature_algorithm = python_pars[ 0 ];
|
||
|
struct Nuitka_FrameObject *frame_166691b41ca88268abd9861de93535aa;
|
||
|
NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL;
|
||
|
PyObject *exception_type = NULL;
|
||
|
PyObject *exception_value = NULL;
|
||
|
PyTracebackObject *exception_tb = NULL;
|
||
|
NUITKA_MAY_BE_UNUSED int exception_lineno = 0;
|
||
|
int tmp_res;
|
||
|
static struct Nuitka_FrameObject *cache_frame_166691b41ca88268abd9861de93535aa = NULL;
|
||
|
PyObject *tmp_return_value = NULL;
|
||
|
PyObject *exception_keeper_type_1;
|
||
|
PyObject *exception_keeper_value_1;
|
||
|
PyTracebackObject *exception_keeper_tb_1;
|
||
|
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
|
||
|
|
||
|
// Actual function code.
|
||
|
{
|
||
|
// Tried code:
|
||
|
MAKE_OR_REUSE_FRAME( cache_frame_166691b41ca88268abd9861de93535aa, codeobj_166691b41ca88268abd9861de93535aa, module_cryptography$hazmat$backends$openssl$utils, sizeof(void *) );
|
||
|
frame_166691b41ca88268abd9861de93535aa = cache_frame_166691b41ca88268abd9861de93535aa;
|
||
|
|
||
|
// Push the new frame as the currently active one.
|
||
|
pushFrameStack( frame_166691b41ca88268abd9861de93535aa );
|
||
|
|
||
|
// Mark the frame object as in use, ref count 1 will be up for reuse.
|
||
|
assert( Py_REFCNT( frame_166691b41ca88268abd9861de93535aa ) == 2 ); // Frame stack
|
||
|
|
||
|
// Framed code:
|
||
|
{
|
||
|
nuitka_bool tmp_condition_result_1;
|
||
|
PyObject *tmp_isinstance_inst_1;
|
||
|
PyObject *tmp_isinstance_cls_1;
|
||
|
PyObject *tmp_mvar_value_1;
|
||
|
CHECK_OBJECT( par_signature_algorithm );
|
||
|
tmp_isinstance_inst_1 = par_signature_algorithm;
|
||
|
tmp_mvar_value_1 = GET_STRING_DICT_VALUE( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain_Prehashed );
|
||
|
|
||
|
if (unlikely( tmp_mvar_value_1 == NULL ))
|
||
|
{
|
||
|
tmp_mvar_value_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_Prehashed );
|
||
|
}
|
||
|
|
||
|
if ( tmp_mvar_value_1 == NULL )
|
||
|
{
|
||
|
|
||
|
exception_type = PyExc_NameError;
|
||
|
Py_INCREF( exception_type );
|
||
|
exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "Prehashed" );
|
||
|
exception_tb = NULL;
|
||
|
NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
|
||
|
CHAIN_EXCEPTION( exception_value );
|
||
|
|
||
|
exception_lineno = 32;
|
||
|
type_description_1 = "o";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
|
||
|
tmp_isinstance_cls_1 = tmp_mvar_value_1;
|
||
|
tmp_res = Nuitka_IsInstance( tmp_isinstance_inst_1, tmp_isinstance_cls_1 );
|
||
|
if ( tmp_res == -1 )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
|
||
|
|
||
|
exception_lineno = 32;
|
||
|
type_description_1 = "o";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
tmp_condition_result_1 = ( tmp_res != 0 ) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
|
||
|
if ( tmp_condition_result_1 == NUITKA_BOOL_TRUE )
|
||
|
{
|
||
|
goto branch_yes_1;
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
goto branch_no_1;
|
||
|
}
|
||
|
branch_yes_1:;
|
||
|
{
|
||
|
PyObject *tmp_raise_type_1;
|
||
|
PyObject *tmp_make_exception_arg_1;
|
||
|
tmp_make_exception_arg_1 = const_str_digest_ee6822ba158fbc94c25a6b301e592f99;
|
||
|
frame_166691b41ca88268abd9861de93535aa->m_frame.f_lineno = 33;
|
||
|
{
|
||
|
PyObject *call_args[] = { tmp_make_exception_arg_1 };
|
||
|
tmp_raise_type_1 = CALL_FUNCTION_WITH_ARGS1( PyExc_TypeError, call_args );
|
||
|
}
|
||
|
|
||
|
assert( !(tmp_raise_type_1 == NULL) );
|
||
|
exception_type = tmp_raise_type_1;
|
||
|
exception_lineno = 33;
|
||
|
RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb );
|
||
|
type_description_1 = "o";
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
branch_no_1:;
|
||
|
}
|
||
|
|
||
|
#if 0
|
||
|
RESTORE_FRAME_EXCEPTION( frame_166691b41ca88268abd9861de93535aa );
|
||
|
#endif
|
||
|
|
||
|
// Put the previous frame back on top.
|
||
|
popFrameStack();
|
||
|
|
||
|
goto frame_no_exception_1;
|
||
|
|
||
|
frame_exception_exit_1:;
|
||
|
|
||
|
#if 0
|
||
|
RESTORE_FRAME_EXCEPTION( frame_166691b41ca88268abd9861de93535aa );
|
||
|
#endif
|
||
|
|
||
|
if ( exception_tb == NULL )
|
||
|
{
|
||
|
exception_tb = MAKE_TRACEBACK( frame_166691b41ca88268abd9861de93535aa, exception_lineno );
|
||
|
}
|
||
|
else if ( exception_tb->tb_frame != &frame_166691b41ca88268abd9861de93535aa->m_frame )
|
||
|
{
|
||
|
exception_tb = ADD_TRACEBACK( exception_tb, frame_166691b41ca88268abd9861de93535aa, exception_lineno );
|
||
|
}
|
||
|
|
||
|
// Attachs locals to frame if any.
|
||
|
Nuitka_Frame_AttachLocals(
|
||
|
(struct Nuitka_FrameObject *)frame_166691b41ca88268abd9861de93535aa,
|
||
|
type_description_1,
|
||
|
par_signature_algorithm
|
||
|
);
|
||
|
|
||
|
|
||
|
// Release cached frame.
|
||
|
if ( frame_166691b41ca88268abd9861de93535aa == cache_frame_166691b41ca88268abd9861de93535aa )
|
||
|
{
|
||
|
Py_DECREF( frame_166691b41ca88268abd9861de93535aa );
|
||
|
}
|
||
|
cache_frame_166691b41ca88268abd9861de93535aa = NULL;
|
||
|
|
||
|
assertFrameObject( frame_166691b41ca88268abd9861de93535aa );
|
||
|
|
||
|
// Put the previous frame back on top.
|
||
|
popFrameStack();
|
||
|
|
||
|
// Return the error.
|
||
|
goto try_except_handler_1;
|
||
|
|
||
|
frame_no_exception_1:;
|
||
|
{
|
||
|
tmp_return_value = Py_None;
|
||
|
Py_INCREF( tmp_return_value );
|
||
|
goto try_return_handler_1;
|
||
|
}
|
||
|
// tried codes exits in all cases
|
||
|
NUITKA_CANNOT_GET_HERE( cryptography$hazmat$backends$openssl$utils$$$function_2__check_not_prehashed );
|
||
|
return NULL;
|
||
|
// Return handler code:
|
||
|
try_return_handler_1:;
|
||
|
{
|
||
|
CHECK_OBJECT( (PyObject *)par_signature_algorithm );
|
||
|
Py_DECREF( par_signature_algorithm );
|
||
|
par_signature_algorithm = NULL;
|
||
|
|
||
|
}
|
||
|
{
|
||
|
goto function_return_exit;
|
||
|
}
|
||
|
// Exception handler code:
|
||
|
try_except_handler_1:;
|
||
|
exception_keeper_type_1 = exception_type;
|
||
|
exception_keeper_value_1 = exception_value;
|
||
|
exception_keeper_tb_1 = exception_tb;
|
||
|
exception_keeper_lineno_1 = exception_lineno;
|
||
|
exception_type = NULL;
|
||
|
exception_value = NULL;
|
||
|
exception_tb = NULL;
|
||
|
exception_lineno = 0;
|
||
|
|
||
|
{
|
||
|
CHECK_OBJECT( (PyObject *)par_signature_algorithm );
|
||
|
Py_DECREF( par_signature_algorithm );
|
||
|
par_signature_algorithm = NULL;
|
||
|
|
||
|
}
|
||
|
{
|
||
|
// Re-raise.
|
||
|
exception_type = exception_keeper_type_1;
|
||
|
exception_value = exception_keeper_value_1;
|
||
|
exception_tb = exception_keeper_tb_1;
|
||
|
exception_lineno = exception_keeper_lineno_1;
|
||
|
|
||
|
goto function_exception_exit;
|
||
|
}
|
||
|
// End of try:
|
||
|
}
|
||
|
|
||
|
// Return statement must have exited already.
|
||
|
NUITKA_CANNOT_GET_HERE( cryptography$hazmat$backends$openssl$utils$$$function_2__check_not_prehashed );
|
||
|
return NULL;
|
||
|
|
||
|
function_exception_exit:
|
||
|
assert( exception_type );
|
||
|
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
|
||
|
|
||
|
return NULL;
|
||
|
function_return_exit:
|
||
|
|
||
|
CHECK_OBJECT( tmp_return_value );
|
||
|
assert( had_error || !ERROR_OCCURRED() );
|
||
|
return tmp_return_value;
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
static PyObject *impl_cryptography$hazmat$backends$openssl$utils$$$function_3__warn_sign_verify_deprecated( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
|
||
|
{
|
||
|
// Preserve error status for checks
|
||
|
#ifndef __NUITKA_NO_ASSERT__
|
||
|
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
|
||
|
#endif
|
||
|
|
||
|
// Local variable declarations.
|
||
|
struct Nuitka_FrameObject *frame_adae0186e2e66f575bb528ec2b18b25f;
|
||
|
NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL;
|
||
|
NUITKA_MAY_BE_UNUSED PyObject *tmp_unused;
|
||
|
PyObject *exception_type = NULL;
|
||
|
PyObject *exception_value = NULL;
|
||
|
PyTracebackObject *exception_tb = NULL;
|
||
|
NUITKA_MAY_BE_UNUSED int exception_lineno = 0;
|
||
|
static struct Nuitka_FrameObject *cache_frame_adae0186e2e66f575bb528ec2b18b25f = NULL;
|
||
|
PyObject *tmp_return_value = NULL;
|
||
|
|
||
|
// Actual function code.
|
||
|
MAKE_OR_REUSE_FRAME( cache_frame_adae0186e2e66f575bb528ec2b18b25f, codeobj_adae0186e2e66f575bb528ec2b18b25f, module_cryptography$hazmat$backends$openssl$utils, 0 );
|
||
|
frame_adae0186e2e66f575bb528ec2b18b25f = cache_frame_adae0186e2e66f575bb528ec2b18b25f;
|
||
|
|
||
|
// Push the new frame as the currently active one.
|
||
|
pushFrameStack( frame_adae0186e2e66f575bb528ec2b18b25f );
|
||
|
|
||
|
// Mark the frame object as in use, ref count 1 will be up for reuse.
|
||
|
assert( Py_REFCNT( frame_adae0186e2e66f575bb528ec2b18b25f ) == 2 ); // Frame stack
|
||
|
|
||
|
// Framed code:
|
||
|
{
|
||
|
PyObject *tmp_called_name_1;
|
||
|
PyObject *tmp_source_name_1;
|
||
|
PyObject *tmp_mvar_value_1;
|
||
|
PyObject *tmp_args_name_1;
|
||
|
PyObject *tmp_tuple_element_1;
|
||
|
PyObject *tmp_source_name_2;
|
||
|
PyObject *tmp_mvar_value_2;
|
||
|
PyObject *tmp_kw_name_1;
|
||
|
tmp_mvar_value_1 = GET_STRING_DICT_VALUE( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain_warnings );
|
||
|
|
||
|
if (unlikely( tmp_mvar_value_1 == NULL ))
|
||
|
{
|
||
|
tmp_mvar_value_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_warnings );
|
||
|
}
|
||
|
|
||
|
if ( tmp_mvar_value_1 == NULL )
|
||
|
{
|
||
|
|
||
|
exception_type = PyExc_NameError;
|
||
|
Py_INCREF( exception_type );
|
||
|
exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "warnings" );
|
||
|
exception_tb = NULL;
|
||
|
NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
|
||
|
CHAIN_EXCEPTION( exception_value );
|
||
|
|
||
|
exception_lineno = 40;
|
||
|
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
|
||
|
tmp_source_name_1 = tmp_mvar_value_1;
|
||
|
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_warn );
|
||
|
if ( tmp_called_name_1 == NULL )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
|
||
|
|
||
|
exception_lineno = 40;
|
||
|
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
tmp_tuple_element_1 = const_str_digest_b5ff1ed078f6189b19f1987693fa19e0;
|
||
|
tmp_args_name_1 = PyTuple_New( 2 );
|
||
|
Py_INCREF( tmp_tuple_element_1 );
|
||
|
PyTuple_SET_ITEM( tmp_args_name_1, 0, tmp_tuple_element_1 );
|
||
|
tmp_mvar_value_2 = GET_STRING_DICT_VALUE( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain_utils );
|
||
|
|
||
|
if (unlikely( tmp_mvar_value_2 == NULL ))
|
||
|
{
|
||
|
tmp_mvar_value_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_utils );
|
||
|
}
|
||
|
|
||
|
if ( tmp_mvar_value_2 == NULL )
|
||
|
{
|
||
|
Py_DECREF( tmp_called_name_1 );
|
||
|
Py_DECREF( tmp_args_name_1 );
|
||
|
exception_type = PyExc_NameError;
|
||
|
Py_INCREF( exception_type );
|
||
|
exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "utils" );
|
||
|
exception_tb = NULL;
|
||
|
NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
|
||
|
CHAIN_EXCEPTION( exception_value );
|
||
|
|
||
|
exception_lineno = 43;
|
||
|
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
|
||
|
tmp_source_name_2 = tmp_mvar_value_2;
|
||
|
tmp_tuple_element_1 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_PersistentlyDeprecated );
|
||
|
if ( tmp_tuple_element_1 == NULL )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
Py_DECREF( tmp_called_name_1 );
|
||
|
Py_DECREF( tmp_args_name_1 );
|
||
|
|
||
|
exception_lineno = 43;
|
||
|
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
PyTuple_SET_ITEM( tmp_args_name_1, 1, tmp_tuple_element_1 );
|
||
|
tmp_kw_name_1 = PyDict_Copy( const_dict_2254aca578e492e580f4e46a40647b9b );
|
||
|
frame_adae0186e2e66f575bb528ec2b18b25f->m_frame.f_lineno = 40;
|
||
|
tmp_unused = CALL_FUNCTION( tmp_called_name_1, tmp_args_name_1, tmp_kw_name_1 );
|
||
|
Py_DECREF( tmp_called_name_1 );
|
||
|
Py_DECREF( tmp_args_name_1 );
|
||
|
Py_DECREF( tmp_kw_name_1 );
|
||
|
if ( tmp_unused == NULL )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
|
||
|
|
||
|
exception_lineno = 40;
|
||
|
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
Py_DECREF( tmp_unused );
|
||
|
}
|
||
|
|
||
|
#if 0
|
||
|
RESTORE_FRAME_EXCEPTION( frame_adae0186e2e66f575bb528ec2b18b25f );
|
||
|
#endif
|
||
|
|
||
|
// Put the previous frame back on top.
|
||
|
popFrameStack();
|
||
|
|
||
|
goto frame_no_exception_1;
|
||
|
|
||
|
frame_exception_exit_1:;
|
||
|
|
||
|
#if 0
|
||
|
RESTORE_FRAME_EXCEPTION( frame_adae0186e2e66f575bb528ec2b18b25f );
|
||
|
#endif
|
||
|
|
||
|
if ( exception_tb == NULL )
|
||
|
{
|
||
|
exception_tb = MAKE_TRACEBACK( frame_adae0186e2e66f575bb528ec2b18b25f, exception_lineno );
|
||
|
}
|
||
|
else if ( exception_tb->tb_frame != &frame_adae0186e2e66f575bb528ec2b18b25f->m_frame )
|
||
|
{
|
||
|
exception_tb = ADD_TRACEBACK( exception_tb, frame_adae0186e2e66f575bb528ec2b18b25f, exception_lineno );
|
||
|
}
|
||
|
|
||
|
// Attachs locals to frame if any.
|
||
|
Nuitka_Frame_AttachLocals(
|
||
|
(struct Nuitka_FrameObject *)frame_adae0186e2e66f575bb528ec2b18b25f,
|
||
|
type_description_1
|
||
|
);
|
||
|
|
||
|
|
||
|
// Release cached frame.
|
||
|
if ( frame_adae0186e2e66f575bb528ec2b18b25f == cache_frame_adae0186e2e66f575bb528ec2b18b25f )
|
||
|
{
|
||
|
Py_DECREF( frame_adae0186e2e66f575bb528ec2b18b25f );
|
||
|
}
|
||
|
cache_frame_adae0186e2e66f575bb528ec2b18b25f = NULL;
|
||
|
|
||
|
assertFrameObject( frame_adae0186e2e66f575bb528ec2b18b25f );
|
||
|
|
||
|
// Put the previous frame back on top.
|
||
|
popFrameStack();
|
||
|
|
||
|
// Return the error.
|
||
|
goto function_exception_exit;
|
||
|
|
||
|
frame_no_exception_1:;
|
||
|
{
|
||
|
tmp_return_value = Py_None;
|
||
|
Py_INCREF( tmp_return_value );
|
||
|
goto function_return_exit;
|
||
|
}
|
||
|
|
||
|
// Return statement must have exited already.
|
||
|
NUITKA_CANNOT_GET_HERE( cryptography$hazmat$backends$openssl$utils$$$function_3__warn_sign_verify_deprecated );
|
||
|
return NULL;
|
||
|
|
||
|
function_exception_exit:
|
||
|
assert( exception_type );
|
||
|
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
|
||
|
|
||
|
return NULL;
|
||
|
function_return_exit:
|
||
|
|
||
|
CHECK_OBJECT( tmp_return_value );
|
||
|
assert( had_error || !ERROR_OCCURRED() );
|
||
|
return tmp_return_value;
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
static PyObject *MAKE_FUNCTION_cryptography$hazmat$backends$openssl$utils$$$function_1__calculate_digest_and_algorithm( )
|
||
|
{
|
||
|
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
|
||
|
impl_cryptography$hazmat$backends$openssl$utils$$$function_1__calculate_digest_and_algorithm,
|
||
|
const_str_plain__calculate_digest_and_algorithm,
|
||
|
#if PYTHON_VERSION >= 300
|
||
|
NULL,
|
||
|
#endif
|
||
|
codeobj_989b334c66e4296003f93ed3b6b1d7a7,
|
||
|
NULL,
|
||
|
#if PYTHON_VERSION >= 300
|
||
|
NULL,
|
||
|
NULL,
|
||
|
#endif
|
||
|
module_cryptography$hazmat$backends$openssl$utils,
|
||
|
NULL,
|
||
|
0
|
||
|
);
|
||
|
|
||
|
return (PyObject *)result;
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
static PyObject *MAKE_FUNCTION_cryptography$hazmat$backends$openssl$utils$$$function_2__check_not_prehashed( )
|
||
|
{
|
||
|
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
|
||
|
impl_cryptography$hazmat$backends$openssl$utils$$$function_2__check_not_prehashed,
|
||
|
const_str_plain__check_not_prehashed,
|
||
|
#if PYTHON_VERSION >= 300
|
||
|
NULL,
|
||
|
#endif
|
||
|
codeobj_166691b41ca88268abd9861de93535aa,
|
||
|
NULL,
|
||
|
#if PYTHON_VERSION >= 300
|
||
|
NULL,
|
||
|
NULL,
|
||
|
#endif
|
||
|
module_cryptography$hazmat$backends$openssl$utils,
|
||
|
NULL,
|
||
|
0
|
||
|
);
|
||
|
|
||
|
return (PyObject *)result;
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
static PyObject *MAKE_FUNCTION_cryptography$hazmat$backends$openssl$utils$$$function_3__warn_sign_verify_deprecated( )
|
||
|
{
|
||
|
struct Nuitka_FunctionObject *result = Nuitka_Function_New(
|
||
|
impl_cryptography$hazmat$backends$openssl$utils$$$function_3__warn_sign_verify_deprecated,
|
||
|
const_str_plain__warn_sign_verify_deprecated,
|
||
|
#if PYTHON_VERSION >= 300
|
||
|
NULL,
|
||
|
#endif
|
||
|
codeobj_adae0186e2e66f575bb528ec2b18b25f,
|
||
|
NULL,
|
||
|
#if PYTHON_VERSION >= 300
|
||
|
NULL,
|
||
|
NULL,
|
||
|
#endif
|
||
|
module_cryptography$hazmat$backends$openssl$utils,
|
||
|
NULL,
|
||
|
0
|
||
|
);
|
||
|
|
||
|
return (PyObject *)result;
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
#if PYTHON_VERSION >= 300
|
||
|
static struct PyModuleDef mdef_cryptography$hazmat$backends$openssl$utils =
|
||
|
{
|
||
|
PyModuleDef_HEAD_INIT,
|
||
|
"cryptography.hazmat.backends.openssl.utils", /* m_name */
|
||
|
NULL, /* m_doc */
|
||
|
-1, /* m_size */
|
||
|
NULL, /* m_methods */
|
||
|
NULL, /* m_reload */
|
||
|
NULL, /* m_traverse */
|
||
|
NULL, /* m_clear */
|
||
|
NULL, /* m_free */
|
||
|
};
|
||
|
#endif
|
||
|
|
||
|
extern PyObject *const_str_plain___package__;
|
||
|
|
||
|
#if PYTHON_VERSION >= 300
|
||
|
extern PyObject *const_str_dot;
|
||
|
|
||
|
extern PyObject *const_str_plain___loader__;
|
||
|
extern PyObject *metapath_based_loader;
|
||
|
#endif
|
||
|
|
||
|
#if PYTHON_VERSION >= 340
|
||
|
extern PyObject *const_str_plain___spec__;
|
||
|
extern PyObject *const_str_plain__initializing;
|
||
|
#endif
|
||
|
|
||
|
extern void _initCompiledCellType();
|
||
|
extern void _initCompiledGeneratorType();
|
||
|
extern void _initCompiledFunctionType();
|
||
|
extern void _initCompiledMethodType();
|
||
|
extern void _initCompiledFrameType();
|
||
|
#if PYTHON_VERSION >= 350
|
||
|
extern void _initCompiledCoroutineTypes();
|
||
|
#endif
|
||
|
#if PYTHON_VERSION >= 360
|
||
|
extern void _initCompiledAsyncgenTypes();
|
||
|
#endif
|
||
|
|
||
|
// The exported interface to CPython. On import of the module, this function
|
||
|
// gets called. It has to have an exact function name, in cases it's a shared
|
||
|
// library export. This is hidden behind the MOD_INIT_DECL.
|
||
|
|
||
|
MOD_INIT_DECL( cryptography$hazmat$backends$openssl$utils )
|
||
|
{
|
||
|
#if defined(_NUITKA_EXE) || PYTHON_VERSION >= 300
|
||
|
static bool _init_done = false;
|
||
|
|
||
|
// Modules might be imported repeatedly, which is to be ignored.
|
||
|
if ( _init_done )
|
||
|
{
|
||
|
return MOD_RETURN_VALUE( module_cryptography$hazmat$backends$openssl$utils );
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
_init_done = true;
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
#ifdef _NUITKA_MODULE
|
||
|
// In case of a stand alone extension module, need to call initialization
|
||
|
// the init here because that's the first and only time we are going to get
|
||
|
// called here.
|
||
|
|
||
|
// Initialize the constant values used.
|
||
|
_initBuiltinModule();
|
||
|
createGlobalConstants();
|
||
|
|
||
|
/* Initialize the compiled types of Nuitka. */
|
||
|
_initCompiledCellType();
|
||
|
_initCompiledGeneratorType();
|
||
|
_initCompiledFunctionType();
|
||
|
_initCompiledMethodType();
|
||
|
_initCompiledFrameType();
|
||
|
#if PYTHON_VERSION >= 350
|
||
|
_initCompiledCoroutineTypes();
|
||
|
#endif
|
||
|
#if PYTHON_VERSION >= 360
|
||
|
_initCompiledAsyncgenTypes();
|
||
|
#endif
|
||
|
|
||
|
#if PYTHON_VERSION < 300
|
||
|
_initSlotCompare();
|
||
|
#endif
|
||
|
#if PYTHON_VERSION >= 270
|
||
|
_initSlotIternext();
|
||
|
#endif
|
||
|
|
||
|
patchBuiltinModule();
|
||
|
patchTypeComparison();
|
||
|
|
||
|
// Enable meta path based loader if not already done.
|
||
|
#ifdef _NUITKA_TRACE
|
||
|
puts("cryptography.hazmat.backends.openssl.utils: Calling setupMetaPathBasedLoader().");
|
||
|
#endif
|
||
|
setupMetaPathBasedLoader();
|
||
|
|
||
|
#if PYTHON_VERSION >= 300
|
||
|
patchInspectModule();
|
||
|
#endif
|
||
|
|
||
|
#endif
|
||
|
|
||
|
/* The constants only used by this module are created now. */
|
||
|
#ifdef _NUITKA_TRACE
|
||
|
puts("cryptography.hazmat.backends.openssl.utils: Calling createModuleConstants().");
|
||
|
#endif
|
||
|
createModuleConstants();
|
||
|
|
||
|
/* The code objects used by this module are created now. */
|
||
|
#ifdef _NUITKA_TRACE
|
||
|
puts("cryptography.hazmat.backends.openssl.utils: Calling createModuleCodeObjects().");
|
||
|
#endif
|
||
|
createModuleCodeObjects();
|
||
|
|
||
|
// puts( "in initcryptography$hazmat$backends$openssl$utils" );
|
||
|
|
||
|
// Create the module object first. There are no methods initially, all are
|
||
|
// added dynamically in actual code only. Also no "__doc__" is initially
|
||
|
// set at this time, as it could not contain NUL characters this way, they
|
||
|
// are instead set in early module code. No "self" for modules, we have no
|
||
|
// use for it.
|
||
|
#if PYTHON_VERSION < 300
|
||
|
module_cryptography$hazmat$backends$openssl$utils = Py_InitModule4(
|
||
|
"cryptography.hazmat.backends.openssl.utils", // Module Name
|
||
|
NULL, // No methods initially, all are added
|
||
|
// dynamically in actual module code only.
|
||
|
NULL, // No "__doc__" is initially set, as it could
|
||
|
// not contain NUL this way, added early in
|
||
|
// actual code.
|
||
|
NULL, // No self for modules, we don't use it.
|
||
|
PYTHON_API_VERSION
|
||
|
);
|
||
|
#else
|
||
|
|
||
|
module_cryptography$hazmat$backends$openssl$utils = PyModule_Create( &mdef_cryptography$hazmat$backends$openssl$utils );
|
||
|
#endif
|
||
|
|
||
|
moduledict_cryptography$hazmat$backends$openssl$utils = MODULE_DICT( module_cryptography$hazmat$backends$openssl$utils );
|
||
|
|
||
|
// Update "__package__" value to what it ought to be.
|
||
|
{
|
||
|
#if 0
|
||
|
PyObject *module_name = GET_STRING_DICT_VALUE( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain___name__ );
|
||
|
|
||
|
UPDATE_STRING_DICT1(
|
||
|
moduledict_cryptography$hazmat$backends$openssl$utils,
|
||
|
(Nuitka_StringObject *)const_str_plain___package__,
|
||
|
module_name
|
||
|
);
|
||
|
|
||
|
#else
|
||
|
|
||
|
#if PYTHON_VERSION < 300
|
||
|
PyObject *module_name = GET_STRING_DICT_VALUE( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain___name__ );
|
||
|
char const *module_name_cstr = PyString_AS_STRING( module_name );
|
||
|
|
||
|
char const *last_dot = strrchr( module_name_cstr, '.' );
|
||
|
|
||
|
if ( last_dot != NULL )
|
||
|
{
|
||
|
UPDATE_STRING_DICT1(
|
||
|
moduledict_cryptography$hazmat$backends$openssl$utils,
|
||
|
(Nuitka_StringObject *)const_str_plain___package__,
|
||
|
PyString_FromStringAndSize( module_name_cstr, last_dot - module_name_cstr )
|
||
|
);
|
||
|
}
|
||
|
#else
|
||
|
PyObject *module_name = GET_STRING_DICT_VALUE( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain___name__ );
|
||
|
Py_ssize_t dot_index = PyUnicode_Find( module_name, const_str_dot, 0, PyUnicode_GetLength( module_name ), -1 );
|
||
|
|
||
|
if ( dot_index != -1 )
|
||
|
{
|
||
|
UPDATE_STRING_DICT1(
|
||
|
moduledict_cryptography$hazmat$backends$openssl$utils,
|
||
|
(Nuitka_StringObject *)const_str_plain___package__,
|
||
|
PyUnicode_Substring( module_name, 0, dot_index )
|
||
|
);
|
||
|
}
|
||
|
#endif
|
||
|
#endif
|
||
|
}
|
||
|
|
||
|
CHECK_OBJECT( module_cryptography$hazmat$backends$openssl$utils );
|
||
|
|
||
|
// Seems to work for Python2.7 out of the box, but for Python3, the module
|
||
|
// doesn't automatically enter "sys.modules", so do it manually.
|
||
|
#if PYTHON_VERSION >= 300
|
||
|
{
|
||
|
int r = PyObject_SetItem( PySys_GetObject( (char *)"modules" ), const_str_digest_626b18d63126fb4fc2b4b00829f745cc, module_cryptography$hazmat$backends$openssl$utils );
|
||
|
|
||
|
assert( r != -1 );
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
// For deep importing of a module we need to have "__builtins__", so we set
|
||
|
// it ourselves in the same way than CPython does. Note: This must be done
|
||
|
// before the frame object is allocated, or else it may fail.
|
||
|
|
||
|
if ( GET_STRING_DICT_VALUE( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain___builtins__ ) == NULL )
|
||
|
{
|
||
|
PyObject *value = (PyObject *)builtin_module;
|
||
|
|
||
|
// Check if main module, not a dict then but the module itself.
|
||
|
#if !defined(_NUITKA_EXE) || !0
|
||
|
value = PyModule_GetDict( value );
|
||
|
#endif
|
||
|
|
||
|
UPDATE_STRING_DICT0( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain___builtins__, value );
|
||
|
}
|
||
|
|
||
|
#if PYTHON_VERSION >= 300
|
||
|
UPDATE_STRING_DICT0( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain___loader__, metapath_based_loader );
|
||
|
#endif
|
||
|
|
||
|
#if PYTHON_VERSION >= 340
|
||
|
#if 0
|
||
|
UPDATE_STRING_DICT0( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain___spec__, Py_None );
|
||
|
#else
|
||
|
{
|
||
|
PyObject *bootstrap_module = PyImport_ImportModule("importlib._bootstrap");
|
||
|
CHECK_OBJECT( bootstrap_module );
|
||
|
PyObject *module_spec_class = PyObject_GetAttrString( bootstrap_module, "ModuleSpec" );
|
||
|
Py_DECREF( bootstrap_module );
|
||
|
|
||
|
PyObject *args[] = {
|
||
|
GET_STRING_DICT_VALUE( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain___name__ ),
|
||
|
metapath_based_loader
|
||
|
};
|
||
|
|
||
|
PyObject *spec_value = CALL_FUNCTION_WITH_ARGS2(
|
||
|
module_spec_class,
|
||
|
args
|
||
|
);
|
||
|
|
||
|
SET_ATTRIBUTE( spec_value, const_str_plain__initializing, Py_True );
|
||
|
|
||
|
UPDATE_STRING_DICT1( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain___spec__, spec_value );
|
||
|
|
||
|
Py_DECREF( module_spec_class );
|
||
|
}
|
||
|
#endif
|
||
|
#endif
|
||
|
|
||
|
|
||
|
// Temp variables if any
|
||
|
PyObject *tmp_import_from_1__module = NULL;
|
||
|
struct Nuitka_FrameObject *frame_25b4923fc1614ffb7728e8127dbf2224;
|
||
|
NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL;
|
||
|
PyObject *exception_type = NULL;
|
||
|
PyObject *exception_value = NULL;
|
||
|
PyTracebackObject *exception_tb = NULL;
|
||
|
NUITKA_MAY_BE_UNUSED int exception_lineno = 0;
|
||
|
PyObject *exception_keeper_type_1;
|
||
|
PyObject *exception_keeper_value_1;
|
||
|
PyTracebackObject *exception_keeper_tb_1;
|
||
|
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
|
||
|
|
||
|
// Module code.
|
||
|
{
|
||
|
PyObject *tmp_assign_source_1;
|
||
|
tmp_assign_source_1 = Py_None;
|
||
|
UPDATE_STRING_DICT0( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain___doc__, tmp_assign_source_1 );
|
||
|
}
|
||
|
{
|
||
|
PyObject *tmp_assign_source_2;
|
||
|
tmp_assign_source_2 = const_str_digest_ce31019111b3ccfe7c1a48d878b2dab7;
|
||
|
UPDATE_STRING_DICT0( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain___file__, tmp_assign_source_2 );
|
||
|
}
|
||
|
{
|
||
|
PyObject *tmp_assign_source_3;
|
||
|
tmp_assign_source_3 = Py_None;
|
||
|
UPDATE_STRING_DICT0( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain___cached__, tmp_assign_source_3 );
|
||
|
}
|
||
|
{
|
||
|
PyObject *tmp_assign_source_4;
|
||
|
tmp_assign_source_4 = PyImport_ImportModule("__future__");
|
||
|
assert( !(tmp_assign_source_4 == NULL) );
|
||
|
assert( tmp_import_from_1__module == NULL );
|
||
|
Py_INCREF( tmp_assign_source_4 );
|
||
|
tmp_import_from_1__module = tmp_assign_source_4;
|
||
|
|
||
|
}
|
||
|
// Frame without reuse.
|
||
|
frame_25b4923fc1614ffb7728e8127dbf2224 = MAKE_MODULE_FRAME( codeobj_25b4923fc1614ffb7728e8127dbf2224, module_cryptography$hazmat$backends$openssl$utils );
|
||
|
|
||
|
// Push the new frame as the currently active one, and we should be exclusively
|
||
|
// owning it.
|
||
|
pushFrameStack( frame_25b4923fc1614ffb7728e8127dbf2224 );
|
||
|
assert( Py_REFCNT( frame_25b4923fc1614ffb7728e8127dbf2224 ) == 2 );
|
||
|
|
||
|
// Framed code:
|
||
|
{
|
||
|
// Tried code:
|
||
|
{
|
||
|
PyObject *tmp_assign_source_5;
|
||
|
PyObject *tmp_import_name_from_1;
|
||
|
CHECK_OBJECT( tmp_import_from_1__module );
|
||
|
tmp_import_name_from_1 = tmp_import_from_1__module;
|
||
|
tmp_assign_source_5 = IMPORT_NAME( tmp_import_name_from_1, const_str_plain_absolute_import );
|
||
|
if ( tmp_assign_source_5 == NULL )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
|
||
|
|
||
|
exception_lineno = 5;
|
||
|
|
||
|
goto try_except_handler_1;
|
||
|
}
|
||
|
UPDATE_STRING_DICT1( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain_absolute_import, tmp_assign_source_5 );
|
||
|
}
|
||
|
{
|
||
|
PyObject *tmp_assign_source_6;
|
||
|
PyObject *tmp_import_name_from_2;
|
||
|
CHECK_OBJECT( tmp_import_from_1__module );
|
||
|
tmp_import_name_from_2 = tmp_import_from_1__module;
|
||
|
tmp_assign_source_6 = IMPORT_NAME( tmp_import_name_from_2, const_str_plain_division );
|
||
|
if ( tmp_assign_source_6 == NULL )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
|
||
|
|
||
|
exception_lineno = 5;
|
||
|
|
||
|
goto try_except_handler_1;
|
||
|
}
|
||
|
UPDATE_STRING_DICT1( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain_division, tmp_assign_source_6 );
|
||
|
}
|
||
|
{
|
||
|
PyObject *tmp_assign_source_7;
|
||
|
PyObject *tmp_import_name_from_3;
|
||
|
CHECK_OBJECT( tmp_import_from_1__module );
|
||
|
tmp_import_name_from_3 = tmp_import_from_1__module;
|
||
|
tmp_assign_source_7 = IMPORT_NAME( tmp_import_name_from_3, const_str_plain_print_function );
|
||
|
if ( tmp_assign_source_7 == NULL )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
|
||
|
|
||
|
exception_lineno = 5;
|
||
|
|
||
|
goto try_except_handler_1;
|
||
|
}
|
||
|
UPDATE_STRING_DICT1( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain_print_function, tmp_assign_source_7 );
|
||
|
}
|
||
|
goto try_end_1;
|
||
|
// Exception handler code:
|
||
|
try_except_handler_1:;
|
||
|
exception_keeper_type_1 = exception_type;
|
||
|
exception_keeper_value_1 = exception_value;
|
||
|
exception_keeper_tb_1 = exception_tb;
|
||
|
exception_keeper_lineno_1 = exception_lineno;
|
||
|
exception_type = NULL;
|
||
|
exception_value = NULL;
|
||
|
exception_tb = NULL;
|
||
|
exception_lineno = 0;
|
||
|
|
||
|
{
|
||
|
CHECK_OBJECT( (PyObject *)tmp_import_from_1__module );
|
||
|
Py_DECREF( tmp_import_from_1__module );
|
||
|
tmp_import_from_1__module = NULL;
|
||
|
|
||
|
}
|
||
|
{
|
||
|
// Re-raise.
|
||
|
exception_type = exception_keeper_type_1;
|
||
|
exception_value = exception_keeper_value_1;
|
||
|
exception_tb = exception_keeper_tb_1;
|
||
|
exception_lineno = exception_keeper_lineno_1;
|
||
|
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
// End of try:
|
||
|
try_end_1:;
|
||
|
}
|
||
|
{
|
||
|
CHECK_OBJECT( (PyObject *)tmp_import_from_1__module );
|
||
|
Py_DECREF( tmp_import_from_1__module );
|
||
|
tmp_import_from_1__module = NULL;
|
||
|
|
||
|
}
|
||
|
{
|
||
|
PyObject *tmp_assign_source_8;
|
||
|
PyObject *tmp_name_name_1;
|
||
|
PyObject *tmp_globals_name_1;
|
||
|
PyObject *tmp_locals_name_1;
|
||
|
PyObject *tmp_fromlist_name_1;
|
||
|
PyObject *tmp_level_name_1;
|
||
|
tmp_name_name_1 = const_str_plain_warnings;
|
||
|
tmp_globals_name_1 = (PyObject *)moduledict_cryptography$hazmat$backends$openssl$utils;
|
||
|
tmp_locals_name_1 = Py_None;
|
||
|
tmp_fromlist_name_1 = Py_None;
|
||
|
tmp_level_name_1 = const_int_0;
|
||
|
frame_25b4923fc1614ffb7728e8127dbf2224->m_frame.f_lineno = 7;
|
||
|
tmp_assign_source_8 = IMPORT_MODULE5( tmp_name_name_1, tmp_globals_name_1, tmp_locals_name_1, tmp_fromlist_name_1, tmp_level_name_1 );
|
||
|
if ( tmp_assign_source_8 == NULL )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
|
||
|
|
||
|
exception_lineno = 7;
|
||
|
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
UPDATE_STRING_DICT1( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain_warnings, tmp_assign_source_8 );
|
||
|
}
|
||
|
{
|
||
|
PyObject *tmp_assign_source_9;
|
||
|
PyObject *tmp_import_name_from_4;
|
||
|
PyObject *tmp_name_name_2;
|
||
|
PyObject *tmp_globals_name_2;
|
||
|
PyObject *tmp_locals_name_2;
|
||
|
PyObject *tmp_fromlist_name_2;
|
||
|
PyObject *tmp_level_name_2;
|
||
|
tmp_name_name_2 = const_str_plain_cryptography;
|
||
|
tmp_globals_name_2 = (PyObject *)moduledict_cryptography$hazmat$backends$openssl$utils;
|
||
|
tmp_locals_name_2 = Py_None;
|
||
|
tmp_fromlist_name_2 = const_tuple_str_plain_utils_tuple;
|
||
|
tmp_level_name_2 = const_int_0;
|
||
|
frame_25b4923fc1614ffb7728e8127dbf2224->m_frame.f_lineno = 9;
|
||
|
tmp_import_name_from_4 = IMPORT_MODULE5( tmp_name_name_2, tmp_globals_name_2, tmp_locals_name_2, tmp_fromlist_name_2, tmp_level_name_2 );
|
||
|
if ( tmp_import_name_from_4 == NULL )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
|
||
|
|
||
|
exception_lineno = 9;
|
||
|
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
tmp_assign_source_9 = IMPORT_NAME( tmp_import_name_from_4, const_str_plain_utils );
|
||
|
Py_DECREF( tmp_import_name_from_4 );
|
||
|
if ( tmp_assign_source_9 == NULL )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
|
||
|
|
||
|
exception_lineno = 9;
|
||
|
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
UPDATE_STRING_DICT1( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain_utils, tmp_assign_source_9 );
|
||
|
}
|
||
|
{
|
||
|
PyObject *tmp_assign_source_10;
|
||
|
PyObject *tmp_import_name_from_5;
|
||
|
PyObject *tmp_name_name_3;
|
||
|
PyObject *tmp_globals_name_3;
|
||
|
PyObject *tmp_locals_name_3;
|
||
|
PyObject *tmp_fromlist_name_3;
|
||
|
PyObject *tmp_level_name_3;
|
||
|
tmp_name_name_3 = const_str_digest_9db3cdd3cd765463b4eec6754eb8e087;
|
||
|
tmp_globals_name_3 = (PyObject *)moduledict_cryptography$hazmat$backends$openssl$utils;
|
||
|
tmp_locals_name_3 = Py_None;
|
||
|
tmp_fromlist_name_3 = const_tuple_str_plain_hashes_tuple;
|
||
|
tmp_level_name_3 = const_int_0;
|
||
|
frame_25b4923fc1614ffb7728e8127dbf2224->m_frame.f_lineno = 10;
|
||
|
tmp_import_name_from_5 = IMPORT_MODULE5( tmp_name_name_3, tmp_globals_name_3, tmp_locals_name_3, tmp_fromlist_name_3, tmp_level_name_3 );
|
||
|
if ( tmp_import_name_from_5 == NULL )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
|
||
|
|
||
|
exception_lineno = 10;
|
||
|
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
tmp_assign_source_10 = IMPORT_NAME( tmp_import_name_from_5, const_str_plain_hashes );
|
||
|
Py_DECREF( tmp_import_name_from_5 );
|
||
|
if ( tmp_assign_source_10 == NULL )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
|
||
|
|
||
|
exception_lineno = 10;
|
||
|
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
UPDATE_STRING_DICT1( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain_hashes, tmp_assign_source_10 );
|
||
|
}
|
||
|
{
|
||
|
PyObject *tmp_assign_source_11;
|
||
|
PyObject *tmp_import_name_from_6;
|
||
|
PyObject *tmp_name_name_4;
|
||
|
PyObject *tmp_globals_name_4;
|
||
|
PyObject *tmp_locals_name_4;
|
||
|
PyObject *tmp_fromlist_name_4;
|
||
|
PyObject *tmp_level_name_4;
|
||
|
tmp_name_name_4 = const_str_digest_5158407475f7a1591cc2a47f66175afb;
|
||
|
tmp_globals_name_4 = (PyObject *)moduledict_cryptography$hazmat$backends$openssl$utils;
|
||
|
tmp_locals_name_4 = Py_None;
|
||
|
tmp_fromlist_name_4 = const_tuple_str_plain_Prehashed_tuple;
|
||
|
tmp_level_name_4 = const_int_0;
|
||
|
frame_25b4923fc1614ffb7728e8127dbf2224->m_frame.f_lineno = 11;
|
||
|
tmp_import_name_from_6 = IMPORT_MODULE5( tmp_name_name_4, tmp_globals_name_4, tmp_locals_name_4, tmp_fromlist_name_4, tmp_level_name_4 );
|
||
|
if ( tmp_import_name_from_6 == NULL )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
|
||
|
|
||
|
exception_lineno = 11;
|
||
|
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
tmp_assign_source_11 = IMPORT_NAME( tmp_import_name_from_6, const_str_plain_Prehashed );
|
||
|
Py_DECREF( tmp_import_name_from_6 );
|
||
|
if ( tmp_assign_source_11 == NULL )
|
||
|
{
|
||
|
assert( ERROR_OCCURRED() );
|
||
|
|
||
|
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
|
||
|
|
||
|
|
||
|
exception_lineno = 11;
|
||
|
|
||
|
goto frame_exception_exit_1;
|
||
|
}
|
||
|
UPDATE_STRING_DICT1( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain_Prehashed, tmp_assign_source_11 );
|
||
|
}
|
||
|
|
||
|
// Restore frame exception if necessary.
|
||
|
#if 0
|
||
|
RESTORE_FRAME_EXCEPTION( frame_25b4923fc1614ffb7728e8127dbf2224 );
|
||
|
#endif
|
||
|
popFrameStack();
|
||
|
|
||
|
assertFrameObject( frame_25b4923fc1614ffb7728e8127dbf2224 );
|
||
|
|
||
|
goto frame_no_exception_1;
|
||
|
|
||
|
frame_exception_exit_1:;
|
||
|
#if 0
|
||
|
RESTORE_FRAME_EXCEPTION( frame_25b4923fc1614ffb7728e8127dbf2224 );
|
||
|
#endif
|
||
|
|
||
|
if ( exception_tb == NULL )
|
||
|
{
|
||
|
exception_tb = MAKE_TRACEBACK( frame_25b4923fc1614ffb7728e8127dbf2224, exception_lineno );
|
||
|
}
|
||
|
else if ( exception_tb->tb_frame != &frame_25b4923fc1614ffb7728e8127dbf2224->m_frame )
|
||
|
{
|
||
|
exception_tb = ADD_TRACEBACK( exception_tb, frame_25b4923fc1614ffb7728e8127dbf2224, exception_lineno );
|
||
|
}
|
||
|
|
||
|
// Put the previous frame back on top.
|
||
|
popFrameStack();
|
||
|
|
||
|
// Return the error.
|
||
|
goto module_exception_exit;
|
||
|
|
||
|
frame_no_exception_1:;
|
||
|
{
|
||
|
PyObject *tmp_assign_source_12;
|
||
|
tmp_assign_source_12 = MAKE_FUNCTION_cryptography$hazmat$backends$openssl$utils$$$function_1__calculate_digest_and_algorithm( );
|
||
|
|
||
|
|
||
|
|
||
|
UPDATE_STRING_DICT1( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain__calculate_digest_and_algorithm, tmp_assign_source_12 );
|
||
|
}
|
||
|
{
|
||
|
PyObject *tmp_assign_source_13;
|
||
|
tmp_assign_source_13 = MAKE_FUNCTION_cryptography$hazmat$backends$openssl$utils$$$function_2__check_not_prehashed( );
|
||
|
|
||
|
|
||
|
|
||
|
UPDATE_STRING_DICT1( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain__check_not_prehashed, tmp_assign_source_13 );
|
||
|
}
|
||
|
{
|
||
|
PyObject *tmp_assign_source_14;
|
||
|
tmp_assign_source_14 = MAKE_FUNCTION_cryptography$hazmat$backends$openssl$utils$$$function_3__warn_sign_verify_deprecated( );
|
||
|
|
||
|
|
||
|
|
||
|
UPDATE_STRING_DICT1( moduledict_cryptography$hazmat$backends$openssl$utils, (Nuitka_StringObject *)const_str_plain__warn_sign_verify_deprecated, tmp_assign_source_14 );
|
||
|
}
|
||
|
|
||
|
return MOD_RETURN_VALUE( module_cryptography$hazmat$backends$openssl$utils );
|
||
|
module_exception_exit:
|
||
|
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
|
||
|
return MOD_RETURN_VALUE( NULL );
|
||
|
}
|