Andy Polyakov
1ff86c5efa
test/asn1_encode_test.c: test "next negative minimum" corner case.
...
Reviewed-by: Richard Levitte <levitte@openssl.org>
2017-04-30 15:18:47 +02:00
Richard Levitte
a9c6d22105
Adapt all test programs
...
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3243 )
2017-04-24 18:09:01 +02:00
Richard Levitte
9612e15760
ASN.1: adapt our use of INTxx et al by making them explicitely embedded
...
Fixes #3191
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3199 )
2017-04-13 10:23:31 +02:00
Richard Levitte
8edefd7bb3
Test printing of ASN.1 types INTxx et al
...
[extended tests]
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3190 )
2017-04-12 23:18:00 +02:00
Richard Levitte
c983bc4fb2
Add tests of custom negative 1
...
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3174 )
2017-04-12 12:30:38 +02:00
Richard Levitte
9fea3a51e5
Fix definition of i2d_fn in asn1_encode_test.c
...
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3174 )
2017-04-12 12:30:38 +02:00
Richard Levitte
fa2274e805
In asn1_encode_test.c, add custom DER encoding checks
...
We're already checking that custom DER decodes to expected values (or
fails to do so), but we didn't check if values encode back to expected
DER.
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3174 )
2017-04-12 12:30:38 +02:00
Richard Levitte
afd7cae271
Fix int64 test of t_4bytes_4_neg
...
{ 0x80, 0x00, 0x00, 0x00 } decoded isn't (positive) 0x80000000,
it's (negative) INT32_MIN.
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3160 )
2017-04-11 22:08:41 +02:00
Matt Caswell
0856e3f167
Reject decoding of an INT64 with a value >INT64_MAX
...
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3159 )
2017-04-11 15:29:42 +01:00
Richard Levitte
31ae516116
Act on deprecation of LONG and ZLONG, step 1
...
Don't compile code that still uses LONG when it's deprecated
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3126 )
2017-04-10 12:11:00 +02:00
Richard Levitte
64f11ee888
Publish our INT32, UINT32, INT64, UINT64 ASN.1 types and Z variants
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3126 )
2017-04-10 12:10:59 +02:00
Richard Levitte
5748e4dc3a
Fix test/asn1_encode_test.c, ASN1_LONG_DATA used inappropriately
...
It's sheer luck that this was used for the first field only which also
has the same type in all data structures, so the offsets were never wrong
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3127 )
2017-04-05 13:37:37 +02:00
Richard Levitte
37332ecc01
Add a test of encoding and decoding LONG, INT32, UINT32, INT64 and UINT64
...
Also Z varieties.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3088 )
2017-04-04 11:29:23 +02:00