openssl/apps
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
..
demoSRP
include APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00
lib Add more negative checks for integers passed to OPENSSL_malloc(). 2021-04-16 12:10:08 +10:00
asn1pars.c
build.info
ca-cert.srl
ca-key.pem
ca-req.pem
ca.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00
CA.pl.in
cert.pem
ciphers.c Update copyright year 2021-02-18 15:05:17 +00:00
client.pem
cmp_mock_srv.c Update copyright year 2021-01-28 13:54:57 +01:00
cmp_mock_srv.h
cmp.c apps/cmp.c: Fix TLS hostname checking in case -server provides more than hostname 2021-04-17 11:39:12 +02:00
cms.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00
crl2p7.c crl2pkcs7 shouldn't include empty optional sets 2021-04-09 11:26:04 +02:00
crl.c Avoid going through NID when unnecessary 2021-04-01 14:39:54 +02:00
ct_log_list.cnf
dgst.c Add "origin" field to EVP_CIPHER, EVP_MD 2021-04-18 10:03:07 +02:00
dhparam.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00
dsa512.pem
dsa1024.pem
dsa-ca.pem
dsa-pca.pem
dsa.c Update copyright year 2021-02-18 15:05:17 +00:00
dsap.pem
dsaparam.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00
ec.c Rename OSSL_ENCODER_CTX_new_by_EVP_PKEY and OSSL_DECODER_CTX_new_by_EVP_PKEY 2021-02-17 15:26:12 +01:00
ecparam.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00
enc.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00
engine.c
errstr.c
fipsinstall.c Make fipsinstall -out flag optional 2021-03-24 17:46:40 +01:00
gendsa.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00
genpkey.c Fetch alg, etc., after loading providers 2021-02-12 08:34:17 +10:00
genrsa.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00
info.c
insta.ca.crt
kdf.c Update copyright year 2021-03-11 13:27:36 +00:00
list.c Fix naming for EVP_RAND_CTX_gettable functions. 2021-04-17 18:22:13 +10:00
mac.c apps: update mac to work with additional MAC_init arguments. This doesn't include the creation of new 'key' arguments. 2021-02-28 17:25:48 +10:00
nseq.c
ocsp.c Fix more certificate related lib_ctx settings. 2021-04-08 11:30:44 +10:00
openssl-vms.cnf
openssl.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00
openssl.cnf
passwd.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00
pca-cert.srl
pca-key.pem
pca-req.pem
pkcs7.c Update copyright year 2021-02-18 15:05:17 +00:00
pkcs8.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00
pkcs12.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00
pkey.c Handle NULL result of ERR_reason_error_string() in some apps 2021-02-22 08:49:52 +01:00
pkeyparam.c Update copyright year 2021-03-11 13:27:36 +00:00
pkeyutl.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00
prime.c
privkey.pem
progs.pl
rand.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00
rehash.c Update copyright year 2021-01-28 13:54:57 +01:00
req.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00
req.pem
rsa8192.pem
rsa.c Handle NULL result of ERR_reason_error_string() in some apps 2021-02-22 08:49:52 +01:00
rsautl.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00
s512-key.pem
s512-req.pem
s1024key.pem
s1024req.pem
s_client.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00
s_server.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00
s_time.c Update copyright year 2021-04-08 13:04:41 +01:00
server2.pem
server.pem
server.srl
sess_id.c
smime.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00
speed.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00
spkac.c
srp.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00
storeutl.c Update copyright year 2021-02-18 15:05:17 +00:00
testCA.pem
testdsa.h Replace OSSL_PARAM_BLD_free_params() with OSSL_PARAM_free(). 2021-04-12 16:55:30 +10:00
testrsa.h
timeouts.h
ts.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00
tsget.in
verify.c Update copyright year 2021-04-08 13:04:41 +01:00
version.c
vms_decc_init.c
x509.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00