Data Structures | Defines | Functions | Variables

ext/openssl/ossl.h File Reference

#include <ruby.h>
#include <ruby/io.h>
#include <openssl/opensslv.h>
#include <errno.h>
#include <openssl/err.h>
#include <openssl/asn1_mac.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_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"
Include dependency graph for ossl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ossl_verify_cb_args

Defines

#define assert(condition)
#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_ErrMsg()   ERR_reason_error_string(ERR_get_error())
#define OSSL_Debug   ossl_debug
#define OSSL_Warning   rb_warning
#define OSSL_Warn   rb_warn

Functions

int string2hex (const unsigned char *, int, char **, int *)
 STACK_OF (X509)*ossl_x509_ary2sk0(VALUE)
int *VALUE ossl_x509_sk2ary (STACK_OF(X509)*certs)
VALUE ossl_x509crl_sk2ary (STACK_OF(X509_CRL)*crl)
VALUE ossl_buf2str (char *buf, int len)
int ossl_pem_passwd_cb (char *, int, int, void *)
 NORETURN (void ossl_raise(VALUE, const char *,...))
VALUE ossl_exc_new (VALUE, const char *,...)
VALUE ossl_call_verify_cb_proc (struct ossl_verify_cb_args *)
int ossl_verify_cb (int, X509_STORE_CTX *)
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
int ossl_verify_cb_idx
ID ossl_s_to_der
VALUE dOSSL

Define Documentation

#define assert (   condition  ) 
#define OSSL_Check_Instance (   obj,
  klass 
)
Value:
do {\
  if (!rb_obj_is_instance_of(obj, klass)) {\
    ossl_raise(rb_eTypeError, "wrong argument (%s)! (Expected instance of %s)",\
               rb_obj_classname(obj), rb_class2name(klass));\
  }\
} while (0)

Definition at line 96 of file ossl.h.

#define OSSL_Check_Kind (   obj,
  klass 
)
#define OSSL_Check_Same_Class (   obj1,
  obj2 
)
Value:
do {\
  if (!rb_obj_is_instance_of(obj1, rb_obj_class(obj2))) {\
    ossl_raise(rb_eTypeError, "wrong argument type");\
  }\
} while (0)

Definition at line 103 of file ossl.h.

#define OSSL_Debug   ossl_debug
#define OSSL_ErrMsg (  )     ERR_reason_error_string(ERR_get_error())

Definition at line 146 of file ossl.h.

Referenced by ossl_x509_check_private_key().

#define ossl_str_adjust (   str,
  p 
)
#define OSSL_Warn   rb_warn

Definition at line 198 of file ossl.h.

#define OSSL_Warning   rb_warning

Definition at line 197 of file ossl.h.

Referenced by ossl_x509_check_private_key().


Function Documentation

void Init_openssl ( void   ) 
NORETURN ( void   ossl_raiseVALUE, const char *,...  ) 
VALUE ossl_buf2str ( char *  buf,
int  len 
)
VALUE ossl_call_verify_cb_proc ( struct ossl_verify_cb_args  ) 
void ossl_debug ( const char *  ,
  ... 
)

Definition at line 360 of file ossl.c.

References Qtrue.

VALUE ossl_exc_new ( VALUE  ,
const char *  ,
  ... 
)

Definition at line 321 of file ossl.c.

References err, and ossl_make_error().

Referenced by read_would_block(), and write_would_block().

int ossl_pem_passwd_cb ( char *  ,
int  ,
int  ,
void *   
)
VALUE ossl_to_der ( VALUE   ) 

Definition at line 254 of file ossl.c.

References rb_funcall(), and StringValue.

Referenced by obj_to_asn1derstr(), and ossl_to_der_if_possible().

VALUE ossl_to_der_if_possible ( VALUE   ) 
int ossl_verify_cb ( int  ,
X509_STORE_CTX *   
)
int* VALUE ossl_x509_sk2ary ( STACK_OF(X509)*  certs  ) 
VALUE ossl_x509crl_sk2ary ( STACK_OF(X509_CRL)*  crl  ) 

Referenced by ossl_pkcs7_get_crls().

STACK_OF ( X509   ) 
int string2hex ( const unsigned char *  ,
int  ,
char **  ,
int *   
)

Definition at line 18 of file ossl.c.

References len.

Referenced by ossl_hmac_hexdigest(), and ossl_hmac_s_hexdigest().


Variable Documentation

Definition at line 356 of file ossl.c.

Referenced by ossl_make_error().

Definition at line 251 of file ossl.c.