mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
ossl.c: RTEST
* ext/openssl/ossl.c (ossl_fips_mode_set): do not assume RTEST() to be parenthesized always. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f1f05e75cd
commit
026518c8e5
1 changed files with 2 additions and 2 deletions
|
@ -442,7 +442,7 @@ ossl_fips_mode_set(VALUE self, VALUE enabled)
|
|||
{
|
||||
|
||||
#ifdef HAVE_OPENSSL_FIPS
|
||||
if RTEST(enabled) {
|
||||
if (RTEST(enabled)) {
|
||||
int mode = FIPS_mode();
|
||||
if(!mode && !FIPS_mode_set(1)) /* turning on twice leads to an error */
|
||||
ossl_raise(eOSSLError, "Turning on FIPS mode failed");
|
||||
|
@ -452,7 +452,7 @@ ossl_fips_mode_set(VALUE self, VALUE enabled)
|
|||
}
|
||||
return enabled;
|
||||
#else
|
||||
if RTEST(enabled)
|
||||
if (RTEST(enabled))
|
||||
ossl_raise(eOSSLError, "This version of OpenSSL does not support FIPS mode");
|
||||
return enabled;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue