summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/bufaux.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* New buffer API; the first installment of the conversion/replacementdjm2014-04-301-232/+100
| | | | | | | | | | | | of OpenSSH's internals to make them usable as a standalone library. This includes a set of wrappers to make it compatible with the existing buffer API so replacement can occur incrementally. With and ok markus@ Thanks also to Ben Hawkes, David Tomaschik, Ivan Fratric, Matthew Dempsky and Ron Bowes for a detailed review.
* make compiling against OpenSSL optional (make OPENSSL=no);markus2014-04-291-3/+1
| | | | | reduces algorithms to curve25519, aes-ctr, chacha, ed25519; allows us to explore further options; with and ok djm
* buffer_get_string_ptr's return should be const to reminddjm2014-04-281-4/+4
| | | | | callers that futzing with it will futz with the actual buffer contents
* skip leading zero bytes in buffer_put_bignum2_from_string();djm2014-04-161-1/+4
| | | | reported by jan AT mojzis.com; ok markus@
* convert memset of potentially-private data to explicit_bzero()djm2014-02-021-3/+3
|
* replace most bzero with explicit_bzero, except a few that cna be memsettedu2014-01-311-2/+2
| | | | ok djm dtucker
* avoid use of OpenSSL BIGNUM type and functions for KEX withdjm2014-01-121-1/+74
| | | | | | | Curve25519 by adding a buffer_put_bignum2_from_string() that stores a string using the bignum encoding rules. Will make it easier to build a reduced-feature OpenSSH without OpenSSL in the future; ok markus@
* Include stdlib.h for free() as per the man page.dtucker2013-11-081-1/+2
|
* fix pointer-signedness warnings from clang/llvm-3.3; "seems nice" deraadt@djm2013-07-121-4/+4
|
* bye, bye xfree(); ok markus@djm2013-05-171-3/+3
|
* Add buffer_get_cstring() and related functions that verify that thedjm2010-08-311-1/+34
| | | | | | | | | | | | | string extracted from the buffer contains no embedded \0 characters* This prevents random (possibly malicious) crap from being appended to strings where it would not be noticed if the string is used with a string(3) function. Use the new API in a few sensitive places. * actually, we allow a single one at the end of the string for now because we don't know how many deployed implementations get this wrong, but don't count on this to remain indefinitely.
* allow buffer_get_int_ret/buffer_get_int64_ret to take a NULL pointerdjm2010-03-261-3/+5
| | | | argument to allow skipping past values in a buffer
* make buffer_get_string_ret() really non-fatal in all cases (it wasdjm2010-02-021-2/+5
| | | | | using buffer_get_int(), which could fatal() on buffer empty); ok markus dtucker
* add a buffer_get_string_ptr_ret() that does the same asdjm2010-01-121-5/+18
| | | | buffer_get_string_ptr() but does not fatal() on error; ok dtucker@
* Use '\0' for a nul byte rather than unadorned 0. ok djm@dtucker2008-06-101-2/+2
|
* avoid extra malloc/copy/free when receiving data over the net;markus2008-05-081-1/+17
| | | | ~10% speedup for localhost-scp; ok djm@
* almost entirely get rid of the culture of ".h files that include .h files"deraadt2006-08-031-3/+4
| | | | | ok djm, sort of ok stevesk makes the pain stop in one easy step
* move #include <string.h> out of includes.hstevesk2006-07-221-1/+4
|
* Move Buffer bignum functions into their own file, bufbn.c. This means thatdtucker2006-04-181-164/+1
| | | | | sftp and sftp-server (which use the Buffer functions in bufaux.c but not the bignum ones) no longer need to be linked with libcrypto. ok markus@
* replace {GET,PUT}_XXBIT macros with functionally similar functions,djm2006-03-301-10/+10
| | | | | | silencing a heap of lint warnings. also allows them to use __bounded__ checking which can't be applied to macros; requested by and feedback from deraadt@
* remove (char *) casts to a function that accepts void * for the argderaadt2006-03-251-2/+2
|
* Put $OpenBSD$ tags back (as comments) to replace the RCSID()s thatdjm2006-03-251-0/+1
| | | | Theo nuked - our scripts to sync -portable need them in the files
* RCSID() can diederaadt2006-03-191-1/+0
|
* Fix leaks in error paths, bz #1109 and #1110 reported by kremenek ATdjm2005-11-051-1/+4
| | | | cs.stanford.edu; ok dtucker@
* make this -Wsign-compare clean; ok avsm@ markus@djm2005-06-171-2/+2
|
* spacingderaadt2005-03-101-2/+2
|
* use 0x00 not \0 since buf[] is a bignummarkus2004-12-061-2/+2
|
* introduce a new buffer API that returns an error rather than fatal()ing whendjm2004-10-291-43/+170
| | | | presented with bad data; ok markus@
* encode 0 correctly in buffer_put_bignum2; noted by Mikulas Patockamarkus2004-02-231-17/+18
| | | | and drop support for negative BNs; ok otto@
* constify. ok markus@ & djm@jakob2003-11-101-3/+3
|
* A few signedness fixes for harmless situations; markus@ okmiod2003-09-181-4/+4
|
* rename log() into logit() to avoid name conflict. markus ok, from netbsditojun2003-04-081-2/+2
|
* %u for u_intmarkus2002-10-231-2/+2
|
* limit size of BNs to 8KB; ok provos/deraadtmarkus2002-06-261-4/+8
|
* minor KNF. things the fingers do while you readderaadt2002-06-231-2/+13
|
* add buffer_{get,put}_shortmarkus2002-04-201-4/+20
|
* do not talk about packets in bufauxmarkus2002-03-261-2/+2
|
* buffer_skip_string and extra sanity checking; needed by ssh-privsepprovos2002-03-181-1/+3
|
* unneeded cast cleanup; ok markus@stevesk2002-01-181-3/+3
|
* buffer_get_bignum: int -> voidmarkus2001-12-281-6/+3
|
* change the buffer/packet interface to use void* vs. char*; ok markus@stevesk2001-12-191-3/+3
|
* basic KNF done while i was looking for something elsederaadt2001-12-191-4/+4
|
* minor KNFderaadt2001-12-051-2/+2
|
* split ssh.h and try to cleanup the #include mess. remove unnecessary #includes.markus2001-01-211-2/+2
| | | | rename util.[ch] -> misc.[ch]
* indentderaadt2001-01-161-2/+2
|
* cleanup sftp-server implementation:markus2001-01-101-1/+17
| | | | | | | | | | | add buffer_get_int64, buffer_put_int64, GET_64BIT, PUT_64BIT parse SSH2_FILEXFER_ATTR_EXTENDED send SSH2_FX_EOF if readdir returns no more entries reply to SSH2_FXP_EXTENDED messages use #defines from the draft. move #definitions to sftp.h more info: http://www.ietf.org/internet-drafts/draft-ietf-secsh-filexfer-00.txt
* replace 'unsigned bla' with 'u_bla' everywhere. also, replace 'char unsigned'markus2000-12-191-14/+14
| | | | with u_char.
* cleanup copyright notices on all files. I have attempted to be accurate withderaadt2000-09-071-8/+28
| | | | | | | the details. everything is now under Tatu's licence (which I copied from his readme), and/or the core-sdi bsd-ish thing for deattack, or various openbsd developers under a 2-term bsd licence. We're not changing any rules, just being accurate.
* OpenBSD tagmarkus2000-06-201-1/+1
|
* whitespace cleanupmarkus2000-04-141-12/+12
|