10 #if !defined(_OSSL_H_)    13 #include RUBY_EXTCONF_H    20 #include <openssl/opensslv.h>    21 #include <openssl/err.h>    22 #include <openssl/asn1.h>    23 #include <openssl/x509v3.h>    24 #include <openssl/ssl.h>    25 #include <openssl/pkcs12.h>    26 #include <openssl/pkcs7.h>    27 #include <openssl/hmac.h>    28 #include <openssl/rand.h>    29 #include <openssl/conf.h>    30 #include <openssl/conf_api.h>    31 #include <openssl/crypto.h>    32 #if !defined(OPENSSL_NO_ENGINE)    33 #  include <openssl/engine.h>    35 #if !defined(OPENSSL_NO_OCSP)    36 #  include <openssl/ocsp.h>    52 #define OSSL_Check_Kind(obj, klass) do {\    53   if (!rb_obj_is_kind_of((obj), (klass))) {\    54     ossl_raise(rb_eTypeError, "wrong argument (%"PRIsVALUE")! (Expected kind of %"PRIsVALUE")",\    55                rb_obj_class(obj), (klass));\    62 #if !defined(NUM2UINT64T)     64 #    define NUM2UINT64T(x) ((uint64_t)NUM2ULONG(x))    65 #  elif defined(HAVE_LONG_LONG) && SIZEOF_LONG_LONG == 8    66 #    define NUM2UINT64T(x) ((uint64_t)NUM2ULL(x))    68 #    error "unknown platform; no 64-bit width integer"    82 #define ossl_str_adjust(str, p) \    84     long len = RSTRING_LEN(str);\    85     long newlen = (long)((p) - (unsigned char*)RSTRING_PTR(str));\    86     assert(newlen <= len);\    87     rb_str_set_len((str), newlen);\   110 #define OSSL_BIO_reset(bio) do { \   111     (void)BIO_reset((bio)); \   112     ossl_clear_error(); \   133 #if defined(HAVE_VA_ARGS_MACRO)   134 #define OSSL_Debug(...) do { \   135   if (dOSSL == Qtrue) { \   136     fprintf(stderr, "OSSL_DEBUG: "); \   137     fprintf(stderr, __VA_ARGS__); \   138     fprintf(stderr, " [%s:%d]\n", __FILE__, __LINE__); \   144 #define OSSL_Debug ossl_debug int *VALUE ossl_x509_sk2ary(const STACK_OF(X509) *certs)
 
VALUE ossl_x509name_sk2ary(const STACK_OF(X509_NAME) *names)
 
STACK_OF(X509) *ossl_x509_ary2sk(VALUE)
 
int ossl_pem_passwd_cb(char *, int, int, void *)
 
void ossl_debug(const char *,...)
 
VALUE ossl_x509crl_sk2ary(const STACK_OF(X509_CRL) *crl)
 
VALUE ossl_buf2str(char *buf, int len)
 
VALUE ossl_to_der_if_possible(VALUE)
 
unsigned char buf[MIME_BUF_SIZE]
 
register unsigned int len
 
void ossl_raise(VALUE exc, const char *fmt,...)
 
VALUE ossl_str_new(const char *, long, int *)
 
VALUE ossl_pem_passwd_value(VALUE)
 
NORETURN(void ossl_raise(VALUE, const char *,...))
 
void ossl_bin2hex(unsigned char *in, char *out, size_t len)
 
void ossl_clear_error(void)