x/crypto/openpgp: compression options are not used in Encrypt function #41213
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
installed Golang version and architecture details :
What did you do?
I'm trying to replicate following gpg command with
crypto/openpgp
package.I'm using
crypto/openpgp
package to encrypt message with a public key and sign it with my private key. I'm using theopenpgp.Encrypt
method and passed following config as parameter:What did you expect to see?
I'm expected to see my plain text input message to be PGP encrypted and must have ZIP compression.
What did you see instead?
Message I get from
openpgp.Encrypt
method, is properly signed and encrypted but not compressed.Resolution
Upon inspecting the Encrypt function and debugging the code, found out that it's not making use of compression config passed as argument anywhere in the flow. Made a change in write.go and added compression. After this change, the messages are properly encrypted and compressed.
A PR is already raised in golang/crypto repository. golang/crypto#103. This PR and debug info is from last year when i raised it in crypto repo. Posting it here due to inactivity there.
The text was updated successfully, but these errors were encountered: