Ruby  2.5.0dev(2017-10-22revision60238)
Macros | Functions | Variables
ossl_pkcs7.c File Reference
#include "ossl.h"

Go to the source code of this file.

Macros

#define NewPKCS7(klass)   TypedData_Wrap_Struct((klass), &ossl_pkcs7_type, 0)
 
#define SetPKCS7(obj, pkcs7)
 
#define GetPKCS7(obj, pkcs7)
 
#define NewPKCS7si(klass)   TypedData_Wrap_Struct((klass), &ossl_pkcs7_signer_info_type, 0)
 
#define SetPKCS7si(obj, p7si)
 
#define GetPKCS7si(obj, p7si)
 
#define NewPKCS7ri(klass)   TypedData_Wrap_Struct((klass), &ossl_pkcs7_recip_info_type, 0)
 
#define SetPKCS7ri(obj, p7ri)
 
#define GetPKCS7ri(obj, p7ri)
 
#define numberof(ary)   (int)(sizeof(ary)/sizeof((ary)[0]))
 
#define ossl_pkcs7_set_data(o, v)   rb_iv_set((o), "@data", (v))
 
#define ossl_pkcs7_get_data(o)   rb_iv_get((o), "@data")
 
#define ossl_pkcs7_set_err_string(o, v)   rb_iv_set((o), "@error_string", (v))
 
#define ossl_pkcs7_get_err_string(o)   rb_iv_get((o), "@error_string")
 
#define DefPKCS7Const(x)   rb_define_const(cPKCS7, #x, INT2NUM(PKCS7_##x))
 

Functions

void Init_ossl_pkcs7 (void)
 

Variables

VALUE cPKCS7
 
VALUE cPKCS7Signer
 
VALUE cPKCS7Recipient
 
VALUE ePKCS7Error
 

Macro Definition Documentation

◆ DefPKCS7Const

#define DefPKCS7Const (   x)    rb_define_const(cPKCS7, #x, INT2NUM(PKCS7_##x))

◆ GetPKCS7

#define GetPKCS7 (   obj,
  pkcs7 
)
Value:
do { \
TypedData_Get_Struct((obj), PKCS7, &ossl_pkcs7_type, (pkcs7)); \
if (!(pkcs7)) { \
ossl_raise(rb_eRuntimeError, "PKCS7 wasn't initialized."); \
} \
} while (0)
VALUE rb_eRuntimeError
Definition: error.c:800

Definition at line 20 of file ossl_pkcs7.c.

◆ GetPKCS7ri

#define GetPKCS7ri (   obj,
  p7ri 
)
Value:
do { \
TypedData_Get_Struct((obj), PKCS7_RECIP_INFO, &ossl_pkcs7_recip_info_type, (p7ri)); \
if (!(p7ri)) { \
ossl_raise(rb_eRuntimeError, "PKCS7ri wasn't initialized."); \
} \
} while (0)
VALUE rb_eRuntimeError
Definition: error.c:800

Definition at line 50 of file ossl_pkcs7.c.

◆ GetPKCS7si

#define GetPKCS7si (   obj,
  p7si 
)
Value:
do { \
TypedData_Get_Struct((obj), PKCS7_SIGNER_INFO, &ossl_pkcs7_signer_info_type, (p7si)); \
if (!(p7si)) { \
ossl_raise(rb_eRuntimeError, "PKCS7si wasn't initialized."); \
} \
} while (0)
VALUE rb_eRuntimeError
Definition: error.c:800

Definition at line 35 of file ossl_pkcs7.c.

◆ NewPKCS7

#define NewPKCS7 (   klass)    TypedData_Wrap_Struct((klass), &ossl_pkcs7_type, 0)

Definition at line 12 of file ossl_pkcs7.c.

◆ NewPKCS7ri

#define NewPKCS7ri (   klass)    TypedData_Wrap_Struct((klass), &ossl_pkcs7_recip_info_type, 0)

Definition at line 42 of file ossl_pkcs7.c.

◆ NewPKCS7si

#define NewPKCS7si (   klass)    TypedData_Wrap_Struct((klass), &ossl_pkcs7_signer_info_type, 0)

Definition at line 27 of file ossl_pkcs7.c.

◆ numberof

#define numberof (   ary)    (int)(sizeof(ary)/sizeof((ary)[0]))

Definition at line 57 of file ossl_pkcs7.c.

◆ ossl_pkcs7_get_data

#define ossl_pkcs7_get_data (   o)    rb_iv_get((o), "@data")

Definition at line 60 of file ossl_pkcs7.c.

◆ ossl_pkcs7_get_err_string

#define ossl_pkcs7_get_err_string (   o)    rb_iv_get((o), "@error_string")

Definition at line 62 of file ossl_pkcs7.c.

◆ ossl_pkcs7_set_data

#define ossl_pkcs7_set_data (   o,
 
)    rb_iv_set((o), "@data", (v))

Definition at line 59 of file ossl_pkcs7.c.

◆ ossl_pkcs7_set_err_string

#define ossl_pkcs7_set_err_string (   o,
 
)    rb_iv_set((o), "@error_string", (v))

Definition at line 61 of file ossl_pkcs7.c.

◆ SetPKCS7

#define SetPKCS7 (   obj,
  pkcs7 
)
Value:
do { \
if (!(pkcs7)) { \
ossl_raise(rb_eRuntimeError, "PKCS7 wasn't initialized."); \
} \
RTYPEDDATA_DATA(obj) = (pkcs7); \
} while (0)
VALUE rb_eRuntimeError
Definition: error.c:800

Definition at line 14 of file ossl_pkcs7.c.

◆ SetPKCS7ri

#define SetPKCS7ri (   obj,
  p7ri 
)
Value:
do { \
if (!(p7ri)) { \
ossl_raise(rb_eRuntimeError, "PKCS7ri wasn't initialized."); \
} \
RTYPEDDATA_DATA(obj) = (p7ri); \
} while (0)
VALUE rb_eRuntimeError
Definition: error.c:800

Definition at line 44 of file ossl_pkcs7.c.

◆ SetPKCS7si

#define SetPKCS7si (   obj,
  p7si 
)
Value:
do { \
if (!(p7si)) { \
ossl_raise(rb_eRuntimeError, "PKCS7si wasn't initialized."); \
} \
RTYPEDDATA_DATA(obj) = (p7si); \
} while (0)
VALUE rb_eRuntimeError
Definition: error.c:800

Definition at line 29 of file ossl_pkcs7.c.

Function Documentation

◆ Init_ossl_pkcs7()

void Init_ossl_pkcs7 ( void  )

Variable Documentation

◆ cPKCS7

VALUE cPKCS7

Definition at line 67 of file ossl_pkcs7.c.

Referenced by Init_ossl_pkcs7().

◆ cPKCS7Recipient

VALUE cPKCS7Recipient

Definition at line 69 of file ossl_pkcs7.c.

◆ cPKCS7Signer

VALUE cPKCS7Signer

Definition at line 68 of file ossl_pkcs7.c.

◆ ePKCS7Error

VALUE ePKCS7Error

Definition at line 70 of file ossl_pkcs7.c.

Referenced by Init_ossl_pkcs7().