Ruby
2.4.2p198(2017-09-14revision59899)
|
Go to the source code of this file.
Data Structures | |
struct | ossl_generate_cb_arg |
Macros | |
#define | OSSL_PKEY_SET_PRIVATE(obj) rb_iv_set((obj), "private", Qtrue) |
#define | OSSL_PKEY_SET_PUBLIC(obj) rb_iv_set((obj), "private", Qfalse) |
#define | OSSL_PKEY_IS_PRIVATE(obj) (rb_iv_get((obj), "private") == Qtrue) |
#define | NewPKey(klass) TypedData_Wrap_Struct((klass), &ossl_evp_pkey_type, 0) |
#define | SetPKey(obj, pkey) |
#define | GetPKey(obj, pkey) |
#define | SafeGetPKey(obj, pkey) |
#define | OSSL_PKEY_BN_DEF_GETTER0(_keytype, _type, _name, _get) |
#define | OSSL_PKEY_BN_DEF_GETTER3(_keytype, _type, _group, a1, a2, a3) |
#define | OSSL_PKEY_BN_DEF_GETTER2(_keytype, _type, _group, a1, a2) |
#define | OSSL_PKEY_BN_DEF_SETTER3(_keytype, _type, _group, a1, a2, a3) |
#define | OSSL_PKEY_BN_DEF_SETTER2(_keytype, _type, _group, a1, a2) |
#define | OSSL_PKEY_BN_DEF_SETTER_OLD(_keytype, _type, _group, _name) |
#define | OSSL_PKEY_BN_DEF3(_keytype, _type, _group, a1, a2, a3) |
#define | OSSL_PKEY_BN_DEF2(_keytype, _type, _group, a1, a2) |
#define | DEF_OSSL_PKEY_BN(class, keytype, name) |
Functions | |
int | ossl_generate_cb_2 (int p, int n, BN_GENCB *cb) |
void | ossl_generate_cb_stop (void *ptr) |
VALUE | ossl_pkey_new (EVP_PKEY *) |
EVP_PKEY * | GetPKeyPtr (VALUE) |
EVP_PKEY * | DupPKeyPtr (VALUE) |
EVP_PKEY * | GetPrivPKeyPtr (VALUE) |
void | Init_ossl_pkey (void) |
VALUE | ossl_rsa_new (EVP_PKEY *) |
void | Init_ossl_rsa (void) |
VALUE | ossl_dsa_new (EVP_PKEY *) |
void | Init_ossl_dsa (void) |
VALUE | ossl_dh_new (EVP_PKEY *) |
void | Init_ossl_dh (void) |
VALUE | ossl_ec_new (EVP_PKEY *) |
void | Init_ossl_ec (void) |
#define DEF_OSSL_PKEY_BN | ( | class, | |
keytype, | |||
name | |||
) |
Definition at line 238 of file ossl_pkey.h.
Referenced by Init_ossl_dh(), Init_ossl_dsa(), and Init_ossl_rsa().
#define GetPKey | ( | obj, | |
pkey | |||
) |
Definition at line 31 of file ossl_pkey.h.
Referenced by ossl_dh_initialize(), ossl_dh_initialize_copy(), ossl_dsa_initialize(), ossl_dsa_initialize_copy(), ossl_pkey_verify(), ossl_rsa_initialize(), and ossl_rsa_initialize_copy().
#define NewPKey | ( | klass | ) | TypedData_Wrap_Struct((klass), &ossl_evp_pkey_type, 0) |
Definition at line 22 of file ossl_pkey.h.
Referenced by dh_instance(), dsa_instance(), ossl_dh_new(), ossl_dsa_new(), ossl_pkey_alloc(), ossl_rsa_new(), pkey_new0(), and rsa_instance().
#define OSSL_PKEY_BN_DEF2 | ( | _keytype, | |
_type, | |||
_group, | |||
a1, | |||
a2 | |||
) |
Definition at line 232 of file ossl_pkey.h.
Referenced by ossl_dh_compute_key(), ossl_dsa_verify(), and ossl_rsa_to_public_key().
#define OSSL_PKEY_BN_DEF3 | ( | _keytype, | |
_type, | |||
_group, | |||
a1, | |||
a2, | |||
a3 | |||
) |
Definition at line 225 of file ossl_pkey.h.
Referenced by ossl_dh_compute_key(), ossl_dsa_verify(), and ossl_rsa_to_public_key().
#define OSSL_PKEY_BN_DEF_GETTER0 | ( | _keytype, | |
_type, | |||
_name, | |||
_get | |||
) |
Definition at line 95 of file ossl_pkey.h.
#define OSSL_PKEY_BN_DEF_GETTER2 | ( | _keytype, | |
_type, | |||
_group, | |||
a1, | |||
a2 | |||
) |
Definition at line 120 of file ossl_pkey.h.
#define OSSL_PKEY_BN_DEF_GETTER3 | ( | _keytype, | |
_type, | |||
_group, | |||
a1, | |||
a2, | |||
a3 | |||
) |
Definition at line 112 of file ossl_pkey.h.
#define OSSL_PKEY_BN_DEF_SETTER2 | ( | _keytype, | |
_type, | |||
_group, | |||
a1, | |||
a2 | |||
) |
Definition at line 157 of file ossl_pkey.h.
#define OSSL_PKEY_BN_DEF_SETTER3 | ( | _keytype, | |
_type, | |||
_group, | |||
a1, | |||
a2, | |||
a3 | |||
) |
Definition at line 126 of file ossl_pkey.h.
#define OSSL_PKEY_BN_DEF_SETTER_OLD | ( | _keytype, | |
_type, | |||
_group, | |||
_name | |||
) |
Definition at line 184 of file ossl_pkey.h.
#define OSSL_PKEY_IS_PRIVATE | ( | obj | ) | (rb_iv_get((obj), "private") == Qtrue) |
Definition at line 20 of file ossl_pkey.h.
Referenced by DSA_PRIVATE(), and RSA_PRIVATE().
#define OSSL_PKEY_SET_PRIVATE | ( | obj | ) | rb_iv_set((obj), "private", Qtrue) |
Definition at line 18 of file ossl_pkey.h.
Referenced by ossl_engine_load_privkey().
#define OSSL_PKEY_SET_PUBLIC | ( | obj | ) | rb_iv_set((obj), "private", Qfalse) |
Definition at line 19 of file ossl_pkey.h.
#define SafeGetPKey | ( | obj, | |
pkey | |||
) |
Definition at line 37 of file ossl_pkey.h.
Referenced by DupPKeyPtr(), GetPKeyPtr(), and GetPrivPKeyPtr().
#define SetPKey | ( | obj, | |
pkey | |||
) |
Definition at line 24 of file ossl_pkey.h.
Referenced by dh_instance(), dsa_instance(), ossl_dh_new(), ossl_dsa_new(), ossl_pkey_alloc(), ossl_rsa_new(), pkey_new0(), and rsa_instance().
EVP_PKEY* DupPKeyPtr | ( | VALUE | ) |
Definition at line 229 of file ossl_pkey.c.
References EVP_PKEY_up_ref, and SafeGetPKey.
Referenced by ossl_client_cert_cb().
EVP_PKEY* GetPKeyPtr | ( | VALUE | ) |
Definition at line 206 of file ossl_pkey.c.
References SafeGetPKey.
Referenced by ossl_call_tmp_dh_callback(), ossl_pkcs12_s_create(), ossl_spki_set_public_key(), ossl_spki_verify(), ossl_x509_set_public_key(), ossl_x509_verify(), ossl_x509crl_verify(), ossl_x509req_set_public_key(), and ossl_x509req_verify().
EVP_PKEY* GetPrivPKeyPtr | ( | VALUE | ) |
Definition at line 216 of file ossl_pkey.c.
References id_private_q, NULL, ossl_raise(), Qtrue, rb_eArgError, rb_funcallv, and SafeGetPKey.
Referenced by ossl_call_client_cert_cb(), ossl_ocspbres_sign(), ossl_ocspreq_sign(), ossl_pkcs7_decrypt(), ossl_pkcs7_s_sign(), ossl_pkcs7si_initialize(), ossl_pkey_sign(), ossl_spki_sign(), ossl_sslctx_setup(), ossl_x509_check_private_key(), ossl_x509_sign(), ossl_x509crl_sign(), and ossl_x509req_sign().
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().
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().
void Init_ossl_ec | ( | void | ) |
Definition at line 1821 of file ossl_pkey_ec.c.
Referenced by Init_ossl_pkey().
void Init_ossl_pkey | ( | void | ) |
Definition at line 389 of file ossl_pkey.c.
References cPKey, eOSSLError, ePKeyError, id_private_q, Init_ossl_dh(), Init_ossl_dsa(), Init_ossl_ec(), Init_ossl_rsa(), mOSSL, mPKey, ossl_pkey_alloc(), ossl_pkey_initialize(), ossl_pkey_new_from_data(), ossl_pkey_sign(), ossl_pkey_verify(), rb_cObject, rb_define_alloc_func(), rb_define_class_under(), rb_define_method(), rb_define_module(), rb_define_module_function(), rb_define_module_under(), rb_eStandardError, and rb_intern.
Referenced by Init_openssl().
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().
VALUE ossl_dh_new | ( | EVP_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().
VALUE ossl_dsa_new | ( | EVP_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().
VALUE ossl_ec_new | ( | EVP_PKEY * | ) |
Referenced by pkey_new0().
int ossl_generate_cb_2 | ( | int | p, |
int | n, | ||
BN_GENCB * | cb | ||
) |
Definition at line 24 of file ossl_pkey.c.
References BN_GENCB_get_arg, INT2NUM, rb_ary_new2, rb_ary_store(), rb_protect(), rb_yield(), ossl_generate_cb_arg::state, ossl_generate_cb_arg::stop, and ossl_generate_cb_arg::yield.
Referenced by dh_generate(), dsa_generate(), and rsa_generate().
void ossl_generate_cb_stop | ( | void * | ptr | ) |
Definition at line 50 of file ossl_pkey.c.
References ossl_generate_cb_arg::stop.
Referenced by dh_generate(), dsa_generate(), and rsa_generate().
VALUE ossl_pkey_new | ( | EVP_PKEY * | ) |
Definition at line 107 of file ossl_pkey.c.
References pkey_new0(), rb_jump_tag(), and rb_protect().
Referenced by ossl_engine_load_privkey(), ossl_engine_load_pubkey(), ossl_pkcs12_initialize(), ossl_pkey_new_from_data(), ossl_spki_get_public_key(), ossl_ssl_get_client_ca_list(), ossl_x509_get_public_key(), and ossl_x509req_get_public_key().
VALUE ossl_rsa_new | ( | EVP_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().
VALUE cDH |
Definition at line 29 of file ossl_pkey_dh.c.
Referenced by Init_ossl_dh(), and ossl_dh_new().
VALUE cDSA |
Definition at line 43 of file ossl_pkey_dsa.c.
Referenced by Init_ossl_dsa(), and ossl_dsa_new().
VALUE cEC |
VALUE cEC_GROUP |
VALUE cEC_POINT |
VALUE cPKey |
Definition at line 16 of file ossl_pkey.c.
Referenced by Init_ossl_dh(), Init_ossl_dsa(), Init_ossl_pkey(), Init_ossl_rsa(), ossl_pkey_initialize(), and pkey_new0().
VALUE cRSA |
Definition at line 44 of file ossl_pkey_rsa.c.
Referenced by Init_ossl_rsa(), and ossl_rsa_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().
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().
VALUE eEC_GROUP |
VALUE eEC_POINT |
VALUE eECError |
VALUE ePKeyError |
Definition at line 17 of file ossl_pkey.c.
Referenced by Init_ossl_dh(), Init_ossl_dsa(), Init_ossl_pkey(), Init_ossl_rsa(), ossl_pkey_alloc(), ossl_pkey_new_from_data(), ossl_pkey_sign(), ossl_pkey_verify(), and pkey_check_public_key().
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().
VALUE mPKey |
Definition at line 15 of file ossl_pkey.c.
Referenced by Init_ossl_dh(), Init_ossl_dsa(), Init_ossl_pkey(), and Init_ossl_rsa().
const rb_data_type_t ossl_evp_pkey_type |
Definition at line 65 of file ossl_pkey.c.