-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
der: introduce an AnyLike
trait to mark parameters
#1415
Conversation
spki/src/lib.rs
Outdated
//! use spki::{AlgorithmIdentifier, ObjectIdentifier}; | ||
//! | ||
//! let alg_oid = "1.2.840.10045.2.1".parse::<ObjectIdentifier>().unwrap(); | ||
//! let params_oid = "1.2.840.10045.3.1.7".parse::<ObjectIdentifier>().unwrap(); | ||
//! | ||
//! let alg_id = AlgorithmIdentifier { | ||
//! oid: alg_oid, | ||
//! parameters: Some(params_oid) | ||
//! parameters: Some(Any::encode_from(¶ms_oid).unwrap()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this was a regression introduced in #769
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this a regression? The change seems like a regression.
Last set of CI errors are related to #799 I think. |
I'm not sure I understand the purpose of this trait or why you're adding bounds for it, nearly all of which seem unused?
...but |
I guess your goal here is to try to constrain the parameters specifically to the ...but that seems needlessly restrictive. The ASN.1 concept of Is there a specific motivation for this change? |
Notably this precludes using e.g. |
The motivation was to compare the parameter to |
This newly defined
AnyLike
trait would help to make sure the parameters ofspki::AlgorithmIdentifier
are serialized as Any.