Ruby  3.1.0dev(2021-09-10revisionb76ad15ed0da636161de0243c547ee1e6fc95681)
Data Structures | Functions | Variables
ossl_pkey.c File Reference

(b76ad15ed0da636161de0243c547ee1e6fc95681)

#include "ossl.h"
Include dependency graph for ossl_pkey.c:

Go to the source code of this file.

Data Structures

struct  pkey_blocking_generate_arg
 

Functions

VALUE ossl_pkey_new (EVP_PKEY *pkey)
 
EVP_PKEY * ossl_pkey_read_generic (BIO *bio, VALUE pass)
 
void ossl_pkey_check_public_key (const EVP_PKEY *pkey)
 
EVP_PKEY * GetPKeyPtr (VALUE obj)
 
EVP_PKEY * GetPrivPKeyPtr (VALUE obj)
 
EVP_PKEY * DupPKeyPtr (VALUE obj)
 
VALUE ossl_pkey_export_traditional (int argc, VALUE *argv, VALUE self, int to_der)
 
VALUE ossl_pkey_export_spki (VALUE self, int to_der)
 
void Init_ossl_pkey (void)
 

Variables

VALUE mPKey
 
VALUE cPKey
 
VALUE ePKeyError
 
const rb_data_type_t ossl_evp_pkey_type
 

Function Documentation

◆ DupPKeyPtr()

EVP_PKEY* DupPKeyPtr ( VALUE  obj)

Definition at line 462 of file ossl_pkey.c.

References EVP_PKEY_up_ref, GetPKey, and pkey_blocking_generate_arg::pkey.

◆ GetPKeyPtr()

EVP_PKEY* GetPKeyPtr ( VALUE  obj)

Definition at line 432 of file ossl_pkey.c.

References GetPKey, and pkey_blocking_generate_arg::pkey.

◆ GetPrivPKeyPtr()

EVP_PKEY* GetPrivPKeyPtr ( VALUE  obj)

◆ Init_ossl_pkey()

void Init_ossl_pkey ( void  )

◆ ossl_pkey_check_public_key()

void ossl_pkey_check_public_key ( const EVP_PKEY *  pkey)

Definition at line 392 of file ossl_pkey.c.

References ePKeyError, NULL, ossl_raise(), pkey_blocking_generate_arg::pkey, and ptr.

◆ ossl_pkey_export_spki()

VALUE ossl_pkey_export_spki ( VALUE  self,
int  to_der 
)

◆ ossl_pkey_export_traditional()

VALUE ossl_pkey_export_traditional ( int  argc,
VALUE argv,
VALUE  self,
int  to_der 
)

◆ ossl_pkey_new()

VALUE ossl_pkey_new ( EVP_PKEY *  pkey)

Definition at line 67 of file ossl_pkey.c.

References rb_protect().

◆ ossl_pkey_read_generic()

EVP_PKEY* ossl_pkey_read_generic ( BIO *  bio,
VALUE  pass 
)

Definition at line 82 of file ossl_pkey.c.

References NULL, OSSL_BIO_reset, and ossl_pem_passwd_cb().

Variable Documentation

◆ cPKey

VALUE cPKey

Definition at line 16 of file ossl_pkey.c.

Referenced by Init_ossl_dh(), Init_ossl_dsa(), Init_ossl_ec(), Init_ossl_pkey(), and Init_ossl_rsa().

◆ ePKeyError

VALUE ePKeyError

◆ mPKey

VALUE mPKey

Definition at line 15 of file ossl_pkey.c.

Referenced by Init_ossl_dh(), Init_ossl_dsa(), Init_ossl_ec(), 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",
{
0, ossl_evp_pkey_free,
},
}

Definition at line 29 of file ossl_pkey.c.

RUBY_TYPED_FREE_IMMEDIATELY
@ RUBY_TYPED_FREE_IMMEDIATELY
Definition: rtypeddata.h:62