James Muir
d5db9f1548
Add new utf8 test-vector, update comments explaining utf8 decoding
...
Description:
Minor changes to help test and clarify the way utf8 strings are
decoded. This originated from my misunderstanding of the fix for
issue #507 . The new test-vector uses two bytes to encode each
wide-char.
The utf8 format is described here:
https://tools.ietf.org/html/rfc3629#section-3
Testing:
$ make clean
$ make CFLAGS="-DUSE_LTM -DLTM_DESC -I../libtommath" EXTRALIBS="../libtommath/libtommath.a" test
$ ./test
You can confirm that the new utf8 test data is correct using python:
>>> s="\xD7\xA9\xD7\x9C\xD7\x95\xD7\x9D"
>>> s.decode("utf-8")
u'\u05e9\u05dc\u05d5\u05dd'
2024-02-18 17:02:06 +00:00
Steffen Jaeckel
c5d7bfb2cc
manually fix the remaining leading _
's
2020-07-16 10:38:33 +02:00
Steffen Jaeckel
9824af8e3b
update header
2020-07-14 18:41:30 +02:00
Steffen Jaeckel
24765c30c5
remove footer
2020-07-14 18:41:29 +02:00
Steffen Jaeckel
cac400cf79
really implement DER decoding resursion limit
...
PR #373 did not really fix the issue of preventing a potential stack
overflow in case a lot of nested sequences have to be decoded.
Instead it only threw an error after successfully decoding all the nested
sequences.
This change fixes this and prevents the decoding.
2020-06-20 12:28:22 +02:00
Steffen Jaeckel
68cc580602
use macros in more tests
2019-10-17 12:49:20 +02:00
Steffen Jaeckel
ef55d1335e
fix some MSVC compiler warnings
2019-10-17 10:29:27 +02:00
Steffen Jaeckel
2a63adc1ab
add XSTRLEN
2019-10-17 10:29:27 +02:00
Steffen Jaeckel
d2027d60eb
add testcase for issue #507
2019-10-11 14:32:22 +02:00
Steffen Jaeckel
eaf2c7b6b9
fix build for msvc
2019-09-24 14:09:35 +02:00
Steffen Jaeckel
1a90da844c
only print der flexi-test on higher debug level
...
it's smashing the stack for some inputs :>
2018-09-07 11:58:54 +02:00
Steffen Jaeckel
6584569872
add another OID testcase for root-node 3
2018-09-07 08:24:25 +02:00
Steffen Jaeckel
079ed04b17
add OID testcase from x.690
2018-09-07 08:24:25 +02:00
Karel Miko
4fb0562a3b
fix -Wmissing-declarations -Wmissing-prototypes -Wmissing-noreturn
2018-07-07 19:54:08 +02:00
Steffen Jaeckel
0011f7f927
add generic test_process_dir()
2018-05-23 10:33:47 +02:00
Karel Miko
24c0eb84f9
ECC curves y^2 = x^3 + ax + b
2018-05-22 23:02:44 +02:00
Steffen Jaeckel
62c2124b82
implement DER resursion limit
2018-04-11 11:15:21 +02:00
Karel Miko
065c89108e
base64_* use char *
for Base64 strings
2018-03-26 16:42:19 +02:00
Steffen Jaeckel
b026c23b0a
use do_compare_testvector() where possible
2018-03-22 16:12:56 +01:00
Steffen Jaeckel
e1cba4da7d
fix der_test and rsa_test when compiling for msvc
2018-03-22 16:12:56 +01:00
Steffen Jaeckel
7fb108d884
add full-debug build to ci-tests
2018-03-10 17:37:54 +01:00
Steffen Jaeckel
3cfdd4bfdb
fix compilation with debug output enabled
2018-03-10 11:34:05 +01:00
Steffen Jaeckel
9d03c38ea4
add flags to der_decode_sequence()
2018-02-25 20:42:26 +01:00
Steffen Jaeckel
7e2d163d1d
add testvectors from [1]
...
[1] https://misc.daniel-marschall.de/asn.1/oid_facts.html
2018-02-25 20:42:26 +01:00
Steffen Jaeckel
3431763275
update/add more DER tests
2018-02-25 20:42:26 +01:00
Steffen Jaeckel
b75c3ce9db
remove LTC_ASN1_CONSTRUCTED and LTC_ASN1_CONTEXT_SPECIFIC
2018-02-25 20:42:26 +01:00
Steffen Jaeckel
64875d3a8f
add ASN.1-length functions
2018-02-25 20:42:26 +01:00
Steffen Jaeckel
a898fde5b7
better debug output
2018-01-11 18:06:23 +01:00
Steffen Jaeckel
fdc6cd2013
improve tests and timing in regards to MPI provider selection
2017-10-18 08:46:17 +02:00
Steffen Jaeckel
efa089e211
fixup #290
2017-10-01 22:56:47 +02:00
Steffen Jaeckel
a65cfb8dbe
make it possible to 'make all' w/o an MPI provider
2017-08-07 21:11:42 +02:00
Steffen Jaeckel
6fc0a90a1e
fix headers & footers in demos & tests
2017-06-20 15:16:11 +02:00
Steffen Jaeckel
fe19dad623
replace SVN tags
2017-06-20 15:16:11 +02:00
Steffen Jaeckel
5a3a27bbd6
rename der_tests to der_test
2017-06-08 22:20:45 +02:00