require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&HEADER_CRYPTO_H)) {
    eval 'sub HEADER_CRYPTO_H () {1;}' unless defined(&HEADER_CRYPTO_H);
    require 'stdlib.ph';
    unless(defined(&OPENSSL_NO_FP_API)) {
	require 'stdio.ph';
    }
    require 'openssl/stack.ph';
    require 'openssl/safestack.ph';
    require 'openssl/opensslv.ph';
    if(defined(&CHARSET_EBCDIC)) {
	require 'openssl/ebcdic.ph';
    }
    require 'openssl/symhacks.ph';
    if(defined(&__cplusplus)) {
    }
    eval 'sub SSLEAY_VERSION_NUMBER () { &OPENSSL_VERSION_NUMBER;}' unless defined(&SSLEAY_VERSION_NUMBER);
    eval 'sub SSLEAY_VERSION () {0;}' unless defined(&SSLEAY_VERSION);
    eval 'sub SSLEAY_CFLAGS () {2;}' unless defined(&SSLEAY_CFLAGS);
    eval 'sub SSLEAY_BUILT_ON () {3;}' unless defined(&SSLEAY_BUILT_ON);
    eval 'sub SSLEAY_PLATFORM () {4;}' unless defined(&SSLEAY_PLATFORM);
    eval 'sub SSLEAY_DIR () {5;}' unless defined(&SSLEAY_DIR);
    eval 'sub CRYPTO_LOCK_ERR () {1;}' unless defined(&CRYPTO_LOCK_ERR);
    eval 'sub CRYPTO_LOCK_EX_DATA () {2;}' unless defined(&CRYPTO_LOCK_EX_DATA);
    eval 'sub CRYPTO_LOCK_X509 () {3;}' unless defined(&CRYPTO_LOCK_X509);
    eval 'sub CRYPTO_LOCK_X509_INFO () {4;}' unless defined(&CRYPTO_LOCK_X509_INFO);
    eval 'sub CRYPTO_LOCK_X509_PKEY () {5;}' unless defined(&CRYPTO_LOCK_X509_PKEY);
    eval 'sub CRYPTO_LOCK_X509_CRL () {6;}' unless defined(&CRYPTO_LOCK_X509_CRL);
    eval 'sub CRYPTO_LOCK_X509_REQ () {7;}' unless defined(&CRYPTO_LOCK_X509_REQ);
    eval 'sub CRYPTO_LOCK_DSA () {8;}' unless defined(&CRYPTO_LOCK_DSA);
    eval 'sub CRYPTO_LOCK_RSA () {9;}' unless defined(&CRYPTO_LOCK_RSA);
    eval 'sub CRYPTO_LOCK_EVP_PKEY () {10;}' unless defined(&CRYPTO_LOCK_EVP_PKEY);
    eval 'sub CRYPTO_LOCK_X509_STORE () {11;}' unless defined(&CRYPTO_LOCK_X509_STORE);
    eval 'sub CRYPTO_LOCK_SSL_CTX () {12;}' unless defined(&CRYPTO_LOCK_SSL_CTX);
    eval 'sub CRYPTO_LOCK_SSL_CERT () {13;}' unless defined(&CRYPTO_LOCK_SSL_CERT);
    eval 'sub CRYPTO_LOCK_SSL_SESSION () {14;}' unless defined(&CRYPTO_LOCK_SSL_SESSION);
    eval 'sub CRYPTO_LOCK_SSL_SESS_CERT () {15;}' unless defined(&CRYPTO_LOCK_SSL_SESS_CERT);
    eval 'sub CRYPTO_LOCK_SSL () {16;}' unless defined(&CRYPTO_LOCK_SSL);
    eval 'sub CRYPTO_LOCK_SSL_METHOD () {17;}' unless defined(&CRYPTO_LOCK_SSL_METHOD);
    eval 'sub CRYPTO_LOCK_RAND () {18;}' unless defined(&CRYPTO_LOCK_RAND);
    eval 'sub CRYPTO_LOCK_RAND2 () {19;}' unless defined(&CRYPTO_LOCK_RAND2);
    eval 'sub CRYPTO_LOCK_MALLOC () {20;}' unless defined(&CRYPTO_LOCK_MALLOC);
    eval 'sub CRYPTO_LOCK_BIO () {21;}' unless defined(&CRYPTO_LOCK_BIO);
    eval 'sub CRYPTO_LOCK_GETHOSTBYNAME () {22;}' unless defined(&CRYPTO_LOCK_GETHOSTBYNAME);
    eval 'sub CRYPTO_LOCK_GETSERVBYNAME () {23;}' unless defined(&CRYPTO_LOCK_GETSERVBYNAME);
    eval 'sub CRYPTO_LOCK_READDIR () {24;}' unless defined(&CRYPTO_LOCK_READDIR);
    eval 'sub CRYPTO_LOCK_RSA_BLINDING () {25;}' unless defined(&CRYPTO_LOCK_RSA_BLINDING);
    eval 'sub CRYPTO_LOCK_DH () {26;}' unless defined(&CRYPTO_LOCK_DH);
    eval 'sub CRYPTO_LOCK_MALLOC2 () {27;}' unless defined(&CRYPTO_LOCK_MALLOC2);
    eval 'sub CRYPTO_LOCK_DSO () {28;}' unless defined(&CRYPTO_LOCK_DSO);
    eval 'sub CRYPTO_LOCK_DYNLOCK () {29;}' unless defined(&CRYPTO_LOCK_DYNLOCK);
    eval 'sub CRYPTO_LOCK_ENGINE () {30;}' unless defined(&CRYPTO_LOCK_ENGINE);
    eval 'sub CRYPTO_LOCK_UI () {31;}' unless defined(&CRYPTO_LOCK_UI);
    eval 'sub CRYPTO_LOCK_HWCRHK () {32;}' unless defined(&CRYPTO_LOCK_HWCRHK);
    eval 'sub CRYPTO_LOCK_FIPS () {33;}' unless defined(&CRYPTO_LOCK_FIPS);
    eval 'sub CRYPTO_LOCK_FIPS2 () {34;}' unless defined(&CRYPTO_LOCK_FIPS2);
    eval 'sub CRYPTO_NUM_LOCKS () {35;}' unless defined(&CRYPTO_NUM_LOCKS);
    eval 'sub CRYPTO_LOCK () {1;}' unless defined(&CRYPTO_LOCK);
    eval 'sub CRYPTO_UNLOCK () {2;}' unless defined(&CRYPTO_UNLOCK);
    eval 'sub CRYPTO_READ () {4;}' unless defined(&CRYPTO_READ);
    eval 'sub CRYPTO_WRITE () {8;}' unless defined(&CRYPTO_WRITE);
    unless(defined(&OPENSSL_NO_LOCKING)) {
	unless(defined(&CRYPTO_w_lock)) {
	    eval 'sub CRYPTO_w_lock {
	        my($type) = @_;
    		eval q( &CRYPTO_lock( &CRYPTO_LOCK| &CRYPTO_WRITE,$type, &__FILE__, &__LINE__));
	    }' unless defined(&CRYPTO_w_lock);
	    eval 'sub CRYPTO_w_unlock {
	        my($type) = @_;
    		eval q( &CRYPTO_lock( &CRYPTO_UNLOCK| &CRYPTO_WRITE,$type, &__FILE__, &__LINE__));
	    }' unless defined(&CRYPTO_w_unlock);
	    eval 'sub CRYPTO_r_lock {
	        my($type) = @_;
    		eval q( &CRYPTO_lock( &CRYPTO_LOCK| &CRYPTO_READ,$type, &__FILE__, &__LINE__));
	    }' unless defined(&CRYPTO_r_lock);
	    eval 'sub CRYPTO_r_unlock {
	        my($type) = @_;
    		eval q( &CRYPTO_lock( &CRYPTO_UNLOCK| &CRYPTO_READ,$type, &__FILE__, &__LINE__));
	    }' unless defined(&CRYPTO_r_unlock);
	    eval 'sub CRYPTO_add {
	        my($addr,$amount,$type) = @_;
    		eval q( &CRYPTO_add_lock($addr,$amount,$type, &__FILE__, &__LINE__));
	    }' unless defined(&CRYPTO_add);
	}
    } else {
	eval 'sub CRYPTO_w_lock {
	    my($a) = @_;
    	    eval q();
	}' unless defined(&CRYPTO_w_lock);
	eval 'sub CRYPTO_w_unlock {
	    my($a) = @_;
    	    eval q();
	}' unless defined(&CRYPTO_w_unlock);
	eval 'sub CRYPTO_r_lock {
	    my($a) = @_;
    	    eval q();
	}' unless defined(&CRYPTO_r_lock);
	eval 'sub CRYPTO_r_unlock {
	    my($a) = @_;
    	    eval q();
	}' unless defined(&CRYPTO_r_unlock);
	eval 'sub CRYPTO_add {
	    my($a,$b,$c) = @_;
    	    eval q(((*($a))+=($b)));
	}' unless defined(&CRYPTO_add);
    }
    eval 'sub CRYPTO_MEM_CHECK_OFF () {0x;}' unless defined(&CRYPTO_MEM_CHECK_OFF);
    eval 'sub CRYPTO_MEM_CHECK_ON () {0x1;}' unless defined(&CRYPTO_MEM_CHECK_ON);
    eval 'sub CRYPTO_MEM_CHECK_ENABLE () {0x2;}' unless defined(&CRYPTO_MEM_CHECK_ENABLE);
    eval 'sub CRYPTO_MEM_CHECK_DISABLE () {0x3;}' unless defined(&CRYPTO_MEM_CHECK_DISABLE);
    eval 'sub V_CRYPTO_MDEBUG_TIME () {0x1;}' unless defined(&V_CRYPTO_MDEBUG_TIME);
    eval 'sub V_CRYPTO_MDEBUG_THREAD () {0x2;}' unless defined(&V_CRYPTO_MDEBUG_THREAD);
    eval 'sub V_CRYPTO_MDEBUG_ALL () {( &V_CRYPTO_MDEBUG_TIME |  &V_CRYPTO_MDEBUG_THREAD);}' unless defined(&V_CRYPTO_MDEBUG_ALL);
    eval 'sub CRYPTO_EX_INDEX_BIO () {0;}' unless defined(&CRYPTO_EX_INDEX_BIO);
    eval 'sub CRYPTO_EX_INDEX_SSL () {1;}' unless defined(&CRYPTO_EX_INDEX_SSL);
    eval 'sub CRYPTO_EX_INDEX_SSL_CTX () {2;}' unless defined(&CRYPTO_EX_INDEX_SSL_CTX);
    eval 'sub CRYPTO_EX_INDEX_SSL_SESSION () {3;}' unless defined(&CRYPTO_EX_INDEX_SSL_SESSION);
    eval 'sub CRYPTO_EX_INDEX_X509_STORE () {4;}' unless defined(&CRYPTO_EX_INDEX_X509_STORE);
    eval 'sub CRYPTO_EX_INDEX_X509_STORE_CTX () {5;}' unless defined(&CRYPTO_EX_INDEX_X509_STORE_CTX);
    eval 'sub CRYPTO_EX_INDEX_RSA () {6;}' unless defined(&CRYPTO_EX_INDEX_RSA);
    eval 'sub CRYPTO_EX_INDEX_DSA () {7;}' unless defined(&CRYPTO_EX_INDEX_DSA);
    eval 'sub CRYPTO_EX_INDEX_DH () {8;}' unless defined(&CRYPTO_EX_INDEX_DH);
    eval 'sub CRYPTO_EX_INDEX_ENGINE () {9;}' unless defined(&CRYPTO_EX_INDEX_ENGINE);
    eval 'sub CRYPTO_EX_INDEX_X509 () {10;}' unless defined(&CRYPTO_EX_INDEX_X509);
    eval 'sub CRYPTO_EX_INDEX_UI () {11;}' unless defined(&CRYPTO_EX_INDEX_UI);
    eval 'sub CRYPTO_EX_INDEX_USER () {100;}' unless defined(&CRYPTO_EX_INDEX_USER);
    eval 'sub CRYPTO_malloc_init () {
        eval q( &CRYPTO_set_mem_functions(  &malloc,  &realloc,  &free));
    }' unless defined(&CRYPTO_malloc_init);
    if(defined (defined(&CRYPTO_MDEBUG_ALL) ? &CRYPTO_MDEBUG_ALL : 0) || defined (defined(&CRYPTO_MDEBUG_TIME) ? &CRYPTO_MDEBUG_TIME : 0) || defined (defined(&CRYPTO_MDEBUG_THREAD) ? &CRYPTO_MDEBUG_THREAD : 0)) {
	unless(defined(&CRYPTO_MDEBUG)) {
	    eval 'sub CRYPTO_MDEBUG () {1;}' unless defined(&CRYPTO_MDEBUG);
	}
    }
    eval 'sub CRYPTO_malloc_debug_init () {
        eval q( &do {  &CRYPTO_set_mem_debug_functions(  &CRYPTO_dbg_malloc,  &CRYPTO_dbg_realloc,  &CRYPTO_dbg_free,  &CRYPTO_dbg_set_options,  &CRYPTO_dbg_get_options); }  &while(0));
    }' unless defined(&CRYPTO_malloc_debug_init);
    eval 'sub MemCheck_start () {
        eval q( &CRYPTO_mem_ctrl( &CRYPTO_MEM_CHECK_ON));
    }' unless defined(&MemCheck_start);
    eval 'sub MemCheck_stop () {
        eval q( &CRYPTO_mem_ctrl( &CRYPTO_MEM_CHECK_OFF));
    }' unless defined(&MemCheck_stop);
    eval 'sub MemCheck_on () {
        eval q( &CRYPTO_mem_ctrl( &CRYPTO_MEM_CHECK_ENABLE));
    }' unless defined(&MemCheck_on);
    eval 'sub MemCheck_off () {
        eval q( &CRYPTO_mem_ctrl( &CRYPTO_MEM_CHECK_DISABLE));
    }' unless defined(&MemCheck_off);
    eval 'sub is_MemCheck_on () {
        eval q( &CRYPTO_is_mem_check_on());
    }' unless defined(&is_MemCheck_on);
    eval 'sub OPENSSL_malloc {
        my($num) = @_;
	    eval q( &CRYPTO_malloc($num, &__FILE__, &__LINE__));
    }' unless defined(&OPENSSL_malloc);
    eval 'sub OPENSSL_realloc {
        my($addr,$num) = @_;
	    eval q( &CRYPTO_realloc($addr,$num, &__FILE__, &__LINE__));
    }' unless defined(&OPENSSL_realloc);
    eval 'sub OPENSSL_realloc_clean {
        my($addr,$old_num,$num) = @_;
	    eval q( &CRYPTO_realloc_clean($addr,$old_num,$num, &__FILE__, &__LINE__));
    }' unless defined(&OPENSSL_realloc_clean);
    eval 'sub OPENSSL_remalloc {
        my($addr,$num) = @_;
	    eval q( &CRYPTO_remalloc($addr,$num, &__FILE__, &__LINE__));
    }' unless defined(&OPENSSL_remalloc);
    eval 'sub OPENSSL_freeFunc () { &CRYPTO_free;}' unless defined(&OPENSSL_freeFunc);
    eval 'sub OPENSSL_free {
        my($addr) = @_;
	    eval q( &CRYPTO_free($addr));
    }' unless defined(&OPENSSL_free);
    eval 'sub OPENSSL_malloc_locked {
        my($num) = @_;
	    eval q( &CRYPTO_malloc_locked($num, &__FILE__, &__LINE__));
    }' unless defined(&OPENSSL_malloc_locked);
    eval 'sub OPENSSL_free_locked {
        my($addr) = @_;
	    eval q( &CRYPTO_free_locked($addr));
    }' unless defined(&OPENSSL_free_locked);
    eval 'sub CRYPTO_push_info {
        my($info) = @_;
	    eval q( &CRYPTO_push_info_($info,  &__FILE__,  &__LINE__););
    }' unless defined(&CRYPTO_push_info);
    unless(defined(&OPENSSL_NO_FP_API)) {
    }
    eval 'sub OPENSSL_assert {
        my($e) = @_;
	    eval q(( &void)(($e) ? 0: ( &OpenSSLDie( &__FILE__,  &__LINE__, $e),1)));
    }' unless defined(&OPENSSL_assert);
    if(defined(&OPENSSL_FIPS)) {
	eval 'sub FIPS_ERROR_IGNORED {
	    my($alg) = @_;
    	    eval q( &OpenSSLDie( &__FILE__,  &__LINE__, $alg \\" previous FIPS forbidden algorithm error ignored\\"););
	}' unless defined(&FIPS_ERROR_IGNORED);
	eval 'sub FIPS_BAD_ABORT {
	    my($alg) = @_;
    	    eval q( &OpenSSLDie( &__FILE__,  &__LINE__, $alg \\" Algorithm forbidden in FIPS mode\\"););
	}' unless defined(&FIPS_BAD_ABORT);
	if(defined(&OPENSSL_FIPS_STRICT)) {
	    eval 'sub FIPS_BAD_ALGORITHM {
	        my($alg) = @_;
    		eval q( &FIPS_BAD_ABORT($alg));
	    }' unless defined(&FIPS_BAD_ALGORITHM);
	} else {
	    eval 'sub FIPS_BAD_ALGORITHM {
	        my($alg) = @_;
    		eval q({  &FIPSerr( &FIPS_F_HASH_FINAL, &FIPS_R_NON_FIPS_METHOD);  &ERR_add_error_data(2, \\"Algorithm=\\", $alg);  &return 0; });
	    }' unless defined(&FIPS_BAD_ALGORITHM);
	}
	eval 'sub FIPS_NON_FIPS_MD_Init {
	    my($alg) = @_;
    	    eval q(\'int\' $alg &_Init($alg &_CTX * &c) {  &if ( &FIPS_mode())  &FIPS_BAD_ALGORITHM($alg)  &return  &private_$alg &_Init( &c); } \'int\'  &private_$alg &_Init($alg &_CTX * &c));
	}' unless defined(&FIPS_NON_FIPS_MD_Init);
	eval 'sub FIPS_NON_FIPS_VCIPHER_Init {
	    my($alg) = @_;
    	    eval q( &void $alg &_set_key($alg &_KEY * &key, \'int\'  &len,  &const \'unsigned char\' * &data) {  &if ( &FIPS_mode())  &FIPS_BAD_ABORT($alg)  &private_$alg &_set_key( &key,  &len,  &data); }  &void  &private_$alg &_set_key($alg &_KEY * &key, \'int\'  &len,  &const \'unsigned char\' * &data));
	}' unless defined(&FIPS_NON_FIPS_VCIPHER_Init);
    } else {
	eval 'sub FIPS_NON_FIPS_VCIPHER_Init {
	    my($alg) = @_;
    	    eval q( &void $alg &_set_key($alg &_KEY * &key, \'int\'  &len,  &const \'unsigned char\' * &data));
	}' unless defined(&FIPS_NON_FIPS_VCIPHER_Init);
	eval 'sub FIPS_NON_FIPS_MD_Init {
	    my($alg) = @_;
    	    eval q(\'int\' $alg &_Init($alg &_CTX * &c));
	}' unless defined(&FIPS_NON_FIPS_MD_Init);
    }
    eval 'sub CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX () {100;}' unless defined(&CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX);
    eval 'sub CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID () {103;}' unless defined(&CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID);
    eval 'sub CRYPTO_F_CRYPTO_GET_NEW_LOCKID () {101;}' unless defined(&CRYPTO_F_CRYPTO_GET_NEW_LOCKID);
    eval 'sub CRYPTO_F_CRYPTO_SET_EX_DATA () {102;}' unless defined(&CRYPTO_F_CRYPTO_SET_EX_DATA);
    eval 'sub CRYPTO_F_DEF_ADD_INDEX () {104;}' unless defined(&CRYPTO_F_DEF_ADD_INDEX);
    eval 'sub CRYPTO_F_DEF_GET_CLASS () {105;}' unless defined(&CRYPTO_F_DEF_GET_CLASS);
    eval 'sub CRYPTO_F_INT_DUP_EX_DATA () {106;}' unless defined(&CRYPTO_F_INT_DUP_EX_DATA);
    eval 'sub CRYPTO_F_INT_FREE_EX_DATA () {107;}' unless defined(&CRYPTO_F_INT_FREE_EX_DATA);
    eval 'sub CRYPTO_F_INT_NEW_EX_DATA () {108;}' unless defined(&CRYPTO_F_INT_NEW_EX_DATA);
    eval 'sub CRYPTO_R_NO_DYNLOCK_CREATE_CALLBACK () {100;}' unless defined(&CRYPTO_R_NO_DYNLOCK_CREATE_CALLBACK);
    if(defined(&__cplusplus)) {
    }
}
1;
