Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

Data Structures | Macros | Functions | Variables
ossl_pkey_rsa.c File Reference
`#include "ossl.h"`

Go to the source code of this file.

## Data Structures
struct | rsa_blocking_gen_arg

## Macros
#define | GetPKeyRSA(obj, pkey)
#define | GetRSA(obj, rsa)
#define | DefRSAConst(x) rb_define_const(cRSA, #x, INT2NUM(RSA_##x))

## Functions
VALUE | ossl_rsa_new (EVP_PKEY *pkey)
void | Init_ossl_rsa (void)

## Variables
VALUE | cRSA
VALUE | eRSAError

## Macro Definition Documentation

## ◆ DefRSAConst

#define DefRSAConst | ( |  | x | ) | rb_define_const(cRSA, #x, INT2NUM(RSA_##x))

Definition at line 877 of file ossl_pkey_rsa.c.

## ◆ GetPKeyRSA

#define GetPKeyRSA | ( |  | obj,
|  |  | pkey
| ) |  |

Value:
do { \
GetPKey((obj), (pkey)); \
if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { /* PARANOIA? */ \
ossl_raise(rb_eRuntimeError, "THIS IS NOT A RSA!") ; \
} \
} while (0)

Definition at line 14 of file ossl_pkey_rsa.c.

## ◆ GetRSA

#define GetRSA | ( |  | obj,
|  |  | rsa
| ) |  |

Value:
do { \
EVP_PKEY *_pkey; \
GetPKeyRSA((obj), _pkey); \
(rsa) = EVP_PKEY_get0_RSA(_pkey); \
} while (0)

Definition at line 20 of file ossl_pkey_rsa.c.

## Function Documentation

## ◆ Init_ossl_rsa()

void Init_ossl_rsa | ( | void |  | ) |

Definition at line 880 of file ossl_pkey_rsa.c.

References cPKey, cRSA, eOSSLError, ePKeyError, eRSAError, mOSSL, mPKey, rb_cObject, rb_define_class_under(), rb_define_module_under(), and rb_define_singleton_method().

## ◆ ossl_rsa_new()

VALUE ossl_rsa_new | ( | EVP_PKEY * | pkey | ) |

Definition at line 73 of file ossl_pkey_rsa.c.

References obj.

## Variable Documentation

## ◆ cRSA

VALUE cRSA

Definition at line 44 of file ossl_pkey_rsa.c.

Referenced by Init_ossl_rsa().

## ◆ eRSAError

VALUE eRSAError

Definition at line 45 of file ossl_pkey_rsa.c.

Referenced by Init_ossl_rsa().

obj
const VALUE VALUE obj
Definition: rb_mjit_min_header-2.7.0.h:5742
rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:920