Ruby
2.0.0p247(2013-06-27revision41674)
|
#include "ossl.h"
Go to the source code of this file.
Macros | |
#define | WrapPKCS7(klass, obj, pkcs7) |
#define | GetPKCS7(obj, pkcs7) |
#define | SafeGetPKCS7(obj, pkcs7) |
#define | WrapPKCS7si(klass, obj, p7si) |
#define | GetPKCS7si(obj, p7si) |
#define | SafeGetPKCS7si(obj, p7si) |
#define | WrapPKCS7ri(klass, 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)) |
Variables | |
VALUE | cPKCS7 |
VALUE | cPKCS7Signer |
VALUE | cPKCS7Recipient |
VALUE | ePKCS7Error |
#define DefPKCS7Const | ( | x | ) | rb_define_const(cPKCS7, #x, INT2NUM(PKCS7_##x)) |
Referenced by Init_ossl_pkcs7().
#define GetPKCS7 | ( | obj, | |
pkcs7 | |||
) |
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 | |||
) |
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 | |||
) |
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().
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.
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().
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 | |||
) |
Definition at line 25 of file ossl_pkcs7.c.
Referenced by ossl_pkcs7_copy(), and ossl_pkcs7_s_write_smime().
#define SafeGetPKCS7ri | ( | obj, | |
p7ri | |||
) |
Definition at line 59 of file ossl_pkcs7.c.
Referenced by DupPKCS7RecipientPtr().
#define SafeGetPKCS7si | ( | obj, | |
p7si | |||
) |
Definition at line 42 of file ossl_pkcs7.c.
Referenced by DupPKCS7SignerPtr().
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().
Definition at line 47 of file ossl_pkcs7.c.
Referenced by ossl_pkcs7ri_alloc(), and ossl_pkcs7ri_new().
Definition at line 30 of file ossl_pkcs7.c.
Referenced by ossl_pkcs7si_alloc(), and ossl_pkcs7si_new().
|
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 |
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().
Definition at line 981 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 566 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 652 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 763 of file ossl_pkcs7.c.
References buf, data, ePKCS7Error, err, GetPKCS7, in, len, NULL, ossl_obj2bio(), ossl_pkcs7_set_data, ossl_raise(), out, and Qnil.
Referenced by Init_ossl_pkcs7().
Definition at line 522 of file ossl_pkcs7.c.
References DupPKCS7RecipientPtr(), ePKCS7Error, GetPKCS7, and ossl_raise().
Referenced by Init_ossl_pkcs7().
Definition at line 476 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, obj, ossl_raise(), and WrapPKCS7.
Referenced by Init_ossl_pkcs7().
Definition at line 340 of file ossl_pkcs7.c.
References a, b, DATA_PTR(), ePKCS7Error, GetPKCS7, NULL, ossl_raise(), rb_check_frozen, and SafeGetPKCS7.
Referenced by Init_ossl_pkcs7().
Definition at line 736 of file ossl_pkcs7.c.
References ePKCS7Error, flags, GetPKCS7, GetPrivPKeyPtr(), GetX509CertPtr(), key, NIL_P(), NULL, NUM2INT, ossl_membio2str(), ossl_raise(), out, rb_scan_args(), and str.
Referenced by Init_ossl_pkcs7().
Definition at line 455 of file ossl_pkcs7.c.
References GetPKCS7, PKCS7_is_detached, Qfalse, and Qtrue.
Referenced by Init_ossl_pkcs7().
Definition at line 646 of file ossl_pkcs7.c.
References ossl_x509_sk2ary().
Referenced by Init_ossl_pkcs7().
Definition at line 686 of file ossl_pkcs7.c.
References ossl_x509crl_sk2ary().
Referenced by Init_ossl_pkcs7().
Definition at line 447 of file ossl_pkcs7.c.
References GetPKCS7, Qfalse, and Qtrue.
Referenced by Init_ossl_pkcs7().
Definition at line 538 of file ossl_pkcs7.c.
References ary, ePKCS7Error, GetPKCS7, i, 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 496 of file ossl_pkcs7.c.
References ary, ePKCS7Error, GetPKCS7, i, 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 414 of file ossl_pkcs7.c.
References GetPKCS7, ID2SYM, PKCS7_type_is_encrypted, Qnil, and rb_intern.
Referenced by Init_ossl_pkcs7().
Definition at line 310 of file ossl_pkcs7.c.
References arg, DATA_PTR(), in, 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().
Definition at line 242 of file ossl_pkcs7.c.
References cPKCS7, data, ePKCS7Error, flags, GetCipherPtr(), in, NIL_P(), NULL, NUM2INT, ossl_obj2bio(), ossl_pkcs7_set_data, ossl_raise(), rb_jump_tag(), rb_scan_args(), ret, STACK_OF(), status, and WrapPKCS7.
Referenced by Init_ossl_pkcs7().
Definition at line 140 of file ossl_pkcs7.c.
References cPKCS7, data, ePKCS7Error, in, NULL, ossl_membio2str(), ossl_obj2bio(), ossl_pkcs7_set_data, ossl_pkcs7_set_err_string, ossl_raise(), out, Qnil, ret, and WrapPKCS7.
Referenced by Init_ossl_pkcs7().
Definition at line 199 of file ossl_pkcs7.c.
References cPKCS7, data, ePKCS7Error, flags, GetPrivPKeyPtr(), GetX509CertPtr(), in, key, NIL_P(), NULL, NUM2INT, ossl_obj2bio(), ossl_pkcs7_set_data, ossl_pkcs7_set_err_string, ossl_raise(), Qnil, rb_jump_tag(), rb_scan_args(), ret, STACK_OF(), status, and WrapPKCS7.
Referenced by Init_ossl_pkcs7().
Definition at line 164 of file ossl_pkcs7.c.
References data, ePKCS7Error, flags, in, NIL_P(), NULL, NUM2INT, ossl_membio2str(), ossl_obj2bio(), ossl_pkcs7_get_data, ossl_raise(), out, PKCS7_is_detached, rb_scan_args(), SafeGetPKCS7, and str.
Referenced by Init_ossl_pkcs7().
Definition at line 633 of file ossl_pkcs7.c.
References ary, ossl_pkcs7_set_certs_i(), rb_block_call(), rb_intern, and STACK_OF().
Referenced by Init_ossl_pkcs7().
Definition at line 627 of file ossl_pkcs7.c.
References ossl_pkcs7_add_certificate().
Referenced by ossl_pkcs7_set_certificates().
Definition at line 463 of file ossl_pkcs7.c.
References ePKCS7Error, GetCipherPtr(), GetPKCS7, NULL, and ossl_raise().
Referenced by Init_ossl_pkcs7().
Definition at line 673 of file ossl_pkcs7.c.
References ary, ossl_pkcs7_set_crls_i(), rb_block_call(), rb_intern, and STACK_OF().
Referenced by Init_ossl_pkcs7().
Definition at line 667 of file ossl_pkcs7.c.
References ossl_pkcs7_add_crl().
Referenced by ossl_pkcs7_set_crls().
Definition at line 433 of file ossl_pkcs7.c.
References ePKCS7Error, flag, GetPKCS7, NULL, ossl_raise(), Qfalse, and Qtrue.
Referenced by Init_ossl_pkcs7().
Definition at line 398 of file ossl_pkcs7.c.
References ePKCS7Error, GetPKCS7, NULL, ossl_pkcs7_sym2typeid(), ossl_raise(), and type.
Referenced by Init_ossl_pkcs7().
Definition at line 361 of file ossl_pkcs7.c.
References ePKCS7Error, i, name, NULL, numberof, ossl_raise(), Qnil, rb_id2name(), ret, s, StringValuePtr, SYM2ID, T_SYMBOL, and TYPE.
Referenced by ossl_pkcs7_set_type().
Definition at line 797 of file ossl_pkcs7.c.
References ePKCS7Error, GetPKCS7, len, NULL, ossl_raise(), ossl_str_adjust, p, rb_str_new(), RSTRING_PTR, and str.
Referenced by Init_ossl_pkcs7().
Definition at line 817 of file ossl_pkcs7.c.
References ePKCS7Error, GetPKCS7, NULL, ossl_membio2str(), ossl_raise(), out, and str.
Referenced by Init_ossl_pkcs7().
Definition at line 692 of file ossl_pkcs7.c.
References data, ePKCS7Error, flags, GetPKCS7, GetX509StorePtr(), in, msg, NIL_P(), NULL, NUM2INT, ossl_membio2str(), ossl_obj2bio(), ossl_pkcs7_get_data, ossl_pkcs7_set_data, ossl_pkcs7_set_err_string, ossl_raise(), out, Qfalse, Qnil, Qtrue, rb_jump_tag(), rb_scan_args(), rb_str_new2, STACK_OF(), and status.
Referenced by Init_ossl_pkcs7().
Definition at line 919 of file ossl_pkcs7.c.
References ePKCS7Error, NULL, obj, ossl_raise(), and WrapPKCS7ri.
Referenced by Init_ossl_pkcs7().
Definition at line 968 of file ossl_pkcs7.c.
References asn1str_to_str(), and GetPKCS7ri.
Referenced by Init_ossl_pkcs7().
Definition at line 948 of file ossl_pkcs7.c.
References GetPKCS7ri, and ossl_x509name_new().
Referenced by Init_ossl_pkcs7().
Definition at line 958 of file ossl_pkcs7.c.
References asn1integer_to_num(), and GetPKCS7ri.
Referenced by Init_ossl_pkcs7().
Definition at line 933 of file ossl_pkcs7.c.
References ePKCS7Error, GetPKCS7ri, GetX509CertPtr(), NULL, and ossl_raise().
Referenced by Init_ossl_pkcs7().
|
static |
Definition at line 110 of file ossl_pkcs7.c.
References cPKCS7Recipient, ePKCS7Error, NULL, obj, ossl_raise(), PKCS7_RECIP_INFO_dup, and WrapPKCS7ri.
Referenced by ossl_pkcs7_get_recipient().
Definition at line 840 of file ossl_pkcs7.c.
References ePKCS7Error, NULL, obj, ossl_raise(), and WrapPKCS7si.
Referenced by Init_ossl_pkcs7().
Definition at line 873 of file ossl_pkcs7.c.
References GetPKCS7si, and ossl_x509name_new().
Referenced by Init_ossl_pkcs7().
Definition at line 883 of file ossl_pkcs7.c.
References asn1integer_to_num(), and GetPKCS7si.
Referenced by Init_ossl_pkcs7().
Definition at line 893 of file ossl_pkcs7.c.
References asn1time_to_time(), ePKCS7Error, GetPKCS7si, NULL, ossl_raise(), and Qnil.
Referenced by Init_ossl_pkcs7().
Definition at line 854 of file ossl_pkcs7.c.
References ePKCS7Error, GetDigestPtr(), GetPKCS7si, GetPrivPKeyPtr(), GetX509CertPtr(), NULL, and ossl_raise().
Referenced by Init_ossl_pkcs7().
|
static |
Definition at line 84 of file ossl_pkcs7.c.
References cPKCS7Signer, ePKCS7Error, NULL, obj, ossl_raise(), PKCS7_SIGNER_INFO_dup, and WrapPKCS7si.
Referenced by ossl_pkcs7_get_signer().
|
static |
Definition at line 580 of file ossl_pkcs7.c.
References GetPKCS7, i, NULL, and STACK_OF().
|
static |
Definition at line 603 of file ossl_pkcs7.c.
References GetPKCS7, i, NULL, and STACK_OF().
VALUE cPKCS7 |
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().
VALUE cPKCS7Recipient |
Definition at line 76 of file ossl_pkcs7.c.
Referenced by Init_ossl_pkcs7(), and ossl_pkcs7ri_new().
VALUE cPKCS7Signer |
Definition at line 75 of file ossl_pkcs7.c.
Referenced by Init_ossl_pkcs7(), and ossl_pkcs7si_new().
VALUE ePKCS7Error |
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().