openssl/engines
Rich Salz f6c95e46c0 Add "origin" field to EVP_CIPHER, EVP_MD
Add a "where did this EVP_{CIPHER,MD} come from" flag: global, via fetch,
or via EVP_{CIPHER,MD}_meth_new.  Update EVP_{CIPHER,MD}_free to handle all
three origins. The flag is deliberately right before some function pointers,
so that compile-time failures (int/pointer) will occur, as opposed to
taking a bit in the existing "flags" field.  The "global variable" flag
is non-zero, so the default case of using OPENSSL_zalloc (for provider
ciphers), will do the right thing. Ref-counting is a no-op for
Make up_ref no-op for global MD and CIPHER objects

Deprecate EVP_MD_CTX_md().  Added EVP_MD_CTX_get0_md() (same semantics as
the deprecated function) and EVP_MD_CTX_get1_md().  Likewise, deprecate
EVP_CIPHER_CTX_cipher() in favor of EVP_CIPHER_CTX_get0_cipher(), and add
EVP_CIPHER_CTX_get1_CIPHER().

Refactor EVP_MD_free() and EVP_MD_meth_free() to call new common
evp_md_free_int() function.
Refactor EVP_CIPHER_free() and EVP_CIPHER_meth_free() to call new common
evp_cipher_free_int() function.

Also change some flags tests to explicit test == or != zero. E.g.,
        if (flags & x) --> if ((flags & x) != 0)
        if (!(flags & x)) --> if ((flags & x) == 0)
Only done for those lines where "get0_cipher" calls were made.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14193)
2021-04-18 10:03:07 +02:00
..
asm
build.info MSBLOB & PVK: Make it possible to write EVP_PKEYs with provided internal key 2020-12-17 12:02:08 +01:00
e_afalg_err.c ERR: Rebuild all generated error headers and source files 2020-11-24 15:22:33 +01:00
e_afalg_err.h Update copyright year 2021-02-18 15:05:17 +00:00
e_afalg.c Add "origin" field to EVP_CIPHER, EVP_MD 2021-04-18 10:03:07 +02:00
e_afalg.ec
e_afalg.h
e_afalg.txt Update copyright year 2021-02-18 15:05:17 +00:00
e_capi_err.c ERR: Rebuild all generated error headers and source files 2020-11-24 15:22:33 +01:00
e_capi_err.h Update copyright year 2021-02-18 15:05:17 +00:00
e_capi.c Don't clear the whole error stack when loading engines 2020-11-06 10:34:48 +00:00
e_capi.ec
e_capi.txt Update copyright year 2021-02-18 15:05:17 +00:00
e_dasync_err.c ERR: Rebuild all generated error headers and source files 2020-11-24 15:22:33 +01:00
e_dasync_err.h Update copyright year 2021-02-18 15:05:17 +00:00
e_dasync.c Don't clear the whole error stack when loading engines 2020-11-06 10:34:48 +00:00
e_dasync.ec
e_dasync.txt Update copyright year 2021-02-18 15:05:17 +00:00
e_devcrypto.c Fix build of /dev/crypto engine with no-dynamic-engine option 2021-03-01 12:02:42 +01:00
e_loader_attic_err.c
e_loader_attic_err.h Update copyright year 2021-02-18 15:05:17 +00:00
e_loader_attic.c Update copyright year 2021-01-28 13:54:57 +01:00
e_loader_attic.ec
e_loader_attic.txt Update copyright year 2021-02-18 15:05:17 +00:00
e_ossltest_err.c ERR: Rebuild all generated error headers and source files 2020-11-24 15:22:33 +01:00
e_ossltest_err.h Update copyright year 2021-02-18 15:05:17 +00:00
e_ossltest.c Add test to demonstrate the app's new engine key loading 2020-12-02 20:19:41 +01:00
e_ossltest.ec
e_ossltest.txt Update copyright year 2021-02-18 15:05:17 +00:00
e_padlock.c Don't clear the whole error stack when loading engines 2020-11-06 10:34:48 +00:00