OpenBSD CVS

CVS log for src/usr.bin/openssl/s_socket.c


[BACK] Up to [local] / src / usr.bin / openssl

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.13 / (download) - annotate - [select for diffs], Mon Dec 6 11:06:58 2021 UTC (2 years, 5 months ago) by tb
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, HEAD
Changes since 1.12: +13 -28 lines
Diff to previous 1.12 (colored)

Clean up a bunch of dead code in s_server.c and s_socket.c

jsg's analysis tool flagged a potential double free in do_server().
While this looks like a false positive, we can clean this code up
a little: the host name passed to the callbacks isn't used by either
sv_body() and www_body(), so it can be made local to do_accept()
(an extra variable would not even be needed).  Simplify the callbacks'
signatures accordingly. Remove some commented out linger code that
would never be used again anyway.

ok inoguchi jsg

Revision 1.12 / (download) - annotate - [select for diffs], Sun Aug 29 12:33:15 2021 UTC (2 years, 8 months ago) by tb
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.11: +5 -3 lines
Diff to previous 1.11 (colored)

Implement -naccept in the s_server.

doc fixes/ok jmc
ok beck

Revision 1.11 / (download) - annotate - [select for diffs], Fri Jun 28 13:35:02 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.10: +4 -4 lines
Diff to previous 1.10 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.10 / (download) - annotate - [select for diffs], Sun Aug 19 20:07:06 2018 UTC (5 years, 9 months ago) by tb
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.9: +3 -1 lines
Diff to previous 1.9 (colored)

Don't leak a strdup()'ed string on error in do_accept().
CID #154702.

input & ok inoguchi, ok mestre on first version

Revision 1.9 / (download) - annotate - [select for diffs], Wed Feb 7 05:47:55 2018 UTC (6 years, 3 months ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.8: +5 -5 lines
Diff to previous 1.8 (colored)

Indent labels with a single space so that diff prototypes are more useful.

Revision 1.8 / (download) - annotate - [select for diffs], Thu Sep 10 02:23:29 2015 UTC (8 years, 8 months ago) by lteo
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.7: +2 -4 lines
Diff to previous 1.7 (colored)

Remove SOCKET_PROTOCOL, a redundant define that was only used once.

No binary change.

ok millert@ miod@

Revision 1.7 / (download) - annotate - [select for diffs], Mon Jul 20 03:22:25 2015 UTC (8 years, 10 months ago) by doug
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.6: +6 -3 lines
Diff to previous 1.6 (colored)

Check return value in openssl(1) s_socket.

Fixes Coverity issue 21655.

ok bcook@

Revision 1.6 / (download) - annotate - [select for diffs], Sun Jul 19 03:28:26 2015 UTC (8 years, 10 months ago) by doug
Branch: MAIN
Changes since 1.5: +5 -3 lines
Diff to previous 1.5 (colored)

Only close descriptor if not already closed.

Fixes coverity 78916.

ok miod@ bcook@

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jul 17 20:22:02 2015 UTC (8 years, 10 months ago) by beck
Branch: MAIN
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

fix leak, found by coverity, ID 78877
ok miod@ jsing@

Revision 1.4 / (download) - annotate - [select for diffs], Sun Mar 22 10:36:22 2015 UTC (9 years, 2 months ago) by bcook
Branch: MAIN
Changes since 1.3: +1 -11 lines
Diff to previous 1.3 (colored)

Since Windows needs BIO_sock_init() before you can call any networking
functions, and ocsp and s_time need networking enabled too, this just moves
BIO_sock_init() up into main() as a catch-all for all of the commands.

Of course, it is a no-op on any other platform.

ok @guenther

Revision 1.3 / (download) - annotate - [select for diffs], Wed Dec 3 22:16:02 2014 UTC (9 years, 5 months ago) by bcook
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.2: +11 -1 lines
Diff to previous 1.2 (colored)

Move Windows OS-specific functions to make porting easier.

Several functions that need to be redefined for a Windows port are right
in the middle of other code that is relatively portable. This patch
isolates the functions that need Windows-specific implementations so
they can be built conditionally in the portable tree.

Add calls to BIO_sock_init() as-needed to openssl(1) so that socket IO works on
Windows. Sorry, these are no-op on other platforms.

ok jsing@ deraadt@

Revision 1.2 / (download) - annotate - [select for diffs], Thu Nov 6 13:46:09 2014 UTC (9 years, 6 months ago) by jsing
Branch: MAIN
Changes since 1.1: +1 -17 lines
Diff to previous 1.1 (colored)

ssl_sock_init() does nothing, so remove it...

Revision 1.1 / (download) - annotate - [select for diffs], Tue Aug 26 17:47:25 2014 UTC (9 years, 8 months ago) by jsing
Branch: MAIN

Move openssl(1) from /usr/sbin/openssl to /usr/bin/openssl, since it is not
a system/superuser binary. At the same time, move the source code from its
current lib/libssl/src/apps location to a more appropriate home under
usr.bin/openssl.

ok deraadt@ miod@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.