Ruby  2.5.0dev(2017-10-22revision60238)
Macros | Functions | Variables
ossl_pkey_ec.c File Reference
#include "ossl.h"

Go to the source code of this file.

Macros

#define EXPORT_PEM   0
 
#define EXPORT_DER   1
 
#define GetPKeyEC(obj, pkey)
 
#define GetEC(obj, key)
 
#define GetECGroup(obj, group)
 
#define GetECPoint(obj, point)
 
#define GetECPointGroup(obj, group)
 

Functions

VALUE ossl_ec_new (EVP_PKEY *pkey)
 
void Init_ossl_ec (void)
 

Variables

VALUE cEC
 
VALUE eECError
 
VALUE cEC_GROUP
 
VALUE eEC_GROUP
 
VALUE cEC_POINT
 
VALUE eEC_POINT
 

Macro Definition Documentation

◆ EXPORT_DER

#define EXPORT_DER   1

Definition at line 10 of file ossl_pkey_ec.c.

◆ EXPORT_PEM

#define EXPORT_PEM   0

Definition at line 9 of file ossl_pkey_ec.c.

◆ GetEC

#define GetEC (   obj,
  key 
)
Value:
do { \
EVP_PKEY *_pkey; \
GetPKeyEC(obj, _pkey); \
(key) = EVP_PKEY_get0_EC_KEY(_pkey); \
} while (0)

Definition at line 21 of file ossl_pkey_ec.c.

◆ GetECGroup

#define GetECGroup (   obj,
  group 
)
Value:
do { \
TypedData_Get_Struct(obj, EC_GROUP, &ossl_ec_group_type, group); \
if ((group) == NULL) \
ossl_raise(eEC_GROUP, "EC_GROUP is not initialized"); \
} while (0)
VALUE eEC_GROUP
Definition: ossl_pkey_ec.c:46
#define NULL
Definition: _sdbm.c:102

Definition at line 27 of file ossl_pkey_ec.c.

◆ GetECPoint

#define GetECPoint (   obj,
  point 
)
Value:
do { \
TypedData_Get_Struct(obj, EC_POINT, &ossl_ec_point_type, point); \
if ((point) == NULL) \
ossl_raise(eEC_POINT, "EC_POINT is not initialized"); \
} while (0)
VALUE eEC_POINT
Definition: ossl_pkey_ec.c:48
#define NULL
Definition: _sdbm.c:102

Definition at line 33 of file ossl_pkey_ec.c.

◆ GetECPointGroup

#define GetECPointGroup (   obj,
  group 
)
Value:
do { \
VALUE _group = rb_attr_get(obj, id_i_group); \
GetECGroup(_group, group); \
} while (0)
VALUE rb_attr_get(VALUE, ID)
Definition: variable.c:1224

Definition at line 38 of file ossl_pkey_ec.c.

◆ GetPKeyEC

#define GetPKeyEC (   obj,
  pkey 
)
Value:
do { \
GetPKey((obj), (pkey)); \
if (EVP_PKEY_base_id(pkey) != EVP_PKEY_EC) { \
ossl_raise(rb_eRuntimeError, "THIS IS NOT A EC PKEY!"); \
} \
} while (0)
VALUE rb_eRuntimeError
Definition: error.c:800

Definition at line 15 of file ossl_pkey_ec.c.

Function Documentation

◆ Init_ossl_ec()

void Init_ossl_ec ( void  )

◆ ossl_ec_new()

VALUE ossl_ec_new ( EVP_PKEY *  pkey)

Definition at line 87 of file ossl_pkey_ec.c.

Variable Documentation

◆ cEC

VALUE cEC

Definition at line 43 of file ossl_pkey_ec.c.

Referenced by Init_ossl_ec().

◆ cEC_GROUP

VALUE cEC_GROUP

Definition at line 45 of file ossl_pkey_ec.c.

Referenced by Init_ossl_ec().

◆ cEC_POINT

VALUE cEC_POINT

Definition at line 47 of file ossl_pkey_ec.c.

Referenced by Init_ossl_ec().

◆ eEC_GROUP

VALUE eEC_GROUP

Definition at line 46 of file ossl_pkey_ec.c.

Referenced by Init_ossl_ec().

◆ eEC_POINT

VALUE eEC_POINT

Definition at line 48 of file ossl_pkey_ec.c.

Referenced by Init_ossl_ec().

◆ eECError

VALUE eECError

Definition at line 44 of file ossl_pkey_ec.c.

Referenced by Init_ossl_ec().