Latest Update
This commit is contained in:
+4
-4
@@ -171,7 +171,7 @@ static SSL_CIPHER ssl3_ciphers[] = {
|
||||
SSL_aRSA,
|
||||
SSL_3DES,
|
||||
SSL_SHA1,
|
||||
SSL3_VERSION, TLS1_2_VERSION,
|
||||
SSL3_VERSION, TLS1_VERSION,
|
||||
DTLS1_BAD_VER, DTLS1_2_VERSION,
|
||||
SSL_NOT_DEFAULT | SSL_MEDIUM | SSL_FIPS,
|
||||
SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
|
||||
@@ -236,8 +236,8 @@ static SSL_CIPHER ssl3_ciphers[] = {
|
||||
SSL_aRSA,
|
||||
SSL_AES128,
|
||||
SSL_SHA1,
|
||||
SSL3_VERSION, TLS1_2_VERSION,
|
||||
DTLS1_BAD_VER, DTLS1_2_VERSION,
|
||||
SSL3_VERSION, TLS1_VERSION,
|
||||
DTLS1_BAD_VER, DTLS1_VERSION,
|
||||
SSL_HIGH | SSL_FIPS,
|
||||
SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
|
||||
128,
|
||||
@@ -300,7 +300,7 @@ static SSL_CIPHER ssl3_ciphers[] = {
|
||||
SSL_aRSA,
|
||||
SSL_AES256,
|
||||
SSL_SHA1,
|
||||
SSL3_VERSION, TLS1_2_VERSION,
|
||||
SSL3_VERSION, TLS1_VERSION,
|
||||
DTLS1_BAD_VER, DTLS1_2_VERSION,
|
||||
SSL_HIGH | SSL_FIPS,
|
||||
SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
|
||||
|
||||
@@ -383,11 +383,6 @@
|
||||
# define SSL_PKEY_ED25519 7
|
||||
# define SSL_PKEY_ED448 8
|
||||
# define SSL_PKEY_NUM 9
|
||||
/*
|
||||
* Pseudo-constant. GOST cipher suites can use different certs for 1
|
||||
* SSL_CIPHER. So let's see which one we have in fact.
|
||||
*/
|
||||
# define SSL_PKEY_GOST_EC SSL_PKEY_NUM+1
|
||||
|
||||
/*-
|
||||
* SSL_kRSA <- RSA_ENC
|
||||
|
||||
+10
-1
@@ -1427,10 +1427,19 @@ int tls_psk_do_binder(SSL *s, const EVP_MD *md, const unsigned char *msgstart,
|
||||
const char external_label[] = "ext binder";
|
||||
const char nonce_label[] = "resumption";
|
||||
const char *label;
|
||||
size_t bindersize, labelsize, psklen, hashsize = EVP_MD_size(md);
|
||||
size_t bindersize, labelsize, psklen, hashsize;
|
||||
int hashsizei = EVP_MD_size(md);
|
||||
int ret = -1;
|
||||
int usepskfored = 0;
|
||||
|
||||
/* Ensure cast to size_t is safe */
|
||||
if (!ossl_assert(hashsizei >= 0)) {
|
||||
SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_TLS_PSK_DO_BINDER,
|
||||
ERR_R_INTERNAL_ERROR);
|
||||
goto err;
|
||||
}
|
||||
hashsize = (size_t)hashsizei;
|
||||
|
||||
if (external
|
||||
&& s->early_data_state == SSL_EARLY_DATA_CONNECTING
|
||||
&& s->session->ext.max_early_data == 0
|
||||
|
||||
+21
-1
@@ -661,7 +661,12 @@ static const uint16_t tls12_sigalgs[] = {
|
||||
|
||||
TLSEXT_SIGALG_dsa_sha256,
|
||||
TLSEXT_SIGALG_dsa_sha384,
|
||||
TLSEXT_SIGALG_dsa_sha512
|
||||
TLSEXT_SIGALG_dsa_sha512,
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_GOST
|
||||
TLSEXT_SIGALG_gostr34102012_256_gostr34112012_256,
|
||||
TLSEXT_SIGALG_gostr34102012_512_gostr34112012_512,
|
||||
TLSEXT_SIGALG_gostr34102001_gostr3411,
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -857,6 +862,21 @@ static const SIGALG_LOOKUP *tls1_get_legacy_sigalg(const SSL *s, int idx)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Some GOST ciphersuites allow more than one signature algorithms
|
||||
* */
|
||||
if (idx == SSL_PKEY_GOST01 && s->s3->tmp.new_cipher->algorithm_auth != SSL_aGOST01) {
|
||||
int real_idx;
|
||||
|
||||
for (real_idx = SSL_PKEY_GOST12_512; real_idx >= SSL_PKEY_GOST01;
|
||||
real_idx--) {
|
||||
if (s->cert->pkeys[real_idx].privatekey != NULL) {
|
||||
idx = real_idx;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
idx = s->cert->key - s->cert->pkeys;
|
||||
}
|
||||
|
||||
+19
-2
@@ -129,6 +129,7 @@ int tls13_generate_secret(SSL *s, const EVP_MD *md,
|
||||
unsigned char *outsecret)
|
||||
{
|
||||
size_t mdlen, prevsecretlen;
|
||||
int mdleni;
|
||||
int ret;
|
||||
EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_HKDF, NULL);
|
||||
static const char derived_secret_label[] = "derived";
|
||||
@@ -140,7 +141,14 @@ int tls13_generate_secret(SSL *s, const EVP_MD *md,
|
||||
return 0;
|
||||
}
|
||||
|
||||
mdlen = EVP_MD_size(md);
|
||||
mdleni = EVP_MD_size(md);
|
||||
/* Ensure cast to size_t is safe */
|
||||
if (!ossl_assert(mdleni >= 0)) {
|
||||
SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_TLS13_GENERATE_SECRET,
|
||||
ERR_R_INTERNAL_ERROR);
|
||||
return 0;
|
||||
}
|
||||
mdlen = (size_t)mdleni;
|
||||
|
||||
if (insecret == NULL) {
|
||||
insecret = default_zeros;
|
||||
@@ -316,7 +324,16 @@ static int derive_secret_key_and_iv(SSL *s, int sending, const EVP_MD *md,
|
||||
{
|
||||
unsigned char key[EVP_MAX_KEY_LENGTH];
|
||||
size_t ivlen, keylen, taglen;
|
||||
size_t hashlen = EVP_MD_size(md);
|
||||
int hashleni = EVP_MD_size(md);
|
||||
size_t hashlen;
|
||||
|
||||
/* Ensure cast to size_t is safe */
|
||||
if (!ossl_assert(hashleni >= 0)) {
|
||||
SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_DERIVE_SECRET_KEY_AND_IV,
|
||||
ERR_R_EVP_LIB);
|
||||
goto err;
|
||||
}
|
||||
hashlen = (size_t)hashleni;
|
||||
|
||||
if (!tls13_hkdf_expand(s, md, insecret, label, labellen, hash, hashlen,
|
||||
secret, hashlen)) {
|
||||
|
||||
Reference in New Issue
Block a user