Ruby
2.1.10p492(2016-04-01revision54464)
|
#include "ossl.h"
Go to the source code of this file.
Macros | |
#define | GetPKeyDH(obj, pkey) |
#define | DH_HAS_PRIVATE(dh) ((dh)->priv_key) |
#define | DH_PRIVATE(dh) DH_HAS_PRIVATE(dh) |
Functions | |
static VALUE | dh_instance (VALUE klass, DH *dh) |
VALUE | ossl_dh_new (EVP_PKEY *pkey) |
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_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) |
static DH * | ossl_create_dh (unsigned char *p, size_t plen, unsigned char *g, size_t glen) |
void | Init_ossl_dh () |
Variables | |
VALUE | cDH |
VALUE | eDHError |
static unsigned char | DEFAULT_DH_512_PRIM [] |
static unsigned char | DEFAULT_DH_512_GEN [] = { 0x02 } |
DH * | OSSL_DEFAULT_DH_512 = NULL |
static unsigned char | DEFAULT_DH_1024_PRIM [] |
static unsigned char | DEFAULT_DH_1024_GEN [] = { 0x02 } |
DH * | OSSL_DEFAULT_DH_1024 = NULL |
#define DH_HAS_PRIVATE | ( | dh | ) | ((dh)->priv_key) |
Definition at line 22 of file ossl_pkey_dh.c.
#define DH_PRIVATE | ( | dh | ) | DH_HAS_PRIVATE(dh) |
Definition at line 27 of file ossl_pkey_dh.c.
Referenced by ossl_dh_is_private().
#define GetPKeyDH | ( | obj, | |
pkey | |||
) |
Definition at line 15 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_is_private(), ossl_dh_is_public(), ossl_dh_to_der(), ossl_dh_to_public_key(), and ossl_dh_to_text().
|
static |
Definition at line 103 of file ossl_pkey_dh.c.
References NULL, ossl_generate_cb(), rb_block_given_p(), rb_jump_tag(), rb_thread_call_without_gvl(), and size.
Referenced by ossl_dh_initialize(), and ossl_dh_s_generate().
Definition at line 41 of file ossl_pkey_dh.c.
References Qfalse, and WrapPKey.
Referenced by ossl_dh_new(), ossl_dh_s_generate(), and ossl_dh_to_public_key().
void Init_ossl_dh | ( | void | ) |
Definition at line 591 of file ossl_pkey_dh.c.
References cDH, cPKey, DEF_OSSL_PKEY_BN, DEFAULT_DH_1024_GEN, DEFAULT_DH_1024_PRIM, DEFAULT_DH_512_GEN, DEFAULT_DH_512_PRIM, eDHError, ePKeyError, mOSSL, mPKey, ossl_create_dh(), OSSL_DEFAULT_DH_1024, OSSL_DEFAULT_DH_512, ossl_dh_check_params(), ossl_dh_compute_key(), ossl_dh_export(), ossl_dh_generate_key(), ossl_dh_get_params(), ossl_dh_initialize(), 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(), rb_define_alias(), rb_define_class_under(), rb_define_method(), rb_define_module(), rb_define_module_under(), and rb_define_singleton_method().
Referenced by Init_ossl_pkey().
|
static |
Definition at line 572 of file ossl_pkey_dh.c.
References eDHError, NULL, ossl_raise(), and rb_long2int.
Referenced by Init_ossl_dh().
Definition at line 440 of file ossl_pkey_dh.c.
References GetPKeyDH, Qfalse, and Qtrue.
Referenced by Init_ossl_dh().
Definition at line 498 of file ossl_pkey_dh.c.
References eDHError, GetBNPtr(), GetPKeyDH, NULL, ossl_raise(), rb_str_new(), rb_str_set_len(), and RSTRING_PTR.
Referenced by Init_ossl_dh().
Definition at line 290 of file ossl_pkey_dh.c.
References eDHError, GetPKeyDH, NULL, ossl_membio2str(), and ossl_raise().
Referenced by Init_ossl_dh().
Definition at line 473 of file ossl_pkey_dh.c.
References eDHError, GetPKeyDH, and ossl_raise().
Referenced by Init_ossl_dh().
Definition at line 347 of file ossl_pkey_dh.c.
References GetPKeyDH, hash(), ossl_bn_new(), rb_hash_aset(), rb_hash_new(), and rb_str_new2.
Referenced by Init_ossl_dh().
Definition at line 205 of file ossl_pkey_dh.c.
References argc, argv, dh_generate(), eDHError, FIX2INT, FIXNUM_P, GetPKey, NIL_P, NULL, NUM2INT, OSSL_BIO_reset, ossl_obj2bio(), ossl_raise(), ossl_to_der_if_possible(), and rb_scan_args().
Referenced by Init_ossl_dh().
Definition at line 270 of file ossl_pkey_dh.c.
References DH_PRIVATE, GetPKeyDH, Qfalse, and Qtrue.
Referenced by Init_ossl_dh().
Definition at line 253 of file ossl_pkey_dh.c.
References GetPKeyDH, Qfalse, and Qtrue.
Referenced by Init_ossl_dh().
VALUE ossl_dh_new | ( | EVP_PKEY * | pkey | ) |
Definition at line 62 of file ossl_pkey_dh.c.
References cDH, dh_instance(), eDHError, NULL, ossl_raise(), Qfalse, rb_eTypeError, and WrapPKey.
Referenced by ossl_pkey_new().
Definition at line 162 of file ossl_pkey_dh.c.
References argc, argv, dh_generate(), dh_instance(), eDHError, NULL, NUM2INT, ossl_raise(), Qfalse, rb_scan_args(), and size.
Referenced by Init_ossl_dh().
Definition at line 319 of file ossl_pkey_dh.c.
References eDHError, GetPKeyDH, NULL, ossl_raise(), ossl_str_adjust, rb_str_new(), and RSTRING_PTR.
Referenced by Init_ossl_dh().
Definition at line 414 of file ossl_pkey_dh.c.
References CLASS_OF, dh_instance(), eDHError, GetPKeyDH, NULL, ossl_raise(), and Qfalse.
Referenced by Init_ossl_dh().
Definition at line 373 of file ossl_pkey_dh.c.
References eDHError, GetPKeyDH, NULL, ossl_membio2str(), and ossl_raise().
Referenced by Init_ossl_dh().
VALUE cDH |
Definition at line 34 of file ossl_pkey_dh.c.
Referenced by Init_ossl_dh(), and ossl_dh_new().
|
static |
Definition at line 568 of file ossl_pkey_dh.c.
Referenced by Init_ossl_dh().
|
static |
Definition at line 550 of file ossl_pkey_dh.c.
Referenced by Init_ossl_dh().
|
static |
Definition at line 540 of file ossl_pkey_dh.c.
Referenced by Init_ossl_dh().
|
static |
Definition at line 530 of file ossl_pkey_dh.c.
Referenced by Init_ossl_dh().
VALUE eDHError |
Definition at line 35 of file ossl_pkey_dh.c.
Referenced by Init_ossl_dh(), ossl_create_dh(), ossl_dh_compute_key(), ossl_dh_export(), ossl_dh_generate_key(), ossl_dh_initialize(), ossl_dh_new(), ossl_dh_s_generate(), ossl_dh_to_der(), ossl_dh_to_public_key(), and ossl_dh_to_text().
DH* OSSL_DEFAULT_DH_1024 = NULL |
Definition at line 569 of file ossl_pkey_dh.c.
Referenced by Init_ossl_dh(), and ossl_default_tmp_dh_callback().
DH* OSSL_DEFAULT_DH_512 = NULL |
Definition at line 541 of file ossl_pkey_dh.c.
Referenced by Init_ossl_dh(), and ossl_default_tmp_dh_callback().