Skip to content

Commit 1c49e30

Browse files
committed
do not include CMS code with LIBRESSL, as it has no CMS code
1 parent b7f68eb commit 1c49e30

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

ext/openssl/extconf.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ def find_openssl_library
165165
have_func("X509_get0_notBefore")
166166
have_func("SSL_SESSION_get_protocol_version")
167167
have_func("EVP_PBE_scrypt")
168+
have_func("CMS_sign")
168169

169170
Logging::message "=== Checking done. ===\n"
170171

ext/openssl/ossl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,9 @@ Init_openssl(void)
12021202
Init_ossl_ns_spki();
12031203
Init_ossl_pkcs12();
12041204
Init_ossl_pkcs7();
1205+
#if defined(HAVE_CMS_SIGN)
12051206
Init_ossl_cms();
1207+
#endif
12061208
Init_ossl_pkey();
12071209
Init_ossl_rand();
12081210
Init_ossl_ssl();

ext/openssl/ossl_cms.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212
#include "ossl.h"
1313

14+
#if defined(HAVE_CMS_SIGN)
1415
/*
1516
* The CMS_ContentInfo is the primary data structure which this module creates and maintains
1617
* Is is called OpenSSL::CMS::ContentInfo in ruby.
@@ -496,3 +497,5 @@ Init_ossl_cms(void)
496497
DefCMSConst(STREAM);
497498
DefCMSConst(PARTIAL);
498499
}
500+
501+
#endif /* HAVE_CMS_SIGN */

0 commit comments

Comments
 (0)