aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-03-02 12:59:36 +0100
committerBjörn Gustavsson <[email protected]>2013-05-31 14:52:17 +0200
commitc11b5a2ebb602c76d0957b67a0ca7741c45fea85 (patch)
treeb9dd1abb048ea3359facc5eb20e8511bd5fe430c /lib/sasl
parent95af544936f9b6d7b8d03f3f49effaf5c314513d (diff)
downloadotp-c11b5a2ebb602c76d0957b67a0ca7741c45fea85.tar.gz
otp-c11b5a2ebb602c76d0957b67a0ca7741c45fea85.tar.bz2
otp-c11b5a2ebb602c76d0957b67a0ca7741c45fea85.zip
PER: Fix aligments bugs for short strings
The encoder wrongly assumed that a known multiplier string (such as IA5String) encoded as exactly 16 bits did not need to be aligned to an octet boundary. X.691 (07/2002) 27.5.7 says that it does. Since an OCTET STRING encoded to 16 bits (two octets) should not be aligned to an octet boundary, that means that asnct_imm:dec_string() needs an additional parameter to determine whether a string of a given length needs to be aligned. Furthermore, there is another subtle rule difference: An OCTET STRING which does not have fixed length is always aligned (in PER), but a known multiplier string is aligned if its upper bound is greater than or equal to 16. In encoding, make sure that short known multiplier strings and OCTET STRINGs with extensible sizes are not aligned when they are below the appropriate limit.
Diffstat (limited to 'lib/sasl')
0 files changed, 0 insertions, 0 deletions