Closed magks closed 11 months ago
I just made this PR to illustrate how the support might be added and start a conversation about it. I was tasked with replacing a proprietary PGP package and I was looking into this one. I believe we require the old format support and was investigating how it could be added. I saw it there was a simple way, so requesting support to be added.
I see there is a failed check in my PR. I'm not sure if its related to my changes. I will look into it and fix it if so. But any word from maintainers on whether old format support like in this PR would be added would be much appreciated.
Hi,
Thanks for submitting this, I hadn't realised there were issues with historical formats.
I think there's an issue with the threading of the tests that causes them to fail sometimes. I'll re-run and hope it passes this time.
I'll take a look at the PR in more detail next week when I've got some more free time.
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
Sorry for the delay in this. I've added this as an option in v6.2.0
Legacy applications may need support for PGP 2.6.x.
BouncyCastle PgpLiteralDataGenerator supports PGP 2.6.x via a constructor taking a bool useOldFormat. Adding support in PgpCore to use that flag by adding a bool property to PGP class UseOldFormat (default false), and a bool arg useFormat to Utilties Write*LiteralData methods with a default value of false to not break any public usage of the methods.
( See https://github.com/neoeinstein/bouncycastle/blob/master/crypto/src/openpgp/PgpLiteralDataGenerator.cs ) PgpLiteralDataGenerator.cs: ///
/// Generates literal data objects in the old format.
/// This is important if you need compatibility with PGP 2.6.x.
///
/// If true, uses old format.
public PgpLiteralDataGenerator(
bool oldFormat)
{
this.oldFormat = oldFormat;
}