Ruby
2.4.2p198(2017-09-14revision59899)
|
#include "ossl.h"
Go to the source code of this file.
Functions | |
int | ossl_generate_cb_2 (int p, int n, BN_GENCB *cb) |
void | ossl_generate_cb_stop (void *ptr) |
static void | ossl_evp_pkey_free (void *ptr) |
static VALUE | pkey_new0 (EVP_PKEY *pkey) |
VALUE | ossl_pkey_new (EVP_PKEY *pkey) |
static VALUE | ossl_pkey_new_from_data (int argc, VALUE *argv, VALUE self) |
static void | pkey_check_public_key (EVP_PKEY *pkey) |
EVP_PKEY * | GetPKeyPtr (VALUE obj) |
EVP_PKEY * | GetPrivPKeyPtr (VALUE obj) |
EVP_PKEY * | DupPKeyPtr (VALUE obj) |
static VALUE | ossl_pkey_alloc (VALUE klass) |
static VALUE | ossl_pkey_initialize (VALUE self) |
static VALUE | ossl_pkey_sign (VALUE self, VALUE digest, VALUE data) |
static VALUE | ossl_pkey_verify (VALUE self, VALUE digest, VALUE sig, VALUE data) |
void | Init_ossl_pkey (void) |
Variables | |
VALUE | mPKey |
VALUE | cPKey |
VALUE | ePKeyError |
static ID | id_private_q |
const rb_data_type_t | ossl_evp_pkey_type |
EVP_PKEY* DupPKeyPtr | ( | VALUE | obj | ) |
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 | obj | ) |
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 | obj | ) |
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_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().
|
static |
Definition at line 57 of file ossl_pkey.c.
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().
Definition at line 243 of file ossl_pkey.c.
References ePKeyError, NewPKey, NULL, ossl_raise(), and SetPKey.
Referenced by Init_ossl_pkey().
Definition at line 265 of file ossl_pkey.c.
References cPKey, ossl_raise(), rb_eTypeError, and rb_obj_is_instance_of().
Referenced by Init_ossl_pkey().
VALUE ossl_pkey_new | ( | EVP_PKEY * | 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().
Definition at line 138 of file ossl_pkey.c.
References ePKeyError, NULL, OSSL_BIO_reset, ossl_obj2bio(), ossl_pem_passwd_cb(), ossl_pem_passwd_value(), ossl_pkey_new(), ossl_raise(), and rb_scan_args().
Referenced by Init_ossl_pkey().
Definition at line 291 of file ossl_pkey.c.
References ePKeyError, EVP_MD_CTX_free, EVP_MD_CTX_new, GetDigestPtr(), GetPrivPKeyPtr(), NULL, ossl_raise(), rb_str_new(), rb_str_set_len(), result, RSTRING_LEN, RSTRING_PTR, and StringValue.
Referenced by Init_ossl_pkey().
Definition at line 347 of file ossl_pkey.c.
References ePKeyError, EVP_MD_CTX_free, EVP_MD_CTX_new, GetDigestPtr(), GetPKey, NULL, ossl_clear_error(), ossl_raise(), pkey_check_public_key(), Qfalse, Qtrue, result, RSTRING_LEN, RSTRING_LENINT, RSTRING_PTR, and StringValue.
Referenced by Init_ossl_pkey().
|
static |
Definition at line 167 of file ossl_pkey.c.
References ePKeyError, EVP_PKEY_base_id, EVP_PKEY_get0, NULL, and ossl_raise().
Referenced by ossl_pkey_verify().
|
static |
Definition at line 74 of file ossl_pkey.c.
References cPKey, EVP_PKEY_base_id, NewPKey, ossl_dh_new(), ossl_dsa_new(), ossl_ec_new(), ossl_raise(), ossl_rsa_new(), rb_eRuntimeError, and SetPKey.
Referenced by ossl_pkey_new().
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 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().
|
static |
Definition at line 18 of file ossl_pkey.c.
Referenced by GetPrivPKeyPtr(), and Init_ossl_pkey().
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.