blob: 5ef6cb19b021b932b55b806c3f4eadf75305d566 [file] [edit]
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 <ravi.kant.sharma@canonical.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/2155003
Bug-Debian: https://bugs.debian.org/1138451
Forwarded: no
Patch downloaded from Debian:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1138451#12
Upstream: https://sourceforge.net/p/trousers/bugs/240/
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
--- 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);