Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/topic/bbannier/correct_rt_module'
Browse files Browse the repository at this point in the history
  • Loading branch information
bbannier committed Mar 5, 2024
2 parents a435263 + 53628a5 commit 9569bba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions analyzer/asn1.spicy
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ type ASN1OctetString = unit(len: uint64, constructed: bool) {
# https://www.obj-sys.com/asn1tutorial/node124.html

type ASN1String = unit(tag: ASN1Tag, len: uint64) {
var encoding: hilti::Charset;
var encoding: spicy::Charset;

on %init {
switch ( tag.type_ ) {
Expand All @@ -151,7 +151,7 @@ type ASN1String = unit(tag: ASN1Tag, len: uint64) {
case ASN1Type::PrintableString,
ASN1Type::GeneralizedTime,
ASN1Type::UTCTime: {
self.encoding = hilti::Charset::ASCII;
self.encoding = spicy::Charset::ASCII;
}

case ASN1Type::UTF8String,
Expand All @@ -167,7 +167,7 @@ type ASN1String = unit(tag: ASN1Tag, len: uint64) {
# BMPString and UniversalString. This *may* not be correct.
ASN1Type::BMPString,
ASN1Type::UniversalString: {
self.encoding = hilti::Charset::UTF8;
self.encoding = spicy::Charset::UTF8;
}
}
}
Expand Down Expand Up @@ -235,7 +235,7 @@ public type ASN1Body = unit(head: ASN1Header, recursive: bool) {
ASN1Type::BitString -> bitstr_value: ASN1BitString(head.len.len, head.tag.constructed);

ASN1Type::OctetString -> str_value: ASN1OctetString(head.len.len, head.tag.constructed)
&convert=$$.value.decode(hilti::Charset::ASCII);
&convert=$$.value.decode(spicy::Charset::ASCII);

ASN1Type::ObjectIdentifier -> str_value: ASN1ObjectIdentifier(head.len.len)
&convert=$$.oidstring;
Expand Down
2 changes: 1 addition & 1 deletion analyzer/ldap.spicy
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ type SearchFilter = unit {
FilterType::FILTER_EXT -> FILTER_EXT: DecodedAttributeValue(FilterType::FILTER_EXT)
&parse-from=self.filterBytes;
FilterType::FILTER_PRESENT -> FILTER_PRESENT: ASN1::ASN1OctetString(self.filterLen, False)
&convert=$$.value.decode(hilti::Charset::ASCII)
&convert=$$.value.decode(spicy::Charset::ASCII)
&parse-from=self.filterBytes;
};

Expand Down

0 comments on commit 9569bba

Please sign in to comment.