[Rpm-maint] [rpm-software-management/rpm] RPM fsverity support (#1203)

Panu Matilainen notifications at github.com
Wed May 27 07:13:29 UTC 2020


@pmatilai commented on this pull request.



> @@ -494,6 +505,36 @@ static rpmRC includeFileSignatures(Header *sigp, Header *hdrp)
 #endif
 }
 
+static rpmRC includeVeritySignatures(FD_t fd, Header *sigp, Header *hdrp)
+{
+#ifdef WITH_FSVERITY
+    rpmRC rc;
+    char *key = rpmExpand("%{?_file_signing_key}", NULL);
+    char *keypass = rpmExpand("%{?_file_signing_key_password}", NULL);
+    char *cert = rpmExpand("%{?_file_signing_cert}", NULL);
+
+    if (rstreq(keypass, "")) {
+	free(keypass);
+	keypass = NULL;
+    }
+
+    if (key && cert) {

I'd go with just `if (key && *key && cert)` and remove the special casing of an empty string in the above. 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1203#pullrequestreview-418914507
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200527/1a09bf6b/attachment.html>


More information about the Rpm-maint mailing list