diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-07-09 16:18:56 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-07-09 16:18:56 +0900 |
commit | a0c5933c144b6fc2be2ab67ce56339d3389cd3f9 (patch) | |
tree | 853dd5f29cc5681a92e175878cf59ffbb52489d8 /ext/openssl/ossl.c | |
parent | 7605a7311392bed3f062bf4b8adfcf9e6834f2ba (diff) | |
parent | 333899460950905622de50cd11593d6034211745 (diff) | |
download | ruby-openssl-a0c5933c144b6fc2be2ab67ce56339d3389cd3f9.tar.gz |
Merge branch 'topic/rdoc-fixes'
* topic/rdoc-fixes:
Fix RDoc style
Update .gitignore
Add RDoc task to Rakefile
Diffstat (limited to 'ext/openssl/ossl.c')
-rw-r--r-- | ext/openssl/ossl.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c index 1af9b247..d39d7b30 100644 --- a/ext/openssl/ossl.c +++ b/ext/openssl/ossl.c @@ -483,9 +483,8 @@ ossl_debug_set(VALUE self, VALUE val) * so otherwise will result in an error. * * === Examples - * - * OpenSSL.fips_mode = true # turn FIPS mode on - * OpenSSL.fips_mode = false # and off again + * OpenSSL.fips_mode = true # turn FIPS mode on + * OpenSSL.fips_mode = false # and off again */ static VALUE ossl_fips_mode_set(VALUE self, VALUE enabled) @@ -910,7 +909,7 @@ static void Init_ossl_locks(void) * ca_key = OpenSSL::PKey::RSA.new 2048 * pass_phrase = 'my secure pass phrase goes here' * - * cipher = OpenSSL::Cipher::Cipher.new 'AES-128-CBC' + * cipher = OpenSSL::Cipher.new 'AES-128-CBC' * * open 'ca_key.pem', 'w', 0400 do |io| * io.write ca_key.export(cipher, pass_phrase) @@ -1166,11 +1165,14 @@ Init_openssl(void) /* * Boolean indicating whether OpenSSL is FIPS-enabled or not */ + rb_define_const(mOSSL, "OPENSSL_FIPS", #ifdef OPENSSL_FIPS - rb_define_const(mOSSL, "OPENSSL_FIPS", Qtrue); + Qtrue #else - rb_define_const(mOSSL, "OPENSSL_FIPS", Qfalse); + Qfalse #endif + ); + rb_define_module_function(mOSSL, "fips_mode=", ossl_fips_mode_set, 1); /* |