Ruby 1.9.3p327(2012-11-10revision37606)
|
Go to the source code of this file.
#define DEF_OSSL_PKEY_BN | ( | class, | |
keytype, | |||
name | |||
) |
do { \ rb_define_method((class), #name, ossl_##keytype##_get_##name, 0); \ rb_define_method((class), #name "=", ossl_##keytype##_set_##name, 1);\ } while (0)
Definition at line 129 of file ossl_pkey.h.
Referenced by Init_ossl_dh(), Init_ossl_dsa(), and Init_ossl_rsa().
#define GetPKey | ( | obj, | |
pkey | |||
) |
do {\ Data_Get_Struct((obj), EVP_PKEY, (pkey));\ if (!(pkey)) { \ rb_raise(rb_eRuntimeError, "PKEY wasn't initialized!");\ } \ } while (0)
Definition at line 30 of file ossl_pkey.h.
Referenced by ossl_dh_initialize(), ossl_dsa_initialize(), ossl_pkey_sign(), ossl_pkey_verify(), and ossl_rsa_initialize().
#define OSSL_PKEY_BN | ( | keytype, | |
name | |||
) |
Definition at line 93 of file ossl_pkey.h.
#define OSSL_PKEY_IS_PRIVATE | ( | obj | ) | (rb_iv_get((obj), "private") == Qtrue) |
Definition at line 21 of file ossl_pkey.h.
#define OSSL_PKEY_SET_PRIVATE | ( | obj | ) | rb_iv_set((obj), "private", Qtrue) |
Definition at line 19 of file ossl_pkey.h.
#define OSSL_PKEY_SET_PUBLIC | ( | obj | ) | rb_iv_set((obj), "private", Qfalse) |
Definition at line 20 of file ossl_pkey.h.
#define SafeGetPKey | ( | obj, | |
pkey | |||
) |
do { \ OSSL_Check_Kind((obj), cPKey); \ GetPKey((obj), (pkey)); \ } while (0)
Definition at line 36 of file ossl_pkey.h.
Referenced by DupPKeyPtr(), DupPrivPKeyPtr(), GetPKeyPtr(), and GetPrivPKeyPtr().
#define WrapPKey | ( | klass, | |
obj, | |||
pkey | |||
) |
do { \ if (!(pkey)) { \ rb_raise(rb_eRuntimeError, "PKEY wasn't initialized!"); \ } \ (obj) = Data_Wrap_Struct((klass), 0, EVP_PKEY_free, (pkey)); \ OSSL_PKEY_SET_PUBLIC(obj); \ } while (0)
Definition at line 23 of file ossl_pkey.h.
Referenced by dh_instance(), dsa_instance(), ossl_dh_new(), ossl_dsa_new(), ossl_pkey_alloc(), ossl_rsa_new(), and rsa_instance().
EVP_PKEY* DupPKeyPtr | ( | VALUE | ) |
Definition at line 159 of file ossl_pkey.c.
References SafeGetPKey.
Referenced by ossl_client_cert_cb().
EVP_PKEY* DupPrivPKeyPtr | ( | VALUE | ) |
Definition at line 170 of file ossl_pkey.c.
References id_private_q, NULL, ossl_raise(), Qtrue, rb_eArgError, rb_funcall(), and SafeGetPKey.
EVP_PKEY* GetPKeyPtr | ( | VALUE | ) |
Definition at line 136 of file ossl_pkey.c.
References SafeGetPKey.
Referenced by ossl_call_client_cert_cb(), ossl_call_tmp_dh_callback(), ossl_pkcs12_s_create(), ossl_spki_set_public_key(), ossl_spki_verify(), ossl_sslctx_setup(), ossl_tmp_dh_callback(), 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 146 of file ossl_pkey.c.
References id_private_q, NULL, ossl_raise(), Qtrue, rb_eArgError, rb_funcall(), and SafeGetPKey.
Referenced by ossl_pkcs7_decrypt(), ossl_pkcs7_s_sign(), ossl_pkcs7si_initialize(), ossl_spki_sign(), ossl_x509_check_private_key(), ossl_x509_sign(), ossl_x509crl_sign(), and ossl_x509req_sign().
void Init_ossl_dh | ( | void | ) |
Definition at line 542 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().
void Init_ossl_dsa | ( | void | ) |
Definition at line 501 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(), 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().
void Init_ossl_ec | ( | void | ) |
Definition at line 1591 of file ossl_pkey_ec.c.
Referenced by Init_ossl_pkey().
void Init_ossl_pkey | ( | void | ) |
Definition at line 304 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(), and rb_intern.
Referenced by Init_openssl().
void Init_ossl_rsa | ( | void | ) |
Definition at line 560 of file ossl_pkey_rsa.c.
References cPKey, cRSA, DEF_OSSL_PKEY_BN, DefRSAConst, ePKeyError, eRSAError, mOSSL, mPKey, ossl_rsa_export(), ossl_rsa_get_params(), ossl_rsa_initialize(), 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_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().
VALUE ossl_dh_new | ( | EVP_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().
VALUE ossl_dsa_new | ( | EVP_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().
VALUE ossl_ec_new | ( | EVP_PKEY * | ) |
Referenced by ossl_pkey_new().
void ossl_generate_cb | ( | int | , |
int | , | ||
void * | |||
) |
Definition at line 25 of file ossl_pkey.c.
References INT2NUM(), rb_ary_new2(), rb_ary_store(), and rb_yield().
Referenced by dh_generate(), dsa_generate(), and rsa_generate().
VALUE ossl_pkey_new | ( | EVP_PKEY * | ) |
Definition at line 40 of file ossl_pkey.c.
References ePKeyError, ossl_dh_new(), ossl_dsa_new(), ossl_ec_new(), ossl_raise(), ossl_rsa_new(), and Qnil.
Referenced by ossl_pkcs12_initialize(), ossl_pkey_new_from_data(), ossl_pkey_new_from_file(), ossl_spki_get_public_key(), ossl_x509_get_public_key(), and ossl_x509req_get_public_key().
Definition at line 69 of file ossl_pkey.c.
References ePKeyError, errno, NULL, ossl_pem_passwd_cb(), ossl_pkey_new(), ossl_raise(), RSTRING_PTR, SafeStringValue, and strerror().
VALUE ossl_rsa_new | ( | EVP_PKEY * | ) |
Definition at line 56 of file ossl_pkey_rsa.c.
References cRSA, eRSAError, NULL, ossl_raise(), Qfalse, rb_eTypeError, rsa_instance(), and WrapPKey.
Referenced by ossl_pkey_new().
Definition at line 34 of file ossl_pkey_dh.c.
Referenced by Init_ossl_dh(), and ossl_dh_new().
Definition at line 28 of file ossl_pkey_dsa.c.
Referenced by Init_ossl_dsa(), and ossl_dsa_new().
Definition at line 17 of file ossl_pkey.c.
Referenced by Init_ossl_dh(), Init_ossl_dsa(), Init_ossl_pkey(), Init_ossl_rsa(), and ossl_pkey_initialize().
Definition at line 28 of file ossl_pkey_rsa.c.
Referenced by Init_ossl_rsa(), and ossl_rsa_new().
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().
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().
Definition at line 18 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(), ossl_pkey_new_from_file(), ossl_pkey_sign(), and ossl_pkey_verify().
Definition at line 29 of file ossl_pkey_rsa.c.
Referenced by Init_ossl_rsa(), ossl_rsa_export(), ossl_rsa_initialize(), 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().
Definition at line 19 of file ossl_pkey.c.
Referenced by DupPrivPKeyPtr(), GetPrivPKeyPtr(), Init_ossl_pkey(), and ossl_pkey_sign().
Definition at line 16 of file ossl_pkey.c.
Referenced by Init_ossl_dh(), Init_ossl_dsa(), Init_ossl_pkey(), and Init_ossl_rsa().
Definition at line 520 of file ossl_pkey_dh.c.
Referenced by Init_ossl_dh(), and ossl_default_tmp_dh_callback().
Definition at line 492 of file ossl_pkey_dh.c.
Referenced by Init_ossl_dh(), and ossl_default_tmp_dh_callback().