ibm-sw-tpm2: backport openssl-3.1 support

Without the change build fails against openssl-3.1 as:

       >                  from Tpm.h:78,
       >                  from CryptEccMain.c:64:
       > TpmToOsslMath.h:79:5: error: #error Untested OpenSSL version
       >    79 | #   error Untested OpenSSL version
       >       |     ^~~~~
This commit is contained in:
Sergei Trofimovich 2023-10-14 11:44:29 +01:00
parent aef16f9cb4
commit 4756a3b968

View File

@ -1,4 +1,9 @@
{ stdenv, fetchurl, lib, openssl }:
{ lib
, stdenv
, fetchurl
, fetchpatch
, openssl
}:
stdenv.mkDerivation rec {
pname = "ibm-sw-tpm2";
@ -9,6 +14,18 @@ stdenv.mkDerivation rec {
hash = "sha256-PLZC+HGheyPVCwRuX5X0ScIodBX8HnrrS9u4kg28s48=";
};
patches = [
# Backport openssl-3.1 from development branch.
# Can be removed with next release.
(fetchpatch {
name = "openssl-3.1.patch";
url = "https://github.com/kgoldman/ibmswtpm2/commit/15501bf4973d334ca9420fa2fb0f0fe1800871e0.patch";
includes = [ "TpmToOsslMath.h" ];
stripLen = 1;
hash = "sha256-8TwyZVy8pQwq5Fl8cy9xJWtdckwL+QK0+DL5EHDLYUY=";
})
];
buildInputs = [ openssl ];
sourceRoot = "src";