Package: haskell-hsopenssl Followup-For: Bug #1138469 X-Debbugs-Cc: [email protected] Control: tags -1 patch ftbfs
Dear Maintainer, The patch fixes the build 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
Description: Fix OpenSSL 4.0 compatibility: opaque ASN1_STRING access ASN1_STRING is opaque in OpenSSL 4.0. Replace direct struct member access (#peek) with ASN1_STRING_get0_data() and ASN1_STRING_length() accessor functions. Author: Ravi Kant Sharma <[email protected]> Forwarded: https://github.com/haskell-cryptography/HsOpenSSL/pull/106 Bug: https://github.com/haskell-cryptography/HsOpenSSL/issues/105 Bug-Ubuntu: https://bugs.launchpad.net/bugs/2155021 Bug-Debian: https://bugs.debian.org/1138469 Last-Update: 2026-06-26 Index: haskell-hsopenssl/OpenSSL/ASN1.hsc =================================================================== --- haskell-hsopenssl.orig/OpenSSL/ASN1.hsc 2026-06-26 16:42:23.062686931 +0200 +++ haskell-hsopenssl/OpenSSL/ASN1.hsc 2026-06-26 16:42:36.542743310 +0200 @@ -61,10 +61,16 @@ data {-# CTYPE "openssl/asn1.h" "ASN1_STRING" #-} ASN1_STRING +foreign import capi unsafe "openssl/asn1.h ASN1_STRING_get0_data" + _ASN1_STRING_get0_data :: Ptr ASN1_STRING -> IO (Ptr CChar) + +foreign import capi unsafe "openssl/asn1.h ASN1_STRING_length" + _ASN1_STRING_length :: Ptr ASN1_STRING -> IO CInt + peekASN1String :: Ptr ASN1_STRING -> IO String peekASN1String strPtr - = do buf <- (#peek ASN1_STRING, data ) strPtr - len <- (#peek ASN1_STRING, length) strPtr :: IO CInt + = do buf <- _ASN1_STRING_get0_data strPtr + len <- _ASN1_STRING_length strPtr peekCStringLen (buf, fromIntegral len)

