Ruby
2.4.2p198(2017-09-14revision59899)
|
#include "ossl.h"
Go to the source code of this file.
Data Structures | |
struct | rsa_blocking_gen_arg |
Macros | |
#define | GetPKeyRSA(obj, pkey) |
#define | GetRSA(obj, rsa) |
#define | DefRSAConst(x) rb_define_const(cRSA, #x, INT2NUM(RSA_##x)) |
Variables | |
VALUE | cRSA |
VALUE | eRSAError |
#define DefRSAConst | ( | x | ) | rb_define_const(cRSA, #x, INT2NUM(RSA_##x)) |
Definition at line 687 of file ossl_pkey_rsa.c.
Referenced by Init_ossl_rsa().
#define GetPKeyRSA | ( | obj, | |
pkey | |||
) |
Definition at line 14 of file ossl_pkey_rsa.c.
Referenced by ossl_rsa_to_public_key().
#define GetRSA | ( | obj, | |
rsa | |||
) |
Definition at line 20 of file ossl_pkey_rsa.c.
Referenced by ossl_rsa_export(), ossl_rsa_get_params(), ossl_rsa_initialize_copy(), ossl_rsa_is_private(), ossl_rsa_is_public(), ossl_rsa_private_decrypt(), ossl_rsa_private_encrypt(), ossl_rsa_public_decrypt(), ossl_rsa_public_encrypt(), ossl_rsa_to_der(), and ossl_rsa_to_text().
void Init_ossl_rsa | ( | void | ) |
Definition at line 690 of file ossl_pkey_rsa.c.
References cPKey, cRSA, DEF_OSSL_PKEY_BN, DefRSAConst, rsa_blocking_gen_arg::e, eOSSLError, ePKeyError, eRSAError, mOSSL, mPKey, ossl_rsa_export(), ossl_rsa_get_params(), ossl_rsa_initialize(), ossl_rsa_initialize_copy(), ossl_rsa_is_private(), ossl_rsa_is_public(), ossl_rsa_private_decrypt(), ossl_rsa_private_encrypt(), ossl_rsa_public_decrypt(), ossl_rsa_public_encrypt(), ossl_rsa_s_generate(), ossl_rsa_to_der(), ossl_rsa_to_public_key(), ossl_rsa_to_text(), rb_cObject, rb_define_alias(), rb_define_class_under(), rb_define_copy_func, rb_define_method(), rb_define_module_under(), rb_define_singleton_method(), and rsa_blocking_gen_arg::rsa.
Referenced by Init_ossl_pkey().
Definition at line 341 of file ossl_pkey_rsa.c.
References eRSAError, GetCipherPtr(), GetRSA, NIL_P, NULL, ossl_membio2str(), ossl_pem_passwd_cb(), ossl_pem_passwd_value(), ossl_raise(), rb_scan_args(), rsa_blocking_gen_arg::rsa, and RSA_HAS_PRIVATE().
Referenced by Init_ossl_rsa().
Definition at line 551 of file ossl_pkey_rsa.c.
References rsa_blocking_gen_arg::e, GetRSA, hash(), ossl_bn_new(), rb_hash_aset(), rb_hash_new(), rb_str_new2, and rsa_blocking_gen_arg::rsa.
Referenced by Init_ossl_rsa().
Definition at line 221 of file ossl_pkey_rsa.c.
References eRSAError, GetPKey, NIL_P, NULL, NUM2INT, NUM2ULONG, OSSL_BIO_reset, ossl_obj2bio(), ossl_pem_passwd_cb(), ossl_pem_passwd_value(), ossl_raise(), ossl_to_der_if_possible(), RB_INTEGER_TYPE_P, rb_scan_args(), rsa_blocking_gen_arg::rsa, and rsa_generate().
Referenced by Init_ossl_rsa().
Definition at line 275 of file ossl_pkey_rsa.c.
References eRSAError, EVP_PKEY_base_id, GetPKey, GetRSA, ossl_raise(), and rsa_blocking_gen_arg::rsa.
Referenced by Init_ossl_rsa().
Definition at line 321 of file ossl_pkey_rsa.c.
References GetRSA, Qfalse, Qtrue, rsa_blocking_gen_arg::rsa, and RSA_PRIVATE().
Referenced by Init_ossl_rsa().
Definition at line 302 of file ossl_pkey_rsa.c.
References GetRSA, Qtrue, and rsa_blocking_gen_arg::rsa.
Referenced by Init_ossl_rsa().
VALUE ossl_rsa_new | ( | EVP_PKEY * | pkey | ) |
Definition at line 73 of file ossl_pkey_rsa.c.
References cRSA, eRSAError, EVP_PKEY_base_id, NewPKey, NULL, ossl_raise(), Qfalse, rb_eTypeError, rsa_instance(), and SetPKey.
Referenced by pkey_new0().
Definition at line 514 of file ossl_pkey_rsa.c.
References eRSAError, GetRSA, NULL, NUM2INT, ossl_raise(), rb_scan_args(), rb_str_new(), rb_str_set_len(), rsa_blocking_gen_arg::rsa, RSA_PRIVATE(), RSTRING_LENINT, RSTRING_PTR, and StringValue.
Referenced by Init_ossl_rsa().
Definition at line 480 of file ossl_pkey_rsa.c.
References eRSAError, GetRSA, NULL, NUM2INT, ossl_raise(), rb_scan_args(), rb_str_new(), rb_str_set_len(), rsa_blocking_gen_arg::rsa, RSA_PRIVATE(), RSTRING_LENINT, RSTRING_PTR, and StringValue.
Referenced by Init_ossl_rsa().
Definition at line 448 of file ossl_pkey_rsa.c.
References eRSAError, GetRSA, NULL, NUM2INT, ossl_raise(), rb_scan_args(), rb_str_new(), rb_str_set_len(), rsa_blocking_gen_arg::rsa, RSTRING_LENINT, RSTRING_PTR, and StringValue.
Referenced by Init_ossl_rsa().
Definition at line 416 of file ossl_pkey_rsa.c.
References eRSAError, GetRSA, NULL, NUM2INT, ossl_raise(), rb_scan_args(), rb_str_new(), rb_str_set_len(), rsa_blocking_gen_arg::rsa, RSTRING_LENINT, RSTRING_PTR, and StringValue.
Referenced by Init_ossl_rsa().
Definition at line 180 of file ossl_pkey_rsa.c.
References eRSAError, NIL_P, NULL, NUM2INT, NUM2ULONG, ossl_raise(), Qfalse, rb_scan_args(), rsa_blocking_gen_arg::rsa, rsa_generate(), rsa_instance(), and rsa_blocking_gen_arg::size.
Referenced by Init_ossl_rsa().
Definition at line 383 of file ossl_pkey_rsa.c.
References eRSAError, GetRSA, len, NULL, ossl_raise(), ossl_str_adjust, rb_str_new(), rsa_blocking_gen_arg::rsa, RSA_HAS_PRIVATE(), and RSTRING_PTR.
Referenced by Init_ossl_rsa().
Definition at line 612 of file ossl_pkey_rsa.c.
References rsa_blocking_gen_arg::e, eRSAError, GetPKeyRSA, key, NULL, OSSL_PKEY_BN_DEF2, OSSL_PKEY_BN_DEF3, ossl_raise(), Qfalse, rb_obj_class(), rsa_blocking_gen_arg::rsa, and rsa_instance().
Referenced by Init_ossl_rsa().
Definition at line 586 of file ossl_pkey_rsa.c.
References eRSAError, GetRSA, NULL, ossl_membio2str(), ossl_raise(), and rsa_blocking_gen_arg::rsa.
Referenced by Init_ossl_rsa().
|
static |
Definition at line 106 of file ossl_pkey_rsa.c.
References rsa_blocking_gen_arg::cb, rsa_blocking_gen_arg::e, rsa_blocking_gen_arg::result, rsa_blocking_gen_arg::rsa, and rsa_blocking_gen_arg::size.
Referenced by rsa_generate().
|
static |
Definition at line 114 of file ossl_pkey_rsa.c.
References BN_GENCB_free, BN_GENCB_new, rsa_blocking_gen_arg::cb, rsa_blocking_gen_arg::e, NULL, ossl_clear_error(), ossl_generate_cb_2(), ossl_generate_cb_stop(), rb_block_given_p(), rb_jump_tag(), rb_thread_call_without_gvl(), rsa_blocking_gen_arg::result, rsa_blocking_gen_arg::rsa, rsa_blocking_gen(), rsa_blocking_gen_arg::size, ossl_generate_cb_arg::state, and ossl_generate_cb_arg::yield.
Referenced by ossl_rsa_initialize(), and ossl_rsa_s_generate().
|
inlinestatic |
Definition at line 27 of file ossl_pkey_rsa.c.
Referenced by ossl_rsa_export(), ossl_rsa_to_der(), and RSA_PRIVATE().
Definition at line 51 of file ossl_pkey_rsa.c.
References NewPKey, Qfalse, and SetPKey.
Referenced by ossl_rsa_new(), ossl_rsa_s_generate(), and ossl_rsa_to_public_key().
|
inlinestatic |
Definition at line 36 of file ossl_pkey_rsa.c.
References OSSL_PKEY_IS_PRIVATE, and RSA_HAS_PRIVATE().
Referenced by ossl_rsa_is_private(), ossl_rsa_private_decrypt(), and ossl_rsa_private_encrypt().
VALUE cRSA |
Definition at line 44 of file ossl_pkey_rsa.c.
Referenced by Init_ossl_rsa(), and ossl_rsa_new().
VALUE eRSAError |
Definition at line 45 of file ossl_pkey_rsa.c.
Referenced by Init_ossl_rsa(), ossl_rsa_export(), ossl_rsa_initialize(), ossl_rsa_initialize_copy(), ossl_rsa_new(), ossl_rsa_private_decrypt(), ossl_rsa_private_encrypt(), ossl_rsa_public_decrypt(), ossl_rsa_public_encrypt(), ossl_rsa_s_generate(), ossl_rsa_to_der(), ossl_rsa_to_public_key(), and ossl_rsa_to_text().