Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 53628a5

Browse files
committed
Use symbols from spicy instead of hilti runtime library.
Previously Spicy would allow references to `hilti`, even though names from `spicy` should have been used. The most recent development version of Spicy got more strict here, so the code as written is now rejected. This patch fixes the Spicy code to use symbols from `spicy` instead of `hilti`. We also add previously implicitly available imports.
1 parent a435263 commit 53628a5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

analyzer/asn1.spicy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ type ASN1OctetString = unit(len: uint64, constructed: bool) {
140140
# https://www.obj-sys.com/asn1tutorial/node124.html
141141

142142
type ASN1String = unit(tag: ASN1Tag, len: uint64) {
143-
var encoding: hilti::Charset;
143+
var encoding: spicy::Charset;
144144

145145
on %init {
146146
switch ( tag.type_ ) {
@@ -151,7 +151,7 @@ type ASN1String = unit(tag: ASN1Tag, len: uint64) {
151151
case ASN1Type::PrintableString,
152152
ASN1Type::GeneralizedTime,
153153
ASN1Type::UTCTime: {
154-
self.encoding = hilti::Charset::ASCII;
154+
self.encoding = spicy::Charset::ASCII;
155155
}
156156

157157
case ASN1Type::UTF8String,
@@ -167,7 +167,7 @@ type ASN1String = unit(tag: ASN1Tag, len: uint64) {
167167
# BMPString and UniversalString. This *may* not be correct.
168168
ASN1Type::BMPString,
169169
ASN1Type::UniversalString: {
170-
self.encoding = hilti::Charset::UTF8;
170+
self.encoding = spicy::Charset::UTF8;
171171
}
172172
}
173173
}
@@ -235,7 +235,7 @@ public type ASN1Body = unit(head: ASN1Header, recursive: bool) {
235235
ASN1Type::BitString -> bitstr_value: ASN1BitString(head.len.len, head.tag.constructed);
236236

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

240240
ASN1Type::ObjectIdentifier -> str_value: ASN1ObjectIdentifier(head.len.len)
241241
&convert=$$.oidstring;

analyzer/ldap.spicy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ type SearchFilter = unit {
733733
FilterType::FILTER_EXT -> FILTER_EXT: DecodedAttributeValue(FilterType::FILTER_EXT)
734734
&parse-from=self.filterBytes;
735735
FilterType::FILTER_PRESENT -> FILTER_PRESENT: ASN1::ASN1OctetString(self.filterLen, False)
736-
&convert=$$.value.decode(hilti::Charset::ASCII)
736+
&convert=$$.value.decode(spicy::Charset::ASCII)
737737
&parse-from=self.filterBytes;
738738
};
739739

0 commit comments

Comments
 (0)