Ruby
2.4.2p198(2017-09-14revision59899)
|
#include "ossl.h"
Go to the source code of this file.
Data Structures | |
struct | dh_blocking_gen_arg |
Macros | |
#define | GetPKeyDH(obj, pkey) |
#define | GetDH(obj, dh) |
Functions | |
static VALUE | dh_instance (VALUE klass, DH *dh) |
VALUE | ossl_dh_new (EVP_PKEY *pkey) |
static void * | dh_blocking_gen (void *arg) |
static DH * | dh_generate (int size, int gen) |
static VALUE | ossl_dh_s_generate (int argc, VALUE *argv, VALUE klass) |
static VALUE | ossl_dh_initialize (int argc, VALUE *argv, VALUE self) |
static VALUE | ossl_dh_initialize_copy (VALUE self, VALUE other) |
static VALUE | ossl_dh_is_public (VALUE self) |
static VALUE | ossl_dh_is_private (VALUE self) |
static VALUE | ossl_dh_export (VALUE self) |
static VALUE | ossl_dh_to_der (VALUE self) |
static VALUE | ossl_dh_get_params (VALUE self) |
static VALUE | ossl_dh_to_text (VALUE self) |
static VALUE | ossl_dh_to_public_key (VALUE self) |
static VALUE | ossl_dh_check_params (VALUE self) |
static VALUE | ossl_dh_generate_key (VALUE self) |
static VALUE | ossl_dh_compute_key (VALUE self, VALUE pub) |
void | Init_ossl_dh (void) |
Variables | |
VALUE | cDH |
VALUE | eDHError |
#define GetDH | ( | obj, | |
dh | |||
) |
Definition at line 20 of file ossl_pkey_dh.c.
Referenced by ossl_dh_check_params(), ossl_dh_compute_key(), ossl_dh_export(), ossl_dh_generate_key(), ossl_dh_get_params(), ossl_dh_initialize_copy(), ossl_dh_is_private(), ossl_dh_is_public(), ossl_dh_to_der(), ossl_dh_to_public_key(), and ossl_dh_to_text().
#define GetPKeyDH | ( | obj, | |
pkey | |||
) |
Definition at line 14 of file ossl_pkey_dh.c.
|
static |
Definition at line 90 of file ossl_pkey_dh.c.
References dh_blocking_gen_arg::cb, dh_blocking_gen_arg::dh, dh_blocking_gen_arg::gen, dh_blocking_gen_arg::result, and dh_blocking_gen_arg::size.
Referenced by dh_generate().
|
static |
Definition at line 98 of file ossl_pkey_dh.c.
References BN_GENCB_free, BN_GENCB_new, dh_blocking_gen_arg::cb, dh_blocking_gen_arg::dh, dh_blocking_gen(), dh_blocking_gen_arg::gen, NULL, ossl_clear_error(), ossl_generate_cb_2(), ossl_generate_cb_stop(), rb_block_given_p(), rb_jump_tag(), rb_thread_call_without_gvl(), dh_blocking_gen_arg::result, dh_blocking_gen_arg::size, ossl_generate_cb_arg::state, and ossl_generate_cb_arg::yield.
Referenced by ossl_dh_initialize(), and ossl_dh_s_generate().
Definition at line 36 of file ossl_pkey_dh.c.
References NewPKey, Qfalse, and SetPKey.
Referenced by ossl_dh_new(), ossl_dh_s_generate(), and ossl_dh_to_public_key().
void Init_ossl_dh | ( | void | ) |
Definition at line 576 of file ossl_pkey_dh.c.
References cDH, cPKey, DEF_OSSL_PKEY_BN, dh_blocking_gen_arg::dh, eDHError, eOSSLError, ePKeyError, mOSSL, mPKey, ossl_dh_check_params(), ossl_dh_compute_key(), ossl_dh_export(), ossl_dh_generate_key(), ossl_dh_get_params(), ossl_dh_initialize(), ossl_dh_initialize_copy(), ossl_dh_is_private(), ossl_dh_is_public(), ossl_dh_s_generate(), ossl_dh_to_der(), ossl_dh_to_public_key(), ossl_dh_to_text(), priv_key, pub_key, rb_cObject, rb_define_alias(), rb_define_class_under(), rb_define_copy_func, rb_define_method(), rb_define_module_under(), and rb_define_singleton_method().
Referenced by Init_ossl_pkey().
Definition at line 481 of file ossl_pkey_dh.c.
References dh_blocking_gen_arg::dh, GetDH, Qfalse, and Qtrue.
Referenced by Init_ossl_dh().
Definition at line 533 of file ossl_pkey_dh.c.
References dh_blocking_gen_arg::dh, eDHError, GetBNPtr, GetDH, key, len, NULL, OSSL_PKEY_BN_DEF2, OSSL_PKEY_BN_DEF3, ossl_raise(), priv_key, pub_key, rb_str_new(), rb_str_set_len(), and RSTRING_PTR.
Referenced by Init_ossl_dh().
Definition at line 329 of file ossl_pkey_dh.c.
References dh_blocking_gen_arg::dh, eDHError, GetDH, NULL, ossl_membio2str(), and ossl_raise().
Referenced by Init_ossl_dh().
Definition at line 511 of file ossl_pkey_dh.c.
References dh_blocking_gen_arg::dh, eDHError, GetDH, and ossl_raise().
Referenced by Init_ossl_dh().
Definition at line 386 of file ossl_pkey_dh.c.
References dh_blocking_gen_arg::dh, GetDH, hash(), ossl_bn_new(), priv_key, pub_key, rb_hash_aset(), rb_hash_new(), and rb_str_new2.
Referenced by Init_ossl_dh().
Definition at line 203 of file ossl_pkey_dh.c.
References dh_blocking_gen_arg::dh, dh_generate(), eDHError, dh_blocking_gen_arg::gen, GetPKey, NIL_P, NULL, NUM2INT, OSSL_BIO_reset, ossl_obj2bio(), ossl_raise(), ossl_to_der_if_possible(), RB_INTEGER_TYPE_P, and rb_scan_args().
Referenced by Init_ossl_dh().
Definition at line 244 of file ossl_pkey_dh.c.
References dh_blocking_gen_arg::dh, eDHError, EVP_PKEY_base_id, GetDH, GetPKey, and ossl_raise().
Referenced by Init_ossl_dh().
Definition at line 303 of file ossl_pkey_dh.c.
References dh_blocking_gen_arg::dh, GetDH, NULL, Qfalse, and Qtrue.
Referenced by Init_ossl_dh().
Definition at line 284 of file ossl_pkey_dh.c.
References dh_blocking_gen_arg::dh, GetDH, NULL, Qfalse, and Qtrue.
Referenced by Init_ossl_dh().
VALUE ossl_dh_new | ( | EVP_PKEY * | pkey | ) |
Definition at line 58 of file ossl_pkey_dh.c.
References cDH, dh_instance(), eDHError, EVP_PKEY_base_id, NewPKey, NULL, ossl_raise(), Qfalse, rb_eTypeError, and SetPKey.
Referenced by pkey_new0().
Definition at line 158 of file ossl_pkey_dh.c.
References dh_blocking_gen_arg::dh, dh_generate(), dh_instance(), eDHError, dh_blocking_gen_arg::gen, NULL, NUM2INT, ossl_raise(), Qfalse, rb_scan_args(), and dh_blocking_gen_arg::size.
Referenced by Init_ossl_dh().
Definition at line 358 of file ossl_pkey_dh.c.
References dh_blocking_gen_arg::dh, eDHError, GetDH, len, NULL, ossl_raise(), ossl_str_adjust, rb_str_new(), and RSTRING_PTR.
Referenced by Init_ossl_dh().
Definition at line 456 of file ossl_pkey_dh.c.
References dh_blocking_gen_arg::dh, dh_instance(), eDHError, GetDH, NULL, ossl_raise(), Qfalse, and rb_obj_class().
Referenced by Init_ossl_dh().
Definition at line 415 of file ossl_pkey_dh.c.
References dh_blocking_gen_arg::dh, eDHError, GetDH, NULL, ossl_membio2str(), and ossl_raise().
Referenced by Init_ossl_dh().
VALUE cDH |
Definition at line 29 of file ossl_pkey_dh.c.
Referenced by Init_ossl_dh(), and ossl_dh_new().
VALUE eDHError |
Definition at line 30 of file ossl_pkey_dh.c.
Referenced by Init_ossl_dh(), ossl_dh_compute_key(), ossl_dh_export(), ossl_dh_generate_key(), ossl_dh_initialize(), ossl_dh_initialize_copy(), ossl_dh_new(), ossl_dh_s_generate(), ossl_dh_to_der(), ossl_dh_to_public_key(), and ossl_dh_to_text().