Module: OpenSSL

Defined in:
ext/openssl/ossl.c,
ext/openssl/ossl_bn.c,
ext/openssl/ossl_ssl.c,
ext/openssl/ossl_pkey.c,
ext/openssl/ossl_hmac.c,
ext/openssl/ossl_rand.c,
ext/openssl/ossl_asn1.c,
ext/openssl/ossl_cipher.c,
ext/openssl/ossl_digest.c,
ext/openssl/ossl_pkey_ec.c,
ext/openssl/ossl_pkey_dh.c,
ext/openssl/ossl_pkey_rsa.c,
ext/openssl/ossl_pkey_dsa.c,
ext/openssl/ossl_ssl_session.c

Defined Under Namespace

Modules: ASN1, PKey, Random, SSL Classes: BN, BNError, Cipher, HMAC, HMACError, OpenSSLError

Constant Summary

VERSION =

Constants

rb_str_new2(OSSL_VERSION)
OPENSSL_VERSION =
rb_str_new2(OPENSSL_VERSION_TEXT)
OPENSSL_VERSION_NUMBER =
INT2NUM(OPENSSL_VERSION_NUMBER)

Class Method Summary (collapse)

Class Method Details

+ (Object) debug



# File 'ext/openssl/ossl.c'

static VALUE
ossl_debug_get(VALUE self)
{
    return dOSSL;
}

+ (Boolean) debug=(boolean)

Turns on or off CRYPTO_MEM_CHECK. Also shows some debugging message on stderr.

Returns:

  • (Boolean)


# File 'ext/openssl/ossl.c'

static VALUE
ossl_debug_set(VALUE self, VALUE val)
{
VALUE old = dOSSL;
dOSSL = val;

if (old != dOSSL) {
if (dOSSL == Qtrue) {
    CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
    fprintf(stderr, "OSSL_DEBUG: IS NOW ON!\n");
}

+ (Array) errors

See any remaining errors held in queue.

Any errors you see here are probably due to a bug in ruby's OpenSSL implementation.

Returns:



# File 'ext/openssl/ossl.c'

VALUE
ossl_get_errors()
{
VALUE ary;
long e;

ary = rb_ary_new();
while ((e = ERR_get_error()) != 0){
    rb_ary_push(ary, rb_str_new2(ERR_error_string(e, NULL)));
}