Module: OpenSSL
- Defined in:
- lib/openssl/bn.rb,
lib/openssl/ssl.rb,
lib/openssl/x509.rb,
lib/openssl/pkcs7.rb,
lib/openssl/cipher.rb,
lib/openssl/digest.rb,
ossl.c,
ossl_bn.c,
ossl_ssl.c,
ossl_asn1.c,
ossl_hmac.c,
ossl_pkey.c,
ossl_rand.c,
ossl_cipher.c,
ossl_digest.c,
ossl_pkey_dh.c,
ossl_pkey_ec.c,
ossl_pkey_dsa.c,
ossl_pkey_rsa.c,
ossl_ssl_session.c
Overview
Should we care what if somebody require this file directly? require ‘openssl’
Defined Under Namespace
Modules: ASN1, Netscape, OCSP, PKCS5, PKey, Random, SSL, X509 Classes: BN, BNError, Cipher, Config, ConfigError, Digest, Engine, HMAC, HMACError, OpenSSLError, PKCS12, PKCS7
Constant Summary collapse
- 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
- .debug ⇒ Object
-
.debug=(boolean) ⇒ Boolean
Turns on or off CRYPTO_MEM_CHECK.
-
.errors ⇒ Array
See any remaining errors held in queue.
Class Method Details
.debug ⇒ Object
360 361 362 363 364 |
# File 'ossl.c', line 360
static VALUE
ossl_debug_get(VALUE self)
{
return dOSSL;
}
|
.debug=(boolean) ⇒ Boolean
Turns on or off CRYPTO_MEM_CHECK. Also shows some debugging message on stderr.
373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 |
# File 'ossl.c', line 373
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");
} else if (old == Qtrue) {
CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_OFF);
fprintf(stderr, "OSSL_DEBUG: IS NOW OFF!\n");
}
}
return val;
}
|
.errors ⇒ Array
See any remaining errors held in queue.
Any errors you see here are probably due to a bug in ruby’s OpenSSL implementation.
321 322 323 324 325 326 327 328 329 330 331 332 333 |
# File 'ossl.c', line 321
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)));
}
return ary;
}
|