Ruby  2.4.2p198(2017-09-14revision59899)
Functions | Variables
ossl_pkey.c File Reference
#include "ossl.h"
Include dependency graph for ossl_pkey.c:

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
 

Function Documentation

◆ DupPKeyPtr()

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().

◆ GetPKeyPtr()

EVP_PKEY* GetPKeyPtr ( VALUE  obj)

◆ GetPrivPKeyPtr()

EVP_PKEY* GetPrivPKeyPtr ( VALUE  obj)

◆ Init_ossl_pkey()

void Init_ossl_pkey ( void  )

◆ ossl_evp_pkey_free()

static void ossl_evp_pkey_free ( void *  ptr)
static

Definition at line 57 of file ossl_pkey.c.

◆ ossl_generate_cb_2()

int ossl_generate_cb_2 ( int  p,
int  n,
BN_GENCB *  cb 
)

◆ ossl_generate_cb_stop()

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().

◆ ossl_pkey_alloc()

static VALUE ossl_pkey_alloc ( VALUE  klass)
static

Definition at line 243 of file ossl_pkey.c.

References ePKeyError, NewPKey, NULL, ossl_raise(), and SetPKey.

Referenced by Init_ossl_pkey().

◆ ossl_pkey_initialize()

static VALUE ossl_pkey_initialize ( VALUE  self)
static

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().

◆ ossl_pkey_new()

VALUE ossl_pkey_new ( EVP_PKEY *  pkey)

◆ ossl_pkey_new_from_data()

static VALUE ossl_pkey_new_from_data ( int  argc,
VALUE argv,
VALUE  self 
)
static

◆ ossl_pkey_sign()

static VALUE ossl_pkey_sign ( VALUE  self,
VALUE  digest,
VALUE  data 
)
static

◆ ossl_pkey_verify()

static VALUE ossl_pkey_verify ( VALUE  self,
VALUE  digest,
VALUE  sig,
VALUE  data 
)
static

◆ pkey_check_public_key()

static void pkey_check_public_key ( EVP_PKEY *  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().

◆ pkey_new0()

static VALUE pkey_new0 ( EVP_PKEY *  pkey)
static

Variable Documentation

◆ cPKey

VALUE cPKey

◆ ePKeyError

VALUE ePKeyError

◆ id_private_q

ID id_private_q
static

Definition at line 18 of file ossl_pkey.c.

Referenced by GetPrivPKeyPtr(), and Init_ossl_pkey().

◆ mPKey

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().

◆ ossl_evp_pkey_type

const rb_data_type_t ossl_evp_pkey_type
Initial value:
= {
"OpenSSL/EVP_PKEY",
{
},
}
#define RUBY_TYPED_FREE_IMMEDIATELY
Definition: ruby.h:1145
static void ossl_evp_pkey_free(void *ptr)
Definition: ossl_pkey.c:57

Definition at line 65 of file ossl_pkey.c.