Eric Leblond
a9bb17e097
tls-handshake: add sanity checks.
14 years ago
Eric Leblond
01c7e5bde6
tls-handshake: Add some missing free in error handling.
...
When DecodeAsn1BuildValue function fails, it may be necessary to
do some clean-up in the calling functions.
14 years ago
Eric Leblond
480db00fd7
tls-handshake: DecodeAsn1BuildValue should return -1 for error
...
This patch modifies DecodeAsn1BuildValue to have it return -1 when
there is a too big number of bytes announced in the ASN.1 message.
14 years ago
Eric Leblond
8f885ce810
TLS parser: add sanity checks on loop
...
It was possible in some loop to read data placed after the buffer
resulting in invalid/unpredictable value. This patch fixes two of
this issues.
14 years ago
Eric Leblond
cb1a75fc9e
TLS parser: modify OCTETSTRING
...
This patch does on over allocation of 1 for the OCTETSTRING
to be able to add a 0 at the end. This will then
allow us to use the string in printf.
14 years ago
Pierre Chifflier
5a65a17f00
TLS parser: add handing of UTF8STRING
...
Some certificate contains UTF8STRING which is a subset of
OCTETSTRING. This patch adds support for this type of string.
14 years ago
Eric Leblond
afba81bb27
decode ASN.1: Factorize value reading
...
This patch factorizes the reading of integer value and fix some
indentation. By convention, a value of 0xffffffff is returned
if the size of the integer is too big. In this case, the hexadecimal
value (which is also read) must be used.
14 years ago
Pierre Chifflier
f77fcdb3e8
Add ASN.1 parser for X509 certificates (in DER format)
...
Signed-off-by: Pierre Chifflier <pierre.chifflier@ssi.gouv.fr>
14 years ago