diff options
author | technorama <technorama@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-04-02 19:00:23 +0000 |
---|---|---|
committer | technorama <technorama@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-04-02 19:00:23 +0000 |
commit | 3930d3b36bfbe7b380595ed835dbd6b36847aab9 (patch) | |
tree | c43e95f78af3662db83b0641edb4e107bf607021 /ext/openssl/ossl.c | |
parent | 790999028d75caa265cb66a8e44d200b8356ed8e (diff) |
* ext/openssl/{ossl.[ch],ossl_pkey.c} Add documentation.
* ext/openssl/ossl_hmac.c Add reset method.
* ext/openssl/ossl_cipher.c (Cipher#update) Take additional buffer argument.
* ext/openssl/{ossl_bio.c,ossl_ssl.c,ruby_missing.h} compatibility with 1.8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl.c')
-rw-r--r-- | ext/openssl/ossl.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c index 16e93bc939..dda3832268 100644 --- a/ext/openssl/ossl.c +++ b/ext/openssl/ossl.c @@ -310,6 +310,14 @@ ossl_raise(VALUE exc, const char *fmt, ...) rb_exc_raise(rb_exc_new(exc, buf, len)); } +/* + * call-seq: + * OpenSSL.errors -> [String...] + * + * See any remaining errors held in queue. + * + * Any errors you see here are probably due to a bug in ruby's OpenSSL implementation. + */ VALUE ossl_get_errors() { @@ -345,12 +353,23 @@ ossl_debug(const char *fmt, ...) } #endif +/* + * call-seq: + * OpenSSL.debug -> true | false + */ static VALUE ossl_debug_get(VALUE self) { return dOSSL; } +/* + * call-seq: + * OpenSSL.debug = boolean -> boolean + * + * Turns on or off CRYPTO_MEM_CHECK. + * Also shows some debugging message on stderr. + */ static VALUE ossl_debug_set(VALUE self, VALUE val) { @@ -427,8 +446,8 @@ Init_openssl() /* * Verify callback Proc index for ext-data */ - ossl_verify_cb_idx = - X509_STORE_CTX_get_ex_new_index(0, "ossl_verify_cb_idx", 0, 0, 0); + if ((ossl_verify_cb_idx = X509_STORE_CTX_get_ex_new_index(0, "ossl_verify_cb_idx", 0, 0, 0)) < 0) + ossl_raise(eOSSLError, "X509_STORE_CTX_get_ex_new_index"); /* * Init debug core |