OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.38 / (download) - annotate - [select for diffs], Mon Mar 6 14:32:06 2023 UTC (14 months, 1 week 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, HEAD
Changes since 1.37: +43 -43 lines
Diff to previous 1.37 (colored)

Rename struct ${app}_config to plain cfg

All the structs are static and we need to reach into them many times.
Having a shorter name is more concise and results in less visual clutter.
It also avoids many overlong lines and we will be able to get rid of some
unfortunate line wrapping down the road.

Discussed with jsing

Revision 1.37 / (download) - annotate - [select for diffs], Sun Mar 5 13:12:53 2023 UTC (14 months, 2 weeks ago) by tb
Branch: MAIN
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)

openssl: make all config structs static

These are per-app, so per-file. Most of them already are static, adjust
the rest of them.

Revision 1.36 / (download) - annotate - [select for diffs], Fri Nov 11 17:07:39 2022 UTC (18 months, 1 week ago) by joshua
Branch: MAIN
Changes since 1.35: +4 -6 lines
Diff to previous 1.35 (colored)

Remove the legacy interactive mode from openssl(1).

This removes the legacy interactive mode from openssl(1) since it is
rarely used, complicates the code, and has also been removed from
OpenSSL in version 3.x.x.

ok tb@ jsing@

Revision 1.35 / (download) - annotate - [select for diffs], Wed Aug 31 12:29:08 2022 UTC (20 months, 2 weeks ago) by tb
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.34: +2 -4 lines
Diff to previous 1.34 (colored)

Avoid division by zero if no connection was made.

CID 184043

Revision 1.34 / (download) - annotate - [select for diffs], Sun Jul 14 03:30:46 2019 UTC (4 years, 10 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, 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.33: +2 -2 lines
Diff to previous 1.33 (colored)

Mark the initialized struct options arrays as both static and const.
This moves them from .data to .data.rel.ro

ok deraadt@ inoguchi@

Revision 1.33 / (download) - annotate - [select for diffs], Wed Jul 3 03:24:02 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

snprintf/vsnprintf return < 0 on error, rather than -1.

Revision 1.32 / (download) - annotate - [select for diffs], Mon Sep 17 15:37:35 2018 UTC (5 years, 8 months ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.31: +21 -14 lines
Diff to previous 1.31 (colored)

Move tally mark printing out of the main benchmark loop; ok tb@

Revision 1.31 / (download) - annotate - [select for diffs], Tue Aug 28 14:30:48 2018 UTC (5 years, 8 months ago) by cheloha
Branch: MAIN
Changes since 1.30: +2 -6 lines
Diff to previous 1.30 (colored)

Drop SSLv2, SSLv3 support.

No need to check for SSLv2/3 sessions when printing the tally mark.
Also do SSLv23_client_method -> TLS_client_method.

ok jsing@

Revision 1.30 / (download) - annotate - [select for diffs], Tue Aug 28 02:14:22 2018 UTC (5 years, 8 months ago) by cheloha
Branch: MAIN
Changes since 1.29: +4 -3 lines
Diff to previous 1.29 (colored)

Check for SSL_write(3) error.

jsing@ notes that this is not a complete solution, as we don't
account for retries or partial writes, but that this is a step
in a right direction.

May want to revisit this later to provide a complete solution.

ok jsing@

Revision 1.29 / (download) - annotate - [select for diffs], Wed Aug 22 20:36:24 2018 UTC (5 years, 8 months ago) by cheloha
Branch: MAIN
Changes since 1.28: +9 -24 lines
Diff to previous 1.28 (colored)

Use a monotonic clock for the benchmark timeout.

While here, we don't need the app_timer_* wrapper function, it only
obfuscates things, so delete it.  Also while here, totalTime only needs
to be assigned once.

ok tb@

Revision 1.28 / (download) - annotate - [select for diffs], Tue Aug 21 15:56:39 2018 UTC (5 years, 8 months ago) by cheloha
Branch: MAIN
Changes since 1.27: +25 -41 lines
Diff to previous 1.27 (colored)

Merge duplicate benchmark() GET/SSL_shutdown blocks into doConnection().

We need to then remove the shadow i from the GET block.  While there,
move retval's declaration to the beginning of the function.

As doConnection() now executes the body of the benchmark's test, rename
it to "run_test".

Shadow variable spotted by tb@.

ok tb@

Revision 1.27 / (download) - annotate - [select for diffs], Sat Aug 18 16:51:33 2018 UTC (5 years, 9 months ago) by cheloha
Branch: MAIN
Changes since 1.26: +22 -32 lines
Diff to previous 1.26 (colored)

Plug SSL object leaks in doConnection().

Move SSL_new/SSL_free up into benchmark() to restrict the responsibility
for the SSL object to a single scope.  Make doConnection() return an int,
openssl-style.  Some miscellaneous cleanup, too.

Discussed with tb, jsing, and jca.  Basic idea from jsing, lots of patch
input from tb.

ok deraadt on an earlier version

ok tb jsing

Revision 1.26 / (download) - annotate - [select for diffs], Tue Aug 14 15:25:04 2018 UTC (5 years, 9 months ago) by cheloha
Branch: MAIN
Changes since 1.25: +12 -19 lines
Diff to previous 1.25 (colored)

Don't fail by default in the -new case; ok tb jca

Revision 1.25 / (download) - annotate - [select for diffs], Sat Aug 11 16:07:36 2018 UTC (5 years, 9 months ago) by cheloha
Branch: MAIN
Changes since 1.24: +108 -139 lines
Diff to previous 1.24 (colored)

Refactor the nearly identical benchmark loops into a single loop.

Move all of the benchmark code -- loop initialization, the loops, and
the report printing -- into a new function, benchmark().  Eliminates
lots of duplicate code.

Regressions to 1.20 caught by tb@ and inoguchi@.  Tweaked by tb@.

ok tb@, jsing@

Revision 1.24 / (download) - annotate - [select for diffs], Fri Jul 13 18:36:56 2018 UTC (5 years, 10 months ago) by cheloha
Branch: MAIN
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

openssl app timers: TM_START -> TM_RESET, TM_STOP -> TM_GET

Much more apt than the current operation names.

Names suggested by jca@ ages ago.

ok jca, jsing

Revision 1.23 / (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.22: +3 -3 lines
Diff to previous 1.22 (colored)

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

Revision 1.22 / (download) - annotate - [select for diffs], Wed Feb 7 04:57:06 2018 UTC (6 years, 3 months ago) by jsing
Branch: MAIN
Changes since 1.21: +2 -3 lines
Diff to previous 1.21 (colored)

Remove guards around *_free() calls since these functions handle NULL.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Feb 6 02:40:29 2018 UTC (6 years, 3 months ago) by tb
Branch: MAIN
Changes since 1.20: +1 -7 lines
Diff to previous 1.20 (colored)

Remove manual shutdown and close of the socket since in this case
SSL_free will do this a second time.

ok jsing

Revision 1.20 / (download) - annotate - [select for diffs], Sun Jan 7 08:43:26 2018 UTC (6 years, 4 months ago) by inoguchi
Branch: MAIN
Changes since 1.19: +1 -2 lines
Diff to previous 1.19 (colored)

Remove unused extern variable in openssl(1) s_time

This extern variable appears not to be used.
And it is overridden by local variable in doConnection().
This causes MSVC warning C4459 "declaration of 'verify_error'
hides global declaration".

OK millert@

Revision 1.19 / (download) - annotate - [select for diffs], Tue Dec 5 15:02:06 2017 UTC (6 years, 5 months ago) by jca
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored)

Seperate real and user timer interfaces

Use more descriptive names, and make it clearer that real and user
timers work on different static storage.  The end goal is to be able to
reuse those timer functions, instead of inlining other timer
implementations subject to clock jumps.

Discussed with Scott Cheloha

Revision 1.18 / (download) - annotate - [select for diffs], Thu Nov 2 00:31:49 2017 UTC (6 years, 6 months ago) by mestre
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

openssl s_time -connect host:port needs dns promise for pledge(2) otherwise it
will SIGABRT

Bug found by Scott Cheloha <scottcheloha at gmail.com>

OK deraadt@

Revision 1.17 / (download) - annotate - [select for diffs], Fri Jan 20 08:57:12 2017 UTC (7 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

rearrange pledge promises into the canonical order; easier to eyeball

Revision 1.16 / (download) - annotate - [select for diffs], Tue Aug 30 14:34:59 2016 UTC (7 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

Add OPTION_ARG_TIME for parsing a (64 bit if needed) time_t
prodding & ok jsing

Revision 1.15 / (download) - annotate - [select for diffs], Tue Aug 30 11:30:14 2016 UTC (7 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.14: +23 -23 lines
Diff to previous 1.14 (colored)

Fix 32-bit time handling, using time_t and make it work on systems
where that is long long.
ok beck guenther

Revision 1.14 / (download) - annotate - [select for diffs], Sat Oct 17 15:00:11 2015 UTC (8 years, 7 months ago) by doug
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.13: +4 -2 lines
Diff to previous 1.13 (colored)

Exit if a pledge call fails in non-interactive mode.

ok semarie@

Revision 1.13 / (download) - annotate - [select for diffs], Sat Oct 10 22:28:51 2015 UTC (8 years, 7 months ago) by doug
Branch: MAIN
Changes since 1.12: +6 -1 lines
Diff to previous 1.12 (colored)

Initial support for pledges in openssl(1) commands.

openssl(1) has two mechanisms for operating: either a single execution
of one command (looking at argv[0] or argv[1]) or as an interactive
session than may execute any number of commands.

We already have a top level pledge that should cover all commands
and that's what interactive mode must continue using.  However, we can
tighten up the pledges when only executing one command.

This is an initial stab at support and may contain regressions.  Most
commands only need "stdio rpath wpath cpath".  The pledges could be
further restricted by evaluating the situation after parsing options.

deraadt@ and beck@ are roughly fine with this approach.

Revision 1.12 / (download) - annotate - [select for diffs], Fri Sep 11 14:43:57 2015 UTC (8 years, 8 months ago) by lteo
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

"Shutdown" should be "Shut down" in the usage for s_time's -no_shutdown
flag.  Pointed out by jmc@'s commit to the openssl(1) man page.

Revision 1.11 / (download) - annotate - [select for diffs], Fri Sep 11 02:08:34 2015 UTC (8 years, 8 months ago) by lteo
Branch: MAIN
Changes since 1.10: +24 -19 lines
Diff to previous 1.10 (colored)

*** empty log message ***

Revision 1.10 / (download) - annotate - [select for diffs], Thu Sep 10 06:36:45 2015 UTC (8 years, 8 months ago) by bcook
Branch: MAIN
Changes since 1.9: +5 -2 lines
Diff to previous 1.9 (colored)

Fix shadowed verify_error in s_server by removing the unused global.

's_time -verify 1' will now actually verify the peer certificate.

ok beck@

Revision 1.9 / (download) - annotate - [select for diffs], Sat Aug 22 16:36:05 2015 UTC (8 years, 8 months ago) by jsing
Branch: MAIN
Changes since 1.8: +1 -3 lines
Diff to previous 1.8 (colored)

Remove all duplicate prototypes for *_main functions (these are already
provided by progs.h). Also, move the FUNCTION type (and flags) into
openssl.c since that is the only place of use. Lastly, remove pointless
'extern' from the prototypes and use char **argv instead of char *argv[]
(the former is used elsewhere).

ok deraadt@ doug@

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jul 17 16:10:49 2015 UTC (8 years, 10 months ago) by doug
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.7: +3 -13 lines
Diff to previous 1.7 (colored)

Remove SSLv3 support from openssl(1) s_time.

ok miod@ bcook@ beck@

Revision 1.7 / (download) - annotate - [select for diffs], Wed Apr 15 16:33:49 2015 UTC (9 years, 1 month ago) by jsing
Branch: MAIN
Changes since 1.6: +11 -6 lines
Diff to previous 1.6 (colored)

Only set the cipher list if one was specified and actually check the return
value from SSL_CTX_set_cipher_list(). Also remove pointless getenv()
handling.

ok bcook@ doug@

Revision 1.6 / (download) - annotate - [select for diffs], Tue Apr 14 12:56:36 2015 UTC (9 years, 1 month ago) by jsing
Branch: MAIN
Changes since 1.5: +1 -3 lines
Diff to previous 1.5 (colored)

Move verify externs into the header file.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Apr 14 11:45:00 2015 UTC (9 years, 1 month ago) by jsing
Branch: MAIN
Changes since 1.4: +178 -201 lines
Diff to previous 1.4 (colored)

Convert openssl(1) s_time to new option handling.

ok doug@

Revision 1.4 / (download) - annotate - [select for diffs], Sun Feb 8 10:22:45 2015 UTC (9 years, 3 months ago) by doug
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.3: +1 -17 lines
Diff to previous 1.3 (colored)

Delete commented out code from openssl(1) apps.

From OpenSSL commits:

6f91b017bbb7140f816721141ac156d1b828a6b3
75d0ebef2aef7a2c77b27575b8da898e22f3ccd5
a2b18e657ea1a932d125154f4e13ab2258796d90

ok miod@, jsing@

Revision 1.3 / (download) - annotate - [select for diffs], Tue Nov 4 18:15:22 2014 UTC (9 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +9 -9 lines
Diff to previous 1.2 (colored)

simple select() to poll() conversion; reviewed by millert and doug

Revision 1.2 / (download) - annotate - [select for diffs], Mon Sep 1 20:54:37 2014 UTC (9 years, 8 months ago) by doug
Branch: MAIN
Changes since 1.1: +7 -9 lines
Diff to previous 1.1 (colored)

Enable -Wshadow in openssl(1) and fix a few shadow warnings.

ok jsing@

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.