[elbe-devel] [PATCH 11/12] simple-validation-image: use and validate host_key

Thomas Weißschuh thomas.weissschuh at linutronix.de
Mon Nov 18 15:45:28 CET 2024


Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 tests/simple-validation-image-test.py | 13 +++++++++++++
 tests/simple-validation-image.xml     | 12 ++++++++++++
 2 files changed, 25 insertions(+)

diff --git a/tests/simple-validation-image-test.py b/tests/simple-validation-image-test.py
index c20e7c4ff8a6b6a6c4d112e826458d80b447efa6..a73868ae706eb60c98095fea1f45c43d1a33d4ba 100755
--- a/tests/simple-validation-image-test.py
+++ b/tests/simple-validation-image-test.py
@@ -245,6 +245,19 @@ def _test_rfs_partition(build_dir, part):
             'deb [arch=amd64] http://deb.debian.org/debian bookworm main',
         ]
 
+        assert root.joinpath('etc', 'apt', 'trusted.gpg.d',
+                             'elbe-xml-primary-key.gpg').read_bytes() == (
+            b'\x983\x04c\xce\xb9S\x16\t+\x06\x01\x04\x01\xdaG\x0f\x01\x01\x07 at w\xb6t\xb2\xbc.\x86P'
+            b'z$\xa1dq\xfe\x07S\x84\x92K\xfc\\E\xfc\x04Al\xebr\xb7\xfa\x00J\xb4IDebian Stable Rele'
+            b'ase Key (12/bookworm) <debian-release at lists.debian.org>\x88\x96\x04\x13\x16\x08\x00>'
+            b'\x16!\x04Md\xfe\xc1\x19\xc2\x02\x90g\xd6\xe7\x91\xf8\xd2X[\x87\x83\xd4\x81\x05\x02c'
+            b'\xce\xb9S\x02\x1b\x03\x05\t\x0f\t\x9c\x00\x05\x0b\t\x08\x07\x02\x06\x15\n\t\x08\x0b'
+            b'\x02\x04\x16\x02\x03\x01\x02\x1e\x01\x02\x17\x80\x00\n\t\x10\xf8\xd2X[\x87\x83\xd4'
+            b'\x81J\x0c\x01\x00\xffj\xa5\xe3\xb9\xcf[9\x9b\x80\xf8\xcft\xdc\xa8:5\xc1\xec\xfa\x0c'
+            b'\xdc\x9a\xdb\xb4\x16Z\x81\xbf\xe2\x80l\x01\x00\x847\xc6t\xd05\xda\x80\xf1\xdb\xc2'
+            b"\xbb\xecck}\x04+\x13\xf8\xf8'J\x7f[\x8a\x86\xf0_\xb6\xc3\x0e"
+        )
+
         sources_list_d = root.joinpath('etc', 'apt', 'sources.list.d')
         assert sources_list_d.is_dir()
         assert len(list(sources_list_d.iterdir())) == 0
diff --git a/tests/simple-validation-image.xml b/tests/simple-validation-image.xml
index 2fe79ea932efb665cc124a97ccb0ddfbb1e38645..d36c8a21a2539eee73620124b74775cb1e3b37ea 100644
--- a/tests/simple-validation-image.xml
+++ b/tests/simple-validation-image.xml
@@ -21,6 +21,18 @@ SPDX-FileCopyrightText: Linutronix GmbH
 			<primary_host>deb.debian.org</primary_host>
 			<primary_path>/debian</primary_path>
 			<primary_proto>http</primary_proto>
+			<primary_key>
+				-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+				mDMEY865UxYJKwYBBAHaRw8BAQdAd7Z0srwuhlB6JKFkcf4HU4SSS/xcRfwEQWzr
+				crf6AEq0SURlYmlhbiBTdGFibGUgUmVsZWFzZSBLZXkgKDEyL2Jvb2t3b3JtKSA8
+				ZGViaWFuLXJlbGVhc2VAbGlzdHMuZGViaWFuLm9yZz6IlgQTFggAPhYhBE1k/sEZ
+				wgKQZ9bnkfjSWFuHg9SBBQJjzrlTAhsDBQkPCZwABQsJCAcCBhUKCQgLAgQWAgMB
+				Ah4BAheAAAoJEPjSWFuHg9SBSgwBAP9qpeO5z1s5m4D4z3TcqDo1wez6DNya27QW
+				WoG/4oBsAQCEN8Z00DXagPHbwrvsY2t9BCsT+PgnSn9biobwX7bDDg==
+				=5NZE
+				-----END PGP PUBLIC KEY BLOCK-----
+			</primary_key>
 		</mirror>
 
 	</project>

-- 
2.47.0



More information about the elbe-devel mailing list