diff options
author | Vincent Ambo <tazjin@tvl.su> | 2024-03-14T06·43+0300 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-03-17T11·30+0000 |
commit | fa8e706b9b66c1d5f0f64967939861fe00101a22 (patch) | |
tree | 876d7f4627189932d7af199c89f12ebab160fd07 /third_party/overlays/patches/tpm2-pkcs11-190-dbupgrade.patch | |
parent | e220d807270e9967d7b76070b968981c2c3dda0c (diff) |
fix(3p/overlays): upgrade tpm2-pkcs11, but add unmerged patch r/7718
Instead of pinning to an old version, move forward but with a fix for the critical bug that's been preventing me from upgrading. The project seems to be unmaintained upstream, but I took the fix from the open pull requests. Change-Id: I85c8f780b1e363bac4060dd89b1930a6e59ce2a3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11145 Tested-by: BuildkiteCI Autosubmit: tazjin <tazjin@tvl.su> Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'third_party/overlays/patches/tpm2-pkcs11-190-dbupgrade.patch')
-rw-r--r-- | third_party/overlays/patches/tpm2-pkcs11-190-dbupgrade.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/third_party/overlays/patches/tpm2-pkcs11-190-dbupgrade.patch b/third_party/overlays/patches/tpm2-pkcs11-190-dbupgrade.patch new file mode 100644 index 000000000000..f831c11a80bc --- /dev/null +++ b/third_party/overlays/patches/tpm2-pkcs11-190-dbupgrade.patch @@ -0,0 +1,29 @@ +From 987323794148a6ff5ce3d02eef8cfeb46bee1761 Mon Sep 17 00:00:00 2001 +From: Anton <tracefinder@gmail.com> +Date: Tue, 7 Nov 2023 12:02:15 +0300 +Subject: [PATCH] Skip null attribute during DB update + +Signed-off-by: Anton <tracefinder@gmail.com> +--- + src/lib/db.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/src/lib/db.c b/src/lib/db.c +index b4bbd1bf..74c5a7b4 100644 +--- a/src/lib/db.c ++++ b/src/lib/db.c +@@ -2169,9 +2169,11 @@ static CK_RV dbup_handler_from_7_to_8(sqlite3 *updb) { + + /* for each tobject */ + CK_ATTRIBUTE_PTR a = attr_get_attribute_by_type(tobj->attrs, CKA_ALLOWED_MECHANISMS); +- CK_BYTE type = type_from_ptr(a->pValue, a->ulValueLen); +- if (type != TYPE_BYTE_INT_SEQ) { +- rv = _db_update_tobject_attrs(updb, tobj->id, tobj->attrs); ++ if (a) { ++ CK_BYTE type = type_from_ptr(a->pValue, a->ulValueLen); ++ if (type != TYPE_BYTE_INT_SEQ) { ++ rv = _db_update_tobject_attrs(updb, tobj->id, tobj->attrs); ++ } + } + + tobject_free(tobj); |