p5-net-ssleay icon indicating copy to clipboard operation
p5-net-ssleay copied to clipboard

Cannot create ED25519 key

Open Yenya opened this issue 3 years ago • 2 comments

I use Net::SSLeay on Fedora 34, and it seems that it cannot generate ED25519 keys, even though the openssl genpkey command can:

$ openssl genpkey -out test.key --algorithm ED25519
$ cat test.key
-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEIKw7B86z+agLNfxskEXr88hq19arjScO7F569v1hmWQF
-----END PRIVATE KEY-----
$ perl -MNet::SSLeay -e 'Net::SSLeay::EC_KEY_generate_key("ED25519")'
unknown curve nid=1087 at -e line 1.

I have tried both the system perl-Net-SSLeay from Fedora RPMs, and my own one compiled from this repository using perl Makefile.PL; make; make test.

Using P-256 curve instead of ED25519 works.

Yenya avatar Aug 31 '21 09:08 Yenya