forked from wolfSSL/wolfssl
Merge pull request #218 from toddouska/ssl3-aes256
add aes256 key derivation to ssl3
This commit is contained in:
@ -890,7 +890,7 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
|||||||
#if defined(WOLFSSL_SNIFFER)
|
#if defined(WOLFSSL_SNIFFER)
|
||||||
if (cipherList == NULL) {
|
if (cipherList == NULL) {
|
||||||
/* don't use EDH, can't sniff tmp keys */
|
/* don't use EDH, can't sniff tmp keys */
|
||||||
if (wolfSSL_CTX_set_cipher_list(ctx, "AES256-SHA256") != SSL_SUCCESS) {
|
if (wolfSSL_CTX_set_cipher_list(ctx, "AES128-SHA") != SSL_SUCCESS) {
|
||||||
err_sys("client can't set cipher list 3");
|
err_sys("client can't set cipher list 3");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -675,7 +675,7 @@ THREAD_RETURN CYASSL_THREAD server_test(void* args)
|
|||||||
#if defined(CYASSL_SNIFFER)
|
#if defined(CYASSL_SNIFFER)
|
||||||
/* don't use EDH, can't sniff tmp keys */
|
/* don't use EDH, can't sniff tmp keys */
|
||||||
if (cipherList == NULL) {
|
if (cipherList == NULL) {
|
||||||
if (SSL_CTX_set_cipher_list(ctx, "AES256-SHA256") != SSL_SUCCESS)
|
if (SSL_CTX_set_cipher_list(ctx, "AES128-SHA") != SSL_SUCCESS)
|
||||||
err_sys("server can't set cipher list 3");
|
err_sys("server can't set cipher list 3");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1802,7 +1802,7 @@ int SetCipherSpecs(WOLFSSL* ssl)
|
|||||||
enum KeyStuff {
|
enum KeyStuff {
|
||||||
MASTER_ROUNDS = 3,
|
MASTER_ROUNDS = 3,
|
||||||
PREFIX = 3, /* up to three letters for master prefix */
|
PREFIX = 3, /* up to three letters for master prefix */
|
||||||
KEY_PREFIX = 7 /* up to 7 prefix letters for key rounds */
|
KEY_PREFIX = 9 /* up to 9 prefix letters for key rounds */
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -1833,6 +1833,12 @@ static int SetPrefix(byte* sha_input, int idx)
|
|||||||
case 6:
|
case 6:
|
||||||
XMEMCPY(sha_input, "GGGGGGG", 7);
|
XMEMCPY(sha_input, "GGGGGGG", 7);
|
||||||
break;
|
break;
|
||||||
|
case 7:
|
||||||
|
XMEMCPY(sha_input, "HHHHHHHH", 8);
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
XMEMCPY(sha_input, "IIIIIIIII", 9);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
WOLFSSL_MSG("Set Prefix error, bad input");
|
WOLFSSL_MSG("Set Prefix error, bad input");
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user