Ruby: ext/openssl/ossl_pkcs12.c File Reference

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

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

Go to the source code of this file.

## Macros
#define | NewPKCS12(klass) TypedData_Wrap_Struct((klass), &ossl_pkcs12_type, 0)
#define | SetPKCS12(obj, p12)
#define | GetPKCS12(obj, p12)
#define | ossl_pkcs12_set_key(o, v) rb_iv_set((o), "@key", (v))
#define | ossl_pkcs12_set_cert(o, v) rb_iv_set((o), "@certificate", (v))
#define | ossl_pkcs12_set_ca_certs(o, v) rb_iv_set((o), "@ca_certs", (v))
#define | ossl_pkcs12_get_key(o) rb_iv_get((o), "@key")
#define | ossl_pkcs12_get_cert(o) rb_iv_get((o), "@certificate")
#define | ossl_pkcs12_get_ca_certs(o) rb_iv_get((o), "@ca_certs")

## Functions
void | Init_ossl_pkcs12 (void)

## Variables
VALUE | cPKCS12
VALUE | ePKCS12Error

## Macro Definition Documentation

## ◆ GetPKCS12

#define GetPKCS12 | ( |  | obj,
|  |  | p12
| ) |  |

Value:
do { \
TypedData_Get_Struct((obj), PKCS12, &ossl_pkcs12_type, (p12)); \
if(!(p12)) ossl_raise(rb_eRuntimeError, "PKCS12 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 15 of file ossl_pkcs12.c.

## ◆ NewPKCS12

#define NewPKCS12 | ( |  | klass | ) | TypedData_Wrap_Struct((klass), &ossl_pkcs12_type, 0)

Definition at line 7 of file ossl_pkcs12.c.

## ◆ ossl_pkcs12_get_ca_certs

#define ossl_pkcs12_get_ca_certs | ( |  | o | ) | rb_iv_get((o), "@ca_certs")

Definition at line 25 of file ossl_pkcs12.c.

## ◆ ossl_pkcs12_get_cert

#define ossl_pkcs12_get_cert | ( |  | o | ) | rb_iv_get((o), "@certificate")

Definition at line 24 of file ossl_pkcs12.c.

## ◆ ossl_pkcs12_get_key

#define ossl_pkcs12_get_key | ( |  | o | ) | rb_iv_get((o), "@key")

Definition at line 23 of file ossl_pkcs12.c.

## ◆ ossl_pkcs12_set_ca_certs

#define ossl_pkcs12_set_ca_certs | ( |  | o,
|  |  | v
| ) |  | rb_iv_set((o), "@ca_certs", (v))

Definition at line 22 of file ossl_pkcs12.c.

## ◆ ossl_pkcs12_set_cert

#define ossl_pkcs12_set_cert | ( |  | o,
|  |  | v
| ) |  | rb_iv_set((o), "@certificate", (v))

Definition at line 21 of file ossl_pkcs12.c.

## ◆ ossl_pkcs12_set_key

#define ossl_pkcs12_set_key | ( |  | o,
|  |  | v
| ) |  | rb_iv_set((o), "@key", (v))

Definition at line 20 of file ossl_pkcs12.c.

## ◆ SetPKCS12

#define SetPKCS12 | ( |  | obj,
|  |  | p12
| ) |  |

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

Definition at line 10 of file ossl_pkcs12.c.

## Function Documentation

## ◆ Init_ossl_pkcs12()

void Init_ossl_pkcs12 | ( | void |  | ) |

Definition at line 233 of file ossl_pkcs12.c.

References cPKCS12, eOSSLError, ePKCS12Error, mOSSL, Qfalse, rb_attr(), rb_cObject, rb_define_alloc_func(), rb_define_class_under(), rb_define_method, rb_define_module(), rb_define_singleton_method, rb_eStandardError, and rb_intern().

Referenced by Init_openssl().

## Variable Documentation

## ◆ cPKCS12

VALUE cPKCS12

Definition at line 30 of file ossl_pkcs12.c.

Referenced by Init_ossl_pkcs12().

## ◆ ePKCS12Error

VALUE ePKCS12Error

Definition at line 31 of file ossl_pkcs12.c.

Referenced by Init_ossl_pkcs12().