mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-05 15:59:45 +00:00
Generate larger block of key material correctly for SSL3 as well as TLS.
Add assert to detect if key material is ever too small again.
This commit is contained in:
parent
99a4abe7dd
commit
3870ce15b8
@ -4432,8 +4432,17 @@ loser:
|
||||
/*
|
||||
* SSL Key generation given pre master secret
|
||||
*/
|
||||
static char *mixers[] = { "A", "BB", "CCC", "DDDD", "EEEEE", "FFFFFF", "GGGGGGG"};
|
||||
#define NUM_MIXERS 9
|
||||
static const char * const mixers[NUM_MIXERS] = {
|
||||
"A",
|
||||
"BB",
|
||||
"CCC",
|
||||
"DDDD",
|
||||
"EEEEE",
|
||||
"FFFFFF",
|
||||
"GGGGGGG",
|
||||
"HHHHHHHH",
|
||||
"IIIIIIIII" };
|
||||
#define SSL3_PMS_LENGTH 48
|
||||
#define SSL3_MASTER_SECRET_LENGTH 48
|
||||
|
||||
@ -4853,6 +4862,7 @@ CK_RV NSC_DeriveKey( CK_SESSION_HANDLE hSession,
|
||||
*/
|
||||
PORT_Memcpy(ssl3_keys_out->pIVServer, &key_block[i], IVSize);
|
||||
i += IVSize;
|
||||
PORT_Assert(i <= sizeof key_block);
|
||||
|
||||
} else if (!isTLS) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user