guenther [Wed, 16 Apr 2014 15:10:07 +0000 (15:10 +0000)]
Kill the bogus "send an SSLv3/TLS hello in SSLv2 format" crap from
the SSLv23_* client code. The server continues to accept it. It
also kills the bits for SSL2 SESSIONs; even when the server gets
an SSLv2-style compat handshake, the session that it creates has
the correct version internally.
ok tedu@ beck@
jsing [Wed, 16 Apr 2014 15:00:28 +0000 (15:00 +0000)]
More KNF.
florian [Wed, 16 Apr 2014 14:43:43 +0000 (14:43 +0000)]
My previous attempt to chdir(2) to the directory containing the cgi
script was not quite right. slowcgi would try to chdir("") with a
SCRIPT_NAME of /foo.cgi; chdir("/") in that case.
I'm not sure how one would configure nginx/slowcgi to get to that
point though.
OK benno@
zhuk [Wed, 16 Apr 2014 14:39:05 +0000 (14:39 +0000)]
Whitespace tweaks before further tweaks; no objections from ajacoutot@.
beck [Wed, 16 Apr 2014 14:31:03 +0000 (14:31 +0000)]
Make this byzantine horror a shell of it's former self by stubbing the
functions. The ability to set the debug mem functions died with mem.c,
but some of the rest of this is still exposed API so we can't delete it..
yet...
ok tedu@
krw [Wed, 16 Apr 2014 13:57:58 +0000 (13:57 +0000)]
OpenSSL is not the only place with bloated code! Remove unused
function 'option_as_string()'.
reyk [Wed, 16 Apr 2014 13:57:14 +0000 (13:57 +0000)]
Some software expects RAND_status() to return 1 for success, so always
return 1 in the arc4random backend because there is no possible error
condition. Unbreaks lynx, git and friends.
ok miod@ dcoppa@
krw [Wed, 16 Apr 2014 13:12:22 +0000 (13:12 +0000)]
Tweak network interface configuration so that after 1st attempted
(rather than first successfull) configuration, the default selection
becomes [done]. This allows one to <cr> past network configuration.
e.g. when dhcp is not working.
Requested by deraadt@. ok halex@.
mpi [Wed, 16 Apr 2014 13:04:38 +0000 (13:04 +0000)]
Merge in_fixaddr() into in_selectsrc() in order to prepare for
IP_SENDSRCADDR support. This reduces the differences with the
IPv6 version and kill some comments that are no longer true.
ok jca@, chrisz@, mikeb@
jsing [Wed, 16 Apr 2014 13:01:09 +0000 (13:01 +0000)]
Clean up non-fatal error handling - we know which error numbers we have
defined.
ok miod@ beck@
sthen [Wed, 16 Apr 2014 12:08:46 +0000 (12:08 +0000)]
unbreak install; /usr/share/man/man3/EVP_PKEY_print_private.3 should link to
/usr/share/man/man3/EVP_PKEY_print_public.3 not itself, from deraadt
aoyama [Wed, 16 Apr 2014 12:01:33 +0000 (12:01 +0000)]
Add generic driver for "NEC PC-9801(*) extension board slot" on
LUNA-88K.
LUNA-88K{,2} has one or two slot(s) that can attach the extension
board designed for PC-9801. This driver provides dedicated mmap(2)
and capability for waiting specified interrupt on that slot so that we
can use the extension board from userland program.
(*)PC-9801 is a Japanese popular personal computer, mainly used in
1980-90's. (see http://en.wikipedia.org/wiki/NEC_PC-9801)
ok miod@, and man pages jmc@
guenther [Wed, 16 Apr 2014 10:52:58 +0000 (10:52 +0000)]
It's been a quarter century: we can assume volatile is present with that name.
zhuk [Wed, 16 Apr 2014 10:31:27 +0000 (10:31 +0000)]
Make directory ordering in our libtool stable. Fixes quiet a few issues
ajacoutot@, me and probably others were seeing. No fallout in bulk build.
Input from espie@ and ajacoutot@.
Prodding by ajacoutot@
Bulk test by jasper@
mpi [Wed, 16 Apr 2014 09:50:10 +0000 (09:50 +0000)]
Sync the list of man pages for libcrypto, explicity rename conflicting
pages instead of doing it in the Makefiles and move a libssl page where
it belongs.
ok miod@
mpi [Wed, 16 Apr 2014 09:41:43 +0000 (09:41 +0000)]
Remove pointless man pages that were not installed.
ok miod@
blambert [Wed, 16 Apr 2014 08:52:28 +0000 (08:52 +0000)]
close memory leaks in snmp client code
ok reyk@
jsg [Wed, 16 Apr 2014 08:29:22 +0000 (08:29 +0000)]
adapt to test file moves
md2test and rsatest targets removed as the files have been removed
jsg [Wed, 16 Apr 2014 08:25:06 +0000 (08:25 +0000)]
adapt to the less old des api
nicm [Wed, 16 Apr 2014 08:02:31 +0000 (08:02 +0000)]
Because we pass the file descriptor from client to server, tmux can't
usefully work if stdin is /dev/tty. Complain about it more clearly.
jsg [Wed, 16 Apr 2014 05:57:05 +0000 (05:57 +0000)]
sync with iked chap_ms.c
jsg [Wed, 16 Apr 2014 05:49:55 +0000 (05:49 +0000)]
des_cblock -> DES_cblock
miod [Wed, 16 Apr 2014 05:16:39 +0000 (05:16 +0000)]
Upgrade from des_old misery
miod [Wed, 16 Apr 2014 04:59:56 +0000 (04:59 +0000)]
More des_foo -> DES_foo
miod [Wed, 16 Apr 2014 04:38:11 +0000 (04:38 +0000)]
Remove _CRAY references. Note that this pleads for the use of <stdint.h>
fixed-width types instead of choosing int or long depending upon what we
think the architecture support.
miod [Wed, 16 Apr 2014 04:31:32 +0000 (04:31 +0000)]
Remove DES_read_password and DES_read_2passwords which are `modern' flavours
of des_old.h routines, acting as wrappers about the OpenSSL UI API.
Nothing should use these functions directly.
Riding the recent libcrypto major bump (in a `des' car).
miod [Wed, 16 Apr 2014 04:17:29 +0000 (04:17 +0000)]
This was subtly using des_old.h defines (des_key_schedule) without using any
of its routines. Trivial fix, since des_old.h used to mention
#define des_key_schedule DES_key_schedule
beck [Wed, 16 Apr 2014 03:24:53 +0000 (03:24 +0000)]
Your operating system memory allocation functions are your friend. If they
are not please fix your operating system. Replace mem.c with an API-compatible
wrapper that just calls the system functions and does not allow a one word
modification of a variable in a running shared library to turn on memory
debug functions that expose things that should not be seen.
ok tedu@
tedu [Wed, 16 Apr 2014 03:24:47 +0000 (03:24 +0000)]
dead file
tedu [Wed, 16 Apr 2014 03:21:29 +0000 (03:21 +0000)]
API compat fix. RAND_load_file can never fail now. discovered and ok beck.
tedu [Wed, 16 Apr 2014 02:51:01 +0000 (02:51 +0000)]
missed vms comment
tedu [Wed, 16 Apr 2014 02:50:09 +0000 (02:50 +0000)]
first round of unifdef hammering
tedu [Wed, 16 Apr 2014 02:42:05 +0000 (02:42 +0000)]
Remove non-posix support. Why is OPENSSL_isservice even here?
Is this a crypto library or a generic platform abstraction library?
"A hack to make Visual C++ 5.0 work correctly" ... time to upgrade.
tedu [Wed, 16 Apr 2014 02:14:27 +0000 (02:14 +0000)]
spray the apps directory with anti-VMS napalm.
so that its lovecraftian horror is not forever lost, i reproduce below
a comment from the deleted code.
/* 2011-03-22 SMS.
* If we have 32-bit pointers everywhere, then we're safe, and
* we bypass this mess, as on non-VMS systems. (See ARGV,
* above.)
* Problem 1: Compaq/HP C before V7.3 always used 32-bit
* pointers for argv[].
* Fix 1: For a 32-bit argv[], when we're using 64-bit pointers
* everywhere else, we always allocate and use a 64-bit
* duplicate of argv[].
* Problem 2: Compaq/HP C V7.3 (Alpha, IA64) before ECO1 failed
* to NULL-terminate a 64-bit argv[]. (As this was written, the
* compiler ECO was available only on IA64.)
* Fix 2: Unless advised not to (VMS_TRUST_ARGV), we test a
* 64-bit argv[argc] for NULL, and, if necessary, use a
* (properly) NULL-terminated (64-bit) duplicate of argv[].
* The same code is used in either case to duplicate argv[].
* Some of these decisions could be handled in preprocessing,
* but the code tends to get even uglier, and the penalty for
* deciding at compile- or run-time is tiny.
*/
tedu [Wed, 16 Apr 2014 01:43:06 +0000 (01:43 +0000)]
strncpy(d, s, strlen(s)) is a special kind of stupid. even when it's right,
it looks wrong. replace with auditable code and eliminate many strlen calls
to improve efficiency. (wait, did somebody say FASTER?) ok beck
matthew [Wed, 16 Apr 2014 01:35:37 +0000 (01:35 +0000)]
Remove disabled code that wouldn't work now that cleanse_ptr was
removed.
Also, fix some nearby KNF nits that were bothering me.
ok beck
dlg [Wed, 16 Apr 2014 01:28:02 +0000 (01:28 +0000)]
set ourselves up to respect the max data transfer size.
dlg [Wed, 16 Apr 2014 01:19:28 +0000 (01:19 +0000)]
print the board name and firmware revision like we do on mpii and
nvme and other stuff.
schwarze [Wed, 16 Apr 2014 00:33:24 +0000 (00:33 +0000)]
Pass the function flags SQLITE_UTF8 (because SQLITE_ANY is deprecated)
and SQLITE_DETERMINISTIC when creating deterministic functions;
best practice measure suggested by espie@ and jeremy@;
as expected by jeremy@, no measurable effect on performance.
dlg [Wed, 16 Apr 2014 00:26:59 +0000 (00:26 +0000)]
have nvme_poll return the status bigs from the completion ring
entry. if i ever implement timeouts ill use high bits in the int
or the phase bit to indicate non chip related errors. a successful
chip status conveniently maps to 0. how handy.
this lets me move the completion handling for the controller
identification commands back into the caller. at the moment im just
printing out controller and firmware details like we do on
mfi/mpii/mfii.
mcbride [Wed, 16 Apr 2014 00:13:30 +0000 (00:13 +0000)]
KNF
tedu [Wed, 16 Apr 2014 00:03:52 +0000 (00:03 +0000)]
you do not want to do the things this program does
schwarze [Tue, 15 Apr 2014 23:47:57 +0000 (23:47 +0000)]
At the end of mansearch(), fchdir() back to where we started from;
this is cleaner and helps to not scatter gmon.out files all over
the place when profiling.
tedu [Tue, 15 Apr 2014 23:20:08 +0000 (23:20 +0000)]
strip this to the bone
deraadt [Tue, 15 Apr 2014 23:09:33 +0000 (23:09 +0000)]
Three wrappers in this file: OPENSSL_strncasecmp, OPENSSL_strcasecmp,
and OPENSSL_memcmp.
All modern systems have strncasecmp. No need to rewrite it.
Same with memcmp, call the system one! It is more likely to be hot
in the icache, and is specifically optimized for the platform. I
thought these OpenSSL people cared about performance?
ok tedu
tedu [Tue, 15 Apr 2014 23:04:49 +0000 (23:04 +0000)]
use explicit_bzero instead of a bizarro "no compiler could ever be smart
enough to optimize this" monstrosity.
schwarze [Tue, 15 Apr 2014 23:01:34 +0000 (23:01 +0000)]
remove documentation of the former macro key "NAME";
it got deleted with mansearch.h rev. 1.8
beck [Tue, 15 Apr 2014 22:49:20 +0000 (22:49 +0000)]
remove BIO_snprintf usage - convert to snprintf.
Interestingly this fixes a bug, as the code appears to have been
assuming that BIO_snprintf returns what snprintf does when it does not.
ok tedu@
tedu [Tue, 15 Apr 2014 22:45:37 +0000 (22:45 +0000)]
remove md2, jpake, and seed clutter.
tedu [Tue, 15 Apr 2014 22:44:15 +0000 (22:44 +0000)]
don't even pretend to build md2, seed, or jpake
ok beck deraadt
beck [Tue, 15 Apr 2014 22:43:53 +0000 (22:43 +0000)]
o_dir.c had a very funny odor. all users of this now use standard functions.
consign it to the Attic.
ok deraadt@
deraadt [Tue, 15 Apr 2014 22:37:36 +0000 (22:37 +0000)]
Remove wraparounds for operating systems which lack issetugid().
I will note that some were missing, looking at you Solaris!!! Anyone home?
Using my own copyright on the file now, since this is a rewrite of
a trivial wrapper around a system call I invented.
ok beck
andre [Tue, 15 Apr 2014 22:35:11 +0000 (22:35 +0000)]
Print hashkey to debug output, this helps hash-action use cases to be tested.
Use log_debug() instead of log_info().
ok reyk@
reyk [Tue, 15 Apr 2014 22:12:43 +0000 (22:12 +0000)]
All the other old Makefiles are gone, so also remove unused engines
Makefile. The directory is empty and will silently disappear in the
Attic (but there are more engines in another directory).
tedu [Tue, 15 Apr 2014 21:55:38 +0000 (21:55 +0000)]
My mailbox is full of shock.
tedu [Tue, 15 Apr 2014 21:47:56 +0000 (21:47 +0000)]
remove ssl2 support even more completely.
in the process, always include ssl3 and tls1, we don't need config options
for them. when the time comes to expire ssl3, it will be with an ax.
checked by miod
tedu [Tue, 15 Apr 2014 21:45:43 +0000 (21:45 +0000)]
the VMS code is legion
tedu [Tue, 15 Apr 2014 21:34:05 +0000 (21:34 +0000)]
$infile="/home/eay/ssl/SSLeay/MINFO";
I wonder when these scripts were last used...
jmc [Tue, 15 Apr 2014 21:21:20 +0000 (21:21 +0000)]
note some unsupported features, and clean up some macros - in particular,
whack a dose of unneccessary Em;
ok millert
tedu [Tue, 15 Apr 2014 21:17:50 +0000 (21:17 +0000)]
we don't use this makefile
miod [Tue, 15 Apr 2014 21:17:14 +0000 (21:17 +0000)]
The more you remove Chtulhu^WVMS tentacles, the more there are
tedu [Tue, 15 Apr 2014 21:04:52 +0000 (21:04 +0000)]
we don't use these files for building
jmc [Tue, 15 Apr 2014 21:00:13 +0000 (21:00 +0000)]
document which bits are xsi; ok millert sobrado
miod [Tue, 15 Apr 2014 20:55:42 +0000 (20:55 +0000)]
Remove workarounds for ld reaching MAXDSIZ on vax, now that MAXDSIZ is
more comfortable.
Reminded by brad@
tedu [Tue, 15 Apr 2014 20:49:00 +0000 (20:49 +0000)]
12 years ago, old_des.h was used to provide compatibility with libdes.
The man page says "Compatibility des_ functions are provided for a short
while" and indeed even the original commit message says "The compatibility
functions will be removed in some future release, at the latest in
version 1.0." So here we are, a short while later.
Now I've only been an OpenBSD developer for 11 years, one year less than
this header has existed, but in that brief time, I've learned a thing or
two about deleting obsolete code. It doesn't delete itself. And worse,
people will continue using it until you force them onto a better path.
deraadt [Tue, 15 Apr 2014 20:36:27 +0000 (20:36 +0000)]
sync
tedu [Tue, 15 Apr 2014 20:33:39 +0000 (20:33 +0000)]
imake died in a fire a long time ago
tedu [Tue, 15 Apr 2014 20:23:37 +0000 (20:23 +0000)]
repair some whitespace
miod [Tue, 15 Apr 2014 20:20:59 +0000 (20:20 +0000)]
Crank major for libcrypto and libssl; more symbol removals to occur during the
next few moments, don't rush your update.
Requested by deraadt@
miod [Tue, 15 Apr 2014 20:19:55 +0000 (20:19 +0000)]
The NO_ASN1_OLD define was introduced in 0.9.7, 8 years ago, to allow for
obsolete (and mostly internal) routines to be compiled out.
We don't expect any reasonable software to stick to these interfaces, so better
clean up the view and unifdef -DNO_ASN1_OLD.
The astute reader will notice the existence of NO_OLD_ASN1 which serves a
similar purpose, but is more entangled. Its time will come, soon.
beck [Tue, 15 Apr 2014 20:14:23 +0000 (20:14 +0000)]
convert BIO_snprintf to snprintf
ok deraadt@ tedu@
miod [Tue, 15 Apr 2014 20:13:07 +0000 (20:13 +0000)]
Just like every web browser expands until it can read mail, every modular
library expands until it has its own dlfcn wrapper, and libcrypto is no
exception.
Remove the non-dlfcn DSO methods.
This causes public DSO_METHOD_{beos,dl,vms,win32} to disappear (major bump
coming soon). Note that portable software ought to use DSO_METHOD_openssl
instead of picking the backend directly (which makes one wonder why the
backends are exposed, as it is unlikely that more than one can work on
your system).
ok beck@ deraadt@
tedu [Tue, 15 Apr 2014 20:06:09 +0000 (20:06 +0000)]
remove FIPS mode support. people who require FIPS can buy something that
meets their needs, but dumping it in here only penalizes the rest of us.
ok beck deraadt
miod [Tue, 15 Apr 2014 20:00:04 +0000 (20:00 +0000)]
Q: How would you like your lies, sir?
A: Rare.
miod [Tue, 15 Apr 2014 19:59:36 +0000 (19:59 +0000)]
Go home, VMS, you're drunk
tedu [Tue, 15 Apr 2014 19:42:56 +0000 (19:42 +0000)]
remove FIPS mode support. people who require FIPS can buy something that
meets their needs, but dumping it in here only penalizes the rest of us.
ok miod
miod [Tue, 15 Apr 2014 18:55:21 +0000 (18:55 +0000)]
In EC_POINT_invert(), actually check the correct function pointer for NULL
before attempting to invoke it; trivial one-liner in OpenSSL RT #2569 ignored
for 2.5 years.
miod [Tue, 15 Apr 2014 18:53:13 +0000 (18:53 +0000)]
No longer mention OPENSSL_EC_BIN_PT_COMP being required to allow for
`compressed' EC point representation.
First, as researched by djb, quoting from http://cr.yp.to/ecdh/patents.html :
``It should, in any case, be obvious to the reader that a patent cannot
cover compression mechanisms published seven years before the patent
was filed.''
Second, that define was actually removed from the code in in OpenSSL 1.0.0.
miod [Tue, 15 Apr 2014 18:10:10 +0000 (18:10 +0000)]
No licence.
sobrado [Tue, 15 Apr 2014 18:08:58 +0000 (18:08 +0000)]
add a STANDARDS section; pointed out by jmc@
miod [Tue, 15 Apr 2014 18:08:41 +0000 (18:08 +0000)]
Moved to regress/lib/libcrypto.
reyk [Tue, 15 Apr 2014 18:02:05 +0000 (18:02 +0000)]
Remove the GOST engine: It is not compiled or used and depends on the
"dynamic engine" feature that is not enabled in our build. People who
need it can still pull it out of the Attic; if it is to have a Russian
engine just because it's a Russian engine.
OK deraadt@ beck@
miod [Tue, 15 Apr 2014 18:01:42 +0000 (18:01 +0000)]
+libcrypto
miod [Tue, 15 Apr 2014 18:01:15 +0000 (18:01 +0000)]
Import the OpenSSL libcrypto tests in a form suitable for our rergress
infrastructure.
The following tests have not been imported, for their code lacks a licence:
asn1, rsa, sha256, sha512, wp.
beck [Tue, 15 Apr 2014 17:46:16 +0000 (17:46 +0000)]
Send the rotIBM stream cipher (ebcdic) to Valhalla to party for eternity
with the bearded ones...
some API's that nobody should be using will dissapear with this commit.
jmc [Tue, 15 Apr 2014 17:27:37 +0000 (17:27 +0000)]
- get the spacing right for -e, -i, -n, and -s
- macro cleanup
ok millert sobrado
jsing [Tue, 15 Apr 2014 17:25:41 +0000 (17:25 +0000)]
Toss a `unifdef -U OPENSSL_SYS_WINDOWS' bomb into crypto/bio.
ok miod@
jsing [Tue, 15 Apr 2014 17:24:25 +0000 (17:24 +0000)]
First pass at applying KNF to the OpenSSL code, which almost makes it
readable. This pass is whitespace only and can readily be verified using
tr and md5.
beck [Tue, 15 Apr 2014 17:20:09 +0000 (17:20 +0000)]
As we now remove it permanently, we no longer need NO_WINDOWS_BRAINDEATH
as a build time option...
ok deraadt@ miod@
miod [Tue, 15 Apr 2014 17:11:21 +0000 (17:11 +0000)]
No need to define DEVRANDOM and DEVRANDOM_EGD any longer.
jsing [Tue, 15 Apr 2014 17:10:21 +0000 (17:10 +0000)]
Remove VMS code.
ok miod@ beck@
jmc [Tue, 15 Apr 2014 17:02:54 +0000 (17:02 +0000)]
flesh out STANDARDS; ok millert sobrado
miod [Tue, 15 Apr 2014 16:52:50 +0000 (16:52 +0000)]
Replace the old OpenSSL PRNG by direct use of arc4random_buf(), keeping the
existing RAND interfaces unchanged.
All interfaces allowing external feed or seed of the RNG (either from a file
or a local entropy gathering daemon) are kept for ABI compatibility, but are
no longer do anything.
While the OpenSSL PRNG was required 15+ years ago when many systems lacked
proper entropy collection, things have evolved and one can reasonably assume
it is better to use the kernel (system global) entropy pool rather than trying
to build one's own and having to compensate for thread scheduling...
<RANT>
Whoever thought that RAND_screen(), feeding the PRNG with the contents of the
local workstation's display, under Win32, was a smart idea, ought to be banned
from security programming.
</RANT>
ok beck@ deraadt@ tedu@
deraadt [Tue, 15 Apr 2014 16:45:42 +0000 (16:45 +0000)]
remove a test directory. If anyone wants something this again, this is
the wrong place and it will need heavy lifting. Love the .bat files
and the reference to pre-draft pthreads code at MIT.
ok beck
jsing [Tue, 15 Apr 2014 16:37:21 +0000 (16:37 +0000)]
First pass at applying KNF to the OpenSSL code, which almost makes it
readable. This pass is whitespace only and can readily be verified using
tr and md5.
beck [Tue, 15 Apr 2014 16:22:30 +0000 (16:22 +0000)]
Convert some BIO_snprintf() to (void) snprintf - as although these ones
save the return value, the value is actually ignored.
ok deraadt@
beck [Tue, 15 Apr 2014 16:21:04 +0000 (16:21 +0000)]
Part 1 of eliminating BIO_snprintf(). This fixes mechanical conversions
where the return value is ignored changing to (void) snprintf.
ok deraadt@
sobrado [Tue, 15 Apr 2014 15:35:24 +0000 (15:35 +0000)]
add -s (two-byte signed decimal display) to od(1), as mandated by POSIX;
remove cross reference to strings(1), it only made sense in the context of
the old 4.3BSD od(1)'s -s flag.
ok jmc@, millert@
jsing [Tue, 15 Apr 2014 14:38:10 +0000 (14:38 +0000)]
First pass at applying KNF to the OpenSSL code, which almost makes it
readable. This pass is whitespace only and can readily be verified using
tr and md5.
jsing [Tue, 15 Apr 2014 13:41:53 +0000 (13:41 +0000)]
First pass at applying KNF to the OpenSSL code, which almost makes it
readable. This pass is whitespace only and can readily be verified using
tr and md5.