Wireshark-dev: Re: [Wireshark-dev] asn2wrs.py no longer seems to generate the same code ...

From: Richard Sharpe <realrichardsharpe@xxxxxxxxx>
Date: Fri, 8 May 2020 08:54:58 -0700
On Fri, May 8, 2020 at 8:43 AM Pascal Quantin <pascal@xxxxxxxxxxxxx> wrote:
>
> Hi Richard,

It doesn't look like it was manually modified. The last person who
touched that file was Peter Wu, it seems, so maybe he can shed some
light on it.

> Le ven. 8 mai 2020 à 17:08, Richard Sharpe <realrichardsharpe@xxxxxxxxx> a écrit :
>>
>> Hi folks,
>>
>> While figuring out how to get a dissection function for
>> ECDSA_Sig_Value, I noticed that asn2wrs.py no longer generates the
>> same code it once did.
>>
>> I re-ran asn2wrs.py against epan/dissectors/asn1/pkcs1/pkcs1.cnf
>> (unmodified) and then compared the current output to what is checked
>> in. This is what I get:
>>
>> -------------------------------------------
>> @@ -131,7 +131,7 @@
>>
>>  static int
>>  dissect_pkcs1_DigestAlgorithmIdentifier(gboolean implicit_tag _U_,
>> tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree
>> *tree _U_, int hf_index _U_) {
>> -  offset = dissect_x509af_AlgorithmIdentifier(implicit_tag, tvb,
>> offset, actx, tree, hf_index);
>> +  offset = dissect_AuthenticationFramework_AlgorithmIdentifier(implicit_tag,
>> tvb, offset, actx, tree, hf_index);
>>
>>    return offset;
>>  }
>> @@ -148,7 +148,7 @@
>>
>>
>>  static const ber_sequence_t DigestInfo_sequence[] = {
>> -  { &hf_pkcs1_digestAlgorithm, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE,
>> BER_FLAGS_NOOWNTAG, dissect_pkcs1_DigestAlgorithmIdentifier },
>> +  { &hf_pkcs1_digestAlgorithm, -1/*imported*/, -1/*imported*/,
>> BER_FLAGS_NOOWNTAG, dissect_pkcs1_DigestAlgorithmIdentifier },
>>    { &hf_pkcs1_digest        , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING,
>> BER_FLAGS_NOOWNTAG, dissect_pkcs1_Digest },
>>    { NULL, 0, 0, 0, NULL }
>>  };
>> ...
>> -----------------------------------
>>
>> This seems like a problem ...
>>
>> Perhaps I should file a bugzilla bug.
>
>
> Didi you check the file history to see whether it was manually modified? It might not be a asn2wrs.py problem.
>
> Best regards,
> Pascal.
> ___________________________________________________________________________
> Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
> Archives:    https://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
>              mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe



-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)(传说杜康是酒的发明者)