require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&HEADER_DH_H)) {
    eval 'sub HEADER_DH_H () {1;}' unless defined(&HEADER_DH_H);
    if(defined(&OPENSSL_NO_DH)) {
	die("DH\ is\ disabled\.");
    }
    unless(defined(&OPENSSL_NO_BIO)) {
	require 'openssl/bio.ph';
    }
    require 'openssl/bn.ph';
    require 'openssl/crypto.ph';
    require 'openssl/ossl_typ.ph';
    eval 'sub OPENSSL_DH_MAX_MODULUS_BITS () {10000;}' unless defined(&OPENSSL_DH_MAX_MODULUS_BITS);
    eval 'sub DH_FLAG_CACHE_MONT_P () {0x1;}' unless defined(&DH_FLAG_CACHE_MONT_P);
    eval 'sub DH_FLAG_NO_EXP_CONSTTIME () {0x2;}' unless defined(&DH_FLAG_NO_EXP_CONSTTIME);
    if(defined(&__cplusplus)) {
    }
    eval 'sub DH_GENERATOR_2 () {2;}' unless defined(&DH_GENERATOR_2);
    eval 'sub DH_GENERATOR_5 () {5;}' unless defined(&DH_GENERATOR_5);
    eval 'sub DH_CHECK_P_NOT_PRIME () {0x1;}' unless defined(&DH_CHECK_P_NOT_PRIME);
    eval 'sub DH_CHECK_P_NOT_SAFE_PRIME () {0x2;}' unless defined(&DH_CHECK_P_NOT_SAFE_PRIME);
    eval 'sub DH_UNABLE_TO_CHECK_GENERATOR () {0x4;}' unless defined(&DH_UNABLE_TO_CHECK_GENERATOR);
    eval 'sub DH_NOT_SUITABLE_GENERATOR () {0x8;}' unless defined(&DH_NOT_SUITABLE_GENERATOR);
    eval 'sub DH_CHECK_PUBKEY_TOO_SMALL () {0x1;}' unless defined(&DH_CHECK_PUBKEY_TOO_SMALL);
    eval 'sub DH_CHECK_PUBKEY_TOO_LARGE () {0x2;}' unless defined(&DH_CHECK_PUBKEY_TOO_LARGE);
    eval 'sub DH_CHECK_P_NOT_STRONG_PRIME () { &DH_CHECK_P_NOT_SAFE_PRIME;}' unless defined(&DH_CHECK_P_NOT_STRONG_PRIME);
    eval 'sub DHparams_dup {
        my($x) = @_;
	    eval q(( &DH *) &ASN1_dup(( &int (*)()) &i2d_DHparams, (\'char\' *(*)()) &d2i_DHparams,($x)));
    }' unless defined(&DHparams_dup);
    eval 'sub d2i_DHparams_fp {
        my($fp,$x) = @_;
	    eval q(( &DH *) &ASN1_d2i_fp((\'char\' *(*)()) &DH_new, (\'char\' *(*)()) &d2i_DHparams,,($x)));
    }' unless defined(&d2i_DHparams_fp);
    eval 'sub i2d_DHparams_fp {
        my($fp,$x) = @_;
	    eval q( &ASN1_i2d_fp( &i2d_DHparams,, ($x)));
    }' unless defined(&i2d_DHparams_fp);
    eval 'sub d2i_DHparams_bio {
        my($bp,$x) = @_;
	    eval q(( &DH *) &ASN1_d2i_bio((\'char\' *(*)()) &DH_new, (\'char\' *(*)()) &d2i_DHparams,,($x)));
    }' unless defined(&d2i_DHparams_bio);
    if(defined(&__cplusplus)) {
	eval 'sub i2d_DHparams_bio {
	    my($bp,$x) = @_;
    	    eval q( &ASN1_i2d_bio(( &int (*)()) &i2d_DHparams,, ($x)));
	}' unless defined(&i2d_DHparams_bio);
    } else {
	eval 'sub i2d_DHparams_bio {
	    my($bp,$x) = @_;
    	    eval q( &ASN1_i2d_bio( &i2d_DHparams,, ($x)));
	}' unless defined(&i2d_DHparams_bio);
    }
    unless(defined(&OPENSSL_NO_FP_API)) {
    }
    unless(defined(&OPENSSL_NO_BIO)) {
    } else {
    }
    eval 'sub DH_F_DHPARAMS_PRINT () {100;}' unless defined(&DH_F_DHPARAMS_PRINT);
    eval 'sub DH_F_DHPARAMS_PRINT_FP () {101;}' unless defined(&DH_F_DHPARAMS_PRINT_FP);
    eval 'sub DH_F_DH_COMPUTE_KEY () {102;}' unless defined(&DH_F_DH_COMPUTE_KEY);
    eval 'sub DH_F_DH_GENERATE_KEY () {103;}' unless defined(&DH_F_DH_GENERATE_KEY);
    eval 'sub DH_F_DH_GENERATE_PARAMETERS () {104;}' unless defined(&DH_F_DH_GENERATE_PARAMETERS);
    eval 'sub DH_F_DH_NEW_METHOD () {105;}' unless defined(&DH_F_DH_NEW_METHOD);
    eval 'sub DH_R_BAD_GENERATOR () {101;}' unless defined(&DH_R_BAD_GENERATOR);
    eval 'sub DH_R_NO_PRIVATE_VALUE () {100;}' unless defined(&DH_R_NO_PRIVATE_VALUE);
    eval 'sub DH_R_INVALID_PUBKEY () {102;}' unless defined(&DH_R_INVALID_PUBKEY);
    eval 'sub DH_R_MODULUS_TOO_LARGE () {103;}' unless defined(&DH_R_MODULUS_TOO_LARGE);
    if(defined(&__cplusplus)) {
    }
}
1;
