|
1 | 1 | //! Negotiation-related types |
2 | 2 | use der::{ |
3 | | - AnyRef, Choice, Enumerated, Sequence, |
4 | | - asn1::{BitString, OctetStringRef}, |
| 3 | + Choice, Enumerated, Sequence, |
| 4 | + asn1::{BitString, GeneralStringRef, OctetStringRef}, |
5 | 5 | }; |
6 | 6 |
|
7 | 7 | use crate::MechType; |
@@ -295,14 +295,8 @@ pub enum NegState { |
295 | 295 | #[derive(Clone, Copy, Debug, Eq, PartialEq, Sequence)] |
296 | 296 | pub struct NegHints<'a> { |
297 | 297 | /// SHOULD<5> contain the string "not_defined_in_RFC4178@please_ignore". |
298 | | - /// This is currently `AnyRef` as `GeneralString` is not part of the `der` crate |
299 | | - #[asn1( |
300 | | - context_specific = "0", |
301 | | - optional = "true", |
302 | | - tag_mode = "IMPLICIT", |
303 | | - constructed = "true" |
304 | | - )] |
305 | | - pub hint_name: Option<AnyRef<'a>>, // TODO: GeneralString |
| 298 | + #[asn1(context_specific = "0", optional = "true")] |
| 299 | + pub hint_name: Option<GeneralStringRef<'a>>, |
306 | 300 |
|
307 | 301 | /// Never present. MUST be omitted by the sender. Note that the encoding rules, as specified in [X690], require that this structure not be present at all, not just be zero. |
308 | 302 | /// |
@@ -389,7 +383,7 @@ mod tests { |
389 | 383 | ); |
390 | 384 | assert_eq!( |
391 | 385 | b"not_defined_in_RFC4178@please_ignore", |
392 | | - &neg_token.neg_hints.unwrap().hint_name.unwrap().value()[2..] |
| 386 | + &neg_token.neg_hints.unwrap().hint_name.unwrap().as_bytes() |
393 | 387 | ); |
394 | 388 | } |
395 | 389 |
|
|
0 commit comments