diff options
Diffstat (limited to 'src/daemon/https/tls/gnutls_cipher.c')
-rw-r--r-- | src/daemon/https/tls/gnutls_cipher.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/daemon/https/tls/gnutls_cipher.c b/src/daemon/https/tls/gnutls_cipher.c index 872abdf0..69b62d16 100644 --- a/src/daemon/https/tls/gnutls_cipher.c +++ b/src/daemon/https/tls/gnutls_cipher.c | |||
@@ -202,7 +202,7 @@ mac_init (enum MHD_GNUTLS_HashAlgorithm mac, opaque * secret, int secret_size, | |||
202 | if (mac == MHD_GNUTLS_MAC_NULL) | 202 | if (mac == MHD_GNUTLS_MAC_NULL) |
203 | return GNUTLS_MAC_FAILED; | 203 | return GNUTLS_MAC_FAILED; |
204 | 204 | ||
205 | if (ver == MHD_GNUTLS_SSL3) | 205 | if (ver == MHD_GNUTLS_PROTOCOL_SSL3) |
206 | { /* SSL 3.0 */ | 206 | { /* SSL 3.0 */ |
207 | td = mhd_gnutls_mac_init_ssl3 (mac, secret, secret_size); | 207 | td = mhd_gnutls_mac_init_ssl3 (mac, secret, secret_size); |
208 | } | 208 | } |
@@ -217,7 +217,7 @@ mac_init (enum MHD_GNUTLS_HashAlgorithm mac, opaque * secret, int secret_size, | |||
217 | inline static void | 217 | inline static void |
218 | mac_deinit (mac_hd_t td, opaque * res, int ver) | 218 | mac_deinit (mac_hd_t td, opaque * res, int ver) |
219 | { | 219 | { |
220 | if (ver == MHD_GNUTLS_SSL3) | 220 | if (ver == MHD_GNUTLS_PROTOCOL_SSL3) |
221 | { /* SSL 3.0 */ | 221 | { /* SSL 3.0 */ |
222 | mhd_gnutls_mac_deinit_ssl3 (td, res); | 222 | mhd_gnutls_mac_deinit_ssl3 (td, res); |
223 | } | 223 | } |
@@ -251,7 +251,7 @@ calc_enc_length (mhd_gtls_session_t session, int data_size, | |||
251 | } | 251 | } |
252 | 252 | ||
253 | /* make rnd a multiple of blocksize */ | 253 | /* make rnd a multiple of blocksize */ |
254 | if (session->security_parameters.version == MHD_GNUTLS_SSL3 || | 254 | if (session->security_parameters.version == MHD_GNUTLS_PROTOCOL_SSL3 || |
255 | random_pad == 0) | 255 | random_pad == 0) |
256 | { | 256 | { |
257 | rnd = 0; | 257 | rnd = 0; |
@@ -271,7 +271,7 @@ calc_enc_length (mhd_gtls_session_t session, int data_size, | |||
271 | *pad = (uint8_t) (blocksize - (length % blocksize)) + rnd; | 271 | *pad = (uint8_t) (blocksize - (length % blocksize)) + rnd; |
272 | 272 | ||
273 | length += *pad; | 273 | length += *pad; |
274 | if (session->security_parameters.version >= MHD_GNUTLS_TLS1_1) | 274 | if (session->security_parameters.version >= MHD_GNUTLS_PROTOCOL_TLS1_1) |
275 | length += blocksize; /* for the IV */ | 275 | length += blocksize; /* for the IV */ |
276 | 276 | ||
277 | break; | 277 | break; |
@@ -341,7 +341,7 @@ mhd_gtls_compressed2ciphertext (mhd_gtls_session_t session, | |||
341 | write_sequence_number), 8); | 341 | write_sequence_number), 8); |
342 | 342 | ||
343 | mhd_gnutls_hash (td, &type, 1); | 343 | mhd_gnutls_hash (td, &type, 1); |
344 | if (ver >= MHD_GNUTLS_TLS1_0) | 344 | if (ver >= MHD_GNUTLS_PROTOCOL_TLS1_0) |
345 | { /* TLS 1.0 or higher */ | 345 | { /* TLS 1.0 or higher */ |
346 | mhd_gnutls_hash (td, &major, 1); | 346 | mhd_gnutls_hash (td, &major, 1); |
347 | mhd_gnutls_hash (td, &minor, 1); | 347 | mhd_gnutls_hash (td, &minor, 1); |
@@ -373,7 +373,7 @@ mhd_gtls_compressed2ciphertext (mhd_gtls_session_t session, | |||
373 | 373 | ||
374 | data_ptr = cipher_data; | 374 | data_ptr = cipher_data; |
375 | if (block_algo == CIPHER_BLOCK && | 375 | if (block_algo == CIPHER_BLOCK && |
376 | session->security_parameters.version >= MHD_GNUTLS_TLS1_1) | 376 | session->security_parameters.version >= MHD_GNUTLS_PROTOCOL_TLS1_1) |
377 | { | 377 | { |
378 | /* copy the random IV. | 378 | /* copy the random IV. |
379 | */ | 379 | */ |
@@ -494,7 +494,7 @@ mhd_gtls_ciphertext2compressed (mhd_gtls_session_t session, | |||
494 | 494 | ||
495 | /* ignore the IV in TLS 1.1. | 495 | /* ignore the IV in TLS 1.1. |
496 | */ | 496 | */ |
497 | if (session->security_parameters.version >= MHD_GNUTLS_TLS1_1) | 497 | if (session->security_parameters.version >= MHD_GNUTLS_PROTOCOL_TLS1_1) |
498 | { | 498 | { |
499 | ciphertext.size -= blocksize; | 499 | ciphertext.size -= blocksize; |
500 | ciphertext.data += blocksize; | 500 | ciphertext.data += blocksize; |
@@ -521,7 +521,7 @@ mhd_gtls_ciphertext2compressed (mhd_gtls_session_t session, | |||
521 | 521 | ||
522 | /* Check the pading bytes (TLS 1.x) | 522 | /* Check the pading bytes (TLS 1.x) |
523 | */ | 523 | */ |
524 | if (ver >= MHD_GNUTLS_TLS1_0 && pad_failed == 0) | 524 | if (ver >= MHD_GNUTLS_PROTOCOL_TLS1_0 && pad_failed == 0) |
525 | for (i = 2; i < pad; i++) | 525 | for (i = 2; i < pad; i++) |
526 | { | 526 | { |
527 | if (ciphertext.data[ciphertext.size - i] != | 527 | if (ciphertext.data[ciphertext.size - i] != |
@@ -548,7 +548,7 @@ mhd_gtls_ciphertext2compressed (mhd_gtls_session_t session, | |||
548 | read_sequence_number), 8); | 548 | read_sequence_number), 8); |
549 | 549 | ||
550 | mhd_gnutls_hash (td, &type, 1); | 550 | mhd_gnutls_hash (td, &type, 1); |
551 | if (ver >= MHD_GNUTLS_TLS1_0) | 551 | if (ver >= MHD_GNUTLS_PROTOCOL_TLS1_0) |
552 | { /* TLS 1.x */ | 552 | { /* TLS 1.x */ |
553 | mhd_gnutls_hash (td, &major, 1); | 553 | mhd_gnutls_hash (td, &major, 1); |
554 | mhd_gnutls_hash (td, &minor, 1); | 554 | mhd_gnutls_hash (td, &minor, 1); |