Ruby
2.4.2p198(2017-09-14revision59899)
|
#include "ossl.h"
Go to the source code of this file.
Data Structures | |
struct | dsa_blocking_gen_arg |
Macros | |
#define | GetPKeyDSA(obj, pkey) |
#define | GetDSA(obj, dsa) |
#define | PEM_read_bio_DSAPublicKey(bp, x, cb, u) |
#define | DSAPublicKey_dup(dsa) |
Functions | |
static int | DSA_HAS_PRIVATE (DSA *dsa) |
static int | DSA_PRIVATE (VALUE obj, DSA *dsa) |
static VALUE | dsa_instance (VALUE klass, DSA *dsa) |
VALUE | ossl_dsa_new (EVP_PKEY *pkey) |
static void * | dsa_blocking_gen (void *arg) |
static DSA * | dsa_generate (int size) |
static VALUE | ossl_dsa_s_generate (VALUE klass, VALUE size) |
static VALUE | ossl_dsa_initialize (int argc, VALUE *argv, VALUE self) |
static VALUE | ossl_dsa_initialize_copy (VALUE self, VALUE other) |
static VALUE | ossl_dsa_is_public (VALUE self) |
static VALUE | ossl_dsa_is_private (VALUE self) |
static VALUE | ossl_dsa_export (int argc, VALUE *argv, VALUE self) |
static VALUE | ossl_dsa_to_der (VALUE self) |
static VALUE | ossl_dsa_get_params (VALUE self) |
static VALUE | ossl_dsa_to_text (VALUE self) |
static VALUE | ossl_dsa_to_public_key (VALUE self) |
static VALUE | ossl_dsa_sign (VALUE self, VALUE data) |
static VALUE | ossl_dsa_verify (VALUE self, VALUE digest, VALUE sig) |
void | Init_ossl_dsa (void) |
Variables | |
VALUE | cDSA |
VALUE | eDSAError |
#define DSAPublicKey_dup | ( | dsa | ) |
Referenced by ossl_dsa_to_public_key().
#define GetDSA | ( | obj, | |
dsa | |||
) |
Definition at line 20 of file ossl_pkey_dsa.c.
Referenced by ossl_dsa_export(), ossl_dsa_get_params(), ossl_dsa_initialize_copy(), ossl_dsa_is_private(), ossl_dsa_is_public(), ossl_dsa_sign(), ossl_dsa_to_der(), ossl_dsa_to_text(), and ossl_dsa_verify().
#define GetPKeyDSA | ( | obj, | |
pkey | |||
) |
Definition at line 14 of file ossl_pkey_dsa.c.
Referenced by ossl_dsa_to_public_key().
#define PEM_read_bio_DSAPublicKey | ( | bp, | |
x, | |||
cb, | |||
u | |||
) |
Referenced by ossl_dsa_initialize().
|
static |
Definition at line 105 of file ossl_pkey_dsa.c.
References dsa_blocking_gen_arg::cb, dsa_blocking_gen_arg::counter, dsa_blocking_gen_arg::dsa, dsa_blocking_gen_arg::h, NULL, dsa_blocking_gen_arg::result, and dsa_blocking_gen_arg::size.
Referenced by dsa_generate().
|
static |
Definition at line 114 of file ossl_pkey_dsa.c.
References BN_GENCB_free, BN_GENCB_new, dsa_blocking_gen_arg::cb, dsa_blocking_gen_arg::counter, dsa_blocking_gen_arg::dsa, dsa_blocking_gen(), dsa_blocking_gen_arg::h, NULL, ossl_clear_error(), ossl_generate_cb_2(), ossl_generate_cb_stop(), rb_block_given_p(), rb_jump_tag(), rb_thread_call_without_gvl(), dsa_blocking_gen_arg::result, dsa_blocking_gen_arg::size, ossl_generate_cb_arg::state, and ossl_generate_cb_arg::yield.
Referenced by ossl_dsa_initialize(), and ossl_dsa_s_generate().
|
inlinestatic |
Definition at line 27 of file ossl_pkey_dsa.c.
References NULL.
Referenced by DSA_PRIVATE(), ossl_dsa_export(), and ossl_dsa_to_der().
Definition at line 50 of file ossl_pkey_dsa.c.
References NewPKey, Qfalse, and SetPKey.
Referenced by ossl_dsa_new(), ossl_dsa_s_generate(), and ossl_dsa_to_public_key().
|
inlinestatic |
Definition at line 35 of file ossl_pkey_dsa.c.
References DSA_HAS_PRIVATE(), and OSSL_PKEY_IS_PRIVATE.
Referenced by ossl_dsa_is_private(), and ossl_dsa_sign().
void Init_ossl_dsa | ( | void | ) |
Definition at line 609 of file ossl_pkey_dsa.c.
References cDSA, cPKey, DEF_OSSL_PKEY_BN, dsa_blocking_gen_arg::dsa, eDSAError, eOSSLError, ePKeyError, mOSSL, mPKey, ossl_dsa_export(), ossl_dsa_get_params(), ossl_dsa_initialize(), ossl_dsa_initialize_copy(), ossl_dsa_is_private(), ossl_dsa_is_public(), ossl_dsa_s_generate(), ossl_dsa_sign(), ossl_dsa_to_der(), ossl_dsa_to_public_key(), ossl_dsa_to_text(), ossl_dsa_verify(), 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 341 of file ossl_pkey_dsa.c.
References dsa_blocking_gen_arg::dsa, DSA_HAS_PRIVATE(), eDSAError, GetCipherPtr(), GetDSA, NIL_P, NULL, ossl_membio2str(), ossl_pem_passwd_cb(), ossl_pem_passwd_value(), ossl_raise(), and rb_scan_args().
Referenced by Init_ossl_dsa().
Definition at line 416 of file ossl_pkey_dsa.c.
References dsa_blocking_gen_arg::dsa, GetDSA, hash(), ossl_bn_new(), priv_key, pub_key, rb_hash_aset(), rb_hash_new(), and rb_str_new2.
Referenced by Init_ossl_dsa().
Definition at line 213 of file ossl_pkey_dsa.c.
References dsa_blocking_gen_arg::dsa, dsa_generate(), eDSAError, GetPKey, NULL, NUM2INT, OSSL_BIO_reset, ossl_clear_error(), ossl_obj2bio(), ossl_pem_passwd_cb(), ossl_pem_passwd_value(), ossl_raise(), ossl_to_der_if_possible(), PEM_read_bio_DSAPublicKey, RB_INTEGER_TYPE_P, and rb_scan_args().
Referenced by Init_ossl_dsa().
Definition at line 268 of file ossl_pkey_dsa.c.
References dsa_blocking_gen_arg::dsa, eDSAError, EVP_PKEY_base_id, GetDSA, GetPKey, and ossl_raise().
Referenced by Init_ossl_dsa().
Definition at line 314 of file ossl_pkey_dsa.c.
References dsa_blocking_gen_arg::dsa, DSA_PRIVATE(), GetDSA, Qfalse, and Qtrue.
Referenced by Init_ossl_dsa().
Definition at line 295 of file ossl_pkey_dsa.c.
References dsa_blocking_gen_arg::dsa, GetDSA, NULL, Qfalse, and Qtrue.
Referenced by Init_ossl_dsa().
VALUE ossl_dsa_new | ( | EVP_PKEY * | pkey | ) |
Definition at line 72 of file ossl_pkey_dsa.c.
References cDSA, dsa_instance(), eDSAError, EVP_PKEY_base_id, NewPKey, NULL, ossl_raise(), Qfalse, rb_eTypeError, and SetPKey.
Referenced by pkey_new0().
Definition at line 179 of file ossl_pkey_dsa.c.
References dsa_blocking_gen_arg::dsa, dsa_generate(), dsa_instance(), eDSAError, NULL, NUM2INT, ossl_raise(), and Qfalse.
Referenced by Init_ossl_dsa().
Definition at line 522 of file ossl_pkey_dsa.c.
References dsa_blocking_gen_arg::dsa, DSA_PRIVATE(), eDSAError, GetDSA, NULL, ossl_raise(), rb_str_new(), rb_str_set_len(), RSTRING_LENINT, RSTRING_PTR, and StringValue.
Referenced by Init_ossl_dsa().
Definition at line 382 of file ossl_pkey_dsa.c.
References dsa_blocking_gen_arg::dsa, DSA_HAS_PRIVATE(), eDSAError, GetDSA, len, NULL, ossl_raise(), ossl_str_adjust, rb_str_new(), and RSTRING_PTR.
Referenced by Init_ossl_dsa().
Definition at line 482 of file ossl_pkey_dsa.c.
References dsa_blocking_gen_arg::dsa, dsa_instance(), DSAPublicKey_dup, eDSAError, GetPKeyDSA, NULL, ossl_raise(), Qfalse, and rb_obj_class().
Referenced by Init_ossl_dsa().
Definition at line 445 of file ossl_pkey_dsa.c.
References dsa_blocking_gen_arg::dsa, eDSAError, GetDSA, NULL, ossl_membio2str(), and ossl_raise().
Referenced by Init_ossl_dsa().
Definition at line 567 of file ossl_pkey_dsa.c.
References dsa_blocking_gen_arg::dsa, eDSAError, GetDSA, key, NULL, OSSL_PKEY_BN_DEF2, OSSL_PKEY_BN_DEF3, ossl_raise(), priv_key, pub_key, Qfalse, Qtrue, RSTRING_LENINT, RSTRING_PTR, and StringValue.
Referenced by Init_ossl_dsa().
VALUE cDSA |
Definition at line 43 of file ossl_pkey_dsa.c.
Referenced by Init_ossl_dsa(), and ossl_dsa_new().
VALUE eDSAError |
Definition at line 44 of file ossl_pkey_dsa.c.
Referenced by Init_ossl_dsa(), ossl_dsa_export(), ossl_dsa_initialize(), ossl_dsa_initialize_copy(), ossl_dsa_new(), ossl_dsa_s_generate(), ossl_dsa_sign(), ossl_dsa_to_der(), ossl_dsa_to_public_key(), ossl_dsa_to_text(), and ossl_dsa_verify().