#include "ossl.h"
Go to the source code of this file.
#define GetX509Ext | ( | obj, | ||
ext | ||||
) |
do { \ Data_Get_Struct(obj, X509_EXTENSION, ext); \ if (!ext) { \ ossl_raise(rb_eRuntimeError, "EXT wasn't initialized!"); \ } \ } while (0)
Definition at line 19 of file ossl_x509ext.c.
Referenced by ossl_x509ext_get_critical(), ossl_x509ext_get_oid(), ossl_x509ext_get_value(), ossl_x509ext_initialize(), ossl_x509ext_set_critical(), ossl_x509ext_set_oid(), ossl_x509ext_set_value(), and ossl_x509ext_to_der().
#define GetX509ExtFactory | ( | obj, | ||
ctx | ||||
) |
do { \ Data_Get_Struct(obj, X509V3_CTX, ctx); \ if (!ctx) { \ ossl_raise(rb_eRuntimeError, "CTX wasn't initialized!"); \ } \ } while (0)
Definition at line 35 of file ossl_x509ext.c.
Referenced by ossl_x509extfactory_create_ext(), ossl_x509extfactory_set_crl(), ossl_x509extfactory_set_issuer_cert(), ossl_x509extfactory_set_subject_cert(), and ossl_x509extfactory_set_subject_req().
#define MakeX509ExtFactory | ( | klass, | ||
obj, | ||||
ctx | ||||
) |
do { \ if (!(ctx = OPENSSL_malloc(sizeof(X509V3_CTX)))) \ ossl_raise(rb_eRuntimeError, "CTX wasn't allocated!"); \ X509V3_set_ctx(ctx, NULL, NULL, NULL, NULL, 0); \ obj = Data_Wrap_Struct(klass, 0, ossl_x509extfactory_free, ctx); \ } while (0)
Definition at line 29 of file ossl_x509ext.c.
Referenced by ossl_x509extfactory_alloc().
#define rb_f_fork rb_f_notimplement |
Definition at line 181 of file ossl_x509ext.c.
#define SafeGetX509Ext | ( | obj, | ||
ext | ||||
) |
do { \ OSSL_Check_Kind(obj, cX509Ext); \ GetX509Ext(obj, ext); \ } while (0)
Definition at line 25 of file ossl_x509ext.c.
Referenced by DupX509ExtPtr(), and GetX509ExtPtr().
#define WrapX509Ext | ( | klass, | ||
obj, | ||||
ext | ||||
) |
do { \ if (!ext) { \ ossl_raise(rb_eRuntimeError, "EXT wasn't initialized!"); \ } \ obj = Data_Wrap_Struct(klass, 0, X509_EXTENSION_free, ext); \ } while (0)
Definition at line 13 of file ossl_x509ext.c.
Referenced by ossl_x509ext_alloc(), ossl_x509ext_new(), and ossl_x509extfactory_create_ext().
X509_EXTENSION* DupX509ExtPtr | ( | VALUE | obj | ) |
Definition at line 82 of file ossl_x509ext.c.
References eX509ExtError, NULL, ossl_raise(), and SafeGetX509Ext.
Referenced by ossl_x509_add_extension(), ossl_x509_set_extensions(), ossl_x509crl_add_extension(), ossl_x509crl_set_extensions(), ossl_x509revoked_add_extension(), and ossl_x509revoked_set_extensions().
X509_EXTENSION* GetX509ExtPtr | ( | VALUE | obj | ) |
Definition at line 72 of file ossl_x509ext.c.
References SafeGetX509Ext.
void Init_ossl_x509ext | ( | void | ) |
Definition at line 427 of file ossl_x509ext.c.
References cX509Ext, cX509ExtFactory, eOSSLError, eX509ExtError, mX509, ossl_x509ext_alloc(), ossl_x509ext_get_critical(), ossl_x509ext_get_oid(), ossl_x509ext_get_value(), ossl_x509ext_initialize(), ossl_x509ext_set_critical(), ossl_x509ext_set_oid(), ossl_x509ext_set_value(), ossl_x509ext_to_der(), ossl_x509extfactory_alloc(), ossl_x509extfactory_create_ext(), ossl_x509extfactory_initialize(), ossl_x509extfactory_set_crl(), ossl_x509extfactory_set_issuer_cert(), ossl_x509extfactory_set_subject_cert(), ossl_x509extfactory_set_subject_req(), Qfalse, rb_attr(), rb_cObject, rb_define_alloc_func(), rb_define_class_under(), rb_define_method(), and rb_intern.
Referenced by Init_ossl_x509().
Definition at line 260 of file ossl_x509ext.c.
References eX509ExtError, NULL, ossl_raise(), and WrapX509Ext.
Referenced by Init_ossl_x509ext().
Definition at line 395 of file ossl_x509ext.c.
References GetX509Ext, and Qtrue.
Referenced by Init_ossl_x509ext().
Definition at line 355 of file ossl_x509ext.c.
References eX509ExtError, GetX509Ext, NULL, ossl_membio2str(), ossl_raise(), and rb_str_new2().
Referenced by Init_ossl_x509ext().
Definition at line 378 of file ossl_x509ext.c.
References eX509ExtError, GetX509Ext, NULL, ossl_membio2str(), and ossl_raise().
Referenced by Init_ossl_x509ext().
Definition at line 274 of file ossl_x509ext.c.
References DATA_PTR, eX509ExtError, GetX509Ext, NULL, ossl_raise(), ossl_to_der_if_possible(), rb_funcall(), rb_intern, rb_scan_args(), RSTRING_LEN, RSTRING_PTR, and StringValue.
Referenced by Init_ossl_x509ext().
VALUE ossl_x509ext_new | ( | X509_EXTENSION * | ext | ) |
Definition at line 53 of file ossl_x509ext.c.
References cX509Ext, eX509ExtError, NULL, ossl_raise(), and WrapX509Ext.
Referenced by ossl_x509_get_extensions(), ossl_x509crl_get_extensions(), and ossl_x509revoked_get_extensions().
Definition at line 344 of file ossl_x509ext.c.
References GetX509Ext, and RTEST.
Referenced by Init_ossl_x509ext().
Definition at line 299 of file ossl_x509ext.c.
References eX509ExtError, GetX509Ext, NULL, ossl_raise(), and StringValuePtr.
Referenced by Init_ossl_x509ext().
Definition at line 316 of file ossl_x509ext.c.
References eX509ExtError, GetX509Ext, NULL, ossl_raise(), ossl_to_der_if_possible(), RSTRING_LEN, RSTRING_PTR, and StringValue.
Referenced by Init_ossl_x509ext().
Definition at line 404 of file ossl_x509ext.c.
References eX509ExtError, GetX509Ext, len, NULL, ossl_raise(), ossl_str_adjust, rb_str_new(), and RSTRING_PTR.
Referenced by Init_ossl_x509ext().
Definition at line 107 of file ossl_x509ext.c.
References MakeX509ExtFactory, Qnil, and rb_iv_set().
Referenced by Init_ossl_x509ext().
Definition at line 215 of file ossl_x509ext.c.
References cX509Ext, eX509ExtError, GetConfigPtr(), GetX509ExtFactory, NIL_P, NULL, ossl_raise(), rb_iv_get(), rb_scan_args(), rb_str_append(), rb_str_new2(), RSTRING_PTR, RTEST, StringValue, and WrapX509Ext.
Referenced by Init_ossl_x509ext().
static void ossl_x509extfactory_free | ( | X509V3_CTX * | ctx | ) | [static] |
Definition at line 101 of file ossl_x509ext.c.
Definition at line 185 of file ossl_x509ext.c.
References NIL_P, ossl_x509extfactory_set_crl(), ossl_x509extfactory_set_issuer_cert(), ossl_x509extfactory_set_subject_cert(), ossl_x509extfactory_set_subject_req(), and rb_scan_args().
Referenced by Init_ossl_x509ext().
Definition at line 155 of file ossl_x509ext.c.
References GetX509CRLPtr(), GetX509ExtFactory, and rb_iv_set().
Referenced by Init_ossl_x509ext(), and ossl_x509extfactory_initialize().
Definition at line 119 of file ossl_x509ext.c.
References GetX509CertPtr(), GetX509ExtFactory, and rb_iv_set().
Referenced by Init_ossl_x509ext(), and ossl_x509extfactory_initialize().
Definition at line 131 of file ossl_x509ext.c.
References GetX509CertPtr(), GetX509ExtFactory, and rb_iv_set().
Referenced by Init_ossl_x509ext(), and ossl_x509extfactory_initialize().
Definition at line 143 of file ossl_x509ext.c.
References GetX509ExtFactory, GetX509ReqPtr(), and rb_iv_set().
Referenced by Init_ossl_x509ext(), and ossl_x509extfactory_initialize().
Definition at line 45 of file ossl_x509ext.c.
Referenced by Init_ossl_x509ext(), ossl_x509_set_extensions(), ossl_x509crl_set_extensions(), ossl_x509ext_new(), ossl_x509extfactory_create_ext(), and ossl_x509revoked_set_extensions().
Definition at line 46 of file ossl_x509ext.c.
Referenced by Init_ossl_x509ext().
Definition at line 47 of file ossl_x509ext.c.
Referenced by DupX509ExtPtr(), Init_ossl_x509ext(), ossl_x509ext_alloc(), ossl_x509ext_get_oid(), ossl_x509ext_get_value(), ossl_x509ext_initialize(), ossl_x509ext_new(), ossl_x509ext_set_oid(), ossl_x509ext_set_value(), ossl_x509ext_to_der(), and ossl_x509extfactory_create_ext().