I've tried using fast_ber for my project as it required BER encoding. It is a Microsoft RDP protocol. It seems that integers are encoded badly, as produced results are not as in BER specification and RDP messages are also expecting different results.
Here are some example of integer being encoded badly:
fast_ber::Integer<> i = 255;
result = 02 02 00 ff (wrong)
should be: 02 01 ff
fast_ber::Integer<> i = 65534;
result = 02 03 00 ff fe (wrong)
should be: 02 02 ff fe
fast_ber::Integer<> i = 65535;
result = 02 03 00 ff ff (wrong)
should be: 02 02 ff ff
Please advise
I've tried using fast_ber for my project as it required BER encoding. It is a Microsoft RDP protocol. It seems that integers are encoded badly, as produced results are not as in BER specification and RDP messages are also expecting different results.
Here are some example of integer being encoded badly:
fast_ber::Integer<> i = 255;result = 02 02 00 ff (wrong)
should be: 02 01 ff
fast_ber::Integer<> i = 65534;result = 02 03 00 ff fe (wrong)
should be: 02 02 ff fe
fast_ber::Integer<> i = 65535;result = 02 03 00 ff ff (wrong)
should be: 02 02 ff ff
Please advise