more asn1 compiles now, so fix errors. not sure why >ber-context-specific string method takes two parameters
parent
984a010df0
commit
7dabe9b1f6
|
@ -30,7 +30,7 @@ USING: asn1 asn1.ldap io io.streams.string tools.test ;
|
|||
] unit-test
|
||||
|
||||
[ B{ 133 6 97 98 99 100 101 102 } ] [
|
||||
5 "abcdef" >ber-contextspecific
|
||||
5 "abcdef" >ber-contextspecific-string
|
||||
] unit-test
|
||||
|
||||
! triggers array
|
||||
|
@ -45,7 +45,7 @@ USING: asn1 asn1.ldap io io.streams.string tools.test ;
|
|||
] unit-test
|
||||
|
||||
[ B{ 160 4 49 50 51 52 } ] [
|
||||
{ 1 2 3 4 } >ber-contextspecific
|
||||
{ 1 2 3 4 } >ber-contextspecific-array
|
||||
] unit-test
|
||||
|
||||
] with-ber
|
||||
|
|
|
@ -209,8 +209,7 @@ M: string >ber ( str -- byte-array )
|
|||
: >ber-application-string ( n str -- byte-array )
|
||||
[ HEX: 40 + set-tag ] dip >ber ;
|
||||
|
||||
GENERIC: >ber-contextspecific ( n obj -- byte-array )
|
||||
M: string >ber-contextspecific ( n str -- byte-array )
|
||||
: >ber-contextspecific-string ( n str -- byte-array )
|
||||
[ HEX: 80 + set-tag ] dip >ber ;
|
||||
|
||||
! =========================================================
|
||||
|
@ -233,5 +232,5 @@ M: array >ber ( array -- byte-array )
|
|||
: >ber-appsequence ( array -- byte-array )
|
||||
HEX: 60 >ber-seq-internal ;
|
||||
|
||||
M: array >ber-contextspecific ( array -- byte-array )
|
||||
: >ber-contextspecific-array ( array -- byte-array )
|
||||
HEX: A0 >ber-seq-internal ;
|
||||
|
|
Loading…
Reference in New Issue