hOpenPGP 3.7.4 → 3.7.4.1
raw patch · 2 files changed
+9/−7 lines, 2 files
Files
- hOpenPGP.cabal +2/−2
- tests/Tests/Encryption.hs +7/−5
hOpenPGP.cabal view
@@ -1,6 +1,6 @@ Cabal-version: 3.4 Name: hOpenPGP-Version: 3.7.4+Version: 3.7.4.1 Synopsis: native Haskell implementation of OpenPGP (RFC9580) Description: native Haskell implementation of OpenPGP (RFC9580), with some backwards compatibility Homepage: https://salsa.debian.org/clint/hOpenPGP@@ -346,4 +346,4 @@ source-repository this type: git location: https://salsa.debian.org/clint/hOpenPGP.git- tag: v3.7.4+ tag: v3.7.4.1
tests/Tests/Encryption.hs view
@@ -6,6 +6,7 @@ {-# LANGUAGE MonoLocalBinds #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TypeApplications #-} module Tests.Encryption (encryptionAndCompressionTests) where @@ -112,6 +113,7 @@ import Codec.Encryption.OpenPGP.Internal ( checksum16BE , point2MBS+ , intToFixedWidth ) import Codec.Encryption.OpenPGP.Internal.HOBlockCipher ( HOBlockCipher (..)@@ -2516,11 +2518,11 @@ ( PKESKPayloadV3Packet (PKESKPayloadV3 _ _ X25519 (ephMPI NE.:| _)) ) -> do- let ephemeralBytes = i2osp (unMPI ephMPI)- assertEqual- "PKESKv3 v6 X25519 ephemeral must be raw 32 bytes (no 0x40 prefix)"- 32- (B.length ephemeralBytes)+ case intToFixedWidth @32 (unMPI ephMPI) of+ Nothing ->+ assertFailure+ "ephemeral exceeds 32 octets — stray 0x40 prefix leaked into the MPI"+ Just _ -> pure () Right other -> assertFailure ("Expected PKESKPayloadV3 with X25519, got " ++ show other)