hopenpgp-tools 0.25.11 → 0.25.12
raw patch · 2 files changed
+17/−59 lines, 2 files
Files
- hop.hs +15/−57
- hopenpgp-tools.cabal +2/−2
hop.hs view
@@ -5403,20 +5403,17 @@ case asMode of AsBinary -> BinaryData AsText -> UTF8Data- anyRecipientSupportsSEIPDv2 = any fsupportsSEIPDv2 recipients+ allRecipientsSupportSEIPDv2 = all fsupportsSEIPDv2 recipients symmetricOverride | useStrictEncryptProfile = preferredStrictSymmetric <|> Just AES256 | otherwise = preferredLegacySymmetric <|> Just AES256- isV6Recipient pkp = _keyVersion pkp == V6 useStrictEncryptProfile = case encryptProfile of EncryptProfileRFC9580 ->- anyRecipientSupportsSEIPDv2- || any (isV6Recipient . fpkp) recipients+ allRecipientsSupportSEIPDv2 EncryptProfileRFC4880 ->- anyRecipientSupportsSEIPDv2- || any (isV6Recipient . fpkp) recipients+ False preferredStrictSymmetric = preferredRecipientSymmetric isSupportedStrictEncryptSymmetric preferredLegacySymmetric =@@ -5441,59 +5438,20 @@ `elem` [AES128, AES192, AES256, TripleDES, CAST5, IDEA, Blowfish] recipientTargetFor funkey = let recipient = fpkp funkey- recipientNeedsV6PKESK =- useStrictEncryptProfile- && (fsupportsSEIPDv2 funkey || _keyVersion recipient == V6)- in if _keyVersion recipient == V6- then+ in if useStrictEncryptProfile+ then case normalizeX25519CompatibleECDHRecipient recipient of+ Just x25519Recipient ->+ recipientEncryptionTargetWithStrategyTyped+ x25519Recipient+ RecipientPreferV6W+ Nothing ->+ recipientEncryptionTargetWithStrategyTyped+ recipient+ RecipientPreferV6W+ else recipientEncryptionTargetWithStrategyTyped recipient- RecipientPreferV6W- else case _pkalgo recipient of- ECDH ->- -- Under strict (SEIPDv2) mode, keep Curve25519-compatible v4 ECDH keys on- -- the X25519/v6 path so ESK/payload versions stay aligned.- if recipientNeedsV6PKESK- then case normalizeX25519CompatibleECDHRecipient recipient of- Just x25519Recipient ->- recipientEncryptionTargetWithStrategyTyped- x25519Recipient- RecipientPreferV6W- Nothing ->- recipientEncryptionTargetWithStrategyTyped- recipient- RecipientPreferV6W- else- recipientEncryptionTargetWithStrategyTyped- recipient- RecipientForceV3InteropW- DeprecatedRSAEncryptOnly ->- if recipientNeedsV6PKESK- then- recipientEncryptionTargetWithStrategyTyped- recipient- RecipientPreferV6W- else- recipientEncryptionTargetWithStrategyTyped- recipient- RecipientForceV3InteropW- RSA ->- if recipientNeedsV6PKESK- then- recipientEncryptionTargetWithStrategyTyped- recipient- RecipientPreferV6W- else- recipientEncryptionTargetWithStrategyTyped- recipient- RecipientForceV3InteropW- _ ->- if recipientNeedsV6PKESK- then- recipientEncryptionTargetWithStrategyTyped- recipient- RecipientPreferV6W- else recipientEncryptionTarget recipient+ RecipientForceV3InteropW normalizeX25519CompatibleECDHRecipient pkp = case _pubkey pkp of
hopenpgp-tools.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: hopenpgp-tools-version: 0.25.11+version: 0.25.12 synopsis: hOpenPGP-based command-line tools description: command-line tools for performing some OpenPGP-related operations homepage: https://salsa.debian.org/clint/hOpenPGP-tools@@ -132,4 +132,4 @@ source-repository this type: git location: https://salsa.debian.org/clint/hopenpgp-tools.git- tag: hopenpgp-tools/0.25.11+ tag: hopenpgp-tools/0.25.12