Re: Custom OpenSSL
Tomasz Kurzawa <[email protected]> Tue, 6 Aug 2024 13:55:07 -0400
| Newsgroups | dev.linux.lists.cryptsetup |
|---|---|
| Message-ID | <CABYE94EyAoO3XvSvQtPoQna_5ZbHLtQb=WD9wEsG_vxkJKGG4w@mail.gmail.com> |
So, just to clarify, there’s no straightforward method to specify the OpenSSL version for cryptsetup using an environment variable or configuration file? I’m trying to use a particular OpenSSL version exclusively for cryptsetup without altering anything in pkgconfig. On Tue, Aug 6, 2024 at 7:30 AM Milan Broz <[email protected]> wrote: > > On 8/6/24 7:02 PM, Tomasz Kurzawa wrote: > > Hi All, > > > > I am currently working on building Cryptsetup with the --enable-fips > > option and integrating it with my custom OpenSSL build, rather than > > the default OpenSSL provided by the operating system. Despite my > > efforts, the debug messages indicate that the system’s OpenSSL version > > is still being used. > > Cryptsetup does not do any magic here, it just use what it detects. > > So, for compilation, change your pkgconfig to point to your devel version > (usually links in libcrypto.pc, not in openssl.pc that references it!). > > After installation, is is only about your ldconfig path. > > It is not so easy as link to one library, OpenSSL3 uses providers and these > need to be loaded from a specific location (see libcrypto.pc). > > If it is for older OpenSSL2, then situation can slightly differ, but > the logic is the same. > > > > > Here is the command I used for the build (custom OpenSSL is installed > > in /usr/local): > > > > LIBCRYPTO_LIBS="/usr/local/lib64" LDFLAGS="-Wl,-rpath,/usr/local/lib64 > > -L/usr/local/lib64" CPPFLAGS="-I/usr/local/include" LIBS="-lcrypto > > -lssl" ./configure --enable-fips > > make > > Do not use it this way, keep autoconf to detect LIBCRYPTO_LIBS > (set by pkgconfig). > > Milan -- Tomasz Kurzawa