aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl.c
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-07-07 16:39:36 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-07-09 15:46:10 +0900
commit333899460950905622de50cd11593d6034211745 (patch)
treed061c4f8baaf4ce0e11025c8feeafee1a8079a4a /ext/openssl/ossl.c
parentf010efa753c7e892700926200713753db151b6c8 (diff)
downloadruby-openssl-333899460950905622de50cd11593d6034211745.tar.gz
Fix RDoc styletopic/rdoc-fixes
Diffstat (limited to 'ext/openssl/ossl.c')
-rw-r--r--ext/openssl/ossl.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c
index 83baa7b6..42587722 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)
@@ -1160,11 +1159,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);
/*