On 17 Apr 2001, manikandan meyyappan wrote:

> Hi,
> I have problem in NULL decoding.
> The extension elements in choice are encoded using open type.
> What is the procedure for encoding the NULL type which is coming under
> extension part?
> 
> In one scenario the NULL is encoded as 
> 0000 0001
> 0000 0000
> But in another scenario the NULL is encoded with no bits.
> 
> I seen the second scenario in  Netmeeting ReleaseComplete message by encoding
> the ReleaseComplete Reason as Security Denied.
> 
> what is the actual procedure for Encoding the NULL type?

NULL is always encoded with no bits.  HOWEVER, X.691 clause 18.9 states
that the extension addition value should be encoded as if it were an open
type value, and clause 10.2.1 states that in producing the encoding of an
open type value the contents of the open type must be encoded then must be
converted into a complete encoding.  So, the NULL value must first be
encoded (producing no bits), then this encoding must be converted to a
complete encoding.  Clause 10.1.3 states that in producing the complete
".... If the result of encoding the outermost value is an empty bit
string, the bit string shall be replaced by a single octet with all bits
set to 0".  Hence, the only correct PER encoding for NULL when it is an
extension addition value is the first scenario above (0000 0001 0000
0000).

If you are using the OSS ASN.1 Tools you can instruct the decoder to not
treat the above mentioned invalid encoding (NULL encoded as an extension
addition value with with no bits) as an error by setting the runtime flag
RELAXPER.

-------------------------------------------------------------------------
Bancroft Scott                               Toll Free    :1-888-OSS-ASN1
OSS Nokalva                                  International:1-732-302-0750
[EMAIL PROTECTED]                                 Tech Support :1-732-302-9669 x-1
1-732-302-9669 x-200                         Fax          :1-732-302-0023
http://www.oss.com



Reply via email to