You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using ssh-key to create a new PrivateKey using an algorithm which doesn't have the correct crate feature enabled results in a runtime error (unknown algorithm).
The following code compiles fine but panics with an error at runtime.
This is not very rusty. It would be much less surprising if the enum variant Ed25519 of the Algorithm enum would also be guarded by the feature that enables the algorithm.
The text was updated successfully, but these errors were encountered:
There are valid uses of that enum without the associated crate features, such as the ability to simply parse and serialize such keys without the associated cryptographic operations.
I suppose we could have an entirely separate, duplicated enum where each variant is gated on the associated crate features just for the use cases that require cryptographic support. I am not sure the added complexity is worth it, however.
Using
ssh-key
to create a newPrivateKey
using an algorithm which doesn't have the correct crate feature enabled results in a runtime error (unknown algorithm
).The following code compiles fine but panics with an error at runtime.
This is not very rusty. It would be much less surprising if the enum variant
Ed25519
of theAlgorithm
enum would also be guarded by the feature that enables the algorithm.The text was updated successfully, but these errors were encountered: