openssl/crypto
Todd Short 37933acbea Add SSL/SSL_CTX_use_cert_and_key()
Add functions that will do the work of assigning certificate, privatekey
and chain certs to an SSL or SSL_CTX. If no privatekey is given, use the
publickey. This will permit the keys to pass validation for both ECDSA
and RSA. If a private key has already been set for the certificate, it
is discarded. A real private key can be set later.

This is an all-or-nothing setting of these parameters. Unlike the
SSL/SSL_CTX_use_certificate() and SSL/SSL_CTX_use_PrivateKey() functions,
the existing cert or privatekey is not modified (i.e. parameters copied).
This permits the existing cert/privatekey to be replaced.

It replaces the sequence of:
* SSL_use_certificate()
* SSL_use_privatekey()
* SSL_set1_chain()
And may actually be faster, as multiple checks are consolidated.

The private key can be NULL, if so an ENGINE module needs to contain the
actual private key that is to be used.

Note that ECDH (using the certificate's ECDSA key) ciphers do not work
without the private key being present, based on how the private key is
used in ECDH. ECDH does not offer PFS; ECDHE ciphers should be used instead.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/1130)
2018-03-09 10:28:04 -06:00
..
aes Always use adr with __thumb2__. 2018-02-27 18:46:33 -05:00
aria
asn1 Integrate X448 and Ed448 into libcrypto 2018-03-02 10:14:31 +00:00
async Copyright update of more files that have changed this year 2018-01-19 13:34:03 +01:00
bf Harmonize the make variables across all known platforms families 2018-02-14 17:13:53 +01:00
bio Update copyright year 2018-02-27 13:59:42 +00:00
blake2
bn bnrand_range: Always call bnrand() with the correct flag 2018-03-06 18:32:35 +01:00
buffer
camellia Harmonize the make variables across all known platforms families 2018-02-14 17:13:53 +01:00
cast Harmonize the make variables across all known platforms families 2018-02-14 17:13:53 +01:00
chacha Harmonize the make variables across all known platforms families 2018-02-14 17:13:53 +01:00
cmac
cms Check for malloc failure 2017-11-27 14:47:42 -05:00
comp Add comments to NULL func ptrs in bio_method_st 2017-12-18 07:04:48 +10:00
conf Add support for .include directive in config files 2018-03-05 13:32:40 +00:00
ct
des Harmonize the make variables across all known platforms families 2018-02-14 17:13:53 +01:00
dh Support public key and param check in EVP interface 2017-11-20 07:20:30 +01:00
dsa
dso
ec ec/curve448/f_generic.c: fix VC-WIN32 debug build failure. 2018-03-03 22:03:44 +01:00
engine Fix issues in ia32 RDRAND asm leading to reduced entropy 2018-03-08 10:27:49 -05:00
err Add SSL/SSL_CTX_use_cert_and_key() 2018-03-09 10:28:04 -06:00
evp Integrate X448 and Ed448 into libcrypto 2018-03-02 10:14:31 +00:00
hmac
idea
include/internal Integrate X448 and Ed448 into libcrypto 2018-03-02 10:14:31 +00:00
kdf
lhash Remove unused num.pl,segregnam scripts 2018-02-22 15:36:27 -05:00
md2
md4
md5 Harmonize the make variables across all known platforms families 2018-02-14 17:13:53 +01:00
mdc2
modes Harmonize the make variables across all known platforms families 2018-02-14 17:13:53 +01:00
objects Add GOST OIDs for Edwards parameter sets 2018-03-07 13:14:59 -05:00
ocsp Update copyright year 2018-02-13 13:59:25 +00:00
pem
perlasm Copyright update of more files that have changed this year 2018-01-19 13:34:03 +01:00
pkcs7
pkcs12
poly1305 Update copyright year 2018-02-27 13:59:42 +00:00
rand Check the parent DRBG's strength 2018-03-06 18:34:23 +01:00
rc2
rc4 Make a few more asm modules conform: last argument is output file 2018-03-08 19:31:41 +01:00
rc5 Harmonize the make variables across all known platforms families 2018-02-14 17:13:53 +01:00
ripemd Harmonize the make variables across all known platforms families 2018-02-14 17:13:53 +01:00
rsa Test the result of CMS_RecipientInfo_ktri_get0_algs() before using its output in rsa_cms_encrypt(). 2018-03-01 09:05:42 -06:00
seed
sha Make a few more asm modules conform: last argument is output file 2018-03-08 19:31:41 +01:00
siphash
sm3 SM3: restructure to EVP internal and update doc to right location 2017-11-06 07:21:15 +08:00
sm4
srp
stack
store STORE 'file' scheme loader: Add search capibility 2018-02-23 07:40:42 +01:00
ts
txt_db
ui Removre comment with user's name 2017-11-08 10:37:52 -05:00
whrlpool Harmonize the make variables across all known platforms families 2018-02-14 17:13:53 +01:00
x509 Integrate X448 and Ed448 into libcrypto 2018-03-02 10:14:31 +00:00
x509v3 Update copyright year 2018-02-27 13:59:42 +00:00
alphacpuid.pl
arm64cpuid.pl Update copyright year 2018-02-13 13:59:25 +00:00
arm_arch.h Update copyright year 2018-02-13 13:59:25 +00:00
armcap.c crypto/armcap.c: mask SHA512 hardware detection on iOS. 2018-03-06 23:18:24 +01:00
armv4cpuid.pl
build.info Display the library building flags 2018-03-09 14:07:59 +01:00
c64xpluscpuid.pl Many spelling fixes/typo's corrected. 2017-11-11 19:03:10 -05:00
cpt_err.c
cryptlib.c Make OPENSSL_rdtsc universally available. 2018-02-07 10:08:15 +10:00
ctype.c
cversion.c Fix SOURCE_DATE_EPOCH bug; use UTC 2017-11-27 14:34:14 -05:00
dllmain.c
ebcdic.c
ex_data.c Update copyright year 2018-02-13 13:59:25 +00:00
ia64cpuid.S
init.c OPENSSL_cleanup: cleanup secure memory 2018-02-13 17:32:54 +01:00
LPdir_nyi.c
LPdir_unix.c
LPdir_vms.c
LPdir_win32.c
LPdir_win.c
LPdir_wince.c
mem_clr.c
mem_dbg.c Update copyright year 2018-02-13 13:59:25 +00:00
mem_sec.c mem_sec.c: portability fixup. 2018-03-03 22:14:19 +01:00
mem.c Avoid unconditional store in CRYPTO_malloc. 2018-03-06 13:21:49 -05:00
mips_arch.h
o_dir.c
o_fips.c
o_fopen.c
o_init.c
o_str.c
o_time.c
pariscid.pl
ppc_arch.h
ppccap.c
ppccpuid.pl
s390x_arch.h s390x assembly pack: add KMAC code path for aes-ccm 2018-02-06 19:39:52 +01:00
s390xcap.c
s390xcpuid.pl s390x assembly pack: implement OPENSSL_rdtsc as STCKF 2018-02-13 20:34:38 +01:00
sparc_arch.h
sparccpuid.S
sparcv9cap.c Create a prototype for OPENSSL_rdtsc 2017-11-25 14:30:11 +01:00
threads_none.c
threads_pthread.c
threads_win.c
uid.c
vms_rms.h
x86_64cpuid.pl Fix issues in ia32 RDRAND asm leading to reduced entropy 2018-03-08 10:27:49 -05:00
x86cpuid.pl Fix issues in ia32 RDRAND asm leading to reduced entropy 2018-03-08 10:27:49 -05:00