Ruby: ext/openssl/ossl_x509store.c File Reference

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

Data Structures | Macros | Functions | Variables
ossl_x509store.c File Reference
`#include "ossl.h"`

Go to the source code of this file.

## Data Structures
struct | ossl_verify_cb_args

## Macros
#define | NewX509Store(klass) TypedData_Wrap_Struct((klass), &ossl_x509store_type, 0)
#define | SetX509Store(obj, st)
#define | GetX509Store(obj, st)
#define | NewX509StCtx(klass) TypedData_Wrap_Struct((klass), &ossl_x509stctx_type, 0)
#define | SetX509StCtx(obj, ctx)
#define | GetX509StCtx(obj, ctx)

## Functions
int | ossl_verify_cb_call (VALUE proc, int ok, X509_STORE_CTX *ctx)
X509_STORE * | GetX509StorePtr (VALUE obj)
void | Init_ossl_x509store (void)

## Variables
VALUE | cX509Store
VALUE | cX509StoreContext
VALUE | eX509StoreError

## Macro Definition Documentation

## ◆ GetX509StCtx

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

Value:
do { \
TypedData_Get_Struct((obj), X509_STORE_CTX, &ossl_x509stctx_type, (ctx)); \
if (!(ctx)) { \
ossl_raise(rb_eRuntimeError, "STORE_CTX is out of scope!"); \
} \
} while (0)
rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:1055

Definition at line 35 of file ossl_x509store.c.

## ◆ GetX509Store

#define GetX509Store | ( |  | obj,
|  |  | st
| ) |  |

Value:
do { \
TypedData_Get_Struct((obj), X509_STORE, &ossl_x509store_type, (st)); \
if (!(st)) { \
ossl_raise(rb_eRuntimeError, "STORE wasn't initialized!"); \
} \
} while (0)

Definition at line 20 of file ossl_x509store.c.

## ◆ NewX509StCtx

#define NewX509StCtx | ( |  | klass | ) | TypedData_Wrap_Struct((klass), &ossl_x509stctx_type, 0)

Definition at line 27 of file ossl_x509store.c.

## ◆ NewX509Store

#define NewX509Store | ( |  | klass | ) | TypedData_Wrap_Struct((klass), &ossl_x509store_type, 0)

Definition at line 12 of file ossl_x509store.c.

## ◆ SetX509StCtx

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

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

Definition at line 29 of file ossl_x509store.c.

## ◆ SetX509Store

#define SetX509Store | ( |  | obj,
|  |  | st
| ) |  |

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

Definition at line 14 of file ossl_x509store.c.

## Function Documentation

## ◆ GetX509StorePtr()

X509_STORE * GetX509StorePtr | ( | VALUE | obj | ) |

Definition at line 133 of file ossl_x509store.c.

References GetX509Store.

## ◆ Init_ossl_x509store()

void Init_ossl_x509store | ( | void |  | ) |

Definition at line 789 of file ossl_x509store.c.

References cX509Store, cX509StoreContext, eOSSLError, eX509StoreError, mOSSL, mX509, ossl_raise(), Qfalse, rb_attr(), rb_cObject, rb_define_alloc_func(), rb_define_class_under(), rb_define_method, rb_define_module(), rb_define_module_under(), rb_eStandardError, rb_intern(), rb_undef_method(), and X509_STORE_get_ex_new_index.

Referenced by Init_ossl_x509().

## ◆ ossl_verify_cb_call()

int ossl_verify_cb_call | ( | VALUE | proc,
|  | int | ok,
|  | X509_STORE_CTX * | ctx
| ) |  |

Definition at line 62 of file ossl_x509store.c.

References NIL_P, NULL, ossl_verify_cb_args::preverify_ok, ossl_verify_cb_args::proc, Qfalse, Qnil, Qtrue, rb_protect(), rb_set_errinfo(), rb_warn(), RTYPEDDATA_DATA, and ossl_verify_cb_args::store_ctx.

## Variable Documentation

## ◆ cX509Store

VALUE cX509Store

Definition at line 104 of file ossl_x509store.c.

Referenced by Init_ossl_x509store().

## ◆ cX509StoreContext

VALUE cX509StoreContext

Definition at line 105 of file ossl_x509store.c.

Referenced by Init_ossl_x509store().

## ◆ eX509StoreError

VALUE eX509StoreError

Definition at line 106 of file ossl_x509store.c.

Referenced by Init_ossl_x509store().