aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/bio
Commit message (Collapse)AuthorAgeFilesLines
* Clarify logic in BIO_*printf functionsMatt Caswell2015-04-301-24/+21
| | | | | | | | | | | | | | The static function dynamically allocates an output buffer if the output grows larger than the static buffer that is normally used. The original logic implied that |currlen| could be greater than |maxlen| which is incorrect (and if so would cause a buffer overrun). Also the original logic would call OPENSSL_malloc to create a dynamic buffer equal to the size of the static buffer, and then immediately call OPENSSL_realloc to make it bigger, rather than just creating a buffer than was big enough in the first place. Thanks to Kevin Wojtysiak (Int3 Solutions) and Paramjot Oberoi (Int3 Solutions) for reporting this issue. Reviewed-by: Andy Polyakov <appro@openssl.org>
* realloc of NULL is like mallocRich Salz2015-04-281-5/+2
| | | | | | ANSI C, and OpenSSL's malloc wrapper do this, also. Reviewed-by: Richard Levitte <levitte@openssl.org>
* remove malloc castsRich Salz2015-04-287-13/+13
| | | | | | | Following ANSI C rules, remove the casts from calls to OPENSSL_malloc and OPENSSL_realloc. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Code style: space after 'if'Viktor Dukhovni2015-04-162-4/+4
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* Remove SSL_TASK, the DECnet Based SSL EngineRichard Levitte2015-03-311-321/+0
| | | | | | | | | | | | | This engine is for VMS only, and isn't really part of the core OpenSSL but rather a side project of its own that just happens to have tagged along for a long time. The reasons why it has remained within the OpenSSL source are long lost in history, and there not being any real reason for it to remain here, it's time for it to move out. This side project will appear as a project in its own right, the location of which will be announced later on. Reviewed-by: Tim Hudson <tjh@openssl.org>
* Remove EXHEADER, TEST, APPS, links:, install: and uninstall: where relevantRichard Levitte2015-03-311-17/+1
| | | | | | | | | | | | With no more symlinks, there's no need for those variables, or the links target. This also goes for all install: and uninstall: targets that do nothing but copy $(EXHEADER) files, since that's now taken care of by the top Makefile. Also, removed METHTEST from test/Makefile. It looks like an old test that's forgotten... Reviewed-by: Rich Salz <rsalz@openssl.org>
* Stop symlinking, move files to intended directoryRichard Levitte2015-03-311-879/+0
| | | | | | | | | | | | | Rather than making include/openssl/foo.h a symlink to crypto/foo/foo.h, this change moves the file to include/openssl/foo.h once and for all. Likewise, move crypto/foo/footest.c to test/footest.c, instead of symlinking it there. Originally-by: Geoff Thorpe <geoff@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* free NULL cleanupRich Salz2015-03-254-22/+11
| | | | | | | This commit handles BIO_ACCEPT_free BIO_CB_FREE BIO_CONNECT_free BIO_free BIO_free_all BIO_vfree Reviewed-by: Matt Caswell <matt@openssl.org>
* RAND_bytes updatesMatt Caswell2015-03-251-2/+4
| | | | | | | Ensure RAND_bytes return value is checked correctly, and that we no longer use RAND_pseudo_bytes. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix malloc define typoMike Frysinger2015-03-241-2/+2
| | | | | | | | | | | Fix compilation failure when SCTP is compiled due to incorrect define. Reported-by: Conrad Kostecki <ck+gentoobugzilla@bl4ckb0x.de> URL: https://bugs.gentoo.org/543828 RT#3758 Signed-off-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
* Remove dead code from cryptoMatt Caswell2015-03-171-5/+2
| | | | | | Some miscellaneous removal of dead code from lib crypto. Reviewed-by: Richard Levitte <levitte@openssl.org>
* BIO_debug_callback: Fix output on 64-bit machinesRichard Godbee2015-03-101-3/+6
| | | | | | | | BIO_debug_callback() no longer assumes the hexadecimal representation of a pointer fits in 8 characters. Signed-off-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* make errorsMatt Caswell2015-03-062-1/+3
| | | | | | Run make errors on master Reviewed-by: Richard Levitte <levitte@openssl.org>
* Unchecked malloc fixesMatt Caswell2015-03-052-1/+22
| | | | | | | Miscellaneous unchecked malloc fixes. Also fixed some mem leaks on error paths as I spotted them along the way. Reviewed-by: Tim Hudson <tjh@openssl.org>
* size_t for buffer functions.Dr. Stephen Henson2015-02-131-1/+1
| | | | | Change BUF_MEM_grow and BUF_MEM_grow_clean to return size_t. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Live code cleanup: remove #if 1 stuffRich Salz2015-02-061-10/+2
| | | | | | | For code bracketed by "#if 1" then remove the alternate "#else .. #endif" lines. Reviewed-by: Andy Polyakov <appro@openssl.org>
* util/mkstack.pl now generates entire safestack.hRich Salz2015-02-061-2/+0
| | | | | | | | | The mkstack.pl script now generates the entire safestack.h file. It generates output that follows the coding style. Also, removed all instances of the obsolete IMPLEMENT_STACK_OF macro. Reviewed-by: Andy Polyakov <appro@openssl.org>
* Dead code removal: #if 0 bio, comp, randRich Salz2015-01-295-281/+12
| | | | | | | The start of removing dead code. A remaining #if 0 in bss_conn.c needs more thought. Reviewed-by: Richard Levitte <levitte@openssl.org>
* clang on Linux x86_64 complains about unreachable code.Richard Levitte2015-01-291-1/+0
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* ifdef cleanup part 3: OPENSSL_SYSNAMERich Salz2015-01-231-1/+1
| | | | | | | | Rename OPENSSL_SYSNAME_xxx to OPENSSL_SYS_xxx Remove MS_STATIC; it's a relic from platforms <32 bits. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
* Fix post-reformat errors preventing windows compilationMatt Caswell2015-01-221-1/+1
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* More comment realignmentmaster-post-reformatMatt Caswell2015-01-223-18/+18
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Re-align some comments after running the reformat script.Matt Caswell2015-01-223-21/+21
| | | | | | | This should be a one off operation (subsequent invokation of the script should not move them) Reviewed-by: Tim Hudson <tjh@openssl.org>
* Rerun util/openssl-format-source -v -c .master-post-auto-reformatMatt Caswell2015-01-221-2/+1
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-2223-8341/+8294
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Move more comments that confuse indentMatt Caswell2015-01-222-6/+12
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* indent has problems with comments that are on the right hand side of a line.Matt Caswell2015-01-222-4/+12
| | | | | | | Sometimes it fails to format them very well, and sometimes it corrupts them! This commit moves some particularly problematic ones. Reviewed-by: Tim Hudson <tjh@openssl.org>
* More commentsMatt Caswell2015-01-221-1/+1
| | | | | | | | | | | | | | | | | Conflicts: crypto/dsa/dsa_vrf.c crypto/ec/ec2_smpl.c crypto/ec/ecp_smpl.c Conflicts: demos/bio/saccept.c ssl/d1_clnt.c Conflicts: bugs/dggccbug.c demos/tunala/cb.c Reviewed-by: Tim Hudson <tjh@openssl.org>
* Cleanup OPENSSL_NO_xxx, part 1master-pre-reformatRich Salz2015-01-142-4/+4
| | | | | | | | | | OPENSSL_NO_RIPEMD160, OPENSSL_NO_RIPEMD merged into OPENSSL_NO_RMD160 OPENSSL_NO_FP_API merged into OPENSSL_NO_STDIO Two typo's on #endif comments fixed: OPENSSL_NO_ECB fixed to OPENSSL_NO_OCB OPENSSL_NO_HW_SureWare fixed to OPENSSL_NO_HW_SUREWARE Reviewed-by: Richard Levitte <levitte@openssl.org>
* RT3548: Remove unsupported platformsRich Salz2015-01-126-41/+28
| | | | | | | This last one for this ticket. Removes WIN16. So long, MS_CALLBACK and MS_FAR. We won't miss you. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix memory leak.Martin Brejcha2015-01-061-2/+10
| | | | | | | | Fix memory leak by freeing up saved_message.data if it is not NULL. PR#3489 Reviewed-by: Stephen Henson <steve@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
* Further comment amendments to preserve formatting prior to source reformatMatt Caswell2015-01-063-4/+8
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Add missing include of sys/time.hKurt Roeckx2014-12-311-0/+3
| | | | | | gettimeofday was undefined Reviewed-by: Geoff Thorpe <geoff@openssl.org>
* mark all block comments that need format preserving so thatTim Hudson2014-12-304-7/+12
| | | | | | | indent will not alter them when reformatting comments Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* RT3548: Remove unsupported platforms.Rich Salz2014-12-221-1/+1
| | | | | | This commit removes MPE/iX Reviewed-by: Andy Polyakov <appro@openssl.org>
* Fix incorrect OPENSSL_assert() usage.Michael Tuexen2014-12-201-22/+64
| | | | | | | | Return an error code for I/O errors instead of an assertion failure. PR#3470 Reviewed-by: Stephen Henson <steve@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
* RT3548: Remove some obsolete platformsRich Salz2014-12-171-4/+0
| | | | | | This commit removes BEOS. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove fipscanister build functionality from makefiles.Dr. Stephen Henson2014-12-081-1/+1
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* There are a number of instances throughout the code where the constant 28 isMatt Caswell2014-12-032-4/+46
| | | | | | | | | | | | used with no explanation. Some of this was introduced as part of RT#1929. The value 28 is the length of the IP header (20 bytes) plus the UDP header (8 bytes). However use of this constant is incorrect because there may be instances where a different value is needed, e.g. an IPv4 header is 20 bytes but an IPv6 header is 40. Similarly you may not be using UDP (e.g. SCTP). This commit introduces a new BIO_CTRL that provides the value to be used for this mtu "overhead". It will be used by subsequent commits. Reviewed-by: Tim Hudson <tjh@openssl.org>
* Remove all .cvsignore filesRich Salz2014-11-281-4/+0
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Don't use msg on error.Jan Hykel2014-11-171-7/+7
| | | | | | | | Don't attempt to access msg structure if recvmsg returns an error. PR#3483 Reviewed-by: Stephen Henson <steve@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
* RT2193: #ifdef errors in bss_dgram.cl.montecchiani@gmail.com2014-08-281-2/+2
| | | | | | | | Problem with #ifdef in the BIO_CTRL_DGRAM_MTU_DISCOVER case that is different from the BIO_CTRL_DGRAM_QUERY_MTU one which seems correct. Reviewed-by: Matt Caswell <matt@openssl.org>
* rtcp_new: return failure if allocation of bi->ptr failedJonas Maebe2014-08-151-0/+2
| | | | | Signed-off-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* BIO_new_dgram_sctp, dgram_sctp_read: zero entire authchunksJonas Maebe2014-08-151-2/+2
| | | | | Signed-off-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* Undo a90081576c94f9f54de1755188a00ccc1760549aRich Salz2014-08-094-3/+29
| | | | Undo unapproved commit that removed DJGPP and WATT32
* Remove DJGPP (and therefore WATT32) #ifdef's.Rich Salz2014-08-084-29/+3
| | | | | | DJGPP is no longer a supported platform. Remove all #ifdef, etc., cases that refer to it. DJGPP also #define'd WATT32, so that is now removed as well.
* Fix memory leak in BIO_free if there is no destroy function.Matt Caswell2014-07-091-2/+2
| | | | | | Based on an original patch by Neitrino Photonov <neitrinoph@gmail.com> PR#3439
* Set authkey to NULL and check malloc return value.Kurt Roeckx2014-05-121-1/+7
|
* dgram_sctp_ctrl: authkey memory leakMartin Brejcha2014-05-121-0/+1
| | | | PR: 3327
* bss_dgram.c,d1_lib.c: make it compile with mingw.Andy Polyakov2014-03-061-0/+4
| | | | Submitted by: Roumen Petrov