Ruby: ext/openssl/ossl_pkey.c File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Functions | Variables
ossl_pkey.c File Reference
`#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)
VALUE | ossl_pkey_new (EVP_PKEY *pkey)
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)
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 258 of file ossl_pkey.c.

References EVP_PKEY_up_ref, and GetPKey.

## ◆ GetPKeyPtr()

EVP_PKEY * GetPKeyPtr | ( | VALUE | obj | ) |

Definition at line 235 of file ossl_pkey.c.

References GetPKey.

## ◆ GetPrivPKeyPtr()

EVP_PKEY * GetPrivPKeyPtr | ( | VALUE | obj | ) |

Definition at line 245 of file ossl_pkey.c.

References GetPKey, NULL, ossl_raise(), Qtrue, rb_eArgError, and rb_funcallv.

## ◆ Init_ossl_pkey()

void Init_ossl_pkey | ( | void |  | ) |

Definition at line 572 of file ossl_pkey.c.

References cPKey, eOSSLError, ePKeyError, Init_ossl_dh(), Init_ossl_dsa(), Init_ossl_ec(), Init_ossl_rsa(), mOSSL, mPKey, 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().

## ◆ ossl_generate_cb_2()

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

Definition at line 39 of file ossl_pkey.c.

References BN_GENCB_get_arg, int(), INT2NUM, ossl_generate_cb_arg::interrupted, NULL, rb_ary_new2, rb_ary_store(), rb_protect(), rb_thread_call_with_gvl(), rb_yield(), ossl_generate_cb_arg::state, and ossl_generate_cb_arg::yield.

## ◆ ossl_generate_cb_stop()

void ossl_generate_cb_stop | ( | void * | ptr | ) |

Definition at line 72 of file ossl_pkey.c.

References ossl_generate_cb_arg::interrupted, and ptr.

## ◆ ossl_pkey_check_public_key()

void ossl_pkey_check_public_key | ( | const EVP_PKEY * | pkey | ) |

Definition at line 195 of file ossl_pkey.c.

References ePKeyError, NULL, ossl_raise(), and ptr.

## ◆ ossl_pkey_new()

VALUE ossl_pkey_new | ( | EVP_PKEY * | pkey | ) |

Definition at line 129 of file ossl_pkey.c.

References rb_jump_tag(), and rb_protect().

## 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

Definition at line 17 of file ossl_pkey.c.

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

## ◆ 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,
},
0, 0, RUBY_TYPED_FREE_IMMEDIATELY,
}
RUBY_TYPED_FREE_IMMEDIATELY
@ RUBY_TYPED_FREE_IMMEDIATELY
Definition: rtypeddata.h:62

Definition at line 87 of file ossl_pkey.c.