Compile against OpenSSL 3.X

283 views
Skip to first unread message

James T.

unread,
Jun 14, 2022, 3:03:35 PM6/14/22
to help-cfengine
For a variety of reasons, we prefer to compile our own CFEngine (Community Edition) packages. It does not seem to compile cleanly against the OpenSSL version found in CentOS 9, RHEL 9, and Ubuntu 22.04.

Is there a workaround or do I need to start building (and bundling) a specific version of OpenSSL along with the agent binaries?

[user@test-cent9 cfengine-3.18.1]$ openssl version
OpenSSL 3.0.1 14 Dec 2021 (Library: OpenSSL 3.0.1 14 Dec 2021)



Compile errors:

In file included from hash.c:33:
./hash.h:64:28: error: unknown type name ‘RSA’
   64 | Hash *HashNewFromKey(const RSA *rsa, HashMethod method);
      |                            ^~~
./hash.h:163:23: error: unknown type name ‘RSA’
  163 | void HashPubKey(const RSA *key, unsigned char digest[EVP_MAX_MD_SIZE + 1], HashMethod type);
      |                       ^~~
hash.c:214:28: error: unknown type name ‘RSA’
  214 | Hash *HashNewFromKey(const RSA *rsa, HashMethod method)
      |                            ^~~
hash.c: In function ‘HashNewFromKey’:
hash.c:226:5: error: implicit declaration of function ‘RSA_get0_key’ [-Werror=implicit-function-declaration]
  226 |     RSA_get0_key(rsa, &n, &e, NULL);
      |     ^~~~~~~~~~~~
hash.c: At top level:
hash.c:531:11: error: unknown type name ‘RSA’
  531 |     const RSA *const key,
      |           ^~~
cc1: some warnings being treated as errors
make[4]: *** [Makefile:618: hash.lo] Error 1
make[3]: *** [Makefile:624: all-recursive] Error 1
make[2]: *** [Makefile:531: all] Error 2
make[1]: *** [Makefile:711: all-recursive] Error 1
make: *** [Makefile:600: all] Error 2

James T.

unread,
Jun 14, 2022, 3:06:21 PM6/14/22
to help-cfengine
I should mention that I am trying to compile CFEngine version 3.18.1

Vratislav Podzimek

unread,
Jun 15, 2022, 10:27:11 AM6/15/22
to help-c...@googlegroups.com
Hello James,
we merged fixes for this 19 days ago:
https://github.com/cfengine/core/pull/4958
https://github.com/cfengine/libntech/pull/160

If you want to build 3.18.1, you will have to backport these changes to a new branch created from
the 3.18.1 tag. Or you can use the 3.18.x branch to get a build of the current status of that LTS
branch.

--
Vratislav
> --
> You received this message because you are subscribed to the Google Groups "help-cfengine" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> help-cfengin...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/help-cfengine/4d024822-2a8e-4184-9cd1-8150f9b6eec9n%40googlegroups.com
> .

signature.asc
Reply all
Reply to author
Forward
0 new messages