diff options
author | Andre Luyer <andre@luyer.nl> | 2019-12-27 17:45:06 +0100 |
---|---|---|
committer | Pascal Quantin <pascal@wireshark.org> | 2020-01-11 18:36:35 +0000 |
commit | dbfb204f487097032d83de318c26cacd185a9d4e (patch) | |
tree | ae59f35a9d744598a67915b2bf20a59acbc28064 /epan/dissectors/packet-rtse.c | |
parent | 3f17a8948fbbe7b6e2767ae9c53e503706952a70 (diff) |
ber: display x509af.utcTime year in 4 digits
Because:
- the 2-digit year can only be in the range 1950..2049 according to
https://tools.ietf.org/html/rfc5280#section-4.1.2.5.1
- to avoid confusion, interpreting the year/month/day in a different order may
still represent a valid date.
- now both utcTime and GeneralizedTime are displayed in exactly the same way.
- some tools, like Perl, apply a different date range when converting 2-digit years.
In packet-ber.c two parameters are added to the function dissect_ber_UTCTime:
datestrptr: if not NULL return datetime string instead of adding to tree
or NULL when packet is malformed
tvblen: if not NULL return consumed packet bytes
Also the memory allocation for outstr is now done using the recommended method
as described in the README.developer document.
The calling function in x509af/x509sat uses this to prepend the century.
Added generated files.
Change-Id: I714c2e8e7f899211caaa1f4136ca0d27cb1aba4a
Reviewed-on: https://code.wireshark.org/review/35414
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Diffstat (limited to 'epan/dissectors/packet-rtse.c')
-rw-r--r-- | epan/dissectors/packet-rtse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-rtse.c b/epan/dissectors/packet-rtse.c index 6ee6bab690..8b05a04017 100644 --- a/epan/dissectors/packet-rtse.c +++ b/epan/dissectors/packet-rtse.c @@ -352,7 +352,7 @@ static int dissect_rtse_CommonReference(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 128 "./asn1/rtse/rtse.cnf" tvbuff_t *string = NULL; - offset = dissect_ber_UTCTime(implicit_tag, actx, tree, tvb, offset, hf_index); + offset = dissect_ber_UTCTime(implicit_tag, actx, tree, tvb, offset, hf_index, NULL, NULL); if(open_request && string) col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %s", tvb_format_text(string, 0, tvb_reported_length(string))); |