Skip to content

Conversation

@jap
Copy link
Contributor

@jap jap commented May 28, 2025

No description provided.

@jap
Copy link
Contributor Author

jap commented May 28, 2025

I wanted something to generate v6 OpenPGP keys from Python, and this works for me™:

>>> import pysequoia
>>> pysequoia.Cert.generate()
<Cert fingerprint=2716A0AEA7FBA6ABCE0113709D029FDFE831E1E1>
>>> pysequoia.Cert.generate(profile=pysequoia.Profile.RFC4880)
<Cert fingerprint=C5ED5D387ACE01BF67CD104604F908905B8349AB>
>>> pysequoia.Cert.generate(profile=pysequoia.Profile.RFC9560)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: type object 'builtins.Profile' has no attribute 'RFC9560'. Did you mean: 'RFC9580'?
>>> pysequoia.Cert.generate(profile=pysequoia.Profile.RFC9580)
<Cert fingerprint=922EAADFC1A8889DCB71274D12861A224FB8A21C366B6A9FED23D8147C97214F>

Not sure whether I should anything to NEXT.md - which appears to have been left behind. Can I leave that to you?
Also, is there any form of testing in this repo?

@jap jap marked this pull request as ready for review May 28, 2025 10:03
@wiktor-k
Copy link
Owner

Thanks for the contribution, looks exciting! 🤩

Can I leave that to you?

Yep, no worries, I'll adjust NEXT.

Also, is there any form of testing in this repo?

Yep, but most of the testing is by extracting all Python code fragments from README and running them. So the documentation is always up-to-date :)

If you want to try it out locally you need my other project: tangler and it's basically: tangler python < README.md > README.py && python README.py. (hmm... I think it also runs the bash code fragments beforehand: tangler bash < README.md > README.sh and then source README.sh.)

If there are any problems getting the CI sorted out don't hesitate to ping me (I think the sign-off is as easy as git commit --amend --no-edit --signoff).

@jap jap changed the title Add an option to the Cert.generate to explicitly select v4/v6 keys Add an option to Cert.generate to explicitly select v4/v6 keys May 28, 2025
Co-authored-by: Wiktor Kwapisiewicz <[email protected]>
Signed-off-by: Jasper Spaans <[email protected]>
@wiktor-k wiktor-k merged commit 9e89b5a into wiktor-k:main May 28, 2025
21 checks passed
@wiktor-k
Copy link
Owner

Okay, it's good for me. Thanks for your contribution! 🚀

If you don't mind I'll wait a week and then release a new version of pysequoia with your change (just in case there will be another contribution that could also make it).

See you later! 👋

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants