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 Remove unnecessary trailing whitespace 2019-02-05 16:25:11 +01:00
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 Check non-option arguments 2020-12-15 11:47:17 +01:00
build.info Remove openssl provider app 2020-09-26 07:13:22 +10:00
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 Update copyright year 2020-04-23 13:55:52 +01:00
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 Rename OPENSSL_CTX prefix to OSSL_LIB_CTX 2020-10-15 11:59:53 +01:00
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 Remove unnecessary trailing whitespace 2019-02-05 16:25:11 +01:00
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 Check non-option arguments 2020-12-15 11:47:17 +01:00
errstr.c Check non-option arguments 2020-12-15 11:47:17 +01:00
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 Check non-option arguments 2020-12-15 11:47:17 +01:00
insta.ca.crt openssl-cmp.pod.in: Update and extend example using Insta Demo CA 2020-08-04 12:11:46 +02:00
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 Check non-option arguments 2020-12-15 11:47:17 +01:00
ocsp.c Fix more certificate related lib_ctx settings. 2021-04-08 11:30:44 +10:00
openssl-vms.cnf Check the configuration file by default 2020-11-05 20:45:20 +03:00
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 Check the configuration file by default 2020-11-05 20:45:20 +03:00
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 Check non-option arguments 2020-12-15 11:47:17 +01:00
privkey.pem
progs.pl OPENSSL_NO_GOST has nothing to do with low-level algos 2020-12-15 04:39:58 +01:00
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 Fix rsa8192.pem 2020-05-13 06:28:36 +02:00
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 Replace apps/server.pem with certificate with a sha256 signature. 2020-01-25 14:10:40 +01:00
server.srl
sess_id.c Check non-option arguments 2020-12-15 11:47:17 +01:00
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 Check non-option arguments 2020-12-15 11:47:17 +01:00
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 Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
timeouts.h Fix header file include guard names 2019-09-28 20:26:36 +02:00
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 apps/tsget.in: use the full version in the user agent string 2018-12-10 20:09:17 +01:00
verify.c Update copyright year 2021-04-08 13:04:41 +01:00
version.c Check non-option arguments 2020-12-15 11:47:17 +01:00
vms_decc_init.c VMS: move copy_argc to its own module and make it an aux source 2019-03-05 08:51:09 +01:00
x509.c APPS: make apps strict on app_RAND_load() and app_RAND_write() failure 2021-04-14 16:48:27 +02:00