Commit graph

15285 commits

Author SHA1 Message Date
Dr Stephen Henson
7b548d3f11 Test for and use AES CSP for RSA if present.
Some keys are attached to the full RSA CSP which doesn't support SHA2
algorithms: uses the AES CSP if present.

Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-02-11 16:01:44 +00:00
Richard Levitte
64c443e3f0 Add support for shared_rcflag, useful for windres (Cygwin and Mingw)
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-11 16:50:01 +01:00
Richard Levitte
68ab559a50 Modernise the mingw cflags and ldflags
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-11 16:50:01 +01:00
Richard Levitte
e737d7b197 Unified build: Keep track of generated header files
If someone runs a mixed unixmake / unified environment (the unified
build tree would obviously be out of the source tree), the unified
build will pick up on the unixmake crypto/buildinf.h because of
assumptions made around this sort of declaration (found in
crypto/build.info):

    DEPENDS[cversion.o]=buildinf.h

The assumption was that if such a header could be found in the source
tree, that was the one to depend on, otherwise it would assume it
should be in the build tree.

This change makes sure that sort of mix-up won't happen again.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-11 16:48:32 +01:00
Richard Levitte
d20bb611d9 Remove the "make depend" message
It's not necessary for a pristine source, and a developer that makes
changes usually knows what to do.

Also, there was this mechanism that would do a "make depend"
automatically which hasn't been used for so many years.  Removed as
well.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-11 16:47:36 +01:00
Viktor Dukhovni
17a723885e Simplify ssl_cert_type() by taking advantage of X509_get0_pubkey
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-11 10:11:54 -05:00
Rich Salz
27f172d9a3 GH620: second diff from rt-2275, adds error code
clean up and apply patches from RT-2275

Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-11 09:33:51 -05:00
Rich Salz
143e5e50f2 Check malloc
Noticed by Claus Assmann <ca+ssl-dev@esmtp.org>

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-11 09:21:35 -05:00
Rich Salz
3577398360 Missing header include.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-11 08:47:57 -05:00
Rich Salz
7253fd550c Hide OPENSSL_INIT_SETTINGS.
Make OPENSSL_INIT_SETTINGS an opaque structure.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-11 08:43:46 -05:00
Richard Levitte
5caef3b502 Add inclusion directory crypto/include for BN compilations
Some files in crypto/bn depend on internal/bn_conf.h, and so does
test/bntest.  Therefore, we add another inclusion directory.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-11 14:39:57 +01:00
Richard Levitte
d94c444bcd The protocol variable has lost its use, remove it
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2016-02-11 14:13:01 +01:00
Richard Levitte
c72fb77ff2 Rework BIO_ADDRINFO_protocol() to return correct values
As noted already, some platforms don't fill in ai_protocol as
expected.  To circumvent that, we have BIO_ADDRINFO_protocol() to
compute a sensible answer in that case.

Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2016-02-11 14:13:01 +01:00
Matt Caswell
210ac68246 Fix errstr error code parsing
Error codes are printed in hex, and previous OpenSSL versions expected
the error codes to be provided to errstr in hex. In 1.1.0, for some
reason, it was expecting them to be decimal.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-11 08:53:11 +00:00
Richard Levitte
124cbe1887 Make comment match reality
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-11 03:04:50 +01:00
Dr. Stephen Henson
b1a99374ae use consistent error messages
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-11 00:59:48 +00:00
Dr. Stephen Henson
2ab7af7b08 Print out bad content octets.
If asn1parse doesn't like a structure print out the content octets
for diagnostic purposes.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-11 00:59:48 +00:00
Richard Levitte
e3e6a72ec8 After auto init, check that the deprecated functions exist before using
The functions that have been deprecated by the auto init changes are
now guarded with deprecation checks, so it's fairly easy to see if
they can be used.

In test/dtlsv1listentest, we simply remove all init and cleanup code,
as they are call automatically when needed.

Reviewed-by: Matt Caswell <matt@openssl.org>
2016-02-10 23:56:50 +01:00
Richard Levitte
fe072ed77c Change the VMS perl pointer from SF file store to the project page
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10 22:25:48 +01:00
Rich Salz
a4625290c3 After renaming init, update errors.
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-02-10 15:52:32 -05:00
Rich Salz
330fad61af BIO_PAIR_DEBUG did nothing; remove it.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-10 15:28:18 -05:00
Richard Levitte
968d1a2372 Use the protocol we know rather than BIO_ADDRINFO_protocol(res)
Because some platforms won't will in any value in ai_protocol, there's
no point using it if we already know what it should be.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10 20:58:18 +01:00
Richard Levitte
07aa1e0459 Don't assert protocol equality
It seems that some platforms' getaddrinfo don't fill in the
ai_protocol field properly.  On those, the assertion
'protocol == BIO_ADDRINFO_protocol(res)' will fail.  Best to remove
it.

Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2016-02-10 20:35:02 +01:00
Todd Short
1c37fd96d8 Add CHACHA20 alias for ciphers.
Update ciphers documentation as well (based on -04 rev of ID).

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Rich Salz <rsalz@openssl.org>

RT: #4206, GH: #642
2016-02-10 20:13:26 +01:00
Dmitry-Me
cc9c568946 Ensure allocation size fits into size_t
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Rich Salz <rsalz@openssl.org>

GH: #630
2016-02-10 20:13:26 +01:00
Dr. Stephen Henson
01a2ade05d typo
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10 19:04:08 +00:00
Richard Levitte
f4a748a17d Produce buildinf.h on Windows the same way as on Unix
Because ENGINESDIR and OPENSSLDIR typically contains backslashes, they
need to be escaped just right.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10 19:36:48 +01:00
Richard Levitte
076e596ffb Quote the CFLAG in Unixly Makefiles, for buildinf.h
Because the command line definitions of OPENSSLDIR and ENGINESDIR
contain quotes, we need a variant of CFLAG where backslashes and
quotes are escaped when we produce buildinf.h

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10 19:36:48 +01:00
Richard Levitte
9ca2529dbf Make sure to escape backslashes and single quotes for buildinf.h
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10 19:36:48 +01:00
Richard Levitte
e09621ff57 Make it possible to get ENGINESDIR info from OpenSSL_versions
Have apps/openssl display the result along with OPENSSLDIR

As part of this, add ENGINESDIR in util/mk1mf.pl

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10 19:36:48 +01:00
Matt Caswell
9cc55ddda5 Add some documentation about init after deinit
Attempting to init after deinit is an error. Update the documentation
accordingly.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10 17:40:59 +00:00
Matt Caswell
068f07fe75 Update CHANGES following init function renaming
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10 17:40:59 +00:00
Matt Caswell
302f75887e Attempt to log an error if init failed
If init failed we'd like to set an error code to indicate that. But if
init failed then when the error system tries to load its strings its going
to fail again. We could get into an infinite loop. Therefore we just set
a single error the first time around. After that no error is set.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10 17:40:59 +00:00
Matt Caswell
0fc32b0718 The new init functions can now fail so shouldn't be void
The new init functions can fail if the library has already been stopped. We
should be able to indicate failure with a 0 return value.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10 17:40:59 +00:00
Matt Caswell
8bd8221be8 Variable was declared static when it shouldn't be
The local variable tmp was declared static when it shouldn't be. This
is in the no-threads implementation, and it was immediately initialised
to something else on every invokation of the function so it doesn't break
anything...but still shouldn't be there.

Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2016-02-10 17:37:11 +00:00
Viktor Dukhovni
5e136d7abf Improve recent option help string additions
Make these more correct, concise and less tautological.

Reviewed-by: Stephen Henson <steve@openssl.org>
2016-02-10 12:34:39 -05:00
Viktor Dukhovni
d33def6624 Deprecate the -issuer_checks debugging option
This was a developer debugging feature and was never a useful public
interface.

Added all missing X509 error codes to the verify(1) manpage, but
many still need a description beyond the associated text string.

Sorted the errors in x509_txt.c by error number.

Reviewed-by: Stephen Henson <steve@openssl.org>
2016-02-10 12:34:06 -05:00
Richard Levitte
056be06b4d The guard macro to be defined didn't match the guard macro checked
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-02-10 18:02:59 +01:00
Rich Salz
f69e29e2c2 Update unified build after store removal
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2016-02-10 10:42:08 -05:00
Rich Salz
f672aee494 Rename INIT funtions, deprecate old ones.
Man, there were a lot of renamings :)

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-10 09:37:03 -05:00
Rich Salz
ea7736a093 No dynamic-init fix; merge goof.
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-02-10 08:45:22 -05:00
Richard Levitte
907d2c2f62 unified build system: add CHANGES & NEWS
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10 14:41:43 +01:00
Richard Levitte
f578075a93 unified build scheme: rewrite INSTALL.VMS
There is more to be added, but this will at least tell people how to try.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10 14:36:32 +01:00
Richard Levitte
0f53f939a1 clean away old VMS cruft
The old building scripts get removed, they are hopelessly gone in bit
rot by now.

Also remove the old symbol hacks.  They were needed needed to shorten
some names to 31 characters, and to resolve other symbol clashes.
Because we now compile with /NAMES=(AS_IS,SHORTENED), this is no
longer required.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10 14:36:32 +01:00
Richard Levitte
e84193e43d unified build scheme: add a "unified" template for VMS descrip.mms
As part of this, change util/mkdef.pl to stop adding libraries to
depend on in its output.  mkdef.pl should ONLY output a symbol
vector.

Because symbol names can't be longer than 31 characters, we use the
compiler to shorten those that are longer down to 23 characters plus
an 8 character CRC.  To make sure users of our header files will pick
up on that automatically, add the DEC C supported extra headers files
__decc_include_prologue.h and __decc_include_epilogue.h.

Furthermore, we add a config.com, so VMS people can configure just as
comfortably as any Unix folks, thusly:

    @config

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10 14:36:32 +01:00
Richard Levitte
9c44c29ef2 unified build scheme: add instructions for travis to build with --unified
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10 14:36:04 +01:00
Richard Levitte
242ffb05a2 unified build scheme: Try to nudge users to try the "unified" build
This commit SHALL be reverted before final release.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10 14:36:04 +01:00
Richard Levitte
fcf80c469a unified build scheme: add the tweaks to build on Cygwin & Mingw
Cygwin and Mingw name their libraries a bit differently from the rest
of the POSIXly universe, we need to adapt to that.

In Makefile.tmpl, it means that some hunks will only be output
conditionally.

This also means that shared_extension for the Cygwin and Mingw
configurations in Configurations/10-main.conf are changing from .dll.a
to .dll.  Makefile.shared does a fine job without having them
specified, and it's much easier to work with tucking an extra .a at
the end of files in the installation recipes than any amount of name
rewrites, especially with the support of the SHARED_NAME in the top
build.info.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10 14:36:04 +01:00
Richard Levitte
567a9e6fe0 unified build scheme: add a "unified" template for Unix Makefile
This also adds all the raw sections needed for some files.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10 14:36:04 +01:00
Richard Levitte
deb02194d2 unified build scheme: give util/dofile.pl the possibility to output selectively
Under certain conditions, one might not want to output certain
sections of a template file.  This adds the functions output_off() and
output_on(), reachable inside the templates.  And example usage in a
Makefile template could be this:

	@ : {- output_off() if $config{no_shared}; "" -}
	... lines dealing with shared libraries
	@ : {- output_on() -}

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10 14:36:04 +01:00