Bug#1138451: trousers: patch for OpenSSL 4.0 compatibility

Ravi Kant Sharma <[email protected]>
Newsgroups gmane.linux.debian.qa-packages
Message-ID <178117248578.2688748.16059199682839029697.reportbug__39148.1582353421$1781172578$gmane$org@dragon0>
Package: 1138451
Version: 0.3.15-1
Followup-For: Bug #1138451
X-Debbugs-Cc: [email protected]
Control: tags -1 patch

Please find attached a patch that fixes this issue.


-- System Information:
Debian Release: trixie/sid
  APT prefers noble-updates
  APT policy: (500, 'noble-updates'), (500, 'noble-security'), (500, 'noble'), (100, 'noble-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.8.0-117-generic (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
fix-for-openssl4-compat.patch (text/plain, 670 B)
Description: Fix for OpenSSL4 compatibility
 Replace direct access to opaque ASN1_OCTET_STRING->data field with
 ASN1_STRING_get0_data() accessor. ASN1_STRING is fully opaque in OpenSSL 4.0.
Author: Ravi Kant Sharma <[email protected]>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/2155003
Bug-Debian: https://bugs.debian.org/1138451
Forwarded: no
--- a/src/tspi/tspi_asn1.c
+++ b/src/tspi/tspi_asn1.c
@@ -237,7 +237,7 @@
 
 	if (*rawBlobSize != 0) {
 		if (decBlobSize <= *rawBlobSize) {
-			memcpy(rawBlob, tssBlob->blob->data, decBlobSize);
+			memcpy(rawBlob, ASN1_STRING_get0_data(tssBlob->blob), decBlobSize);
 		}
 		else {
 			TSS_BLOB_free(tssBlob);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.