Ruby: ext/openssl/ossl_ocsp.c File Reference

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

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

Go to the source code of this file.

## Macros
#define | NewOCSPReq(klass) TypedData_Wrap_Struct((klass), &ossl_ocsp_request_type, 0)
#define | SetOCSPReq(obj, req)
#define | GetOCSPReq(obj, req)
#define | NewOCSPRes(klass) TypedData_Wrap_Struct((klass), &ossl_ocsp_response_type, 0)
#define | SetOCSPRes(obj, res)
#define | GetOCSPRes(obj, res)
#define | NewOCSPBasicRes(klass) TypedData_Wrap_Struct((klass), &ossl_ocsp_basicresp_type, 0)
#define | SetOCSPBasicRes(obj, res)
#define | GetOCSPBasicRes(obj, res)
#define | NewOCSPSingleRes(klass) TypedData_Wrap_Struct((klass), &ossl_ocsp_singleresp_type, 0)
#define | SetOCSPSingleRes(obj, res)
#define | GetOCSPSingleRes(obj, res)
#define | NewOCSPCertId(klass) TypedData_Wrap_Struct((klass), &ossl_ocsp_certid_type, 0)
#define | SetOCSPCertId(obj, cid)
#define | GetOCSPCertId(obj, cid)

## Functions
void | Init_ossl_ocsp (void)

## Variables
VALUE | mOCSP
VALUE | eOCSPError
VALUE | cOCSPReq
VALUE | cOCSPRes
VALUE | cOCSPBasicRes
VALUE | cOCSPSingleRes
VALUE | cOCSPCertId

## Macro Definition Documentation

## ◆ GetOCSPBasicRes

#define GetOCSPBasicRes | ( |  | obj,
|  |  | res
| ) |  |

Value:
do { \
TypedData_Get_Struct((obj), OCSP_BASICRESP, &ossl_ocsp_basicresp_type, (res)); \
if(!(res)) ossl_raise(rb_eRuntimeError, "Response wasn't initialized!"); \
} while (0)
rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:1055
ossl_raise
void ossl_raise(VALUE exc, const char *fmt,...)
Definition: ossl.c:293

Definition at line 43 of file ossl_ocsp.c.

## ◆ GetOCSPCertId

#define GetOCSPCertId | ( |  | obj,
|  |  | cid
| ) |  |

Value:
do { \
TypedData_Get_Struct((obj), OCSP_CERTID, &ossl_ocsp_certid_type, (cid)); \
if(!(cid)) ossl_raise(rb_eRuntimeError, "Cert ID wasn't initialized!"); \
} while (0)

Definition at line 65 of file ossl_ocsp.c.

## ◆ GetOCSPReq

#define GetOCSPReq | ( |  | obj,
|  |  | req
| ) |  |

Value:
do { \
TypedData_Get_Struct((obj), OCSP_REQUEST, &ossl_ocsp_request_type, (req)); \
if(!(req)) ossl_raise(rb_eRuntimeError, "Request wasn't initialized!"); \
} while (0)

Definition at line 21 of file ossl_ocsp.c.

## ◆ GetOCSPRes

#define GetOCSPRes | ( |  | obj,
|  |  | res
| ) |  |

Value:
do { \
TypedData_Get_Struct((obj), OCSP_RESPONSE, &ossl_ocsp_response_type, (res)); \
if(!(res)) ossl_raise(rb_eRuntimeError, "Response wasn't initialized!"); \
} while (0)

Definition at line 32 of file ossl_ocsp.c.

## ◆ GetOCSPSingleRes

#define GetOCSPSingleRes | ( |  | obj,
|  |  | res
| ) |  |

Value:
do { \
TypedData_Get_Struct((obj), OCSP_SINGLERESP, &ossl_ocsp_singleresp_type, (res)); \
if(!(res)) ossl_raise(rb_eRuntimeError, "SingleResponse wasn't initialized!"); \
} while (0)

Definition at line 54 of file ossl_ocsp.c.

## ◆ NewOCSPBasicRes

#define NewOCSPBasicRes | ( |  | klass | ) | TypedData_Wrap_Struct((klass), &ossl_ocsp_basicresp_type, 0)

Definition at line 37 of file ossl_ocsp.c.

## ◆ NewOCSPCertId

#define NewOCSPCertId | ( |  | klass | ) | TypedData_Wrap_Struct((klass), &ossl_ocsp_certid_type, 0)

Definition at line 59 of file ossl_ocsp.c.

## ◆ NewOCSPReq

#define NewOCSPReq | ( |  | klass | ) | TypedData_Wrap_Struct((klass), &ossl_ocsp_request_type, 0)

Definition at line 15 of file ossl_ocsp.c.

## ◆ NewOCSPRes

#define NewOCSPRes | ( |  | klass | ) | TypedData_Wrap_Struct((klass), &ossl_ocsp_response_type, 0)

Definition at line 26 of file ossl_ocsp.c.

## ◆ NewOCSPSingleRes

#define NewOCSPSingleRes | ( |  | klass | ) | TypedData_Wrap_Struct((klass), &ossl_ocsp_singleresp_type, 0)

Definition at line 48 of file ossl_ocsp.c.

## ◆ SetOCSPBasicRes

#define SetOCSPBasicRes | ( |  | obj,
|  |  | res
| ) |  |

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

Definition at line 39 of file ossl_ocsp.c.

## ◆ SetOCSPCertId

#define SetOCSPCertId | ( |  | obj,
|  |  | cid
| ) |  |

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

Definition at line 61 of file ossl_ocsp.c.

## ◆ SetOCSPReq

#define SetOCSPReq | ( |  | obj,
|  |  | req
| ) |  |

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

Definition at line 17 of file ossl_ocsp.c.

## ◆ SetOCSPRes

#define SetOCSPRes | ( |  | obj,
|  |  | res
| ) |  |

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

Definition at line 28 of file ossl_ocsp.c.

## ◆ SetOCSPSingleRes

#define SetOCSPSingleRes | ( |  | obj,
|  |  | res
| ) |  |

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

Definition at line 50 of file ossl_ocsp.c.

## Function Documentation

## ◆ Init_ossl_ocsp()

void Init_ossl_ocsp | ( | void |  | ) |

Definition at line 1699 of file ossl_ocsp.c.

References cOCSPBasicRes, cOCSPCertId, cOCSPReq, cOCSPRes, cOCSPSingleRes, eOCSPError, eOSSLError, INT2NUM, mOCSP, mOSSL, rb_cObject, rb_define_alloc_func(), rb_define_class_under(), rb_define_const(), rb_define_method, rb_define_module(), rb_define_module_under(), rb_define_singleton_method, and rb_eStandardError.

Referenced by Init_openssl().

## Variable Documentation

## ◆ cOCSPBasicRes

VALUE cOCSPBasicRes

Definition at line 74 of file ossl_ocsp.c.

Referenced by Init_ossl_ocsp().

## ◆ cOCSPCertId

VALUE cOCSPCertId

Definition at line 76 of file ossl_ocsp.c.

Referenced by Init_ossl_ocsp().

## ◆ cOCSPReq

VALUE cOCSPReq

Definition at line 72 of file ossl_ocsp.c.

Referenced by Init_ossl_ocsp().

## ◆ cOCSPRes

VALUE cOCSPRes

Definition at line 73 of file ossl_ocsp.c.

Referenced by Init_ossl_ocsp().

## ◆ cOCSPSingleRes

VALUE cOCSPSingleRes

Definition at line 75 of file ossl_ocsp.c.

Referenced by Init_ossl_ocsp().

## ◆ eOCSPError

VALUE eOCSPError

Definition at line 71 of file ossl_ocsp.c.

Referenced by Init_ossl_ocsp().

## ◆ mOCSP

VALUE mOCSP

Definition at line 70 of file ossl_ocsp.c.

Referenced by Init_ossl_ocsp().