Skip to content

Commit d9e5cbf

Browse files
authored
Merge pull request #424 from Shopify/fix-openssl-engine-build
Fix OpenSSL::Engine build on Debian
2 parents 4f1f5bd + e4a622e commit d9e5cbf

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

ext/openssl/ossl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ ossl_crypto_fixed_length_secure_compare(VALUE dummy, VALUE str1, VALUE str2)
11291129
void
11301130
Init_openssl(void)
11311131
{
1132-
#if HAVE_RB_EXT_RACTOR_SAFE
1132+
#ifdef HAVE_RB_EXT_RACTOR_SAFE
11331133
rb_ext_ractor_safe(true);
11341134
#endif
11351135

ext/openssl/ossl_bn.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/* modified by Michal Rokos <m.rokos@sh.cvut.cz> */
1111
#include "ossl.h"
1212

13-
#if HAVE_RB_EXT_RACTOR_SAFE
13+
#ifdef HAVE_RB_EXT_RACTOR_SAFE
1414
#include <ruby/ractor.h>
1515
#endif
1616

@@ -155,7 +155,7 @@ ossl_bn_value_ptr(volatile VALUE *ptr)
155155
* Private
156156
*/
157157

158-
#if HAVE_RB_EXT_RACTOR_SAFE
158+
#ifdef HAVE_RB_EXT_RACTOR_SAFE
159159
void
160160
ossl_bn_ctx_free(void *ptr)
161161
{

ext/openssl/ossl_engine.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -101,48 +101,48 @@ ossl_engine_s_load(int argc, VALUE *argv, VALUE klass)
101101
return Qtrue;
102102
}
103103
StringValueCStr(name);
104-
#if HAVE_ENGINE_LOAD_DYNAMIC
104+
#ifdef HAVE_ENGINE_LOAD_DYNAMIC
105105
OSSL_ENGINE_LOAD_IF_MATCH(dynamic, DYNAMIC);
106106
#endif
107107
#ifndef OPENSSL_NO_STATIC_ENGINE
108-
#if HAVE_ENGINE_LOAD_4758CCA
108+
#ifdef HAVE_ENGINE_LOAD_4758CCA
109109
OSSL_ENGINE_LOAD_IF_MATCH(4758cca, 4758CCA);
110110
#endif
111-
#if HAVE_ENGINE_LOAD_AEP
111+
#ifdef HAVE_ENGINE_LOAD_AEP
112112
OSSL_ENGINE_LOAD_IF_MATCH(aep, AEP);
113113
#endif
114-
#if HAVE_ENGINE_LOAD_ATALLA
114+
#ifdef HAVE_ENGINE_LOAD_ATALLA
115115
OSSL_ENGINE_LOAD_IF_MATCH(atalla, ATALLA);
116116
#endif
117-
#if HAVE_ENGINE_LOAD_CHIL
117+
#ifdef HAVE_ENGINE_LOAD_CHIL
118118
OSSL_ENGINE_LOAD_IF_MATCH(chil, CHIL);
119119
#endif
120-
#if HAVE_ENGINE_LOAD_CSWIFT
120+
#ifdef HAVE_ENGINE_LOAD_CSWIFT
121121
OSSL_ENGINE_LOAD_IF_MATCH(cswift, CSWIFT);
122122
#endif
123-
#if HAVE_ENGINE_LOAD_NURON
123+
#ifdef HAVE_ENGINE_LOAD_NURON
124124
OSSL_ENGINE_LOAD_IF_MATCH(nuron, NURON);
125125
#endif
126-
#if HAVE_ENGINE_LOAD_SUREWARE
126+
#ifdef HAVE_ENGINE_LOAD_SUREWARE
127127
OSSL_ENGINE_LOAD_IF_MATCH(sureware, SUREWARE);
128128
#endif
129-
#if HAVE_ENGINE_LOAD_UBSEC
129+
#ifdef HAVE_ENGINE_LOAD_UBSEC
130130
OSSL_ENGINE_LOAD_IF_MATCH(ubsec, UBSEC);
131131
#endif
132-
#if HAVE_ENGINE_LOAD_PADLOCK
132+
#ifdef HAVE_ENGINE_LOAD_PADLOCK
133133
OSSL_ENGINE_LOAD_IF_MATCH(padlock, PADLOCK);
134134
#endif
135-
#if HAVE_ENGINE_LOAD_CAPI
135+
#ifdef HAVE_ENGINE_LOAD_CAPI
136136
OSSL_ENGINE_LOAD_IF_MATCH(capi, CAPI);
137137
#endif
138-
#if HAVE_ENGINE_LOAD_GMP
138+
#ifdef HAVE_ENGINE_LOAD_GMP
139139
OSSL_ENGINE_LOAD_IF_MATCH(gmp, GMP);
140140
#endif
141-
#if HAVE_ENGINE_LOAD_GOST
141+
#ifdef HAVE_ENGINE_LOAD_GOST
142142
OSSL_ENGINE_LOAD_IF_MATCH(gost, GOST);
143143
#endif
144144
#endif
145-
#if HAVE_ENGINE_LOAD_CRYPTODEV
145+
#ifdef HAVE_ENGINE_LOAD_CRYPTODEV
146146
OSSL_ENGINE_LOAD_IF_MATCH(cryptodev, CRYPTODEV);
147147
#endif
148148
OSSL_ENGINE_LOAD_IF_MATCH(openssl, OPENSSL);

0 commit comments

Comments
 (0)