9 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
52f8dc5221 memory leak in test 2012-03-07 00:26:53 +01:00
Markus Friedl
60702a301e adapt sshbuf_dump test to new output format 2012-03-04 21:19:21 +01:00
Damien Miller
e60ae70c50 better name for the unit tests 2012-01-17 14:32:49 +01:00