[openssl] master update
tomas at openssl.org
tomas at openssl.org
Tue Jun 29 10:16:03 UTC 2021
The branch master has been updated
via b2eabccbe52d57f009b351700b472b42195380d9 (commit)
from f0b9e75e4f9d6ae74389cd1b019b77cf2bd01033 (commit)
- Log -----------------------------------------------------------------
commit b2eabccbe52d57f009b351700b472b42195380d9
Author: Hubert Kario <hkario at redhat.com>
Date: Fri Jun 25 13:34:31 2021 +0200
doc: make error checking in ticket handling code explicit
Reviewed-by: Dmitry Belyavskiy <beldmit at gmail.com>
Reviewed-by: Paul Dale <pauli at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15918)
-----------------------------------------------------------------------
Summary of changes:
doc/man3/SSL_CTX_set_tlsext_ticket_key_cb.pod | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/doc/man3/SSL_CTX_set_tlsext_ticket_key_cb.pod b/doc/man3/SSL_CTX_set_tlsext_ticket_key_cb.pod
index e658e6c83e..f4730066fa 100644
--- a/doc/man3/SSL_CTX_set_tlsext_ticket_key_cb.pod
+++ b/doc/man3/SSL_CTX_set_tlsext_ticket_key_cb.pod
@@ -179,14 +179,17 @@ Reference Implementation:
}
memcpy(key_name, key->name, 16);
- EVP_EncryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, key->aes_key, iv);
+ if (EVP_EncryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, key->aes_key,
+ iv) == 0)
+ return -1; /* error in cipher initialisation */
params[0] = OSSL_PARAM_construct_octet_string(OSSL_MAC_PARAM_KEY,
key->hmac_key, 32);
params[1] = OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_DIGEST,
"sha256", 0);
params[2] = OSSL_PARAM_construct_end();
- EVP_MAC_CTX_set_params(hctx, params);
+ if (EVP_MAC_CTX_set_params(hctx, params) == 0)
+ return -1; /* error in mac initialisation */
return 1;
@@ -202,9 +205,12 @@ Reference Implementation:
params[1] = OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_DIGEST,
"sha256", 0);
params[2] = OSSL_PARAM_construct_end();
- EVP_MAC_CTX_set_params(hctx, params);
+ if (EVP_MAC_CTX_set_params(hctx, params) == 0)
+ return -1; /* error in mac initialisation */
- EVP_DecryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, key->aes_key, iv);
+ if (EVP_DecryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, key->aes_key,
+ iv) == 0)
+ return -1; /* error in cipher initialisation */
if (key->expire < t - RENEW_TIME) { /* RENEW_TIME: implement */
/*
More information about the openssl-commits
mailing list