Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

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)

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)

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)

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)

Definition at line 15 of file ossl_pkey_ec.c.

## Function Documentation

## ◆ Init_ossl_ec()

void Init_ossl_ec | ( | void |  | ) |

Definition at line 1650 of file ossl_pkey_ec.c.

References cEC, cEC_GROUP, cEC_POINT, cPKey, eEC_GROUP, eEC_POINT, eECError, eOSSLError, ePKeyError, mOSSL, mPKey, rb_cObject, rb_define_class_under(), rb_define_module_under(), and rb_eStandardError.

## ◆ ossl_ec_new()

VALUE ossl_ec_new | ( | EVP_PKEY * | pkey | ) |

Definition at line 87 of file ossl_pkey_ec.c.

References obj.

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

eEC_POINT
VALUE eEC_POINT
Definition: ossl_pkey_ec.c:48
rb_attr_get
VALUE rb_attr_get(VALUE, ID)
Definition: variable.c:1084
NULL
#define NULL
Definition: _sdbm.c:101
obj
const VALUE VALUE obj
Definition: rb_mjit_min_header-2.7.0.h:5742
rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:920
key
key
Definition: openssl_missing.h:181
eEC_GROUP
VALUE eEC_GROUP
Definition: ossl_pkey_ec.c:46