Ruby  3.1.0dev(2021-09-10revisionb76ad15ed0da636161de0243c547ee1e6fc95681)
Macros | Functions | Variables
ossl_pkey_rsa.c File Reference

(b76ad15ed0da636161de0243c547ee1e6fc95681)

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

Go to the source code of this file.

Macros

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

Functions

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 488 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  )

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

rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:1091