Go to file
Matt Caswell b1558c0bc8 Don't store an HMAC key for longer than we need
The HMAC_CTX structure stores the original key in case the ctx is reused
without changing the key.

However, HMAC_Init_ex() checks its parameters such that the only code path
where the stored key is ever used is in the case where HMAC_Init_ex is
called with a NULL key and an explicit md is provided which is the same as
the md that was provided previously. But in that case we can actually reuse
the pre-digested key that we calculated last time, so we can refactor the
code not to use the stored key at all.

With that refactor done it is no longer necessary to store the key in the
ctx at all. This means that long running ctx's will not keep the key in
memory for any longer than required. Note though that the digested key
*is* still kept in memory for the duration of the life of the ctx.

Fixes #10743

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/10747)
2020-01-06 10:46:05 +00:00
.github Add a GitHub issue template for documentation issues 2019-10-30 17:46:00 +01:00
apps Fix disabled ecdsa in apps/speed 2020-01-05 10:35:46 +02:00
boringssl@2070f8ad91
Configurations Configurations/windows-makefile.tmpl: HTMLDOCS are files, not directories 2019-12-26 00:49:07 +01:00
crypto Don't store an HMAC key for longer than we need 2020-01-06 10:46:05 +00:00
demos Remove RANDFILE settings from configuration files 2019-11-24 08:35:14 +01:00
doc Move -nameopt to openssl.pod 2020-01-06 11:15:46 +08:00
engines Update source files for deprecation at 3.0 2019-11-07 11:37:25 +01:00
external/perl
fuzz Add support for otherName:NAIRealm in output 2019-12-11 22:29:19 +03:00
include Add AES_CBC_HMAC_SHA ciphers to providers. 2020-01-06 13:02:16 +10:00
krb5@890ca2f401 Update the krb5 submodule 2019-12-25 12:45:32 -08:00
ms
os-dep
providers Add AES_CBC_HMAC_SHA ciphers to providers. 2020-01-06 13:02:16 +10:00
pyca-cryptography@09403100de
ssl Update tls13_enc.c 2020-01-02 13:49:41 +01:00
test Don't store an HMAC key for longer than we need 2020-01-06 10:46:05 +00:00
tools
util Removed now documented stuff from util/missing*.txt 2019-12-26 00:45:12 +01:00
VMS
.gitattributes
.gitignore Add better support for using deprecated symbols internally 2019-12-13 10:09:49 +01:00
.gitmodules
.travis-apt-pin.preferences
.travis-create-release.sh
.travis.yml Temporarily disable the explicit enable-asan build 2019-12-27 21:48:53 +01:00
ACKNOWLEDGEMENTS
appveyor.yml Configure: Make --strict-warnings meaningful with MSVC cl 2019-11-02 11:00:13 +01:00
AUTHORS
build.info Add better support for using deprecated symbols internally 2019-12-13 10:09:49 +01:00
CHANGES Use a function to generate do-not-edit comment 2019-12-19 09:48:53 +01:00
config
config.com
configdata.pm.in configdata.pm.in: Don't try to quotify undefined values 2019-12-04 00:19:40 +01:00
Configure Deprecated crypto-mdebug-backtrace 2019-12-14 20:57:35 +01:00
CONTRIBUTING
e_os.h
FAQ
HACKING
INSTALL Deprecate most of debug-memory 2019-12-14 20:57:35 +01:00
LICENSE
NEWS Deprecate most of debug-memory 2019-12-14 20:57:35 +01:00
NOTES.ANDROID Remove spurious space from file. 2019-12-05 07:25:52 +10:00
NOTES.DJGPP
NOTES.PERL
NOTES.UNIX
NOTES.VALGRIND
NOTES.VMS
NOTES.WIN
README
README.ENGINE
README.FIPS
VERSION

 Copyright (c) 1998-2018 The OpenSSL Project
 Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
 All rights reserved.

 DESCRIPTION
 -----------

 The OpenSSL Project is a collaborative effort to develop a robust,
 commercial-grade, fully featured, and Open Source toolkit implementing the
 Transport Layer Security (TLS) protocols (including SSLv3) as well as a
 full-strength general purpose cryptographic library.

 OpenSSL is descended from the SSLeay library developed by Eric A. Young
 and Tim J. Hudson.

 The OpenSSL toolkit is licensed under the Apache License 2.0, which means
 that you are free to get and use it for commercial and non-commercial
 purposes as long as you fulfill its conditions.

 OVERVIEW
 --------

 The OpenSSL toolkit includes:

 libssl (with platform specific naming):
     Provides the client and server-side implementations for SSLv3 and TLS.

 libcrypto (with platform specific naming):
     Provides general cryptographic and X.509 support needed by SSL/TLS but
     not logically part of it.

 openssl:
     A command line tool that can be used for:
        Creation of key parameters
        Creation of X.509 certificates, CSRs and CRLs
        Calculation of message digests
        Encryption and decryption
        SSL/TLS client and server tests
        Handling of S/MIME signed or encrypted mail
        And more...

 INSTALLATION
 ------------

 See the appropriate file:
        INSTALL         Linux, Unix, Windows, OpenVMS, ...
        NOTES.*         INSTALL addendums for different platforms

 SUPPORT
 -------

 See the OpenSSL website www.openssl.org for details on how to obtain
 commercial technical support. Free community support is available through the
 openssl-users email list (see
 https://www.openssl.org/community/mailinglists.html for further details).

 If you have any problems with OpenSSL then please take the following steps
 first:

    - Download the latest version from the repository
      to see if the problem has already been addressed
    - Configure with no-asm
    - Remove compiler optimization flags

 If you wish to report a bug then please include the following information
 and create an issue on GitHub:

    - OpenSSL version: output of 'openssl version -a'
    - Configuration data: output of 'perl configdata.pm --dump'
    - OS Name, Version, Hardware platform
    - Compiler Details (name, version)
    - Application Details (name, version)
    - Problem Description (steps that will reproduce the problem, if known)
    - Stack Traceback (if the application dumps core)

 Just because something doesn't work the way you expect does not mean it
 is necessarily a bug in OpenSSL. Use the openssl-users email list for this type
 of query.

 HOW TO CONTRIBUTE TO OpenSSL
 ----------------------------

 See CONTRIBUTING

 LEGALITIES
 ----------

 A number of nations restrict the use or export of cryptography. If you
 are potentially subject to such restrictions you should seek competent
 professional legal advice before attempting to develop or distribute
 cryptographic code.