Ruby
2.4.2p198(2017-09-14revision59899)
|
#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 | SafeGetPKCS7(obj, pkcs7) |
#define | NewPKCS7si(klass) TypedData_Wrap_Struct((klass), &ossl_pkcs7_signer_info_type, 0) |
#define | SetPKCS7si(obj, p7si) |
#define | GetPKCS7si(obj, p7si) |
#define | SafeGetPKCS7si(obj, p7si) |
#define | NewPKCS7ri(klass) TypedData_Wrap_Struct((klass), &ossl_pkcs7_recip_info_type, 0) |
#define | SetPKCS7ri(obj, p7ri) |
#define | GetPKCS7ri(obj, p7ri) |
#define | SafeGetPKCS7ri(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)) |
#define DefPKCS7Const | ( | x | ) | rb_define_const(cPKCS7, #x, INT2NUM(PKCS7_##x)) |
Referenced by Init_ossl_pkcs7().
#define GetPKCS7 | ( | obj, | |
pkcs7 | |||
) |
Definition at line 20 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 | |||
) |
Definition at line 58 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 | |||
) |
Definition at line 39 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 NewPKCS7 | ( | klass | ) | TypedData_Wrap_Struct((klass), &ossl_pkcs7_type, 0) |
Definition at line 12 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 NewPKCS7ri | ( | klass | ) | TypedData_Wrap_Struct((klass), &ossl_pkcs7_recip_info_type, 0) |
Definition at line 50 of file ossl_pkcs7.c.
Referenced by ossl_pkcs7ri_alloc(), and ossl_pkcs7ri_new().
#define NewPKCS7si | ( | klass | ) | TypedData_Wrap_Struct((klass), &ossl_pkcs7_signer_info_type, 0) |
Definition at line 31 of file ossl_pkcs7.c.
Referenced by ossl_pkcs7si_alloc(), and ossl_pkcs7si_new().
#define numberof | ( | ary | ) | (int)(sizeof(ary)/sizeof((ary)[0])) |
Definition at line 69 of file ossl_pkcs7.c.
Referenced by ossl_pkcs7_sym2typeid().
#define ossl_pkcs7_get_data | ( | o | ) | rb_iv_get((o), "@data") |
Definition at line 72 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 74 of file ossl_pkcs7.c.
#define ossl_pkcs7_set_data | ( | o, | |
v | |||
) | rb_iv_set((o), "@data", (v)) |
Definition at line 71 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 73 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 | |||
) |
Definition at line 26 of file ossl_pkcs7.c.
Referenced by ossl_pkcs7_copy(), and ossl_pkcs7_s_write_smime().
#define SafeGetPKCS7ri | ( | obj, | |
p7ri | |||
) |
Definition at line 64 of file ossl_pkcs7.c.
Referenced by DupPKCS7RecipientPtr().
#define SafeGetPKCS7si | ( | obj, | |
p7si | |||
) |
Definition at line 45 of file ossl_pkcs7.c.
Referenced by DupPKCS7SignerPtr().
#define SetPKCS7 | ( | obj, | |
pkcs7 | |||
) |
Definition at line 14 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 SetPKCS7ri | ( | obj, | |
p7ri | |||
) |
Definition at line 52 of file ossl_pkcs7.c.
Referenced by ossl_pkcs7ri_alloc(), and ossl_pkcs7ri_new().
#define SetPKCS7si | ( | obj, | |
p7si | |||
) |
Definition at line 33 of file ossl_pkcs7.c.
Referenced by ossl_pkcs7si_alloc(), and ossl_pkcs7si_new().
|
static |
Definition at line 188 of file ossl_pkcs7.c.
References ePKCS7Error, NULL, ossl_PKCS7_RECIP_INFO_dup(), ossl_raise(), and SafeGetPKCS7ri.
Referenced by ossl_pkcs7_add_recipient().
|
static |
Definition at line 161 of file ossl_pkcs7.c.
References ePKCS7Error, NULL, ossl_PKCS7_SIGNER_INFO_dup(), ossl_raise(), and SafeGetPKCS7si.
Referenced by ossl_pkcs7_add_signer().
void Init_ossl_pkcs7 | ( | void | ) |
Definition at line 1055 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_module(), rb_define_singleton_method(), rb_eStandardError, and rb_intern.
Referenced by Init_openssl().
Definition at line 638 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 724 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 835 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 594 of file ossl_pkcs7.c.
References DupPKCS7RecipientPtr(), ePKCS7Error, GetPKCS7, and ossl_raise().
Referenced by Init_ossl_pkcs7().
Definition at line 548 of file ossl_pkcs7.c.
References DupPKCS7SignerPtr(), ePKCS7Error, GetPKCS7, and ossl_raise().
Referenced by Init_ossl_pkcs7().
Definition at line 357 of file ossl_pkcs7.c.
References ePKCS7Error, NewPKCS7, NULL, ossl_raise(), and SetPKCS7.
Referenced by Init_ossl_pkcs7().
Definition at line 409 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 808 of file ossl_pkcs7.c.
References ePKCS7Error, GetPKCS7, GetPrivPKeyPtr(), GetX509CertPtr(), key, NIL_P, NULL, NUM2INT, ossl_membio2str(), ossl_raise(), and rb_scan_args().
Referenced by Init_ossl_pkcs7().
Definition at line 527 of file ossl_pkcs7.c.
References GetPKCS7, Qfalse, and Qtrue.
Referenced by Init_ossl_pkcs7().
|
static |
Definition at line 85 of file ossl_pkcs7.c.
Definition at line 718 of file ossl_pkcs7.c.
References ossl_x509_sk2ary().
Referenced by Init_ossl_pkcs7().
Definition at line 758 of file ossl_pkcs7.c.
References ossl_x509crl_sk2ary().
Referenced by Init_ossl_pkcs7().
Definition at line 519 of file ossl_pkcs7.c.
References GetPKCS7, Qfalse, and Qtrue.
Referenced by Init_ossl_pkcs7().
Definition at line 610 of file ossl_pkcs7.c.
References ePKCS7Error, GetPKCS7, NULL, 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 568 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 486 of file ossl_pkcs7.c.
References GetPKCS7, ID2SYM, Qnil, and rb_intern.
Referenced by Init_ossl_pkcs7().
Definition at line 379 of file ossl_pkcs7.c.
References DATA_PTR, NULL, OSSL_BIO_reset, ossl_obj2bio(), ossl_pkcs7_set_data, ossl_pkcs7_set_err_string, ossl_raise(), ossl_to_der_if_possible(), Qnil, rb_eArgError, and rb_scan_args().
Referenced by Init_ossl_pkcs7().
|
static |
Definition at line 139 of file ossl_pkcs7.c.
Referenced by DupPKCS7RecipientPtr(), and ossl_pkcs7ri_new().
|
static |
Definition at line 113 of file ossl_pkcs7.c.
Definition at line 309 of file ossl_pkcs7.c.
References cPKCS7, ePKCS7Error, GetCipherPtr(), NewPKCS7, NIL_P, NULL, NUM2INT, ossl_obj2bio(), ossl_pkcs7_set_data, ossl_raise(), rb_jump_tag(), rb_scan_args(), SetPKCS7, and STACK_OF().
Referenced by Init_ossl_pkcs7().
Definition at line 205 of file ossl_pkcs7.c.
References cPKCS7, ePKCS7Error, NewPKCS7, NULL, ossl_membio2str(), ossl_obj2bio(), ossl_pkcs7_set_data, ossl_pkcs7_set_err_string, ossl_raise(), Qnil, and SetPKCS7.
Referenced by Init_ossl_pkcs7().
Definition at line 265 of file ossl_pkcs7.c.
References cPKCS7, ePKCS7Error, GetPrivPKeyPtr(), GetX509CertPtr(), key, NewPKCS7, NIL_P, NULL, NUM2INT, ossl_obj2bio(), ossl_pkcs7_set_data, ossl_pkcs7_set_err_string, ossl_raise(), Qnil, rb_jump_tag(), rb_scan_args(), SetPKCS7, and STACK_OF().
Referenced by Init_ossl_pkcs7().
Definition at line 230 of file ossl_pkcs7.c.
References ePKCS7Error, NIL_P, NULL, NUM2INT, ossl_membio2str(), ossl_obj2bio(), ossl_pkcs7_get_data, ossl_raise(), rb_scan_args(), and SafeGetPKCS7.
Referenced by Init_ossl_pkcs7().
Definition at line 705 of file ossl_pkcs7.c.
References ossl_pkcs7_set_certs_i(), rb_block_call(), rb_intern, and STACK_OF().
Referenced by Init_ossl_pkcs7().
|
static |
Definition at line 699 of file ossl_pkcs7.c.
References ossl_pkcs7_add_certificate().
Referenced by ossl_pkcs7_set_certificates().
Definition at line 535 of file ossl_pkcs7.c.
References ePKCS7Error, GetCipherPtr(), GetPKCS7, NULL, and ossl_raise().
Referenced by Init_ossl_pkcs7().
Definition at line 745 of file ossl_pkcs7.c.
References ossl_pkcs7_set_crls_i(), rb_block_call(), rb_intern, and STACK_OF().
Referenced by Init_ossl_pkcs7().
|
static |
Definition at line 739 of file ossl_pkcs7.c.
References ossl_pkcs7_add_crl().
Referenced by ossl_pkcs7_set_crls().
Definition at line 505 of file ossl_pkcs7.c.
References ePKCS7Error, GetPKCS7, NULL, ossl_raise(), Qfalse, and Qtrue.
Referenced by Init_ossl_pkcs7().
Definition at line 470 of file ossl_pkcs7.c.
References ePKCS7Error, GetPKCS7, NULL, ossl_pkcs7_sym2typeid(), and ossl_raise().
Referenced by Init_ossl_pkcs7().
|
static |
Definition at line 131 of file ossl_pkcs7.c.
Referenced by DupPKCS7SignerPtr(), and ossl_pkcs7si_new().
|
static |
Definition at line 99 of file ossl_pkcs7.c.
|
static |
Definition at line 430 of file ossl_pkcs7.c.
References ePKCS7Error, name, nid, numberof, ossl_raise(), PRIsVALUE, Qnil, rb_sym2str, RSTRING_GETMEM, StringValue, strlen(), and SYMBOL_P.
Referenced by ossl_pkcs7_set_type().
Definition at line 869 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 889 of file ossl_pkcs7.c.
References ePKCS7Error, GetPKCS7, NULL, ossl_membio2str(), and ossl_raise().
Referenced by Init_ossl_pkcs7().
Definition at line 764 of file ossl_pkcs7.c.
References ePKCS7Error, GetPKCS7, GetX509StorePtr(), msg, NIL_P, NULL, NUM2INT, ossl_clear_error(), ossl_membio2str(), ossl_obj2bio(), ossl_pkcs7_get_data, ossl_pkcs7_set_data, ossl_pkcs7_set_err_string, ossl_raise(), Qfalse, Qnil, Qtrue, rb_jump_tag(), rb_scan_args(), rb_str_new2, and STACK_OF().
Referenced by Init_ossl_pkcs7().
Definition at line 992 of file ossl_pkcs7.c.
References ePKCS7Error, NewPKCS7ri, NULL, ossl_raise(), and SetPKCS7ri.
Referenced by Init_ossl_pkcs7().
Definition at line 1042 of file ossl_pkcs7.c.
References asn1str_to_str(), and GetPKCS7ri.
Referenced by Init_ossl_pkcs7().
Definition at line 1022 of file ossl_pkcs7.c.
References GetPKCS7ri, and ossl_x509name_new().
Referenced by Init_ossl_pkcs7().
Definition at line 1032 of file ossl_pkcs7.c.
References asn1integer_to_num(), and GetPKCS7ri.
Referenced by Init_ossl_pkcs7().
Definition at line 1007 of file ossl_pkcs7.c.
References ePKCS7Error, GetPKCS7ri, GetX509CertPtr(), NULL, and ossl_raise().
Referenced by Init_ossl_pkcs7().
|
static |
Definition at line 174 of file ossl_pkcs7.c.
References cPKCS7Recipient, ePKCS7Error, NewPKCS7ri, NULL, ossl_PKCS7_RECIP_INFO_dup(), ossl_raise(), and SetPKCS7ri.
Referenced by ossl_pkcs7_get_recipient().
Definition at line 912 of file ossl_pkcs7.c.
References ePKCS7Error, NewPKCS7si, NULL, ossl_raise(), and SetPKCS7si.
Referenced by Init_ossl_pkcs7().
Definition at line 946 of file ossl_pkcs7.c.
References GetPKCS7si, and ossl_x509name_new().
Referenced by Init_ossl_pkcs7().
Definition at line 956 of file ossl_pkcs7.c.
References asn1integer_to_num(), and GetPKCS7si.
Referenced by Init_ossl_pkcs7().
Definition at line 966 of file ossl_pkcs7.c.
References asn1time_to_time(), ePKCS7Error, GetPKCS7si, NULL, ossl_raise(), and Qnil.
Referenced by Init_ossl_pkcs7().
Definition at line 927 of file ossl_pkcs7.c.
References ePKCS7Error, GetDigestPtr(), GetPKCS7si, GetPrivPKeyPtr(), GetX509CertPtr(), NULL, and ossl_raise().
Referenced by Init_ossl_pkcs7().
|
static |
Definition at line 147 of file ossl_pkcs7.c.
References cPKCS7Signer, ePKCS7Error, NewPKCS7si, NULL, ossl_PKCS7_SIGNER_INFO_dup(), ossl_raise(), and SetPKCS7si.
Referenced by ossl_pkcs7_get_signer().
|
static |
Definition at line 652 of file ossl_pkcs7.c.
References GetPKCS7, and NULL.
Referenced by ossl_pkcs7_get_recipient(), ossl_pkcs7_get_signer(), ossl_pkcs7_s_encrypt(), ossl_pkcs7_s_sign(), ossl_pkcs7_set_certificates(), ossl_pkcs7_set_crls(), ossl_pkcs7_verify(), and STACK_OF().
|
static |
Definition at line 675 of file ossl_pkcs7.c.
References GetPKCS7, NULL, and STACK_OF().
VALUE cPKCS7 |
Definition at line 79 of file ossl_pkcs7.c.
Referenced by Init_ossl_pkcs7(), ossl_pkcs7_s_encrypt(), ossl_pkcs7_s_read_smime(), and ossl_pkcs7_s_sign().
VALUE cPKCS7Recipient |
Definition at line 81 of file ossl_pkcs7.c.
Referenced by Init_ossl_pkcs7(), and ossl_pkcs7ri_new().
VALUE cPKCS7Signer |
Definition at line 80 of file ossl_pkcs7.c.
Referenced by Init_ossl_pkcs7(), and ossl_pkcs7si_new().
VALUE ePKCS7Error |
Definition at line 82 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().
|
static |
Definition at line 118 of file ossl_pkcs7.c.
|
static |
Definition at line 104 of file ossl_pkcs7.c.
|
static |
Definition at line 90 of file ossl_pkcs7.c.