Artem Tokarev

Results 9 comments of Artem Tokarev

This is cool! I hope this feature will merge soon, exactly what i need for my case. I've been trying to implement a similar thing but as a separate crate....

@iskakaushik in case of my solution there were not many challenges, i defined a big enum with a variants for each `sqlparser`'s AST type, then i implemented some traversal traits...

It seems like [`DecodingKey::from_ed_der`](https://docs.rs/jsonwebtoken/latest/jsonwebtoken/struct.DecodingKey.html#method.from_ed_der) function actually expects raw 32 bytes public key, which ring's [`Ed25519KeyPair::public_key`](https://docs.rs/ring/latest/ring/signature/struct.Ed25519KeyPair.html#method.public_key) returns. Also running `openssl asn1parse -inform der -in file-with-pubkey` shows again that these 32 bytes...

Regarding PEM format I had no issues while testing just now.

Running `cargo test --examples` fails with the following error message (kept only last most useful lines) ``` ... Running unittests examples/ed25519.rs (target/debug/examples/ed25519-dcfabe976d67ec15) running 1 test test tests::test ... FAILED failures:...

Maybe it can be called a bugfix, but I think a lot of people already depend on the current behaviour and their code would crash at runtime if implementation changed,...

Oh it seems #318 adds [`ed25519-dalek`](https://github.com/dalek-cryptography/curve25519-dalek/tree/main/ed25519-dalek) as a dependency, so when/if it's merged adding DER/SPKI decoding wouldn't be much of a problem I think.

You mean implement a proper `DecodingKey::from_ed_der` on top of #318 branch? I'll try it this week/weekend.

Oh okay, I'll take a look later then.