For want of a parens, 2 hours were lost :)
I do trip on this, still, a lot. Blame my dyslexia!
thanks!
On 8/30/24 01:57, Glyph wrote:
You will note that
https://cryptography.io/en/latest/hazmat/primitives/asymmetric/ed25519/#cryptography.hazmat.primitives.asymmetric.ed25519.Ed25519Private
You will note that
https://cryptography.io/en/latest/hazmat/primitives/asymmetric/ed25519/#cryptography.hazmat.primitives.asymmetric.ed25519.Ed25519PrivateKey.public_key
has parentheses after it in its description. That's it. You just forgot the
parens. i.e., try:
public_bytes = csr.public_k
I may know a lot about x.509 objects (and use openssl command line a
lot), but I am a serious hack at anything python, so I am missing your
point wrt what I need to do after reading in the csr to get a var that
contains the public key in bytes I can use.
So, please, be a little understanding a
public_key is a method on your csr object that returns the public_key,
not an attribute.
-Paul
On Thu, Aug 29, 2024 at 8:36 PM Robert Moskowitz wrote:
>
> I tried that and:
>
> public_bytes = public_key.public_bytes(
> encoding=serialization.Encoding.Raw,
> format=serialization.PublicF
I tried that and:
public_bytes = public_key.public_bytes(
encoding=serialization.Encoding.Raw,
format=serialization.PublicFormat.Raw)
public_bytes = public_key.public_bytes(
^^
NameError: name 'public_key' is not defined
so I tried
public_bytes = csr.publ
All of our public key types have a public_bytes() method that can be
used to serialize the key as you wish:
https://cryptography.io/en/latest/hazmat/primitives/asymmetric/ed25519/#cryptography.hazmat.primitives.asymmetric.ed25519.Ed25519PublicKey.public_bytes
Alex
On Thu, Aug 29, 2024 at 11:12 PM
I want a variable that is the bits of the public key so that if I print
it, I get something like:
0xf32938f7ff6918d5bbdc52483f31e3725875456a9aeb83f915461a5ea629acda
or whatever type that I can then change to what I need elsewhere.
On 8/29/24 23:02, Alex Gaynor wrote:
You're getting back the p
You're getting back the public key object for that CSR. When you say
you want the "public key itself" what do you mean?
Alex
On Thu, Aug 29, 2024 at 10:54 PM Robert Moskowitz wrote:
>
> I have a csr with an eddsa25519 key:
>
> -BEGIN CERTIFICATE REQUEST-
> MIGPMEMCAQAwEDEOMAwGA1UEBRMFeDE
I have a csr with an eddsa25519 key:
-BEGIN CERTIFICATE REQUEST-
MIGPMEMCAQAwEDEOMAwGA1UEBRMFeDEyMjQwKjAFBgMrZXADIQAqLOv73gF8OMT9
dvXIai0HOzyoT0kWkwziuPObnb+PbaAAMAUGAytlcANBAMbkfr344AGb2NHMJOk7
hUdknmKY3XOrAKITLbE0X5NiSxfsZ8ovLG4SnmIEE86t5pWfaPAFhJ8t+jMGJUzQ
XgM=
-END CERTIFICATE REQ