#include "ossl.h"
Go to the source code of this file.
#define DefPKCS7Const | ( | x | ) | rb_define_const(cPKCS7, #x, INT2NUM(PKCS7_##x)) |
Referenced by Init_ossl_pkcs7().
#define GetPKCS7 | ( | obj, | ||
pkcs7 | ||||
) |
do { \ Data_Get_Struct(obj, PKCS7, pkcs7); \ if (!pkcs7) { \ ossl_raise(rb_eRuntimeError, "PKCS7 wasn't initialized."); \ } \ } while (0)
Definition at line 19 of file ossl_pkcs7.c.
Referenced by ossl_pkcs7_add_certificate(), ossl_pkcs7_add_crl(), ossl_pkcs7_add_data(), ossl_pkcs7_add_recipient(), ossl_pkcs7_add_signer(), ossl_pkcs7_copy(), ossl_pkcs7_decrypt(), ossl_pkcs7_detached_p(), ossl_pkcs7_get_detached(), ossl_pkcs7_get_recipient(), ossl_pkcs7_get_signer(), ossl_pkcs7_get_type(), ossl_pkcs7_set_cipher(), ossl_pkcs7_set_detached(), ossl_pkcs7_set_type(), ossl_pkcs7_to_der(), ossl_pkcs7_to_pem(), ossl_pkcs7_verify(), and STACK_OF().
#define GetPKCS7ri | ( | obj, | ||
p7ri | ||||
) |
do { \ Data_Get_Struct(obj, PKCS7_RECIP_INFO, p7ri); \ if (!p7ri) { \ ossl_raise(rb_eRuntimeError, "PKCS7ri wasn't initialized."); \ } \ } while (0)
Definition at line 53 of file ossl_pkcs7.c.
Referenced by ossl_pkcs7ri_get_enc_key(), ossl_pkcs7ri_get_issuer(), ossl_pkcs7ri_get_serial(), and ossl_pkcs7ri_initialize().
#define GetPKCS7si | ( | obj, | ||
p7si | ||||
) |
do { \ Data_Get_Struct(obj, PKCS7_SIGNER_INFO, p7si); \ if (!p7si) { \ ossl_raise(rb_eRuntimeError, "PKCS7si wasn't initialized."); \ } \ } while (0)
Definition at line 36 of file ossl_pkcs7.c.
Referenced by ossl_pkcs7si_get_issuer(), ossl_pkcs7si_get_serial(), ossl_pkcs7si_get_signed_time(), and ossl_pkcs7si_initialize().
#define numberof | ( | ary | ) | (sizeof(ary)/sizeof(ary[0])) |
Definition at line 64 of file ossl_pkcs7.c.
Referenced by ossl_pkcs7_sym2typeid().
#define ossl_pkcs7_get_data | ( | o | ) | rb_iv_get((o), "@data") |
Definition at line 67 of file ossl_pkcs7.c.
Referenced by ossl_pkcs7_s_write_smime(), and ossl_pkcs7_verify().
#define ossl_pkcs7_get_err_string | ( | o | ) | rb_iv_get((o), "@error_string") |
Definition at line 69 of file ossl_pkcs7.c.
#define ossl_pkcs7_set_data | ( | o, | ||
v | ||||
) | rb_iv_set((o), "@data", (v)) |
Definition at line 66 of file ossl_pkcs7.c.
Referenced by ossl_pkcs7_add_data(), ossl_pkcs7_initialize(), ossl_pkcs7_s_encrypt(), ossl_pkcs7_s_read_smime(), ossl_pkcs7_s_sign(), and ossl_pkcs7_verify().
#define ossl_pkcs7_set_err_string | ( | o, | ||
v | ||||
) | rb_iv_set((o), "@error_string", (v)) |
Definition at line 68 of file ossl_pkcs7.c.
Referenced by ossl_pkcs7_initialize(), ossl_pkcs7_s_read_smime(), ossl_pkcs7_s_sign(), and ossl_pkcs7_verify().
#define SafeGetPKCS7 | ( | obj, | ||
pkcs7 | ||||
) |
do { \ OSSL_Check_Kind(obj, cPKCS7); \ GetPKCS7(obj, pkcs7); \ } while (0)
Definition at line 25 of file ossl_pkcs7.c.
Referenced by ossl_pkcs7_copy(), and ossl_pkcs7_s_write_smime().
#define SafeGetPKCS7ri | ( | obj, | ||
p7ri | ||||
) |
do { \ OSSL_Check_Kind(obj, cPKCS7Recipient); \ GetPKCS7ri(obj, p7ri); \ } while (0)
Definition at line 59 of file ossl_pkcs7.c.
Referenced by DupPKCS7RecipientPtr().
#define SafeGetPKCS7si | ( | obj, | ||
p7si | ||||
) |
do { \ OSSL_Check_Kind(obj, cPKCS7Signer); \ GetPKCS7si(obj, p7si); \ } while (0)
Definition at line 42 of file ossl_pkcs7.c.
Referenced by DupPKCS7SignerPtr().
#define WrapPKCS7 | ( | klass, | ||
obj, | ||||
pkcs7 | ||||
) |
do { \ if (!pkcs7) { \ ossl_raise(rb_eRuntimeError, "PKCS7 wasn't initialized."); \ } \ obj = Data_Wrap_Struct(klass, 0, PKCS7_free, pkcs7); \ } while (0)
Definition at line 13 of file ossl_pkcs7.c.
Referenced by ossl_pkcs7_alloc(), ossl_pkcs7_s_encrypt(), ossl_pkcs7_s_read_smime(), and ossl_pkcs7_s_sign().
#define WrapPKCS7ri | ( | klass, | ||
obj, | ||||
p7ri | ||||
) |
do { \ if (!p7ri) { \ ossl_raise(rb_eRuntimeError, "PKCS7ri wasn't initialized."); \ } \ obj = Data_Wrap_Struct(klass, 0, PKCS7_RECIP_INFO_free, p7ri); \ } while (0)
Definition at line 47 of file ossl_pkcs7.c.
Referenced by ossl_pkcs7ri_alloc(), and ossl_pkcs7ri_new().
#define WrapPKCS7si | ( | klass, | ||
obj, | ||||
p7si | ||||
) |
do { \ if (!p7si) { \ ossl_raise(rb_eRuntimeError, "PKCS7si wasn't initialized."); \ } \ obj = Data_Wrap_Struct(klass, 0, PKCS7_SIGNER_INFO_free, p7si); \ } while (0)
Definition at line 30 of file ossl_pkcs7.c.
Referenced by ossl_pkcs7si_alloc(), and ossl_pkcs7si_new().
static PKCS7_RECIP_INFO* DupPKCS7RecipientPtr | ( | VALUE | obj | ) | [static] |
Definition at line 123 of file ossl_pkcs7.c.
References ePKCS7Error, NULL, ossl_raise(), PKCS7_RECIP_INFO_dup, and SafeGetPKCS7ri.
Referenced by ossl_pkcs7_add_recipient().
static PKCS7_SIGNER_INFO* DupPKCS7SignerPtr | ( | VALUE | obj | ) | [static] |
Definition at line 97 of file ossl_pkcs7.c.
References ePKCS7Error, NULL, ossl_raise(), PKCS7_SIGNER_INFO_dup, and SafeGetPKCS7si.
Referenced by ossl_pkcs7_add_signer().
void Init_ossl_pkcs7 | ( | void | ) |
Definition at line 976 of file ossl_pkcs7.c.
References BINARY, cPKCS7, cPKCS7Recipient, cPKCS7Signer, DefPKCS7Const, eOSSLError, ePKCS7Error, mOSSL, ossl_pkcs7_add_certificate(), ossl_pkcs7_add_crl(), ossl_pkcs7_add_data(), ossl_pkcs7_add_recipient(), ossl_pkcs7_add_signer(), ossl_pkcs7_alloc(), ossl_pkcs7_copy(), ossl_pkcs7_decrypt(), ossl_pkcs7_detached_p(), ossl_pkcs7_get_certificates(), ossl_pkcs7_get_crls(), ossl_pkcs7_get_detached(), ossl_pkcs7_get_recipient(), ossl_pkcs7_get_signer(), ossl_pkcs7_get_type(), ossl_pkcs7_initialize(), ossl_pkcs7_s_encrypt(), ossl_pkcs7_s_read_smime(), ossl_pkcs7_s_sign(), ossl_pkcs7_s_write_smime(), ossl_pkcs7_set_certificates(), ossl_pkcs7_set_cipher(), ossl_pkcs7_set_crls(), ossl_pkcs7_set_detached(), ossl_pkcs7_set_type(), ossl_pkcs7_to_der(), ossl_pkcs7_to_pem(), ossl_pkcs7_verify(), ossl_pkcs7ri_alloc(), ossl_pkcs7ri_get_enc_key(), ossl_pkcs7ri_get_issuer(), ossl_pkcs7ri_get_serial(), ossl_pkcs7ri_initialize(), ossl_pkcs7si_alloc(), ossl_pkcs7si_get_issuer(), ossl_pkcs7si_get_serial(), ossl_pkcs7si_get_signed_time(), ossl_pkcs7si_initialize(), Qfalse, rb_attr(), rb_cObject, rb_define_alias(), rb_define_alloc_func(), rb_define_class_under(), rb_define_const(), rb_define_copy_func, rb_define_method(), rb_define_singleton_method(), and rb_intern.
Referenced by Init_openssl().
Definition at line 561 of file ossl_pkcs7.c.
References ePKCS7Error, GetPKCS7, GetX509CertPtr(), NULL, and ossl_raise().
Referenced by Init_ossl_pkcs7(), and ossl_pkcs7_set_certs_i().
Definition at line 647 of file ossl_pkcs7.c.
References ePKCS7Error, GetPKCS7, GetX509CRLPtr(), NULL, and ossl_raise().
Referenced by Init_ossl_pkcs7(), and ossl_pkcs7_set_crls_i().
Definition at line 758 of file ossl_pkcs7.c.
References buf, ePKCS7Error, err, GetPKCS7, len, NULL, ossl_obj2bio(), ossl_pkcs7_set_data, ossl_raise(), and Qnil.
Referenced by Init_ossl_pkcs7().
Definition at line 517 of file ossl_pkcs7.c.
References DupPKCS7RecipientPtr(), ePKCS7Error, GetPKCS7, and ossl_raise().
Referenced by Init_ossl_pkcs7().
Definition at line 471 of file ossl_pkcs7.c.
References DupPKCS7SignerPtr(), ePKCS7Error, GetPKCS7, and ossl_raise().
Referenced by Init_ossl_pkcs7().
Definition at line 289 of file ossl_pkcs7.c.
References ePKCS7Error, NULL, ossl_raise(), and WrapPKCS7.
Referenced by Init_ossl_pkcs7().
Definition at line 335 of file ossl_pkcs7.c.
References DATA_PTR, ePKCS7Error, GetPKCS7, NULL, ossl_raise(), rb_check_frozen(), and SafeGetPKCS7.
Referenced by Init_ossl_pkcs7().
Definition at line 731 of file ossl_pkcs7.c.
References ePKCS7Error, GetPKCS7, GetPrivPKeyPtr(), GetX509CertPtr(), NIL_P, NULL, NUM2INT, ossl_membio2str(), ossl_raise(), and rb_scan_args().
Referenced by Init_ossl_pkcs7().
Definition at line 450 of file ossl_pkcs7.c.
References GetPKCS7, PKCS7_is_detached, and Qtrue.
Referenced by Init_ossl_pkcs7().
Definition at line 641 of file ossl_pkcs7.c.
References ossl_x509_sk2ary().
Referenced by Init_ossl_pkcs7().
Definition at line 681 of file ossl_pkcs7.c.
References ossl_x509crl_sk2ary().
Referenced by Init_ossl_pkcs7().
Definition at line 442 of file ossl_pkcs7.c.
References GetPKCS7, and Qtrue.
Referenced by Init_ossl_pkcs7().
Definition at line 533 of file ossl_pkcs7.c.
References ePKCS7Error, GetPKCS7, ossl_pkcs7ri_new(), ossl_raise(), rb_ary_new(), rb_ary_new2(), rb_ary_push(), and STACK_OF().
Referenced by Init_ossl_pkcs7().
Definition at line 491 of file ossl_pkcs7.c.
References ePKCS7Error, GetPKCS7, OSSL_Debug, ossl_pkcs7si_new(), ossl_raise(), rb_ary_new(), rb_ary_new2(), rb_ary_push(), and STACK_OF().
Referenced by Init_ossl_pkcs7().
Definition at line 409 of file ossl_pkcs7.c.
References GetPKCS7, ID2SYM, PKCS7_type_is_encrypted, and rb_intern.
Referenced by Init_ossl_pkcs7().
Definition at line 310 of file ossl_pkcs7.c.
References DATA_PTR, NULL, ossl_obj2bio(), ossl_pkcs7_set_data, ossl_pkcs7_set_err_string, ossl_to_der_if_possible(), Qnil, and rb_scan_args().
Referenced by Init_ossl_pkcs7().
Definition at line 242 of file ossl_pkcs7.c.
References cPKCS7, ePKCS7Error, GetCipherPtr(), NIL_P, NULL, NUM2INT, ossl_obj2bio(), ossl_pkcs7_set_data, ossl_raise(), rb_jump_tag(), rb_scan_args(), STACK_OF(), and WrapPKCS7.
Referenced by Init_ossl_pkcs7().
Definition at line 140 of file ossl_pkcs7.c.
References cPKCS7, ePKCS7Error, NULL, ossl_membio2str(), ossl_obj2bio(), ossl_pkcs7_set_data, ossl_pkcs7_set_err_string, ossl_raise(), Qnil, and WrapPKCS7.
Referenced by Init_ossl_pkcs7().
Definition at line 199 of file ossl_pkcs7.c.
References cPKCS7, ePKCS7Error, GetPrivPKeyPtr(), GetX509CertPtr(), NIL_P, NULL, NUM2INT, ossl_obj2bio(), ossl_pkcs7_set_data, ossl_pkcs7_set_err_string, ossl_raise(), Qnil, rb_jump_tag(), rb_scan_args(), STACK_OF(), and WrapPKCS7.
Referenced by Init_ossl_pkcs7().
Definition at line 164 of file ossl_pkcs7.c.
References ePKCS7Error, NIL_P, NULL, NUM2INT, ossl_membio2str(), ossl_obj2bio(), ossl_pkcs7_get_data, ossl_raise(), PKCS7_is_detached, rb_scan_args(), and SafeGetPKCS7.
Referenced by Init_ossl_pkcs7().
Definition at line 628 of file ossl_pkcs7.c.
References ossl_pkcs7_set_certs_i(), rb_block_call, rb_intern, and STACK_OF().
Referenced by Init_ossl_pkcs7().
Definition at line 622 of file ossl_pkcs7.c.
References ossl_pkcs7_add_certificate().
Referenced by ossl_pkcs7_set_certificates().
Definition at line 458 of file ossl_pkcs7.c.
References ePKCS7Error, GetCipherPtr(), GetPKCS7, NULL, and ossl_raise().
Referenced by Init_ossl_pkcs7().
Definition at line 668 of file ossl_pkcs7.c.
References ossl_pkcs7_set_crls_i(), rb_block_call, rb_intern, and STACK_OF().
Referenced by Init_ossl_pkcs7().
Definition at line 662 of file ossl_pkcs7.c.
References ossl_pkcs7_add_crl().
Referenced by ossl_pkcs7_set_crls().
Definition at line 428 of file ossl_pkcs7.c.
References ePKCS7Error, GetPKCS7, NULL, ossl_raise(), Qfalse, and Qtrue.
Referenced by Init_ossl_pkcs7().
Definition at line 393 of file ossl_pkcs7.c.
References ePKCS7Error, GetPKCS7, NULL, ossl_pkcs7_sym2typeid(), and ossl_raise().
Referenced by Init_ossl_pkcs7().
static int ossl_pkcs7_sym2typeid | ( | VALUE | sym | ) | [static] |
Definition at line 356 of file ossl_pkcs7.c.
References ePKCS7Error, name, NULL, numberof, ossl_raise(), rb_id2name(), StringValuePtr, SYM2ID, T_SYMBOL, and TYPE.
Referenced by ossl_pkcs7_set_type().
Definition at line 792 of file ossl_pkcs7.c.
References ePKCS7Error, GetPKCS7, len, NULL, ossl_raise(), ossl_str_adjust, rb_str_new(), and RSTRING_PTR.
Referenced by Init_ossl_pkcs7().
Definition at line 812 of file ossl_pkcs7.c.
References ePKCS7Error, GetPKCS7, NULL, ossl_membio2str(), and ossl_raise().
Referenced by Init_ossl_pkcs7().
Definition at line 687 of file ossl_pkcs7.c.
References ePKCS7Error, GetPKCS7, GetX509StorePtr(), msg, NIL_P, NULL, NUM2INT, ossl_membio2str(), ossl_obj2bio(), ossl_pkcs7_get_data, ossl_pkcs7_set_data, ossl_pkcs7_set_err_string, ossl_raise(), Qnil, Qtrue, rb_jump_tag(), rb_scan_args(), rb_str_new2(), and STACK_OF().
Referenced by Init_ossl_pkcs7().
Definition at line 914 of file ossl_pkcs7.c.
References ePKCS7Error, NULL, ossl_raise(), and WrapPKCS7ri.
Referenced by Init_ossl_pkcs7().
Definition at line 963 of file ossl_pkcs7.c.
References asn1str_to_str(), and GetPKCS7ri.
Referenced by Init_ossl_pkcs7().
Definition at line 943 of file ossl_pkcs7.c.
References GetPKCS7ri, and ossl_x509name_new().
Referenced by Init_ossl_pkcs7().
Definition at line 953 of file ossl_pkcs7.c.
References asn1integer_to_num(), and GetPKCS7ri.
Referenced by Init_ossl_pkcs7().
Definition at line 928 of file ossl_pkcs7.c.
References ePKCS7Error, GetPKCS7ri, GetX509CertPtr(), NULL, and ossl_raise().
Referenced by Init_ossl_pkcs7().
static VALUE ossl_pkcs7ri_new | ( | PKCS7_RECIP_INFO * | p7ri | ) | [static] |
Definition at line 110 of file ossl_pkcs7.c.
References cPKCS7Recipient, ePKCS7Error, NULL, ossl_raise(), PKCS7_RECIP_INFO_dup, and WrapPKCS7ri.
Referenced by ossl_pkcs7_get_recipient().
Definition at line 835 of file ossl_pkcs7.c.
References ePKCS7Error, NULL, ossl_raise(), and WrapPKCS7si.
Referenced by Init_ossl_pkcs7().
Definition at line 868 of file ossl_pkcs7.c.
References GetPKCS7si, and ossl_x509name_new().
Referenced by Init_ossl_pkcs7().
Definition at line 878 of file ossl_pkcs7.c.
References asn1integer_to_num(), and GetPKCS7si.
Referenced by Init_ossl_pkcs7().
Definition at line 888 of file ossl_pkcs7.c.
References asn1time_to_time(), ePKCS7Error, GetPKCS7si, NULL, and ossl_raise().
Referenced by Init_ossl_pkcs7().
Definition at line 849 of file ossl_pkcs7.c.
References ePKCS7Error, GetDigestPtr(), GetPKCS7si, GetPrivPKeyPtr(), GetX509CertPtr(), NULL, and ossl_raise().
Referenced by Init_ossl_pkcs7().
static VALUE ossl_pkcs7si_new | ( | PKCS7_SIGNER_INFO * | p7si | ) | [static] |
Definition at line 84 of file ossl_pkcs7.c.
References cPKCS7Signer, ePKCS7Error, NULL, ossl_raise(), PKCS7_SIGNER_INFO_dup, and WrapPKCS7si.
Referenced by ossl_pkcs7_get_signer().
static STACK_OF | ( | X509 | ) | [static] |
Definition at line 575 of file ossl_pkcs7.c.
References GetPKCS7, and STACK_OF().
static STACK_OF | ( | X509_CRL | ) | [static] |
Definition at line 598 of file ossl_pkcs7.c.
References GetPKCS7, and STACK_OF().
Definition at line 74 of file ossl_pkcs7.c.
Referenced by Init_ossl_pkcs7(), ossl_pkcs7_s_encrypt(), ossl_pkcs7_s_read_smime(), and ossl_pkcs7_s_sign().
Definition at line 76 of file ossl_pkcs7.c.
Referenced by Init_ossl_pkcs7(), and ossl_pkcs7ri_new().
Definition at line 75 of file ossl_pkcs7.c.
Referenced by Init_ossl_pkcs7(), and ossl_pkcs7si_new().
Definition at line 77 of file ossl_pkcs7.c.
Referenced by DupPKCS7RecipientPtr(), DupPKCS7SignerPtr(), Init_ossl_pkcs7(), ossl_pkcs7_add_certificate(), ossl_pkcs7_add_crl(), ossl_pkcs7_add_data(), ossl_pkcs7_add_recipient(), ossl_pkcs7_add_signer(), ossl_pkcs7_alloc(), ossl_pkcs7_copy(), ossl_pkcs7_decrypt(), ossl_pkcs7_get_recipient(), ossl_pkcs7_get_signer(), ossl_pkcs7_s_encrypt(), ossl_pkcs7_s_read_smime(), ossl_pkcs7_s_sign(), ossl_pkcs7_s_write_smime(), ossl_pkcs7_set_cipher(), ossl_pkcs7_set_detached(), ossl_pkcs7_set_type(), ossl_pkcs7_sym2typeid(), ossl_pkcs7_to_der(), ossl_pkcs7_to_pem(), ossl_pkcs7_verify(), ossl_pkcs7ri_alloc(), ossl_pkcs7ri_initialize(), ossl_pkcs7ri_new(), ossl_pkcs7si_alloc(), ossl_pkcs7si_get_signed_time(), ossl_pkcs7si_initialize(), and ossl_pkcs7si_new().