Ruby
2.4.2p198(2017-09-14revision59899)
|
#include <assert.h>
#include <errno.h>
#include <ruby.h>
#include <ruby/io.h>
#include <ruby/thread.h>
#include <openssl/opensslv.h>
#include <openssl/err.h>
#include <openssl/asn1.h>
#include <openssl/x509v3.h>
#include <openssl/ssl.h>
#include <openssl/pkcs12.h>
#include <openssl/pkcs7.h>
#include <openssl/hmac.h>
#include <openssl/rand.h>
#include <openssl/conf.h>
#include <openssl/conf_api.h>
#include <openssl/crypto.h>
#include <openssl/engine.h>
#include <openssl/ocsp.h>
#include "openssl_missing.h"
#include "ruby_missing.h"
#include "ossl_asn1.h"
#include "ossl_bio.h"
#include "ossl_bn.h"
#include "ossl_cipher.h"
#include "ossl_config.h"
#include "ossl_digest.h"
#include "ossl_hmac.h"
#include "ossl_ns_spki.h"
#include "ossl_ocsp.h"
#include "ossl_pkcs12.h"
#include "ossl_pkcs7.h"
#include "ossl_pkcs5.h"
#include "ossl_pkey.h"
#include "ossl_rand.h"
#include "ossl_ssl.h"
#include "ossl_version.h"
#include "ossl_x509.h"
#include "ossl_engine.h"
Go to the source code of this file.
Macros | |
#define | OSSL_Check_Kind(obj, klass) |
#define | OSSL_Check_Instance(obj, klass) |
#define | OSSL_Check_Same_Class(obj1, obj2) |
#define | ossl_str_adjust(str, p) |
#define | OSSL_BIO_reset(bio) |
#define | OSSL_ErrMsg() ERR_reason_error_string(ERR_get_error()) |
#define | OSSL_Debug ossl_debug |
#define | OSSL_Warning rb_warning |
#define | OSSL_Warn rb_warn |
Functions | |
STACK_OF (X509) *ossl_x509_ary2sk0(VALUE) | |
int *VALUE | ossl_x509_sk2ary (const STACK_OF(X509) *certs) |
VALUE | ossl_x509crl_sk2ary (const STACK_OF(X509_CRL) *crl) |
VALUE | ossl_x509name_sk2ary (const STACK_OF(X509_NAME) *names) |
VALUE | ossl_buf2str (char *buf, int len) |
void | ossl_bin2hex (unsigned char *in, char *out, size_t len) |
VALUE | ossl_pem_passwd_value (VALUE) |
int | ossl_pem_passwd_cb (char *, int, int, void *) |
NORETURN (void ossl_raise(VALUE, const char *,...)) | |
void | ossl_clear_error (void) |
VALUE | ossl_to_der (VALUE) |
VALUE | ossl_to_der_if_possible (VALUE) |
void | ossl_debug (const char *,...) |
void | Init_openssl (void) |
Variables | |
VALUE | mOSSL |
VALUE | eOSSLError |
ID | ossl_s_to_der |
VALUE | dOSSL |
#define OSSL_BIO_reset | ( | bio | ) |
Definition at line 110 of file ossl.h.
Referenced by ossl_dh_initialize(), ossl_dsa_initialize(), ossl_pkcs7_initialize(), ossl_pkey_new_from_data(), ossl_rsa_initialize(), ossl_ssl_session_initialize(), ossl_x509_initialize(), ossl_x509crl_initialize(), and ossl_x509req_initialize().
#define OSSL_Check_Instance | ( | obj, | |
klass | |||
) |
#define OSSL_Check_Kind | ( | obj, | |
klass | |||
) |
Definition at line 52 of file ossl.h.
Referenced by DupConfigPtr(), ossl_ocspbres_add_status(), ossl_x509_set_extensions(), ossl_x509attr_set_value(), ossl_x509crl_set_extensions(), ossl_x509crl_set_revoked(), ossl_x509req_set_attributes(), and ossl_x509revoked_set_extensions().
#define OSSL_Check_Same_Class | ( | obj1, | |
obj2 | |||
) |
#define OSSL_Debug ossl_debug |
Definition at line 155 of file ossl.h.
Referenced by ossl_pem_passwd_cb(), ossl_pkcs7_get_signer(), ossl_spki_get_challenge(), ossl_sslctx_session_get_cb(), ossl_sslctx_session_new_cb(), ossl_sslctx_session_remove_cb(), ossl_sslctx_setup(), ossl_x509crl_get_extensions(), ossl_x509crl_get_revoked(), ossl_x509name_to_a(), ossl_x509req_get_attributes(), ossl_x509revoked_get_extensions(), and ossl_x509stctx_get_chain().
#define OSSL_ErrMsg | ( | ) | ERR_reason_error_string(ERR_get_error()) |
#define ossl_str_adjust | ( | str, | |
p | |||
) |
Definition at line 82 of file ossl.h.
Referenced by ossl_asn1cons_to_der(), ossl_asn1data_to_der(), ossl_dh_to_der(), ossl_dsa_to_der(), ossl_ocspbres_to_der(), ossl_ocspcid_to_der(), ossl_ocspreq_to_der(), ossl_ocspres_to_der(), ossl_ocspsres_to_der(), ossl_pkcs12_to_der(), ossl_pkcs7_to_der(), ossl_rsa_to_der(), ossl_spki_to_der(), ossl_ssl_session_to_der(), ossl_x509_to_der(), ossl_x509attr_get_value(), ossl_x509attr_to_der(), ossl_x509ext_to_der(), ossl_x509name_to_der(), and ossl_x509req_to_der().
#define OSSL_Warning rb_warning |
void Init_openssl | ( | void | ) |
Definition at line 999 of file ossl.c.
References argc, argv, Init_ossl_asn1(), Init_ossl_bn(), Init_ossl_cipher(), Init_ossl_config(), Init_ossl_digest(), Init_ossl_engine(), Init_ossl_hmac(), Init_ossl_locks(), Init_ossl_ns_spki(), Init_ossl_ocsp(), Init_ossl_pkcs12(), Init_ossl_pkcs5(), Init_ossl_pkcs7(), Init_ossl_pkey(), Init_ossl_rand(), Init_ossl_ssl(), Init_ossl_x509(), INT2NUM, main(), ossl_debug_get(), ossl_debug_set(), ossl_fips_mode_set(), ossl_get_errors(), OSSL_VERSION, Qfalse, Qtrue, rb_define_class_under(), rb_define_const(), rb_define_module(), rb_define_module_function(), rb_eStandardError, rb_global_variable(), rb_intern, and rb_str_new2.
NORETURN | ( | void | ossl_raiseVALUE, const char *,... | ) |
void ossl_bin2hex | ( | unsigned char * | in, |
char * | out, | ||
size_t | len | ||
) |
Definition at line 115 of file ossl.c.
References assert, and LONG_MAX.
Referenced by ossl_hmac_hexdigest(), ossl_hmac_s_hexdigest(), ossl_ocspcid_get_issuer_key_hash(), and ossl_ocspcid_get_issuer_name_hash().
VALUE ossl_buf2str | ( | char * | buf, |
int | len | ||
) |
Definition at line 101 of file ossl.c.
References memcpy, NIL_P, ossl_str_new(), rb_jump_tag(), rb_protect(), and RSTRING_PTR.
Referenced by ossl_asn1prim_to_der(), ossl_bn_to_s(), and ossl_spki_to_pem().
void ossl_clear_error | ( | void | ) |
Definition at line 289 of file ossl.c.
References dOSSL, NULL, Qtrue, and rb_warn().
Referenced by dh_generate(), dsa_generate(), ossl_dsa_initialize(), ossl_engine_s_by_id(), ossl_make_error(), ossl_ocspbres_verify(), ossl_ocspreq_verify(), ossl_ocspsres_check_validity(), ossl_pkcs7_verify(), ossl_pkey_verify(), ossl_spki_initialize(), ossl_ssl_stop(), ossl_start_ssl(), ossl_x509_check_private_key(), ossl_x509_verify(), ossl_x509crl_verify(), ossl_x509req_verify(), ossl_x509stctx_verify(), ossl_x509store_add_file(), and rsa_generate().
int ossl_pem_passwd_cb | ( | char * | , |
int | , | ||
int | , | ||
void * | |||
) |
Definition at line 159 of file ossl.c.
References len, memcpy, NIL_P, NULL, OSSL_Debug, ossl_pem_passwd_cb0(), Qfalse, Qnil, Qtrue, rb_block_given_p(), rb_protect(), rb_set_errinfo(), RB_TYPE_P, rb_warning(), RSTRING_LEN, RSTRING_PTR, RTEST, and T_STRING.
Referenced by ossl_dsa_export(), ossl_dsa_initialize(), ossl_engine_s_by_id(), ossl_pkey_new_from_data(), ossl_rsa_export(), and ossl_rsa_initialize().
Definition at line 133 of file ossl.c.
References eOSSLError, NIL_P, ossl_raise(), Qnil, RSTRING_LEN, and StringValue.
Referenced by ossl_dsa_export(), ossl_dsa_initialize(), ossl_pkey_new_from_data(), ossl_rsa_export(), and ossl_rsa_initialize().
Definition at line 226 of file ossl.c.
References rb_funcall(), and StringValue.
Referenced by obj_to_asn1derstr(), and ossl_to_der_if_possible().
Definition at line 237 of file ossl.c.
References ossl_to_der(), and rb_respond_to().
Referenced by join_der_i(), ossl_asn1_decode(), ossl_asn1_decode_all(), ossl_asn1_traverse(), ossl_dh_initialize(), ossl_dsa_initialize(), ossl_ocspbres_initialize(), ossl_ocspcid_initialize(), ossl_ocspreq_initialize(), ossl_ocspres_initialize(), ossl_ocspsres_initialize(), ossl_pkcs7_initialize(), ossl_rsa_initialize(), ossl_x509_initialize(), ossl_x509attr_initialize(), ossl_x509crl_initialize(), ossl_x509ext_initialize(), ossl_x509ext_set_value(), ossl_x509name_initialize(), and ossl_x509req_initialize().
Referenced by ossl_pkcs12_initialize(), and ossl_pkcs7_get_certificates().
Referenced by ossl_pkcs7_get_crls().
Referenced by ossl_ssl_get_client_ca_list().
STACK_OF | ( | X509 | ) |
Referenced by ossl_ocspbres_sign(), ossl_ocspbres_verify(), ossl_ocspreq_sign(), ossl_ocspreq_verify(), ossl_pkcs12_initialize(), ossl_pkcs12_s_create(), ossl_ssl_get_client_ca_list(), ossl_ssl_get_peer_cert_chain(), ossl_sslctx_get_ciphers(), ossl_x509attr_get_value(), ossl_x509crl_set_revoked(), ossl_x509stctx_get_chain(), and ossl_x509stctx_initialize().
VALUE dOSSL |
Definition at line 341 of file ossl.c.
Referenced by ossl_clear_error(), ossl_debug_get(), and ossl_make_error().
VALUE eOSSLError |
Definition at line 218 of file ossl.c.
Referenced by asn1integer_to_num(), Init_ossl_asn1(), Init_ossl_bn(), Init_ossl_cipher(), Init_ossl_config(), Init_ossl_dh(), Init_ossl_digest(), Init_ossl_dsa(), Init_ossl_engine(), Init_ossl_hmac(), Init_ossl_ns_spki(), Init_ossl_ocsp(), Init_ossl_pkcs12(), Init_ossl_pkcs5(), Init_ossl_pkcs7(), Init_ossl_pkey(), Init_ossl_rand(), Init_ossl_rsa(), Init_ossl_ssl(), Init_ossl_ssl_session(), Init_ossl_x509attr(), Init_ossl_x509cert(), Init_ossl_x509crl(), Init_ossl_x509ext(), Init_ossl_x509name(), Init_ossl_x509req(), Init_ossl_x509revoked(), Init_ossl_x509store(), num_to_asn1integer(), ossl_obj2bio(), and ossl_pem_passwd_value().
VALUE mOSSL |
Definition at line 213 of file ossl.c.
Referenced by Init_ossl_asn1(), Init_ossl_bn(), Init_ossl_cipher(), Init_ossl_config(), Init_ossl_dh(), Init_ossl_digest(), Init_ossl_dsa(), Init_ossl_engine(), Init_ossl_hmac(), Init_ossl_ns_spki(), Init_ossl_ocsp(), Init_ossl_pkcs12(), Init_ossl_pkcs5(), Init_ossl_pkcs7(), Init_ossl_pkey(), Init_ossl_rand(), Init_ossl_rsa(), Init_ossl_ssl(), Init_ossl_ssl_session(), Init_ossl_x509(), Init_ossl_x509attr(), Init_ossl_x509cert(), Init_ossl_x509crl(), Init_ossl_x509ext(), Init_ossl_x509name(), Init_ossl_x509req(), Init_ossl_x509revoked(), and Init_ossl_x509store().