Commit Graph

51 Commits

Author SHA1 Message Date
Brent Cook
14f4175b67 split long manpage makefile lines. 2014-12-06 17:48:03 -06:00
Brent Cook
29804a73cc simplify packaging for libcrypto.
Remove a lot of complex shell code. Upstream churn has slowed down, so
it is now easier to maintain this directly as automake files. This is
also needed to start integrating CPU-specific acceleration support.

Since we are deriving the copy list from the Makefile.am files, we can
now get rid of copy_src/copy_crypto.
2014-12-06 17:48:03 -06:00
Brent Cook
d643bcf4b5 simplify packaging for libssl.
Follow libtls and derive the file list from the Makefile.am
template itself.
2014-12-06 17:47:30 -06:00
Brent Cook
13035fa666 simplify building the apps Makefile
Remove extra machinery in favor of a plain-old Makefile.am.
Tighten up what files are copied on build, package a simple openssl.cnf.
2014-12-06 11:20:56 -06:00
Brent Cook
33ff088a60 simplify packaging for libtls.
Derive the file list from the Makefile.am template itself (DRY), ensure
manpage is packaged with the final tarball.
2014-12-06 10:21:23 -06:00
Brent Cook
b3270494f0 add support for building libtls
Use './configure --enable-libtls' to build the library and install the
associated manpages. Note that the API and ABI of this library may
change still, though feedback is welcome.

ok deraadt@ jsing@ tedu@
2014-12-06 09:13:56 -06:00
Brent Cook
a19dd0e61b better cleanup biotest.c 2014-12-03 22:58:24 -06:00
Brent Cook
1bbde19a7c add minimal poll(2) implementation for Windows
This provides sufficient functionality to run openssl(1) from a Windows
console. This is based on the original select-based version from from
songdongsheng@live.cn. Changes:

 * use nfds_t directly for iterating the fds.
 * add WSAGetLastError -> errno mappings
 * handle POLLHUP and the OOB data cases for revents
 * handle sparse arrays of fds correctly
 * KNF style updates
 * teach poll how to handle file handles as well as sockets

This handles the socket/non-socket issue  by alternating a loop between
WaitForMultipleObjects for non-sockets and and select for sockets. One
would think this would be terrible for performance, but as of this
writing, poll consumes about 6% of the time doing a bulk transfer
between a Linux box and 'openssl.exe s_server'.

I tried to implement this all in terms of WaitForMultipleObjects with a
select 'poll' at the end to get extra specific socket status. However,
the cost of setting up an event handle for each socket, setting the
WSAEventSelect attributes, and cleaning them up reliably was pretty
high. Since the event handle associated with a socket is also global,
creating a new one cancels the previous one or can be disabled
externally.

In addition, the 'FD_WRITE' status of a socket event handle does not
behave in an expected fashion, being triggered by an edge on a write
event rather than being level triggered.

Another fun horror story is how stdin in windows might be a console, it
might be a pipe, it might be something else. If these all worked in the
same way, it would be great. But, since a console-stdin can also signal
on a mouse or window event, it means we can easily get stuck in a
blocking read (you can't make stdin non-blocking) if the non-character
events are not filtered out. So, poll does that too.

See here for various additional horror stories:

http://www.postgresql.org/message-id/4351.1336927207@sss.pgh.pa.us
2014-12-03 17:03:47 -06:00
Brent Cook
96bf8be098 update and mask unit tests when running on win32
Update pq_test to ignore changes in whitespace.
Update for new testssl params, specify absolute paths to test binaries.
Fork-based tests do not make sense on Windows.
Disable building biotest, since it is too specific to OpenBSD's behavior
to be useful on other platforms.
2014-12-03 17:02:29 -06:00
Brent Cook
58fcd3c39c Add conditional compilation for windows and posix functions.
This adds a Windows-specific versions of several symbols from libcrypto
and openssl(1).
2014-12-03 17:02:29 -06:00
Brent Cook
2103690cbf improve readability of generated Makefile.am files 2014-11-23 08:33:56 -06:00
Brent Cook
29f8d827f2 Enable GOST in libcrypto and libssl, contributed by Dmitry Eremin-Solenikov
Ensure the public camellia.h header is installed along with gost.h
2014-11-18 08:02:32 -06:00
Brent Cook
f223e6f14d Add the Cammelia cipher to libcrypto.
from miod@:

There used to be a strong reluctance to provide this cipher in LibreSSL in the
past, because the licence terms under which Cammelia was released by NTT were
free-but-not-in-the-corners, by restricting the right to modify the source
code, as well retaining the right to enforce their patents against anyone
in the future.

However, as stated in http://www.ntt.co.jp/news/news06e/0604/060413a.html ,
NTT changed its mind and made this code truly free. We only wish there had
been more visibility of this, for we could have had enabled Cammelia
earlier (-:

Licence change noticed by deraadt@. General agreement from the usual LibreSSL
suspects.

Crank libcrypto.so minor version due to the added symbols.
2014-11-17 17:48:46 -06:00
Brent Cook
a4cc953911 Improve and simplify function and header detection logic.
Simplify autoconf checks by using AC_CHECK_FUNCS/HEADERS.
Clarify some ambiguous dependencies around strnlen/strndup.
Unconditionally enable pidwraptest for all arc4random implementations.
Remove HAVE_VASPRINTF conditional, since asprintf requires vasprintf.

ok @doug
2014-10-30 19:15:11 -05:00
Brent Cook
72c1e56b38 enable -lcrypto -lssl with all test programs directly.
This removes the need to specify each one individually.

ok doug@
2014-10-30 10:55:30 -05:00
Brent Cook
ccaf9cdd9c remove duplicate (and overlapping) .1 manpages
openssl.1 contains all of the information from the other application
manpages, and is the only one packaged in OpenBSD. So, remove the other
obsolete .1 manpages (and avoid overlapping system pages like passwd.1)
2014-10-26 09:23:03 -05:00
Brent Cook
54259e50a5 include a proper check for memmem when configuring unit tests
This allows the proper compatibility header definition to be exposed.
2014-10-22 12:37:06 -05:00
Brent Cook
2408253191 add extended ChangeLog file
help people more easily find the code and changes
2014-10-14 22:25:16 -05:00
Brent Cook
0534fffefa update to new converted SSL manpages 2014-10-14 20:43:30 -05:00
Brent Cook
3f944e83ff update for upstream move of the openssl app 2014-08-27 21:46:43 -05:00
Brent Cook
46b6df7cb0 remove configure.am.tpl, pull in VERSION directly
from wouter@
2014-08-12 21:17:41 -05:00
Brent Cook
d6a485d1a1 rebase on pull when updating the openbsd branch
this avoids inadvertent local merges
2014-08-08 07:32:38 -05:00
Brent Cook
c95574be92 tie master libressl branch to openbsd master
Added OPENBSD_BRANCH to set what branch update.sh should checkout.
2014-07-31 22:08:30 -05:00
Brent Cook
cd168d519b split big line 2014-07-28 07:50:48 -05:00
Brent Cook
0a74a4d464 add strndup/strnlen compat functions from OpenBSD 2014-07-28 07:07:23 -05:00
Brent Cook
ea6e7116c9 build openbsd memmem implementation for explicit_bzero test
memmem is not always available, and not all memmem's work the same way

ok beck@ guenther@
2014-07-21 20:29:49 -05:00
Brent Cook
451dbd967c compute absolute paths to source
removes relative path hackery

ok beck@ guenther@
2014-07-21 20:27:14 -05:00
Brent Cook
33bc05ca9c better handle disabled tests and exclude files
ok beck@ guenther@
2014-07-21 20:27:14 -05:00
Brent Cook
4335a49f51 use correct link order for app and tests
ok beck@ guenther@
2014-07-21 19:53:52 -05:00
Brent Cook
8a44ab84f0 preserve timestamps on copy from upstream checkout
this saves time on rebuilds when testing tarballs

ok beck@ guenther@
2014-07-21 19:53:28 -05:00
Brent Cook
9c2c499bf3 Use correct static link order for unit tests.
thanks to Jonas 'Sortie' Termansen

ok beck@
2014-07-20 16:30:44 -05:00
Brent Cook
1b1bce16b1 update to newly-refactored arc4random compatibility shims
the thread-private bits can move next

ok beck@
2014-07-18 09:19:23 -05:00
Brent Cook
477f1f0187 added fork_rand test to check for PID wraparound
ok beck@
2014-07-15 16:43:00 -05:00
Brent Cook
7f2fab20bc enable the asn1 test 2014-07-15 14:49:34 -05:00
Mark Kettenis
bbd51d0e32 give section 1 man pages a .1 suffix instead of .3
ok beck@
2014-07-14 16:09:18 +02:00
Bob Beck
e0386dd263 rc4_util.c went away
ok bcook@
2014-07-13 03:02:25 -06:00
Brent Cook
65944782c3 add platform libraries to libcompat's LIBADD list
ok beck@
2014-07-12 03:34:08 -05:00
Brent Cook
596ef45803 source library version from a common place, speed man builds
grab library version from VERSION file
build manpages only on changes

ok beck@
2014-07-12 04:02:35 -06:00
Brent Cook
09fdc9c09b source the proper man links file
otherwise, this picks up 'links' in the path
2014-07-11 10:51:28 -05:00
Brent Cook
8b125f31bb build strtonum directly into apps/openssl
it is not needed as a library export

ok beck@
2014-07-11 04:47:03 -05:00
Brent Cook
e1e636db22 prefer symlinks rather than hardlinks for manpages
ok beck@
2014-07-11 03:56:58 -05:00
Bob Beck
77b34fe012 Ignore .1 man pages, and fix update to include new opensslfeatures.h
ok bcook@
2014-07-11 10:08:57 -06:00
Brent Cook
d698dcfaa1 update manpage links list 2014-07-11 01:26:35 -05:00
Brent Cook
bc2d1a3255 fixes for manpage linker 2014-07-11 00:51:33 -05:00
Brent Cook
5acefa2f5a add manpages and links 2014-07-11 00:15:13 -05:00
Charlie Root
6d6c94a291 Actually get man pages. 2014-07-11 04:43:20 -06:00
Charlie Root
ab3d9838cd wording changes and initial stab at crypto man pages.
still need to get man links working and ssl and apps
man pages added.
2014-07-11 04:14:48 -06:00
Brent Cook
faaf265e84 build fixes and simplifications
switch from submodules to plain-old-clones
 remove broken biotest for now

ok beck@
2014-07-10 19:43:04 -05:00
Bob Beck
b3543f9c59 add LIBRESSL_GIT environment variable
Allows for eventual public github default, which can be easily
overridden by developers.
2014-07-10 08:05:45 -06:00
Bob Beck
985fdadd45 update script to work rebased on cvs.openbsd.org
ok bcook@
2014-07-10 07:36:19 -06:00