Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

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

Go to the source code of this file.

## Macros
#define | NewX509Attr(klass) TypedData_Wrap_Struct((klass), &ossl_x509attr_type, 0)
#define | SetX509Attr(obj, attr)
#define | GetX509Attr(obj, attr)

## Functions
VALUE | ossl_x509attr_new (X509_ATTRIBUTE *attr)
X509_ATTRIBUTE * | GetX509AttrPtr (VALUE obj)
void | Init_ossl_x509attr (void)

## Variables
VALUE | cX509Attr
VALUE | eX509AttrError

## Macro Definition Documentation

## ◆ GetX509Attr

#define GetX509Attr | ( |  | obj,
|  |  | attr
| ) |  |

Value:
do { \
TypedData_Get_Struct((obj), X509_ATTRIBUTE, &ossl_x509attr_type, (attr)); \
if (!(attr)) { \
ossl_raise(rb_eRuntimeError, "ATTR wasn't initialized!"); \
} \
} while (0)

Definition at line 20 of file ossl_x509attr.c.

## ◆ NewX509Attr

#define NewX509Attr | ( |  | klass | ) | TypedData_Wrap_Struct((klass), &ossl_x509attr_type, 0)

Definition at line 12 of file ossl_x509attr.c.

## ◆ SetX509Attr

#define SetX509Attr | ( |  | obj,
|  |  | attr
| ) |  |

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

Definition at line 14 of file ossl_x509attr.c.

## Function Documentation

## ◆ GetX509AttrPtr()

X509_ATTRIBUTE* GetX509AttrPtr | ( | VALUE | obj | ) |

Definition at line 71 of file ossl_x509attr.c.

References GetX509Attr, and obj.

## ◆ Init_ossl_x509attr()

void Init_ossl_x509attr | ( | void |  | ) |

Definition at line 305 of file ossl_x509attr.c.

References cX509Attr, eOSSLError, eX509AttrError, 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_x509attr_new()

VALUE ossl_x509attr_new | ( | X509_ATTRIBUTE * | attr | ) |

Definition at line 51 of file ossl_x509attr.c.

References cX509Attr, eX509AttrError, NewX509Attr, NULL, obj, ossl_raise(), and SetX509Attr.

## Variable Documentation

## ◆ cX509Attr

VALUE cX509Attr

Definition at line 30 of file ossl_x509attr.c.

Referenced by Init_ossl_x509attr(), and ossl_x509attr_new().

## ◆ eX509AttrError

VALUE eX509AttrError

Definition at line 31 of file ossl_x509attr.c.

Referenced by Init_ossl_x509attr(), and ossl_x509attr_new().

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