openbsd
7 years agoSwitch 802.11 crypto over to the new AES
mikeb [Tue, 2 May 2017 17:07:06 +0000 (17:07 +0000)]
Switch 802.11 crypto over to the new AES

OK stsp@

7 years agorsa1 is no longer valid;
jmc [Tue, 2 May 2017 17:04:09 +0000 (17:04 +0000)]
rsa1 is no longer valid;

7 years agoStricter pledge for bpf. ok deraadt
natano [Tue, 2 May 2017 16:46:00 +0000 (16:46 +0000)]
Stricter pledge for bpf. ok deraadt

7 years agoRemove check for compatible property here as well.
kettenis [Tue, 2 May 2017 15:13:20 +0000 (15:13 +0000)]
Remove check for compatible property here as well.

7 years agoRemove check for compatible property. Turns out sunxi relied on the broken
kettenis [Tue, 2 May 2017 14:45:26 +0000 (14:45 +0000)]
Remove check for compatible property.  Turns out sunxi relied on the broken
check we had before rev 1.16.

Suggested by jmatthew@

7 years agoLinux switched from a device-specific pinctrl binding to a the generic version
kettenis [Tue, 2 May 2017 14:38:36 +0000 (14:38 +0000)]
Linux switched from a device-specific pinctrl binding to a the generic version
for Allwinner devices.  Implement support for the latter such that we can
use newer device trees.

ok patrick@

7 years agoadd PubKeyAcceptedKeyTypes to the -o list: scp(1) has it, so i guess
jmc [Tue, 2 May 2017 14:06:37 +0000 (14:06 +0000)]
add PubKeyAcceptedKeyTypes to the -o list: scp(1) has it, so i guess
this should too;

7 years agoremove now obsolete protocol1 options from the -o lists;
jmc [Tue, 2 May 2017 13:44:51 +0000 (13:44 +0000)]
remove now obsolete protocol1 options from the -o lists;

7 years agoRevise MDIO driver code so that device instances can be attached
visa [Tue, 2 May 2017 13:26:49 +0000 (13:26 +0000)]
Revise MDIO driver code so that device instances can be attached
using fdt. This lets the system utilize multiple MDIO controllers.

This patch enables all RJ45 Ethernet ports on EdgeRouter Pro.
The SFP module slots do not work yet.

OK kettenis@, jmatthew@

7 years agoProvide pluggable queueing interface for pf
mikeb [Tue, 2 May 2017 12:27:37 +0000 (12:27 +0000)]
Provide pluggable queueing interface for pf

By hiding H-FSC behind pfq_ops structure similar to the ifq_ops,
we provide a possibility to plug alternative queueing interfaces
for use in pf.  This reduces amount of H-FSC specific code in the
pf ioctl handler

While here, change the the order of elements in hfsc_class_stats
to provide some compatibility between queue stat structures of
different traffic conditioners.

No objections from henning@, ok sthen@

7 years agoSwitch glxsb(4), VIA padlock and AES-NI drivers over to the new AES
mikeb [Tue, 2 May 2017 11:47:49 +0000 (11:47 +0000)]
Switch glxsb(4), VIA padlock and AES-NI drivers over to the new AES

7 years agoSync GMAC and AES-CTR/-XTS regress tests with the new AES code
mikeb [Tue, 2 May 2017 11:46:00 +0000 (11:46 +0000)]
Sync GMAC and AES-CTR/-XTS regress tests with the new AES code

ok djm

7 years agoSwitch OCF and IPsec over to the new AES
mikeb [Tue, 2 May 2017 11:44:32 +0000 (11:44 +0000)]
Switch OCF and IPsec over to the new AES

ok djm

7 years agoPick the right AES source file
mikeb [Tue, 2 May 2017 11:33:48 +0000 (11:33 +0000)]
Pick the right AES source file

7 years agoFix a problem with associating to wifi networks with a hidden SSID.
stsp [Tue, 2 May 2017 11:03:48 +0000 (11:03 +0000)]
Fix a problem with associating to wifi networks with a hidden SSID.

If an AP is configured to hide its SSID it sends a non-zero length SSID
which contains only zeroes. The AP sends its actual SSID only in probe
responses after a client includes this SSID in a probe request.
If we happened to receive a beacon before the probe response we stored a
non-zero-length SSID of zeroes and never updated the SSID when the probe
response arrived. The client was then unable to find the AP.

test & ok jung@

7 years agoResynchronize the guest RTC via vmmci(4) on host resume from zzz/ZZZ
mlarkin [Tue, 2 May 2017 09:51:19 +0000 (09:51 +0000)]
Resynchronize the guest RTC via vmmci(4) on host resume from zzz/ZZZ
(vmd part)

This feature is for OpenBSD guests only.

ok reyk, kettenis

7 years agoResynchronize the guest RTC via vmmci(4) on host resume from zzz/ZZZ
mlarkin [Tue, 2 May 2017 09:50:38 +0000 (09:50 +0000)]
Resynchronize the guest RTC via vmmci(4) on host resume from zzz/ZZZ
(kernel part)

This feature is for OpenBSD guests only.

ok reyk, kettenis

7 years agomore -O shuffle; ok djm
jmc [Tue, 2 May 2017 09:05:58 +0000 (09:05 +0000)]
more -O shuffle; ok djm

7 years agoremove -1 / -2 options; pointed out by jmc@
djm [Tue, 2 May 2017 08:54:19 +0000 (08:54 +0000)]
remove -1 / -2 options; pointed out by jmc@

7 years agoremove options -12 from usage();
jmc [Tue, 2 May 2017 08:06:33 +0000 (08:06 +0000)]
remove options -12 from usage();

7 years agofix an error in i386 vmd build
mlarkin [Tue, 2 May 2017 07:19:53 +0000 (07:19 +0000)]
fix an error in i386 vmd build

7 years agoMatching i386 commit to previous amd64 commit (initial support for vmctl
mlarkin [Tue, 2 May 2017 07:18:19 +0000 (07:18 +0000)]
Matching i386 commit to previous amd64 commit (initial support for vmctl
send/receive)

7 years agotidy up -O somewhat; ok djm
jmc [Tue, 2 May 2017 07:13:31 +0000 (07:13 +0000)]
tidy up -O somewhat; ok djm

7 years agothe XXXfree functions being called accept NULL, so don't check first.
deraadt [Tue, 2 May 2017 04:11:08 +0000 (04:11 +0000)]
the XXXfree functions being called accept NULL, so don't check first.
ok beck

7 years agoAdd regress for free functions that should be safe with NULL
beck [Tue, 2 May 2017 04:03:06 +0000 (04:03 +0000)]
Add regress for free functions that should be safe with NULL

7 years agouse freezero() instead of memset/explicit_bzero + free. Substantially
deraadt [Tue, 2 May 2017 03:59:44 +0000 (03:59 +0000)]
use freezero() instead of memset/explicit_bzero + free.  Substantially
reduces conditional logic (-218, +82).

MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH cache alignment calculation bn/bn_exp.c
wasn'tt quite right.  Two other tricky bits with ASN1_STRING_FLAG_NDEF and
BN_FLG_STATIC_DATA where the condition cannot be collapsed completely.

Passes regress.  ok beck

7 years agoMatching vmd(8) part of previous diff (first part of vmctl send/receive).
mlarkin [Tue, 2 May 2017 02:58:24 +0000 (02:58 +0000)]
Matching vmd(8) part of previous diff (first part of vmctl send/receive).

ok kettenis

7 years agoAllow setting of guest MSRs from vmd(8). This change is the first part of
mlarkin [Tue, 2 May 2017 02:57:46 +0000 (02:57 +0000)]
Allow setting of guest MSRs from vmd(8). This change is the first part of
a larger effort to implement vmctl send/vmctl receive (snapshot and VM
migration).

From Pratik Vyas, Siri Chandana, Harshada Mone and Ashwin Agrawal, a
group of students I am supervising.

ok kettenis

7 years agoA few days ago, a patch from <G dot Branden dot Robinson at gmail dot com>
schwarze [Mon, 1 May 2017 23:27:23 +0000 (23:27 +0000)]
A few days ago, a patch from <G dot Branden dot Robinson at gmail dot com>
got committed to groff which changed .TP from using .it to using .itc,
such that groff now supports more than one man(7) macro line in the .TP
head if all but the last line in the head end with \c.

Of course, relying on that behaviour is utterly non-portable, but if
authors are reckless enough to use that idiom, let's do what they want.

7 years agowhen freeing a bitmap, zero all it bytes; spotted by Ilya Kaliman
djm [Mon, 1 May 2017 22:09:48 +0000 (22:09 +0000)]
when freeing a bitmap, zero all it bytes; spotted by Ilya Kaliman

7 years agoWhen trying to expand some columns in a table where the sum of the
schwarze [Mon, 1 May 2017 20:53:58 +0000 (20:53 +0000)]
When trying to expand some columns in a table where the sum of the
widths of the remaining columns is already wider than the line
length, underflowing size_t and dying from ENOMEM is the wrong plan.
Instead, simply refrain from expanding anything in such a situation,
avoiding a crash that tb@ found with afl.

7 years agoQuiet an "implicit conversion from 'int' to 'char' changes value"
millert [Mon, 1 May 2017 19:05:49 +0000 (19:05 +0000)]
Quiet an "implicit conversion from 'int' to 'char' changes value"
warning from clang.

7 years agoRevert r1.170 and remove the id==0 check.
rpe [Mon, 1 May 2017 16:23:42 +0000 (16:23 +0000)]
Revert r1.170 and remove the id==0 check.
The id binary is not available in nfs diskless setups at this point.

reported by Andreas Kusalananda, thanks.
discussed with deraadt@

7 years agomove some binutils files from gcc sets back to md sets
jsg [Mon, 1 May 2017 14:43:46 +0000 (14:43 +0000)]
move some binutils files from gcc sets back to md sets
ok deraadt@

7 years agoApply same change of defaultroute handling as in r1.179 of netstart.
rpe [Mon, 1 May 2017 14:29:39 +0000 (14:29 +0000)]
Apply same change of defaultroute handling as in r1.179 of netstart.

Now that routes are automatically G/C with the address they are
attached to there's no reason to duplicate the kernel's job.

7 years agoRemove last remnants of rtsol. IPv6 autoconfiguration of interfaces is now
rpe [Mon, 1 May 2017 14:23:29 +0000 (14:23 +0000)]
Remove last remnants of rtsol. IPv6 autoconfiguration of interfaces is now
done in ifstart(). Remove ipv6autoconf() and replace rtsolif with a boolean
variable V6_AUTOCONF. Replace dhcpif with a boolean variable V4_DHCPCONF.
Both are later used in defaultroute() to decide whether or not to configre
defaultroutes from /etc/mygate.

OK krw@

7 years agoRemove last remnants of rtsol. IPv6 autoconfiguration of interfaces
rpe [Mon, 1 May 2017 14:22:36 +0000 (14:22 +0000)]
Remove last remnants of rtsol. IPv6 autoconfiguration of interfaces
is now done in ifstart(). Replace rtsolif with a boolean variable
V6_AUTOCONF. Replace dhcpif with a boolean variable V4_DHCPCONF.
Both are later used to decide whether or not to configre defaultroutes
from /etc/mygate.

OK krw@

7 years agothis one I did forget to "cvs rm"
djm [Mon, 1 May 2017 14:08:26 +0000 (14:08 +0000)]
this one I did forget to "cvs rm"

7 years agoComments and spacing.
rpe [Mon, 1 May 2017 14:01:47 +0000 (14:01 +0000)]
Comments and spacing.

7 years agomove more gcc files to gcc sets
jsg [Mon, 1 May 2017 13:44:59 +0000 (13:44 +0000)]
move more gcc files to gcc sets
ok deraadt@

7 years agoIn order that people can use formats like #D in #() in the status line
nicm [Mon, 1 May 2017 12:20:55 +0000 (12:20 +0000)]
In order that people can use formats like #D in #() in the status line
and not have to wait for an update when they change pane, we allow
commands to run more than once a second if the expanded form
changes. Unfortunately this can mean them being run far too often
(pretty much continually) when multiple clients exist, because some
formats (including #D) will always differ between clients.

To avoid this, give each client its own tree of jobs which means that
the same command will be different instances for each client - similar
to how we have the tag to separate commands for different panes.

GitHub issue 889; test case reported by Paul Johnson.

7 years agoin function used for tracing, display unknown lookup types as "???"
gilles [Mon, 1 May 2017 09:29:07 +0000 (09:29 +0000)]
in function used for tracing, display unknown lookup types as "???"

diff from Wolf480pl

7 years agodon't know why cvs didn't exterminate these the first time around,
djm [Mon, 1 May 2017 09:27:45 +0000 (09:27 +0000)]
don't know why cvs didn't exterminate these the first time around,
I use rm -f and everuthing...

pointed out by sobrado@

7 years agoFewer kgdb(7) references and fix previous.
mpi [Mon, 1 May 2017 06:39:25 +0000 (06:39 +0000)]
Fewer kgdb(7) references and fix previous.

Pointed by jmc@

7 years agoupdate currency exchange rates;
jmc [Mon, 1 May 2017 06:23:59 +0000 (06:23 +0000)]
update currency exchange rates;

7 years agoremove unused variable
djm [Mon, 1 May 2017 02:27:11 +0000 (02:27 +0000)]
remove unused variable

7 years agoDocument that wait3/waitpid can receive SIGCHILD when wpid does
millert [Mon, 1 May 2017 00:08:31 +0000 (00:08 +0000)]
Document that wait3/waitpid can receive SIGCHILD when wpid does
not exist or is not a child of the calling process.
Document what happens when SIGCHLD is ignored or SA_NOCLDWAIT is
set in sa_flags (this part from FreeBSD).
OK guenther@

7 years agofixup setting ciphercontext->plaintext (lost in SSHv1 purge), though
djm [Mon, 1 May 2017 00:03:18 +0000 (00:03 +0000)]
fixup setting ciphercontext->plaintext (lost in SSHv1 purge), though
it isn't really used for much anymore.

7 years agosync
deraadt [Sun, 30 Apr 2017 23:54:43 +0000 (23:54 +0000)]
sync

7 years agoeliminate explicit specification of protocol in tests and loops over
djm [Sun, 30 Apr 2017 23:34:55 +0000 (23:34 +0000)]
eliminate explicit specification of protocol in tests and loops over
protocol. We only support SSHv2 now.

7 years agoremove SSHv1 support from unit tests
djm [Sun, 30 Apr 2017 23:33:48 +0000 (23:33 +0000)]
remove SSHv1 support from unit tests

7 years agoflense SSHv1 support from ssh-agent, considerably simplifying it
djm [Sun, 30 Apr 2017 23:29:10 +0000 (23:29 +0000)]
flense SSHv1 support from ssh-agent, considerably simplifying it

ok markus

7 years agoobliterate ssh1.h and some dead code that used it
djm [Sun, 30 Apr 2017 23:28:41 +0000 (23:28 +0000)]
obliterate ssh1.h and some dead code that used it

ok markus@

7 years agoexterminate the -1 flag from scp
djm [Sun, 30 Apr 2017 23:28:12 +0000 (23:28 +0000)]
exterminate the -1 flag from scp

ok markus@

7 years agopurge the last traces of SSHv1 from the TTY modes handling code
djm [Sun, 30 Apr 2017 23:26:54 +0000 (23:26 +0000)]
purge the last traces of SSHv1 from the TTY modes handling code

ok markus

7 years agoremove the (in)famous SSHv1 CRC compensation attack detector.
djm [Sun, 30 Apr 2017 23:26:16 +0000 (23:26 +0000)]
remove the (in)famous SSHv1 CRC compensation attack detector.

Despite your cameo in The Matrix movies, you will not be missed.

ok markus

7 years agoundo some local debugging stuff that I committed by accident
djm [Sun, 30 Apr 2017 23:25:03 +0000 (23:25 +0000)]
undo some local debugging stuff that I committed by accident

7 years agoremove SSHv1 support from packet and buffer APIs
djm [Sun, 30 Apr 2017 23:23:54 +0000 (23:23 +0000)]
remove SSHv1 support from packet and buffer APIs

ok markus@

7 years agoremove SSHv1-related buffers from client code
djm [Sun, 30 Apr 2017 23:21:54 +0000 (23:21 +0000)]
remove SSHv1-related buffers from client code

7 years agoremove KEY_RSA1
djm [Sun, 30 Apr 2017 23:18:44 +0000 (23:18 +0000)]
remove KEY_RSA1

ok markus@

7 years agoremove SSHv1 configuration options and man pages bits
djm [Sun, 30 Apr 2017 23:18:22 +0000 (23:18 +0000)]
remove SSHv1 configuration options and man pages bits

ok markus@

7 years agoremove SSH1 make flag and associated files
djm [Sun, 30 Apr 2017 23:17:37 +0000 (23:17 +0000)]
remove SSH1 make flag and associated files
ok markus@

7 years agoremove SSHv1 ciphers; ok markus@
djm [Sun, 30 Apr 2017 23:15:04 +0000 (23:15 +0000)]
remove SSHv1 ciphers; ok markus@

7 years agoremove compat20/compat13/compat15 variables
djm [Sun, 30 Apr 2017 23:13:25 +0000 (23:13 +0000)]
remove compat20/compat13/compat15 variables

ok markus@

7 years agoremove options.protocol and client Protocol configuration knob
djm [Sun, 30 Apr 2017 23:11:45 +0000 (23:11 +0000)]
remove options.protocol and client Protocol configuration knob

ok markus@

7 years agounifdef WITH_SSH1
djm [Sun, 30 Apr 2017 23:10:43 +0000 (23:10 +0000)]
unifdef WITH_SSH1
ok markus@

7 years agoMake early attrbute work here as well. Remove unreachable panic while there.
kettenis [Sun, 30 Apr 2017 22:35:33 +0000 (22:35 +0000)]
Make early attrbute work here as well.  Remove unreachable panic while there.

ok visa@, patrick@, drahn@

7 years agoFix priority handling. The interrupt priority registers expose the full range
kettenis [Sun, 30 Apr 2017 21:52:40 +0000 (21:52 +0000)]
Fix priority handling.  The interrupt priority registers expose the full range
of priorities available in secure mode (minimally 32).  For non-secure
interrupts we need to make sure the top bit is set and shift our interrupt
priority level into the remaining bits.  The priority mask register on the
other hand only exposes the priority levels available to the mode from which
it is accessed.  So when accessed from non-secure mode, we need to shift our
interrupt priority level by a different amount.

Also set the binary point register to zero to make sure the maximum number of
available bits are used for the priority group and priority masking actually
works as expected.

This makes the FireFly-RK3399 boot multi-user with the root filesystem on USB.

ok drahn@

7 years agoSwitch AES testcase to the new implementation
mikeb [Sun, 30 Apr 2017 21:34:45 +0000 (21:34 +0000)]
Switch AES testcase to the new implementation

OK djm@

7 years agoConstant time AES implementation
mikeb [Sun, 30 Apr 2017 21:33:02 +0000 (21:33 +0000)]
Constant time AES implementation

This introduces a 32-bit constant time AES implementation from
Thomas Pornin originally for BearSSL and then adjusted by Thomas
and myself to fit OpenBSD kernel. One of the additional features
is an API for encryption and decryption subkey expansion in the
format specified by NIST in FIPS 197.

Tested by myself and naddy@, ok djm@

7 years agosync
deraadt [Sun, 30 Apr 2017 21:15:46 +0000 (21:15 +0000)]
sync

7 years agoMove FlexLexer.h from /usr/include/g++ to /usr/include. It is not
millert [Sun, 30 Apr 2017 20:30:39 +0000 (20:30 +0000)]
Move FlexLexer.h from /usr/include/g++ to /usr/include.  It is not
a g++-specific header and this matches most other systems.  Needed
to use flex++ with clang.  OK espie@ kettenis@

7 years agoRemove KGDB references.
mpi [Sun, 30 Apr 2017 20:09:27 +0000 (20:09 +0000)]
Remove KGDB references.

7 years agoRemove some KGDB leftovers.
mpi [Sun, 30 Apr 2017 20:04:42 +0000 (20:04 +0000)]
Remove some KGDB leftovers.

From Amit Kulkarni.

7 years agoDo not try to delete a default route before adding it.
mpi [Sun, 30 Apr 2017 19:37:13 +0000 (19:37 +0000)]
Do not try to delete a default route before adding it.

Now that route are automatically G/C with the address they are attached
to there's no reason to duplicate the kernel's job.

Fix a regression introduced with multipath default routes.

ok deraadt@

7 years agoNo original OpenSSL code remains in this file. Relicense
beck [Sun, 30 Apr 2017 17:54:11 +0000 (17:54 +0000)]
No original OpenSSL code remains in this file. Relicense

7 years agowhitespace
beck [Sun, 30 Apr 2017 17:46:27 +0000 (17:46 +0000)]
whitespace

7 years agoAdd rkclock(4), a driver for the Rockchip RK3399 clocks.
kettenis [Sun, 30 Apr 2017 17:42:32 +0000 (17:42 +0000)]
Add rkclock(4), a driver for the Rockchip RK3399 clocks.

7 years agoRename Debugger() into db_enter().
mpi [Sun, 30 Apr 2017 16:45:45 +0000 (16:45 +0000)]
Rename Debugger() into db_enter().

Using a name with the 'db_' prefix makes it invisible from the dynamic
profiler.

ok deraadt@, kettenis@, visa@

7 years agosync
deraadt [Sun, 30 Apr 2017 15:17:28 +0000 (15:17 +0000)]
sync

7 years agoMention that escaping "^" as "\(ha" in source code samples improves
schwarze [Sun, 30 Apr 2017 15:05:27 +0000 (15:05 +0000)]
Mention that escaping "^" as "\(ha" in source code samples improves
portability, in particular when rendering to formats such as PDF
with real typesetters such as groff.

While here, make it even more explicit that the rendering of raw
ASCII accents ( ` ' ~ ^ ) found in the input is kind of a mess and
varies among implementations, software versions, macro sets, and
output devices.

Issue noticed when reading the groff_char(7) manual, and confirmed
by testing with current groff.

OK bentley@, "certainly no objection" jmc@

N.B.: Nobody will get scolded for ignoring this subtlety.

7 years agoAdd xhci@fdt, and move ehci(4) from the sunxi block to the generic block.
kettenis [Sun, 30 Apr 2017 14:03:44 +0000 (14:03 +0000)]
Add xhci@fdt, and move ehci(4) from the sunxi block to the generic block.

7 years agoAdd rkgrf(4), a driver that makes the "generic register file" of the Rockchip
kettenis [Sun, 30 Apr 2017 14:00:06 +0000 (14:00 +0000)]
Add rkgrf(4), a driver that makes the "generic register file" of the Rockchip
RK3399 available to other drivers through the regmap interface.

7 years agoMake early attrbute work here as well. Remove unreachable panic while there.
kettenis [Sun, 30 Apr 2017 13:54:00 +0000 (13:54 +0000)]
Make early attrbute work here as well.  Remove unreachable panic while there.

ok visa@

7 years agoTweak error message when running on an unsupported release.
ajacoutot [Sun, 30 Apr 2017 13:41:10 +0000 (13:41 +0000)]
Tweak error message when running on an unsupported release.

7 years agoUnifdef KGDB.
mpi [Sun, 30 Apr 2017 13:04:49 +0000 (13:04 +0000)]
Unifdef KGDB.

It doesn't compile und hasn't been working during the last decade.

ok kettenis@, deraadt@

7 years agoCheck that unsupported operation returns ENOSYS.
mpi [Sun, 30 Apr 2017 10:11:03 +0000 (10:11 +0000)]
Check that unsupported operation returns ENOSYS.

7 years agoReturn ENOSYS for unsupported operation.
mpi [Sun, 30 Apr 2017 10:10:21 +0000 (10:10 +0000)]
Return ENOSYS for unsupported operation.

7 years agoRegression tests for futex(2).
mpi [Sun, 30 Apr 2017 09:03:58 +0000 (09:03 +0000)]
Regression tests for futex(2).

7 years agoAdd futex(2) shim, bump minor.
mpi [Sun, 30 Apr 2017 09:01:14 +0000 (09:01 +0000)]
Add futex(2) shim, bump minor.

Inputs from guenther@, ok kettenis@, visa@

7 years agoMake BIO_get_host_ip just yet another getaddrinfo wrapper
beck [Sun, 30 Apr 2017 05:43:05 +0000 (05:43 +0000)]
Make BIO_get_host_ip just yet another getaddrinfo wrapper

7 years agoRework BIO_accept to be more like modern code.
beck [Sun, 30 Apr 2017 05:09:22 +0000 (05:09 +0000)]
Rework BIO_accept to be more like modern code.
ok jsing@

7 years agoOnly enable -Werror on libcrypto/libssl/libtls if we are building with
jsing [Sun, 30 Apr 2017 04:44:58 +0000 (04:44 +0000)]
Only enable -Werror on libcrypto/libssl/libtls if we are building with
gcc4. This should avoid failed builds while transitioning compilers.
While here also make the CFLAGS blocks consistent across makefiles.

Discussed with deraadt@, ok beck@

7 years agoRemove unused POW status functions. Makes clang happier.
visa [Sun, 30 Apr 2017 04:32:58 +0000 (04:32 +0000)]
Remove unused POW status functions. Makes clang happier.

7 years agoSwitch back to freezero() and explicitly initialise data_len to zero. The
jsing [Sun, 30 Apr 2017 04:21:53 +0000 (04:21 +0000)]
Switch back to freezero() and explicitly initialise data_len to zero. The
previous code was safe since data would always be NULL if data_len was
uninitialised, however compilers cannot know this.

7 years agoMicrosoft Windows hates BIO_get_accept_socket in portable. Fix it to
beck [Sun, 30 Apr 2017 04:18:58 +0000 (04:18 +0000)]
Microsoft Windows hates BIO_get_accept_socket in portable. Fix it to
not be awful or have any claims on supporting ipv6 when it does so
very badly
ok jsing@

7 years agoAdd missing tls_init() and tls_free() calls.
jsing [Sun, 30 Apr 2017 03:53:31 +0000 (03:53 +0000)]
Add missing tls_init() and tls_free() calls.

7 years agoAdd a tls_keypair_clear_key() function that uses freezero() to make key
jsing [Sun, 30 Apr 2017 02:10:22 +0000 (02:10 +0000)]
Add a tls_keypair_clear_key() function that uses freezero() to make key
material inaccessible, then call it from the appropriate places.

ok beck@

7 years agoFix a bug caused by the return value being set early to signal successful
jsing [Sat, 29 Apr 2017 23:38:49 +0000 (23:38 +0000)]
Fix a bug caused by the return value being set early to signal successful
DTLS cookie validation. This can mask a later failure and result in a
positive return value being returned from ssl3_get_client_hello(), when
it should return a negative value to propagate the error.

Ironically this was introduced in OpenSSL 2e9802b7a7b with the commit
message "Fix DTLS cookie management bugs".

Fix based on OpenSSL.

Issue reported by Nicolas Bouliane <nbouliane at jive dot com>.

ok beck@

7 years agoRevert previous - we still want to do this, but I forgot about the installer
beck [Sat, 29 Apr 2017 22:31:42 +0000 (22:31 +0000)]
Revert previous - we still want to do this, but I forgot about the installer
and want to avoid the wrath of theo when he arrives home in a couple
of hours :)