diff options
Diffstat (limited to 'src/daemon/https/tls/gnutls_algorithms.c')
-rw-r--r-- | src/daemon/https/tls/gnutls_algorithms.c | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/src/daemon/https/tls/gnutls_algorithms.c b/src/daemon/https/tls/gnutls_algorithms.c index 876d860c..6a6c9b3a 100644 --- a/src/daemon/https/tls/gnutls_algorithms.c +++ b/src/daemon/https/tls/gnutls_algorithms.c | |||
@@ -235,14 +235,6 @@ static const MHD_gnutls_cipher_entry MHD_gtls_algorithms[] = { | |||
235 | CIPHER_BLOCK, | 235 | CIPHER_BLOCK, |
236 | 8, | 236 | 8, |
237 | 1}, | 237 | 1}, |
238 | #ifdef ENABLE_CAMELLIA | ||
239 | {"CAMELLIA-256-CBC", MHD_GNUTLS_CIPHER_CAMELLIA_256_CBC, 16, 32, | ||
240 | CIPHER_BLOCK, | ||
241 | 16, 0}, | ||
242 | {"CAMELLIA-128-CBC", MHD_GNUTLS_CIPHER_CAMELLIA_128_CBC, 16, 16, | ||
243 | CIPHER_BLOCK, | ||
244 | 16, 0}, | ||
245 | #endif | ||
246 | {"NULL", | 238 | {"NULL", |
247 | MHD_GNUTLS_CIPHER_NULL, | 239 | MHD_GNUTLS_CIPHER_NULL, |
248 | 1, | 240 | 1, |
@@ -268,10 +260,6 @@ static const enum MHD_GNUTLS_CipherAlgorithm MHD_gtls_supported_ciphers[] = | |||
268 | MHD_GNUTLS_CIPHER_ARCFOUR_128, | 260 | MHD_GNUTLS_CIPHER_ARCFOUR_128, |
269 | MHD_GNUTLS_CIPHER_ARCFOUR_40, | 261 | MHD_GNUTLS_CIPHER_ARCFOUR_40, |
270 | MHD_GNUTLS_CIPHER_RC2_40_CBC, | 262 | MHD_GNUTLS_CIPHER_RC2_40_CBC, |
271 | #ifdef ENABLE_CAMELLIA | ||
272 | MHD_GNUTLS_CIPHER_CAMELLIA_256_CBC, | ||
273 | MHD_GNUTLS_CIPHER_CAMELLIA_128_CBC, | ||
274 | #endif | ||
275 | MHD_GNUTLS_CIPHER_NULL, | 263 | MHD_GNUTLS_CIPHER_NULL, |
276 | 0 | 264 | 0 |
277 | }; | 265 | }; |
@@ -595,16 +583,6 @@ static const MHD_gtls_cipher_suite_entry MHD_gtls_cs_algorithms[] = { | |||
595 | MHD_GNUTLS_CIPHER_AES_256_CBC, | 583 | MHD_GNUTLS_CIPHER_AES_256_CBC, |
596 | MHD_GNUTLS_KX_DHE_DSS, | 584 | MHD_GNUTLS_KX_DHE_DSS, |
597 | MHD_GNUTLS_MAC_SHA1, MHD_GNUTLS_PROTOCOL_SSL3), | 585 | MHD_GNUTLS_MAC_SHA1, MHD_GNUTLS_PROTOCOL_SSL3), |
598 | #ifdef ENABLE_CAMELLIA | ||
599 | GNUTLS_CIPHER_SUITE_ENTRY (GNUTLS_DHE_DSS_CAMELLIA_128_CBC_SHA1, | ||
600 | MHD_GNUTLS_CIPHER_CAMELLIA_128_CBC, | ||
601 | MHD_GNUTLS_KX_DHE_DSS, | ||
602 | MHD_GNUTLS_MAC_SHA1, MHD_GNUTLS_PROTOCOL_TLS1_0), | ||
603 | GNUTLS_CIPHER_SUITE_ENTRY (GNUTLS_DHE_DSS_CAMELLIA_256_CBC_SHA1, | ||
604 | MHD_GNUTLS_CIPHER_CAMELLIA_256_CBC, | ||
605 | MHD_GNUTLS_KX_DHE_DSS, | ||
606 | MHD_GNUTLS_MAC_SHA1, MHD_GNUTLS_PROTOCOL_TLS1_0), | ||
607 | #endif | ||
608 | /* DHE_RSA */ | 586 | /* DHE_RSA */ |
609 | GNUTLS_CIPHER_SUITE_ENTRY (GNUTLS_DHE_RSA_3DES_EDE_CBC_SHA1, | 587 | GNUTLS_CIPHER_SUITE_ENTRY (GNUTLS_DHE_RSA_3DES_EDE_CBC_SHA1, |
610 | MHD_GNUTLS_CIPHER_3DES_CBC, | 588 | MHD_GNUTLS_CIPHER_3DES_CBC, |
@@ -618,16 +596,6 @@ static const MHD_gtls_cipher_suite_entry MHD_gtls_cs_algorithms[] = { | |||
618 | MHD_GNUTLS_CIPHER_AES_256_CBC, | 596 | MHD_GNUTLS_CIPHER_AES_256_CBC, |
619 | MHD_GNUTLS_KX_DHE_RSA, | 597 | MHD_GNUTLS_KX_DHE_RSA, |
620 | MHD_GNUTLS_MAC_SHA1, MHD_GNUTLS_PROTOCOL_SSL3), | 598 | MHD_GNUTLS_MAC_SHA1, MHD_GNUTLS_PROTOCOL_SSL3), |
621 | #ifdef ENABLE_CAMELLIA | ||
622 | GNUTLS_CIPHER_SUITE_ENTRY (GNUTLS_DHE_RSA_CAMELLIA_128_CBC_SHA1, | ||
623 | MHD_GNUTLS_CIPHER_CAMELLIA_128_CBC, | ||
624 | MHD_GNUTLS_KX_DHE_RSA, | ||
625 | MHD_GNUTLS_MAC_SHA1, MHD_GNUTLS_PROTOCOL_TLS1_0), | ||
626 | GNUTLS_CIPHER_SUITE_ENTRY (GNUTLS_DHE_RSA_CAMELLIA_256_CBC_SHA1, | ||
627 | MHD_GNUTLS_CIPHER_CAMELLIA_256_CBC, | ||
628 | MHD_GNUTLS_KX_DHE_RSA, | ||
629 | MHD_GNUTLS_MAC_SHA1, MHD_GNUTLS_PROTOCOL_TLS1_0), | ||
630 | #endif | ||
631 | /* RSA */ | 599 | /* RSA */ |
632 | GNUTLS_CIPHER_SUITE_ENTRY (GNUTLS_RSA_NULL_MD5, | 600 | GNUTLS_CIPHER_SUITE_ENTRY (GNUTLS_RSA_NULL_MD5, |
633 | MHD_GNUTLS_CIPHER_NULL, | 601 | MHD_GNUTLS_CIPHER_NULL, |
@@ -657,16 +625,6 @@ static const MHD_gtls_cipher_suite_entry MHD_gtls_cs_algorithms[] = { | |||
657 | GNUTLS_CIPHER_SUITE_ENTRY (GNUTLS_RSA_AES_256_CBC_SHA1, | 625 | GNUTLS_CIPHER_SUITE_ENTRY (GNUTLS_RSA_AES_256_CBC_SHA1, |
658 | MHD_GNUTLS_CIPHER_AES_256_CBC, MHD_GNUTLS_KX_RSA, | 626 | MHD_GNUTLS_CIPHER_AES_256_CBC, MHD_GNUTLS_KX_RSA, |
659 | MHD_GNUTLS_MAC_SHA1, MHD_GNUTLS_PROTOCOL_SSL3), | 627 | MHD_GNUTLS_MAC_SHA1, MHD_GNUTLS_PROTOCOL_SSL3), |
660 | #ifdef ENABLE_CAMELLIA | ||
661 | GNUTLS_CIPHER_SUITE_ENTRY (GNUTLS_RSA_CAMELLIA_128_CBC_SHA1, | ||
662 | MHD_GNUTLS_CIPHER_CAMELLIA_128_CBC, | ||
663 | MHD_GNUTLS_KX_RSA, | ||
664 | MHD_GNUTLS_MAC_SHA1, MHD_GNUTLS_PROTOCOL_TLS1_0), | ||
665 | GNUTLS_CIPHER_SUITE_ENTRY (GNUTLS_RSA_CAMELLIA_256_CBC_SHA1, | ||
666 | MHD_GNUTLS_CIPHER_CAMELLIA_256_CBC, | ||
667 | MHD_GNUTLS_KX_RSA, | ||
668 | MHD_GNUTLS_MAC_SHA1, MHD_GNUTLS_PROTOCOL_TLS1_0), | ||
669 | #endif | ||
670 | {0, | 628 | {0, |
671 | { | 629 | { |
672 | {0, | 630 | {0, |
@@ -1245,39 +1203,11 @@ MHD__gnutls_compare_algo (MHD_gtls_session_t session, | |||
1245 | } | 1203 | } |
1246 | } | 1204 | } |
1247 | 1205 | ||
1248 | #ifdef SORT_DEBUG | ||
1249 | static void | ||
1250 | MHD__gnutls_bsort (MHD_gtls_session_t session, void *_base, size_t nmemb, | ||
1251 | size_t size, int (*compar) (MHD_gtls_session_t, | ||
1252 | const void *, const void *)) | ||
1253 | { | ||
1254 | unsigned int i, j; | ||
1255 | int full = nmemb * size; | ||
1256 | char *base = _base; | ||
1257 | char tmp[MAX_ELEM_SIZE]; | ||
1258 | |||
1259 | for (i = 0; i < full; i += size) | ||
1260 | { | ||
1261 | for (j = 0; j < full; j += size) | ||
1262 | { | ||
1263 | if (compar (session, &base[i], &base[j]) < 0) | ||
1264 | { | ||
1265 | SWAP (&base[j], &base[i]); | ||
1266 | } | ||
1267 | } | ||
1268 | } | ||
1269 | |||
1270 | } | ||
1271 | #endif | ||
1272 | |||
1273 | int | 1206 | int |
1274 | MHD_gtls_supported_ciphersuites_sorted (MHD_gtls_session_t session, | 1207 | MHD_gtls_supported_ciphersuites_sorted (MHD_gtls_session_t session, |
1275 | cipher_suite_st ** ciphers) | 1208 | cipher_suite_st ** ciphers) |
1276 | { | 1209 | { |
1277 | 1210 | ||
1278 | #ifdef SORT_DEBUG | ||
1279 | unsigned int i; | ||
1280 | #endif | ||
1281 | int count; | 1211 | int count; |
1282 | 1212 | ||
1283 | count = MHD_gtls_supported_ciphersuites (session, ciphers); | 1213 | count = MHD_gtls_supported_ciphersuites (session, ciphers); |
@@ -1286,23 +1216,9 @@ MHD_gtls_supported_ciphersuites_sorted (MHD_gtls_session_t session, | |||
1286 | MHD_gnutls_assert (); | 1216 | MHD_gnutls_assert (); |
1287 | return count; | 1217 | return count; |
1288 | } | 1218 | } |
1289 | #ifdef SORT_DEBUG | ||
1290 | MHD__gnutls_debug_log ("Unsorted: \n"); | ||
1291 | for (i = 0; i < count; i++) | ||
1292 | MHD__gnutls_debug_log ("\t%d: %s\n", i, | ||
1293 | MHD_gtls_cipher_suite_get_name ((*ciphers)[i])); | ||
1294 | #endif | ||
1295 | |||
1296 | MHD__gnutls_qsort (session, *ciphers, count, sizeof (cipher_suite_st), | 1219 | MHD__gnutls_qsort (session, *ciphers, count, sizeof (cipher_suite_st), |
1297 | MHD__gnutls_compare_algo); | 1220 | MHD__gnutls_compare_algo); |
1298 | 1221 | ||
1299 | #ifdef SORT_DEBUG | ||
1300 | MHD__gnutls_debug_log ("Sorted: \n"); | ||
1301 | for (i = 0; i < count; i++) | ||
1302 | MHD__gnutls_debug_log ("\t%d: %s\n", i, | ||
1303 | MHD_gtls_cipher_suite_get_name ((*ciphers)[i])); | ||
1304 | #endif | ||
1305 | |||
1306 | return count; | 1222 | return count; |
1307 | } | 1223 | } |
1308 | 1224 | ||