remove CBC naming from HC-128 suites

This commit is contained in:
toddouska 2013-10-24 12:10:09 -07:00
parent f833674171
commit 8c7715ee33
4 changed files with 40 additions and 40 deletions

View File

@ -255,12 +255,12 @@ void c32to24(word32 in, word24 out);
#endif
#if !defined(NO_HC128) && !defined(NO_RSA) && !defined(NO_TLS)
#define BUILD_TLS_RSA_WITH_HC_128_CBC_MD5
#define BUILD_TLS_RSA_WITH_HC_128_MD5
#if !defined(NO_SHA)
#define BUILD_TLS_RSA_WITH_HC_128_CBC_SHA
#define BUILD_TLS_RSA_WITH_HC_128_SHA
#endif
#if defined(HAVE_BLAKE2)
#define BUILD_TLS_RSA_WITH_HC_128_CBC_B2B256
#define BUILD_TLS_RSA_WITH_HC_128_B2B256
#endif
#endif
@ -389,9 +389,9 @@ void c32to24(word32 in, word24 out);
#define BUILD_AESGCM
#endif
#if defined(BUILD_TLS_RSA_WITH_HC_128_CBC_SHA) || \
defined(BUILD_TLS_RSA_WITH_HC_128_CBC_MD5) || \
defined(BUILD_TLS_RSA_WITH_HC_128_CBC_B2B256)
#if defined(BUILD_TLS_RSA_WITH_HC_128_SHA) || \
defined(BUILD_TLS_RSA_WITH_HC_128_MD5) || \
defined(BUILD_TLS_RSA_WITH_HC_128_B2B256)
#define BUILD_HC128
#endif
@ -470,14 +470,14 @@ enum {
TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 = 0x26,
/* CyaSSL extension - eSTREAM */
TLS_RSA_WITH_HC_128_CBC_MD5 = 0xFB,
TLS_RSA_WITH_HC_128_CBC_SHA = 0xFC,
TLS_RSA_WITH_RABBIT_SHA = 0xFD,
TLS_RSA_WITH_HC_128_MD5 = 0xFB,
TLS_RSA_WITH_HC_128_SHA = 0xFC,
TLS_RSA_WITH_RABBIT_SHA = 0xFD,
/* CyaSSL extension - Blake2b 256 */
TLS_RSA_WITH_AES_128_CBC_B2B256 = 0xF8,
TLS_RSA_WITH_AES_256_CBC_B2B256 = 0xF9,
TLS_RSA_WITH_HC_128_CBC_B2B256 = 0xFA, /* eSTREAM too */
TLS_RSA_WITH_HC_128_B2B256 = 0xFA, /* eSTREAM too */
/* CyaSSL extension - NTRU */

View File

@ -1091,24 +1091,24 @@ void InitSuites(Suites* suites, ProtocolVersion pv, byte haveRSA, byte havePSK,
}
#endif
#ifdef BUILD_TLS_RSA_WITH_HC_128_CBC_MD5
#ifdef BUILD_TLS_RSA_WITH_HC_128_MD5
if (tls && haveRSA) {
suites->suites[idx++] = 0;
suites->suites[idx++] = TLS_RSA_WITH_HC_128_CBC_MD5;
suites->suites[idx++] = TLS_RSA_WITH_HC_128_MD5;
}
#endif
#ifdef BUILD_TLS_RSA_WITH_HC_128_CBC_SHA
#ifdef BUILD_TLS_RSA_WITH_HC_128_SHA
if (tls && haveRSA) {
suites->suites[idx++] = 0;
suites->suites[idx++] = TLS_RSA_WITH_HC_128_CBC_SHA;
suites->suites[idx++] = TLS_RSA_WITH_HC_128_SHA;
}
#endif
#ifdef BUILD_TLS_RSA_WITH_HC_128_CBC_B2B256
#ifdef BUILD_TLS_RSA_WITH_HC_128_B2B256
if (tls && haveRSA) {
suites->suites[idx++] = 0;
suites->suites[idx++] = TLS_RSA_WITH_HC_128_CBC_B2B256;
suites->suites[idx++] = TLS_RSA_WITH_HC_128_B2B256;
}
#endif
@ -6155,15 +6155,15 @@ const char* const cipher_names[] =
"PSK-NULL-SHA",
#endif
#ifdef BUILD_TLS_RSA_WITH_HC_128_CBC_MD5
#ifdef BUILD_TLS_RSA_WITH_HC_128_MD5
"HC128-MD5",
#endif
#ifdef BUILD_TLS_RSA_WITH_HC_128_CBC_SHA
#ifdef BUILD_TLS_RSA_WITH_HC_128_SHA
"HC128-SHA",
#endif
#ifdef BUILD_TLS_RSA_WITH_HC_128_CBC_B2B256
#ifdef BUILD_TLS_RSA_WITH_HC_128_B2B256
"HC128-B2B256",
#endif
@ -6475,16 +6475,16 @@ int cipher_name_idx[] =
TLS_PSK_WITH_NULL_SHA,
#endif
#ifdef BUILD_TLS_RSA_WITH_HC_128_CBC_MD5
TLS_RSA_WITH_HC_128_CBC_MD5,
#ifdef BUILD_TLS_RSA_WITH_HC_128_MD5
TLS_RSA_WITH_HC_128_MD5,
#endif
#ifdef BUILD_TLS_RSA_WITH_HC_128_CBC_SHA
TLS_RSA_WITH_HC_128_CBC_SHA,
#ifdef BUILD_TLS_RSA_WITH_HC_128_SHA
TLS_RSA_WITH_HC_128_SHA,
#endif
#ifdef BUILD_TLS_RSA_WITH_HC_128_CBC_B2B256
TLS_RSA_WITH_HC_128_CBC_B2B256,
#ifdef BUILD_TLS_RSA_WITH_HC_128_B2B256
TLS_RSA_WITH_HC_128_B2B256,
#endif
#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_B2B256
@ -9340,17 +9340,17 @@ static void PickHashSigAlgo(CYASSL* ssl,
return 1;
break;
case TLS_RSA_WITH_HC_128_CBC_MD5 :
case TLS_RSA_WITH_HC_128_MD5 :
if (requirement == REQUIRES_RSA)
return 1;
break;
case TLS_RSA_WITH_HC_128_CBC_SHA :
case TLS_RSA_WITH_HC_128_SHA :
if (requirement == REQUIRES_RSA)
return 1;
break;
case TLS_RSA_WITH_HC_128_CBC_B2B256:
case TLS_RSA_WITH_HC_128_B2B256:
if (requirement == REQUIRES_RSA)
return 1;
break;

View File

@ -1088,8 +1088,8 @@ int SetCipherSpecs(CYASSL* ssl)
break;
#endif
#ifdef BUILD_TLS_RSA_WITH_HC_128_CBC_MD5
case TLS_RSA_WITH_HC_128_CBC_MD5 :
#ifdef BUILD_TLS_RSA_WITH_HC_128_MD5
case TLS_RSA_WITH_HC_128_MD5 :
ssl->specs.bulk_cipher_algorithm = cyassl_hc128;
ssl->specs.cipher_type = stream;
ssl->specs.mac_algorithm = md5_mac;
@ -1105,8 +1105,8 @@ int SetCipherSpecs(CYASSL* ssl)
break;
#endif
#ifdef BUILD_TLS_RSA_WITH_HC_128_CBC_SHA
case TLS_RSA_WITH_HC_128_CBC_SHA :
#ifdef BUILD_TLS_RSA_WITH_HC_128_SHA
case TLS_RSA_WITH_HC_128_SHA :
ssl->specs.bulk_cipher_algorithm = cyassl_hc128;
ssl->specs.cipher_type = stream;
ssl->specs.mac_algorithm = sha_mac;
@ -1122,8 +1122,8 @@ int SetCipherSpecs(CYASSL* ssl)
break;
#endif
#ifdef BUILD_TLS_RSA_WITH_HC_128_CBC_B2B256
case TLS_RSA_WITH_HC_128_CBC_B2B256:
#ifdef BUILD_TLS_RSA_WITH_HC_128_B2B256
case TLS_RSA_WITH_HC_128_B2B256:
ssl->specs.bulk_cipher_algorithm = cyassl_hc128;
ssl->specs.cipher_type = stream;
ssl->specs.mac_algorithm = blake2b_mac;

View File

@ -7580,16 +7580,16 @@ CYASSL_X509* CyaSSL_X509_load_certificate_file(const char* fname, int format)
#endif
#ifndef NO_HC128
#ifndef NO_MD5
case TLS_RSA_WITH_HC_128_CBC_MD5 :
return "TLS_RSA_WITH_HC_128_CBC_MD5";
case TLS_RSA_WITH_HC_128_MD5 :
return "TLS_RSA_WITH_HC_128_MD5";
#endif
#ifndef NO_SHA
case TLS_RSA_WITH_HC_128_CBC_SHA :
return "TLS_RSA_WITH_HC_128_CBC_SHA";
case TLS_RSA_WITH_HC_128_SHA :
return "TLS_RSA_WITH_HC_128_SHA";
#endif
#ifdef HAVE_BLAKE2
case TLS_RSA_WITH_HC_128_CBC_B2B256:
return "TLS_RSA_WITH_HC_128_CBC_B2B256";
case TLS_RSA_WITH_HC_128_B2B256:
return "TLS_RSA_WITH_HC_128_B2B256";
#endif
#endif /* NO_HC128 */
#ifndef NO_SHA