Ruby: ext/openssl/ossl_x509attr.c File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

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)
rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:1055

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.

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