37 Commits

Author SHA1 Message Date
Markus Friedl
21f1618b17 sshbuf_fixed: the parent buf is not mutable 2012-10-10 20:36:20 +02:00
Markus Friedl
371a869f0a unittests: sshbuf_ptr not returns const 2012-10-10 15:49:54 +02:00
Damien Miller
8f73555808 protect sshbuf_from[bs] children by refusing modification of the parent buffers
This adds a reference mechanism to struct sshbuf, making parent buffers to
those created with buffer_froms() and buffer_fromb() read-only until the
child buffer is freed. It also delays freeing of the parent buffer until
all child buffers have freed.
2012-10-09 23:22:54 +02:00
Damien Miller
b305993cea deprecate the buffer_init() sshbuf entrypoint.
Allows making struct sshbuf opaque
2012-10-09 23:22:53 +02:00
Damien Miller
25ba47881f re-enable tests that I turned off while debugging RO buffers 2012-10-09 23:22:53 +02:00
Damien Miller
60cb7a627f new functions for read-only buffers with external storage
This adds some new functions: sshbuf_from(), sshbuf_fromb() and sshbuf_froms()
that create new buffers from a read-only blob, the contents of a buffer and
the contents of a string in a buffer respectively. In all cases the memory
contents are not copied - the new buffer, which is read-only, just refers to
the original location in memory.
2012-10-09 23:22:53 +02:00
Damien Miller
2ae5891148 unbreak test_kex (needs sshbuf.h) 2012-09-21 19:59:25 +10:00
Damien Miller
d403adfa35 fuzz certificate parsing 2012-03-20 15:09:18 +01:00
Damien Miller
3f5b354ed7 test certificate loading 2012-03-20 15:09:18 +01:00
Damien Miller
3a5cb4965b correct test names: s/RSA/RSA1 for a few 2012-03-20 15:09:18 +01:00
Damien Miller
3f69ecb299 activate leakmalloc support when LEAKMALLOC make variable is set
(mostly by markus@)
2012-03-15 13:27:43 +11:00
Markus Friedl
077cbaa855 don't leak the test keys and the kex after deserialize 2012-03-07 00:26:57 +01:00
Damien Miller
4a3c3a7baf fix some kex-related leaks 2012-03-07 00:26:54 +01:00
Damien Miller
06cbafed01 add a "quiet" mode, activated by -q, that prints nothing to stdout 2012-03-07 00:26:54 +01:00
Damien Miller
bdf8ba65b2 memory leaks in fingerprint tests 2012-03-07 00:26:53 +01:00
Damien Miller
52f8dc5221 memory leak in test 2012-03-07 00:26:53 +01:00
Markus Friedl
a9b5c1feef replace ssh_packet_payload() with sshpkt_ptr(); adapt ssh_packet_payload()
sshpkt_ptr() has similar argument/return types as sshbuf_ptr()
u_int -> size_t, void * -> u_char.
2012-03-04 21:19:24 +01:00
Markus Friedl
cbf6120318 add a kex unit test 2012-03-04 21:19:24 +01:00
Damien Miller
d19d229054 flesh out sshkey tests substantially
use new fuzz framework to fuzz private and pubkey parsing

test loading of RSA1 keys
2012-03-04 21:19:23 +01:00
Damien Miller
39c4aec751 support for fuzzing base64 files 2012-03-04 21:19:23 +01:00
Damien Miller
57d23bd234 support for multiple fuzz strategies in a single invocation 2012-03-04 21:19:22 +01:00
Damien Miller
c978fa80fc fuzz support fixes 2012-03-04 21:19:22 +01:00
Damien Miller
ef27482cc7 missed a s/fuzz_buf/fuzz_ptr/ 2012-03-04 21:19:22 +01:00
Damien Miller
256e902fe1 match sshbuf naming for fuzz methods 2012-03-04 21:19:22 +01:00
Damien Miller
38fe458892 hook in all the tests 2012-03-04 21:19:22 +01:00
Damien Miller
9b0034eeaf fix parameter extraction 2012-03-04 21:19:22 +01:00
Damien Miller
0bececbb60 Basic fuzzing framework 2012-03-04 21:19:22 +01:00
Damien Miller
30c2bb48b9 matching constification of arguments 2012-03-04 21:19:22 +01:00
Damien Miller
044fea56f4 constify arguments 2012-03-04 21:19:22 +01:00
Damien Miller
222ddc9e44 basic unittests for authfile.c pub/private key loading 2012-03-04 21:19:22 +01:00
Markus Friedl
60702a301e adapt sshbuf_dump test to new output format 2012-03-04 21:19:21 +01:00
Markus Friedl
4492816499 re-add clang to unittests/TODO 2012-01-17 14:49:28 +01:00
Damien Miller
22200296fd add simple way to locate test data in test_helper 2012-01-17 14:43:51 +01:00
Damien Miller
eab08a3d52 add fingerprints to test data 2012-01-17 14:32:49 +01:00
Damien Miller
27d673a877 TODO for unittests 2012-01-17 14:32:49 +01:00
Damien Miller
0a106ab1a1 start regress tests for sshkey code 2012-01-17 14:32:49 +01:00
Damien Miller
e60ae70c50 better name for the unit tests 2012-01-17 14:32:49 +01:00