<s> from __future__ import unicode_literals , division , absolute_import , print_function <EOL> import re <EOL> from ctypes . util import find_library <EOL> from ctypes import CDLL , c_void_p , c_char_p , c_int , c_ulong , c_uint , c_long , c_size_t , POINTER <EOL> from . . _errors import pretty_message <EOL> from . . _ffi import LibraryNotFoundError , FFIEngineError <EOL> __all__ = [ <EOL> '<STR_LIT>' , <EOL> '<STR_LIT:version>' , <EOL> '<STR_LIT>' , <EOL> ] <EOL> libcrypto_path = find_library ( '<STR_LIT>' ) <EOL> if not libcrypto_path : <EOL> raise LibraryNotFoundError ( '<STR_LIT>' ) <EOL> libcrypto = CDLL ( libcrypto_path , use_errno = True ) <EOL> try : <EOL> libcrypto . SSLeay_version . argtypes = [ c_int ] <EOL> libcrypto . SSLeay_version . restype = c_char_p <EOL> except ( AttributeError ) : <EOL> raise FFIEngineError ( '<STR_LIT>' ) <EOL> version_string = libcrypto . SSLeay_version ( <NUM_LIT:0> ) . decode ( '<STR_LIT:utf-8>' ) <EOL> version_match = re . search ( '<STR_LIT>' , version_string ) <EOL> if not version_match : <EOL> version_match = re . search ( '<STR_LIT>' , version_string ) <EOL> if not version_match : <EOL> raise LibraryNotFoundError ( '<STR_LIT>' ) <EOL> version = version_match . group ( <NUM_LIT:1> ) <EOL> version_parts = re . sub ( '<STR_LIT>' , '<STR_LIT>' , version ) . split ( '<STR_LIT:.>' ) <EOL> version_info = tuple ( int ( part ) if part . isdigit ( ) else part for part in version_parts ) <EOL> if version_info < ( <NUM_LIT:0> , <NUM_LIT:9> , <NUM_LIT:8> ) : <EOL> raise LibraryNotFoundError ( pretty_message ( <EOL> '''<STR_LIT>''' , <EOL> version <EOL> ) ) <EOL> P_EVP_CIPHER_CTX = c_void_p <EOL> P_EVP_CIPHER = c_void_p <EOL> P_EVP_MD_CTX = c_void_p <EOL> P_EVP_MD = c_void_p <EOL> P_ENGINE = c_void_p <EOL> P_EVP_PKEY = c_void_p <EOL> EVP_PKEY_CTX = c_void_p <EOL> P_EVP_PKEY_CTX = POINTER ( c_void_p ) <EOL> P_X509 = POINTER ( c_void_p ) <EOL> P_DH = c_void_p <EOL> P_RSA = c_void_p <EOL> P_DSA = c_void_p <EOL> P_EC_KEY = c_void_p <EOL> P_BN_GENCB = c_void_p <EOL> BIGNUM = c_void_p <EOL> P_BIGNUM = POINTER ( BIGNUM ) <EOL> p_int = POINTER ( c_int ) <EOL> p_uint = POINTER ( c_uint ) <EOL> try : <EOL> libcrypto . ERR_load_crypto_strings . argtypes = [ ] <EOL> libcrypto . ERR_load_crypto_strings . restype = None <EOL> libcrypto . ERR_get_error . argtypes = [ ] <EOL> libcrypto . ERR_get_error . restype = c_ulong <EOL> libcrypto . ERR_peek_error . argtypes = [ ] <EOL> libcrypto . ERR_peek_error . restype = c_ulong <EOL> libcrypto . ERR_error_string . argtypes = [ <EOL> c_ulong , <EOL> c_char_p <EOL> ] <EOL> libcrypto . ERR_error_string . restype = c_char_p <EOL> libcrypto . ERR_free_strings . argtypes = [ ] <EOL> libcrypto . ERR_free_strings . restype = None <EOL> libcrypto . OPENSSL_config . argtypes = [ <EOL> c_char_p <EOL> ] <EOL> libcrypto . OPENSSL_config . restype = None <EOL> libcrypto . EVP_CIPHER_CTX_new . argtype = [ ] <EOL> libcrypto . EVP_CIPHER_CTX_new . restype = P_EVP_CIPHER_CTX <EOL> libcrypto . EVP_CIPHER_CTX_set_key_length . argtypes = [ <EOL> P_EVP_CIPHER_CTX , <EOL> c_int <EOL> ] <EOL> libcrypto . EVP_CIPHER_CTX_set_key_length . restype = c_int <EOL> libcrypto . EVP_CIPHER_CTX_set_padding . argtypes = [ <EOL> P_EVP_CIPHER_CTX , <EOL> c_int <EOL> ] <EOL> libcrypto . EVP_CIPHER_CTX_set_padding . restype = c_int <EOL> libcrypto . EVP_CIPHER_CTX_ctrl . argtypes = [ <EOL> P_EVP_CIPHER_CTX , <EOL> c_int , <EOL> c_int , <EOL> c_void_p <EOL> ] <EOL> libcrypto . EVP_CIPHER_CTX_ctrl . restype = c_int <EOL> libcrypto . EVP_CIPHER_CTX_free . argtypes = [ <EOL> P_EVP_CIPHER_CTX <EOL> ] <EOL> libcrypto . EVP_CIPHER_CTX_free . restype = None <EOL> libcrypto . EVP_aes_128_cbc . argtypes = [ ] <EOL> libcrypto . EVP_aes_128_cbc . restype = P_EVP_CIPHER <EOL> libcrypto . EVP_aes_192_cbc . argtypes = [ ] <EOL> libcrypto . EVP_aes_192_cbc . restype = P_EVP_CIPHER <EOL> libcrypto . EVP_aes_256_cbc . argtypes = [ ] <EOL> libcrypto . EVP_aes_256_cbc . restype = P_EVP_CIPHER <EOL> libcrypto . EVP_des_cbc . argtypes = [ ] <EOL> libcrypto . EVP_des_cbc . restype = P_EVP_CIPHER <EOL> libcrypto . EVP_des_ede_cbc . argtypes = [ ] <EOL> libcrypto . EVP_des_ede_cbc . restype = P_EVP_CIPHER <EOL> libcrypto . EVP_des_ede3_cbc . argtypes = [ ] <EOL> libcrypto . EVP_des_ede3_cbc . restype = P_EVP_CIPHER <EOL> libcrypto . EVP_rc4 . argtypes = [ ] <EOL> libcrypto . EVP_rc4 . restype = P_EVP_CIPHER <EOL> libcrypto . EVP_rc2_cbc . argtypes = [ ] <EOL> libcrypto . EVP_rc2_cbc . restype = P_EVP_CIPHER <EOL> libcrypto . EVP_EncryptInit_ex . argtypes = [ <EOL> P_EVP_CIPHER_CTX , <EOL> P_EVP_CIPHER , <EOL> P_ENGINE , <EOL> c_char_p , <EOL> c_char_p <EOL> ] <EOL> libcrypto . EVP_EncryptInit_ex . restype = c_int <EOL> libcrypto . EVP_EncryptUpdate . argtypes = [ <EOL> P_EVP_CIPHER_CTX , <EOL> c_char_p , <EOL> p_int , <EOL> c_char_p , <EOL> c_int <EOL> ] <EOL> libcrypto . EVP_EncryptUpdate . restype = c_int <EOL> libcrypto . EVP_EncryptFinal_ex . argtypes = [ <EOL> P_EVP_CIPHER_CTX , <EOL> c_char_p , <EOL> p_int <EOL> ] <EOL> libcrypto . EVP_EncryptFinal_ex . restype = c_int <EOL> libcrypto . EVP_DecryptInit_ex . argtypes = [ <EOL> P_EVP_CIPHER_CTX , <EOL> P_EVP_CIPHER , <EOL> P_ENGINE , <EOL> c_char_p , <EOL> c_char_p <EOL> ] <EOL> libcrypto . EVP_DecryptInit_ex . restype = c_int <EOL> libcrypto . EVP_DecryptUpdate . argtypes = [ <EOL> P_EVP_CIPHER_CTX , <EOL> c_char_p , <EOL> p_int , <EOL> c_char_p , <EOL> c_int <EOL> ] <EOL> libcrypto . EVP_DecryptUpdate . restype = c_int <EOL> libcrypto . EVP_DecryptFinal_ex . argtypes = [ <EOL> P_EVP_CIPHER_CTX , <EOL> c_char_p , <EOL> p_int <EOL> ] <EOL> libcrypto . EVP_DecryptFinal_ex . restype = c_int <EOL> libcrypto . d2i_AutoPrivateKey . argtypes = [ <EOL> POINTER ( P_EVP_PKEY ) , <EOL> POINTER ( c_char_p ) , <EOL> c_int <EOL> ] <EOL> libcrypto . d2i_AutoPrivateKey . restype = P_EVP_PKEY <EOL> libcrypto . d2i_PUBKEY . argtypes = [ <EOL> POINTER ( P_EVP_PKEY ) , <EOL> POINTER ( c_char_p ) , <EOL> c_int <EOL> ] <EOL> libcrypto . d2i_PUBKEY . restype = P_EVP_PKEY <EOL> libcrypto . d2i_X509 . argtypes = [ <EOL> POINTER ( P_X509 ) , <EOL> POINTER ( c_char_p ) , <EOL> c_int <EOL> ] <EOL> libcrypto . d2i_X509 . restype = P_X509 <EOL> libcrypto . i2d_X509 . argtypes = [ <EOL> P_X509 , <EOL> POINTER ( c_char_p ) <EOL> ] <EOL> libcrypto . i2d_X509 . restype = c_int <EOL> libcrypto . X509_get_pubkey . argtypes = [ <EOL> P_X509 <EOL> ] <EOL> libcrypto . X509_get_pubkey . restype = P_EVP_PKEY <EOL> libcrypto . X509_free . argtypes = [ <EOL> P_X509 <EOL> ] <EOL> libcrypto . X509_free . restype = None <EOL> libcrypto . EVP_PKEY_free . argtypes = [ <EOL> P_EVP_PKEY <EOL> ] <EOL> libcrypto . EVP_PKEY_free . restype = None <EOL> libcrypto . EVP_MD_CTX_create . argtypes = [ ] <EOL> libcrypto . EVP_MD_CTX_create . restype = P_EVP_MD_CTX <EOL> libcrypto . EVP_MD_CTX_destroy . argtypes = [ <EOL> P_EVP_MD_CTX <EOL> ] <EOL> libcrypto . EVP_MD_CTX_destroy . restype = None <EOL> libcrypto . EVP_md5 . argtypes = [ ] <EOL> libcrypto . EVP_md5 . restype = P_EVP_MD <EOL> libcrypto . EVP_sha1 . argtypes = [ ] <EOL> libcrypto . EVP_sha1 . restype = P_EVP_MD <EOL> libcrypto . EVP_sha224 . argtypes = [ ] <EOL> libcrypto . EVP_sha224 . restype = P_EVP_MD <EOL> libcrypto . EVP_sha256 . argtypes = [ ] <EOL> libcrypto . EVP_sha256 . restype = P_EVP_MD <EOL> libcrypto . EVP_sha384 . argtypes = [ ] <EOL> libcrypto . EVP_sha384 . restype = P_EVP_MD <EOL> libcrypto . EVP_sha512 . argtypes = [ ] <EOL> libcrypto . EVP_sha512 . restype = P_EVP_MD <EOL> libcrypto . EVP_PKEY_size . argtypes = [ <EOL> P_EVP_PKEY <EOL> ] <EOL> libcrypto . EVP_PKEY_size . restype = c_int <EOL> libcrypto . EVP_PKEY_get1_RSA . argtypes = [ <EOL> P_EVP_PKEY <EOL> ] <EOL> libcrypto . EVP_PKEY_get1_RSA . restype = P_RSA <EOL> libcrypto . RSA_free . argtypes = [ <EOL> P_RSA <EOL> ] <EOL> libcrypto . RSA_free . restype = None <EOL> libcrypto . RSA_public_encrypt . argtypes = [ <EOL> c_int , <EOL> c_char_p , <EOL> c_char_p , <EOL> P_RSA , <EOL> c_int <EOL> ] <EOL> libcrypto . RSA_public_encrypt . restype = c_int <EOL> libcrypto . RSA_private_encrypt . argtypes = [ <EOL> c_int , <EOL> c_char_p , <EOL> c_char_p , <EOL> P_RSA , <EOL> c_int <EOL> ] <EOL> libcrypto . RSA_private_encrypt . restype = c_int <EOL> libcrypto . RSA_public_decrypt . argtypes = [ <EOL> c_int , <EOL> c_char_p , <EOL> c_char_p , <EOL> P_RSA , <EOL> c_int <EOL> ] <EOL> libcrypto . RSA_public_decrypt . restype = c_int <EOL> libcrypto . RSA_private_decrypt . argtypes = [ <EOL> c_int , <EOL> c_char_p , <EOL> c_char_p , <EOL> P_RSA , <EOL> c_int <EOL> ] <EOL> libcrypto . RSA_private_decrypt . restype = c_int <EOL> libcrypto . EVP_DigestUpdate . argtypes = [ <EOL> P_EVP_MD_CTX , <EOL> c_char_p , <EOL> c_uint <EOL> ] <EOL> libcrypto . EVP_DigestUpdate . restype = c_int <EOL> libcrypto . PKCS12_key_gen_uni . argtypes = [ <EOL> c_char_p , <EOL> c_int , <EOL> c_char_p , <EOL> c_int , <EOL> c_int , <EOL> c_int , <EOL> c_int , <EOL> c_char_p , <EOL> c_void_p <EOL> ] <EOL> libcrypto . PKCS12_key_gen_uni . restype = c_int <EOL> libcrypto . BN_free . argtypes = [ <EOL> P_BIGNUM <EOL> ] <EOL> libcrypto . BN_free . restype = None <EOL> libcrypto . BN_dec2bn . argtypes = [ <EOL> POINTER ( P_BIGNUM ) , <EOL> c_char_p <EOL> ] <EOL> libcrypto . BN_dec2bn . restype = c_int <EOL> libcrypto . DH_new . argtypes = [ ] <EOL> libcrypto . DH_new . restype = P_DH <EOL> libcrypto . DH_generate_parameters_ex . argtypes = [ <EOL> P_DH , <EOL> c_int , <EOL> c_int , <EOL> P_BN_GENCB <EOL> ] <EOL> libcrypto . DH_generate_parameters_ex . restype = c_int <EOL> libcrypto . i2d_DHparams . argtypes = [ <EOL> P_DH , <EOL> POINTER ( c_char_p ) <EOL> ] <EOL> libcrypto . i2d_DHparams . restype = c_int <EOL> libcrypto . DH_free . argtypes = [ <EOL> P_DH <EOL> ] <EOL> libcrypto . DH_free . restype = None <EOL> libcrypto . RSA_new . argtypes = [ ] <EOL> libcrypto . RSA_new . restype = P_RSA <EOL> libcrypto . RSA_generate_key_ex . argtypes = [ <EOL> P_RSA , <EOL> c_int , <EOL> P_BIGNUM , <EOL> P_BN_GENCB <EOL> ] <EOL> libcrypto . RSA_generate_key_ex . restype = c_int <EOL> libcrypto . i2d_RSAPublicKey . argtypes = [ <EOL> P_RSA , <EOL> POINTER ( c_char_p ) <EOL> ] <EOL> libcrypto . i2d_RSAPublicKey . restype = c_int <EOL> libcrypto . i2d_RSAPrivateKey . argtypes = [ <EOL> P_RSA , <EOL> POINTER ( c_char_p ) <EOL> ] <EOL> libcrypto . i2d_RSAPrivateKey . restype = c_int <EOL> libcrypto . RSA_free . argtypes = [ <EOL> P_RSA <EOL> ] <EOL> libcrypto . RSA_free . restype = None <EOL> libcrypto . DSA_new . argtypes = [ ] <EOL> libcrypto . DSA_new . restype = P_DSA <EOL> libcrypto . DSA_generate_parameters_ex . argtypes = [ <EOL> P_DSA , <EOL> c_int , <EOL> c_char_p , <EOL> c_int , <EOL> POINTER ( c_int ) , <EOL> POINTER ( c_ulong ) , <EOL> P_BN_GENCB <EOL> ] <EOL> libcrypto . DSA_generate_parameters_ex . restype = c_int <EOL> libcrypto . DSA_generate_key . argtypes = [ <EOL> P_DSA <EOL> ] <EOL> libcrypto . DSA_generate_key . restype = c_int <EOL> libcrypto . i2d_DSA_PUBKEY . argtypes = [ <EOL> P_DSA , <EOL> POINTER ( c_char_p ) <EOL> ] <EOL> libcrypto . i2d_DSA_PUBKEY . restype = c_int <EOL> libcrypto . i2d_DSAPrivateKey . argtypes = [ <EOL> P_DSA , <EOL> POINTER ( c_char_p ) <EOL> ] <EOL> libcrypto . i2d_DSAPrivateKey . restype = c_int <EOL> libcrypto . DSA_free . argtypes = [ <EOL> P_DSA <EOL> ] <EOL> libcrypto . DSA_free . restype = None <EOL> libcrypto . EC_KEY_new_by_curve_name . argtypes = [ <EOL> c_int <EOL> ] <EOL> libcrypto . EC_KEY_new_by_curve_name . restype = P_EC_KEY <EOL> libcrypto . EC_KEY_generate_key . argtypes = [ <EOL> P_EC_KEY <EOL> ] <EOL> libcrypto . EC_KEY_generate_key . restype = c_int <EOL> libcrypto . EC_KEY_set_asn1_flag . argtypes = [ <EOL> P_EC_KEY , <EOL> c_int <EOL> ] <EOL> libcrypto . EC_KEY_set_asn1_flag . restype = None <EOL> libcrypto . i2d_ECPrivateKey . argtypes = [ <EOL> P_EC_KEY , <EOL> POINTER ( c_char_p ) <EOL> ] <EOL> libcrypto . i2d_ECPrivateKey . restype = c_int <EOL> libcrypto . i2o_ECPublicKey . argtypes = [ <EOL> P_EC_KEY , <EOL> POINTER ( c_char_p ) <EOL> ] <EOL> libcrypto . i2o_ECPublicKey . restype = c_int <EOL> libcrypto . EC_KEY_free . argtypes = [ <EOL> P_EC_KEY <EOL> ] <EOL> libcrypto . EC_KEY_free . restype = None <EOL> if version_info < ( <NUM_LIT:1> , ) : <EOL> P_DSA_SIG = c_void_p <EOL> P_ECDSA_SIG = c_void_p <EOL> libcrypto . DSA_do_sign . argtypes = [ <EOL> c_char_p , <EOL> c_int , <EOL> P_DSA <EOL> ] <EOL> libcrypto . DSA_do_sign . restype = P_DSA_SIG <EOL> libcrypto . ECDSA_do_sign . argtypes = [ <EOL> c_char_p , <EOL> c_int , <EOL> P_EC_KEY <EOL> ] <EOL> libcrypto . ECDSA_do_sign . restype = P_ECDSA_SIG <EOL> libcrypto . d2i_DSA_SIG . argtypes = [ <EOL> POINTER ( P_DSA_SIG ) , <EOL> POINTER ( c_char_p ) , <EOL> c_long <EOL> ] <EOL> libcrypto . d2i_DSA_SIG . restype = P_DSA_SIG <EOL> libcrypto . d2i_ECDSA_SIG . argtypes = [ <EOL> POINTER ( P_ECDSA_SIG ) , <EOL> POINTER ( c_char_p ) , <EOL> c_long <EOL> ] <EOL> libcrypto . d2i_ECDSA_SIG . restype = P_ECDSA_SIG <EOL> libcrypto . i2d_DSA_SIG . argtypes = [ <EOL> P_DSA_SIG , <EOL> POINTER ( c_char_p ) <EOL> ] <EOL> libcrypto . i2d_DSA_SIG . restype = c_int <EOL> libcrypto . i2d_ECDSA_SIG . argtypes = [ <EOL> P_ECDSA_SIG , <EOL> POINTER ( c_char_p ) <EOL> ] <EOL> libcrypto . i2d_ECDSA_SIG . restype = c_int <EOL> libcrypto . DSA_do_verify . argtypes = [ <EOL> c_char_p , <EOL> c_int , <EOL> P_DSA_SIG , <EOL> P_DSA <EOL> ] <EOL> libcrypto . DSA_do_verify . restype = c_int <EOL> libcrypto . ECDSA_do_verify . argtypes = [ <EOL> c_char_p , <EOL> c_int , <EOL> P_ECDSA_SIG , <EOL> P_EC_KEY <EOL> ] <EOL> libcrypto . ECDSA_do_verify . restype = c_int <EOL> libcrypto . DSA_SIG_free . argtypes = [ <EOL> P_DSA_SIG <EOL> ] <EOL> libcrypto . DSA_SIG_free . restype = None <EOL> libcrypto . ECDSA_SIG_free . argtypes = [ <EOL> P_ECDSA_SIG <EOL> ] <EOL> libcrypto . ECDSA_SIG_free . restype = None <EOL> libcrypto . EVP_PKEY_get1_DSA . argtypes = [ <EOL> P_EVP_PKEY <EOL> ] <EOL> libcrypto . EVP_PKEY_get1_DSA . restype = P_DSA <EOL> libcrypto . EVP_PKEY_get1_EC_KEY . argtypes = [ <EOL> P_EVP_PKEY <EOL> ] <EOL> libcrypto . EVP_PKEY_get1_EC_KEY . restype = P_EC_KEY <EOL> libcrypto . RSA_verify_PKCS1_PSS . argtypes = [ <EOL> P_RSA , <EOL> c_char_p , <EOL> P_EVP_MD , <EOL> c_char_p , <EOL> c_int <EOL> ] <EOL> libcrypto . RSA_verify_PKCS1_PSS . restype = c_int <EOL> libcrypto . RSA_padding_add_PKCS1_PSS . argtypes = [ <EOL> P_RSA , <EOL> c_char_p , <EOL> c_char_p , <EOL> P_EVP_MD , <EOL> c_int <EOL> ] <EOL> libcrypto . RSA_padding_add_PKCS1_PSS . restype = c_int <EOL> libcrypto . EVP_DigestInit_ex . argtypes = [ <EOL> P_EVP_MD_CTX , <EOL> P_EVP_MD , <EOL> P_ENGINE <EOL> ] <EOL> libcrypto . EVP_DigestInit_ex . restype = c_int <EOL> libcrypto . EVP_SignFinal . argtypes = [ <EOL> P_EVP_MD_CTX , <EOL> c_char_p , <EOL> p_uint , <EOL> P_EVP_PKEY <EOL> ] <EOL> libcrypto . EVP_SignFinal . restype = c_int <EOL> libcrypto . EVP_VerifyFinal . argtypes = [ <EOL> P_EVP_MD_CTX , <EOL> c_char_p , <EOL> c_uint , <EOL> P_EVP_PKEY <EOL> ] <EOL> libcrypto . EVP_VerifyFinal . restype = c_int <EOL> libcrypto . EVP_MD_CTX_set_flags . argtypes = [ <EOL> P_EVP_MD_CTX , <EOL> c_int <EOL> ] <EOL> libcrypto . EVP_MD_CTX_set_flags . restype = None <EOL> else : <EOL> libcrypto . PKCS5_PBKDF2_HMAC . argtypes = [ <EOL> c_char_p , <EOL> c_int , <EOL> c_char_p , <EOL> c_int , <EOL> c_int , <EOL> P_EVP_MD , <EOL> c_int , <EOL> c_char_p <EOL> ] <EOL> libcrypto . PKCS5_PBKDF2_HMAC . restype = c_int <EOL> libcrypto . EVP_DigestSignInit . argtypes = [ <EOL> P_EVP_MD_CTX , <EOL> POINTER ( P_EVP_PKEY_CTX ) , <EOL> P_EVP_MD , <EOL> P_ENGINE , <EOL> P_EVP_PKEY <EOL> ] <EOL> libcrypto . EVP_DigestSignInit . restype = c_int <EOL> libcrypto . EVP_DigestSignFinal . argtypes = [ <EOL> P_EVP_MD_CTX , <EOL> c_char_p , <EOL> POINTER ( c_size_t ) <EOL> ] <EOL> libcrypto . EVP_DigestSignFinal . restype = c_int <EOL> libcrypto . EVP_DigestVerifyInit . argtypes = [ <EOL> P_EVP_MD_CTX , <EOL> POINTER ( P_EVP_PKEY_CTX ) , <EOL> P_EVP_MD , <EOL> P_ENGINE , <EOL> P_EVP_PKEY <EOL> ] <EOL> libcrypto . EVP_DigestVerifyInit . restype = c_int <EOL> libcrypto . EVP_DigestVerifyFinal . argtypes = [ <EOL> P_EVP_MD_CTX , <EOL> c_char_p , <EOL> c_size_t <EOL> ] <EOL> libcrypto . EVP_DigestVerifyFinal . restype = c_int <EOL> libcrypto . EVP_PKEY_CTX_ctrl . argtypes = [ <EOL> P_EVP_PKEY_CTX , <EOL> c_int , <EOL> c_int , <EOL> c_int , <EOL> c_int , <EOL> c_void_p <EOL> ] <EOL> libcrypto . EVP_PKEY_CTX_ctrl . restype = c_int <EOL> except ( AttributeError ) : <EOL> raise FFIEngineError ( '<STR_LIT>' ) <EOL> setattr ( libcrypto , '<STR_LIT>' , EVP_PKEY_CTX ) <EOL> setattr ( libcrypto , '<STR_LIT>' , BIGNUM ) </s>
