Skip to content

Commit 959d2ec

Browse files
committed
gss-api: strict hintName[0] GeneralString constructed bit
1 parent be4197a commit 959d2ec

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

gss-api/src/negotiation.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Negotiation-related types
22
use der::{
3-
AnyRef, Choice, Enumerated, Sequence,
3+
Choice, Enumerated, Sequence,
44
asn1::{BitString, OctetStringRef},
55
};
66

@@ -295,14 +295,14 @@ pub enum NegState {
295295
#[derive(Clone, Copy, Debug, Eq, PartialEq, Sequence)]
296296
pub struct NegHints<'a> {
297297
/// 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
298+
/// This is currently `OctetStringRef` as `GeneralString` is not part of the `der` crate
299299
#[asn1(
300300
context_specific = "0",
301301
optional = "true",
302302
tag_mode = "IMPLICIT",
303303
constructed = "true"
304304
)]
305-
pub hint_name: Option<AnyRef<'a>>, // TODO: GeneralString
305+
pub hint_name: Option<OctetStringRef<'a>>, // TODO: GeneralString
306306

307307
/// 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.
308308
///
@@ -389,7 +389,7 @@ mod tests {
389389
);
390390
assert_eq!(
391391
b"not_defined_in_RFC4178@please_ignore",
392-
&neg_token.neg_hints.unwrap().hint_name.unwrap().value()[2..]
392+
&neg_token.neg_hints.unwrap().hint_name.unwrap().as_bytes()[2..]
393393
);
394394
}
395395

0 commit comments

Comments
 (0)