Ruby: ext/openssl/ossl_x509name.c File Reference

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

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

Go to the source code of this file.

## Macros
#define | NewX509Name(klass) TypedData_Wrap_Struct((klass), &ossl_x509name_type, 0)
#define | SetX509Name(obj, name)
#define | GetX509Name(obj, name)
#define | OBJECT_TYPE_TEMPLATE rb_const_get(cX509Name, rb_intern("OBJECT_TYPE_TEMPLATE"))
#define | DEFAULT_OBJECT_TYPE rb_const_get(cX509Name, rb_intern("DEFAULT_OBJECT_TYPE"))
#define | rb_aref(obj, key) rb_funcall((obj), id_aref, 1, (key))

## Functions
VALUE | ossl_x509name_new (X509_NAME *name)
X509_NAME * | GetX509NamePtr (VALUE obj)
void | Init_ossl_x509name (void)

## Variables
VALUE | cX509Name
VALUE | eX509NameError

## Macro Definition Documentation

## ◆ DEFAULT_OBJECT_TYPE

#define DEFAULT_OBJECT_TYPE rb_const_get(cX509Name, rb_intern("DEFAULT_OBJECT_TYPE"))

Definition at line 29 of file ossl_x509name.c.

## ◆ GetX509Name

#define GetX509Name | ( |  | obj,
|  |  | name
| ) |  |

Value:
do { \
TypedData_Get_Struct((obj), X509_NAME, &ossl_x509name_type, (name)); \
if (!(name)) { \
ossl_raise(rb_eRuntimeError, "Name wasn't initialized."); \
} \
} while (0)
rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:1055
name
const char * name
Definition: nkf.c:208

Definition at line 20 of file ossl_x509name.c.

## ◆ NewX509Name

#define NewX509Name | ( |  | klass | ) | TypedData_Wrap_Struct((klass), &ossl_x509name_type, 0)

Definition at line 12 of file ossl_x509name.c.

## ◆ OBJECT_TYPE_TEMPLATE

#define OBJECT_TYPE_TEMPLATE rb_const_get(cX509Name, rb_intern("OBJECT_TYPE_TEMPLATE"))

Definition at line 27 of file ossl_x509name.c.

## ◆ rb_aref

#define rb_aref | ( |  | obj,
|  |  | key
| ) |  | rb_funcall((obj), id_aref, 1, (key))

Definition at line 105 of file ossl_x509name.c.

## ◆ SetX509Name

#define SetX509Name | ( |  | obj,
|  |  | name
| ) |  |

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

Definition at line 14 of file ossl_x509name.c.

## Function Documentation

## ◆ GetX509NamePtr()

X509_NAME * GetX509NamePtr | ( | VALUE | obj | ) |

Definition at line 76 of file ossl_x509name.c.

References GetX509Name, and name.

## ◆ Init_ossl_x509name()

void Init_ossl_x509name | ( | void |  | ) |

Definition at line 507 of file ossl_x509name.c.

References cX509Name, eOSSLError, eX509NameError, INT2NUM, mOSSL, mX509, rb_cObject, rb_define_alias(), rb_define_alloc_func(), rb_define_class_under(), rb_define_const(), rb_define_method, rb_define_module(), rb_define_module_under(), rb_eStandardError, rb_hash_aset(), rb_hash_new(), rb_include_module(), rb_intern(), rb_mComparable, rb_str_new2, RHASH_SET_IFNONE, and ULONG2NUM.

Referenced by Init_ossl_x509().

## ◆ ossl_x509name_new()

VALUE ossl_x509name_new | ( | X509_NAME * | name | ) |

Definition at line 56 of file ossl_x509name.c.

References cX509Name, eX509NameError, name, NewX509Name, NULL, ossl_raise(), and SetX509Name.

## Variable Documentation

## ◆ cX509Name

VALUE cX509Name

Definition at line 35 of file ossl_x509name.c.

Referenced by Init_ossl_x509name(), and ossl_x509name_new().

## ◆ eX509NameError

VALUE eX509NameError

Definition at line 36 of file ossl_x509name.c.

Referenced by Init_ossl_x509name(), and ossl_x509name_new().