aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2014-08-24 14:25:02 +0200
committerAndreas Schneider <asn@cryptomilk.org>2014-09-07 10:36:32 +0200
commit86ae6b2251dad939cba04b097066cd01fab48583 (patch)
tree24900eec00847add9c6f3fe680c6248329753b44 /include
parent2cb2587b55466fda621d3b21b1477cb28f4e4231 (diff)
downloadlibssh-86ae6b2251dad939cba04b097066cd01fab48583.tar.gz
libssh-86ae6b2251dad939cba04b097066cd01fab48583.tar.xz
libssh-86ae6b2251dad939cba04b097066cd01fab48583.zip
buffer: Add a secure buffer mechanism to avoid memory spills
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'include')
-rw-r--r--include/libssh/buffer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/libssh/buffer.h b/include/libssh/buffer.h
index a3e093c2..2aebe7e7 100644
--- a/include/libssh/buffer.h
+++ b/include/libssh/buffer.h
@@ -36,6 +36,7 @@ struct ssh_buffer_struct {
uint32_t used;
uint32_t allocated;
uint32_t pos;
+ int secure;
};
#define SSH_BUFFER_PACK_END ((uint32_t) 0x4f65feb3)
@@ -44,6 +45,7 @@ LIBSSH_API void ssh_buffer_free(ssh_buffer buffer);
LIBSSH_API void *ssh_buffer_get_begin(ssh_buffer buffer);
LIBSSH_API uint32_t ssh_buffer_get_len(ssh_buffer buffer);
LIBSSH_API ssh_buffer ssh_buffer_new(void);
+void ssh_buffer_set_secure(ssh_buffer buffer);
int buffer_add_ssh_string(ssh_buffer buffer, ssh_string string);
int buffer_add_u8(ssh_buffer buffer, uint8_t data);
int buffer_add_u16(ssh_buffer buffer, uint16_t data);