Ruby
2.0.0p451(2014-02-24revision45167)
|
#include "ossl.h"
Go to the source code of this file.
Macros | |
#define | GetPKeyDSA(obj, pkey) |
#define | DSA_HAS_PRIVATE(dsa) ((dsa)->priv_key) |
#define | DSA_PRIVATE(obj, dsa) (DSA_HAS_PRIVATE(dsa)||OSSL_PKEY_IS_PRIVATE(obj)) |
#define | ossl_dsa_buf_size(pkey) (DSA_size((pkey)->pkey.dsa)+16) |
Functions | |
static VALUE | dsa_instance (VALUE klass, DSA *dsa) |
VALUE | ossl_dsa_new (EVP_PKEY *pkey) |
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_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 () |
Variables | |
VALUE | cDSA |
VALUE | eDSAError |
#define DSA_HAS_PRIVATE | ( | dsa | ) | ((dsa)->priv_key) |
Definition at line 22 of file ossl_pkey_dsa.c.
Referenced by ossl_dsa_export(), and ossl_dsa_to_der().
#define DSA_PRIVATE | ( | obj, | |
dsa | |||
) | (DSA_HAS_PRIVATE(dsa)||OSSL_PKEY_IS_PRIVATE(obj)) |
Definition at line 23 of file ossl_pkey_dsa.c.
Referenced by ossl_dsa_is_private(), and ossl_dsa_sign().
#define GetPKeyDSA | ( | obj, | |
pkey | |||
) |
Definition at line 15 of file ossl_pkey_dsa.c.
Referenced by ossl_dsa_export(), ossl_dsa_get_params(), ossl_dsa_is_private(), ossl_dsa_is_public(), ossl_dsa_sign(), ossl_dsa_to_der(), ossl_dsa_to_public_key(), ossl_dsa_to_text(), and ossl_dsa_verify().
#define ossl_dsa_buf_size | ( | pkey | ) | (DSA_size((pkey)->pkey.dsa)+16) |
Definition at line 469 of file ossl_pkey_dsa.c.
Referenced by ossl_dsa_sign().
|
static |
Definition at line 100 of file ossl_pkey_dsa.c.
References NULL, ossl_generate_cb(), rb_block_given_p(), rb_jump_tag(), rb_thread_call_without_gvl(), and size.
Referenced by ossl_dsa_initialize(), and ossl_dsa_s_generate().
Definition at line 35 of file ossl_pkey_dsa.c.
References Qfalse, and WrapPKey.
Referenced by ossl_dsa_new(), ossl_dsa_s_generate(), and ossl_dsa_to_public_key().
void Init_ossl_dsa | ( | void | ) |
Definition at line 564 of file ossl_pkey_dsa.c.
References cDSA, cPKey, DEF_OSSL_PKEY_BN, eDSAError, ePKeyError, mOSSL, mPKey, ossl_dsa_export(), ossl_dsa_get_params(), ossl_dsa_initialize(), 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(), p, 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().
Definition at line 308 of file ossl_pkey_dsa.c.
References DSA_HAS_PRIVATE, eDSAError, eOSSLError, GetCipherPtr(), GetPKeyDSA, NIL_P, NULL, ossl_membio2str(), OSSL_MIN_PWD_LEN, ossl_pem_passwd_cb(), ossl_raise(), rb_scan_args(), RSTRING_LENINT, RSTRING_PTR, and StringValue.
Referenced by Init_ossl_dsa().
Definition at line 388 of file ossl_pkey_dsa.c.
References GetPKeyDSA, hash(), ossl_bn_new(), rb_hash_aset(), rb_hash_new(), and rb_str_new2.
Referenced by Init_ossl_dsa().
Definition at line 206 of file ossl_pkey_dsa.c.
References arg, dsa_generate(), eDSAError, FIX2INT, FIXNUM_P, GetPKey, NIL_P, NULL, OSSL_BIO_reset, ossl_obj2bio(), ossl_pem_passwd_cb(), ossl_raise(), ossl_to_der_if_possible(), PEM_read_bio_DSAPublicKey, rb_scan_args(), and StringValuePtr.
Referenced by Init_ossl_dsa().
Definition at line 283 of file ossl_pkey_dsa.c.
References DSA_PRIVATE, GetPKeyDSA, Qfalse, and Qtrue.
Referenced by Init_ossl_dsa().
Definition at line 266 of file ossl_pkey_dsa.c.
References GetPKeyDSA, Qfalse, and Qtrue.
Referenced by Init_ossl_dsa().
VALUE ossl_dsa_new | ( | EVP_PKEY * | pkey | ) |
Definition at line 56 of file ossl_pkey_dsa.c.
References cDSA, dsa_instance(), eDSAError, NULL, ossl_raise(), Qfalse, rb_eTypeError, and WrapPKey.
Referenced by ossl_pkey_new().
Definition at line 174 of file ossl_pkey_dsa.c.
References dsa_generate(), dsa_instance(), eDSAError, NULL, NUM2INT, ossl_raise(), and Qfalse.
Referenced by Init_ossl_dsa().
Definition at line 491 of file ossl_pkey_dsa.c.
References DSA_PRIVATE, eDSAError, GetPKeyDSA, NULL, ossl_dsa_buf_size, ossl_raise(), rb_str_new(), rb_str_set_len(), RSTRING_LENINT, RSTRING_PTR, and StringValue.
Referenced by Init_ossl_dsa().
Definition at line 355 of file ossl_pkey_dsa.c.
References _, DSA_HAS_PRIVATE, eDSAError, GetPKeyDSA, NULL, ossl_raise(), ossl_str_adjust, p, rb_str_new(), and RSTRING_PTR.
Referenced by Init_ossl_dsa().
Definition at line 452 of file ossl_pkey_dsa.c.
References CLASS_OF, dsa_instance(), DSAPublicKey_dup, eDSAError, GetPKeyDSA, NULL, ossl_raise(), and Qfalse.
Referenced by Init_ossl_dsa().
Definition at line 415 of file ossl_pkey_dsa.c.
References eDSAError, GetPKeyDSA, NULL, ossl_membio2str(), and ossl_raise().
Referenced by Init_ossl_dsa().
Definition at line 533 of file ossl_pkey_dsa.c.
References eDSAError, GetPKeyDSA, NULL, ossl_raise(), Qfalse, Qtrue, RSTRING_LENINT, RSTRING_PTR, and StringValue.
Referenced by Init_ossl_dsa().
VALUE cDSA |
Definition at line 28 of file ossl_pkey_dsa.c.
Referenced by Init_ossl_dsa(), and ossl_dsa_new().
VALUE eDSAError |
Definition at line 29 of file ossl_pkey_dsa.c.
Referenced by Init_ossl_dsa(), ossl_dsa_export(), ossl_dsa_initialize(), 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().