Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

Macros | Functions | Variables
ossl_x509ext.c File Reference
`#include "ossl.h"`

Go to the source code of this file.

## Macros
#define | NewX509Ext(klass) TypedData_Wrap_Struct((klass), &ossl_x509ext_type, 0)
#define | SetX509Ext(obj, ext)
#define | GetX509Ext(obj, ext)
#define | MakeX509ExtFactory(klass, obj, ctx)
#define | GetX509ExtFactory(obj, ctx)

## Functions
VALUE | ossl_x509ext_new (X509_EXTENSION *ext)
X509_EXTENSION * | GetX509ExtPtr (VALUE obj)
void | Init_ossl_x509ext (void)

## Variables
VALUE | cX509Ext
VALUE | cX509ExtFactory
VALUE | eX509ExtError

## Macro Definition Documentation

## ◆ GetX509Ext

#define GetX509Ext | ( |  | obj,
|  |  | ext
| ) |  |

Value:
do { \
TypedData_Get_Struct((obj), X509_EXTENSION, &ossl_x509ext_type, (ext)); \
if (!(ext)) { \
ossl_raise(rb_eRuntimeError, "EXT wasn't initialized!"); \
} \
} while (0)

Definition at line 20 of file ossl_x509ext.c.

## ◆ GetX509ExtFactory

#define GetX509ExtFactory | ( |  | obj,
|  |  | ctx
| ) |  |

Value:
do { \
TypedData_Get_Struct((obj), X509V3_CTX, &ossl_x509extfactory_type, (ctx)); \
if (!(ctx)) { \
ossl_raise(rb_eRuntimeError, "CTX wasn't initialized!"); \
} \
} while (0)

Definition at line 33 of file ossl_x509ext.c.

## ◆ MakeX509ExtFactory

#define MakeX509ExtFactory | ( |  | klass,
|  |  | obj,
|  |  | ctx
| ) |  |

Value:
do { \
(obj) = TypedData_Wrap_Struct((klass), &ossl_x509extfactory_type, 0); \
if (!((ctx) = OPENSSL_malloc(sizeof(X509V3_CTX)))) \
ossl_raise(rb_eRuntimeError, "CTX wasn't allocated!"); \
X509V3_set_ctx((ctx), NULL, NULL, NULL, NULL, 0); \
RTYPEDDATA_DATA(obj) = (ctx); \
} while (0)

Definition at line 26 of file ossl_x509ext.c.

## ◆ NewX509Ext

#define NewX509Ext | ( |  | klass | ) | TypedData_Wrap_Struct((klass), &ossl_x509ext_type, 0)

Definition at line 12 of file ossl_x509ext.c.

## ◆ SetX509Ext

#define SetX509Ext | ( |  | obj,
|  |  | ext
| ) |  |

Value:
do { \
if (!(ext)) { \
ossl_raise(rb_eRuntimeError, "EXT wasn't initialized!"); \
} \
RTYPEDDATA_DATA(obj) = (ext); \
} while (0)

Definition at line 14 of file ossl_x509ext.c.

## Function Documentation

## ◆ GetX509ExtPtr()

X509_EXTENSION* GetX509ExtPtr | ( | VALUE | obj | ) |

Definition at line 85 of file ossl_x509ext.c.

References GetX509Ext, and obj.

## ◆ Init_ossl_x509ext()

void Init_ossl_x509ext | ( | void |  | ) |

Definition at line 438 of file ossl_x509ext.c.

References cX509ExtFactory, eOSSLError, eX509ExtError, mOSSL, mX509, rb_cObject, rb_define_alloc_func(), rb_define_class_under(), rb_define_module(), rb_define_module_under(), and rb_eStandardError.

Referenced by Init_ossl_x509().

## ◆ ossl_x509ext_new()

VALUE ossl_x509ext_new | ( | X509_EXTENSION * | ext | ) |

Definition at line 65 of file ossl_x509ext.c.

References cX509Ext, eX509ExtError, NewX509Ext, NULL, obj, ossl_raise(), and SetX509Ext.

## Variable Documentation

## ◆ cX509Ext

VALUE cX509Ext

Definition at line 43 of file ossl_x509ext.c.

Referenced by ossl_x509ext_new().

## ◆ cX509ExtFactory

VALUE cX509ExtFactory

Definition at line 44 of file ossl_x509ext.c.

Referenced by Init_ossl_x509ext().

## ◆ eX509ExtError

VALUE eX509ExtError

Definition at line 45 of file ossl_x509ext.c.

Referenced by Init_ossl_x509ext(), and ossl_x509ext_new().

NULL
#define NULL
Definition: _sdbm.c:101
obj
const VALUE VALUE obj
Definition: rb_mjit_min_header-2.7.0.h:5742
TypedData_Wrap_Struct
#define TypedData_Wrap_Struct(klass, data_type, sval)
Definition: ruby.h:1231
rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:920
klass
VALUE klass
Definition: rb_mjit_min_header-2.7.0.h:13254