pyca / cryptography

cryptography is a package designed to expose cryptographic primitives and recipes to Python developers.
https://cryptography.io
Other
6.6k stars 1.51k forks source link

add support custom comments when formatting openssh private keys #8980

Open gzm55 opened 1 year ago

gzm55 commented 1 year ago

The comment field is left empty when formatting as openssh key protocol. can we support to custom this comment field?

alex commented 1 year ago

I think we'd accept a PR that added support to https://cryptography.io/en/latest/hazmat/primitives/asymmetric/serialization/#cryptography.hazmat.primitives.serialization.KeySerializationEncryptionBuilder

gzm55 commented 1 year ago

when parsing from bytes, the comment is also lost.

alex commented 1 year ago

I think we'd also be happy to take a PR exposing it.

On Fri, Jun 2, 2023 at 1:26 PM James Z.M. Gao @.***> wrote:

when parsing from bytes, the comment is also lost.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

-- All that is necessary for evil to succeed is for good people to do nothing.

gzm55 commented 1 year ago

I think we'd also be happy to take a PR exposing it. On Fri, Jun 2, 2023 at 1:26 PM James Z.M. Gao @.> wrote: when parsing from bytes, the comment is also lost. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.> -- All that is necessary for evil to succeed is for good people to do nothing.

@alex here is a simple pr to fix this issue

gzm55 commented 1 year ago

any comments about this issue or the pr?

gzm55 commented 2 months ago

I think we'd also be happy to take a PR exposing it. On Fri, Jun 2, 2023 at 1:26 PM James Z.M. Gao @.**> wrote: when parsing from bytes, the comment is also lost. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.**> -- All that is necessary for evil to succeed is for good people to do nothing.

@alex here is a simple pr to fix this issue

@alex any other way to fix this issue?