diff options
author | tedu <> | 2014-07-10 08:51:15 +0000 |
---|---|---|
committer | tedu <> | 2014-07-10 08:51:15 +0000 |
commit | 7fa0fcaa4570540c46d2430a269ae2e95aaa258e (patch) | |
tree | 10d3c4ab8299021b37a17232dc3493cb7fc5dd87 /src/lib/libssl/t1_enc.c | |
parent | 4edb6fce921fd3bc18b713f5802551bacc02cf8a (diff) | |
download | openbsd-7fa0fcaa4570540c46d2430a269ae2e95aaa258e.tar.gz openbsd-7fa0fcaa4570540c46d2430a269ae2e95aaa258e.tar.bz2 openbsd-7fa0fcaa4570540c46d2430a269ae2e95aaa258e.zip |
decompress libssl. ok beck jsing
Diffstat (limited to 'src/lib/libssl/t1_enc.c')
-rw-r--r-- | src/lib/libssl/t1_enc.c | 45 |
1 files changed, 1 insertions, 44 deletions
diff --git a/src/lib/libssl/t1_enc.c b/src/lib/libssl/t1_enc.c index 26d98522d0..cccf17eab5 100644 --- a/src/lib/libssl/t1_enc.c +++ b/src/lib/libssl/t1_enc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: t1_enc.c,v 1.65 2014/07/09 11:25:42 jsing Exp $ */ | 1 | /* $OpenBSD: t1_enc.c,v 1.66 2014/07/10 08:51:15 tedu Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -137,9 +137,6 @@ | |||
137 | 137 | ||
138 | #include <stdio.h> | 138 | #include <stdio.h> |
139 | #include "ssl_locl.h" | 139 | #include "ssl_locl.h" |
140 | #ifndef OPENSSL_NO_COMP | ||
141 | #include <openssl/comp.h> | ||
142 | #endif | ||
143 | #include <openssl/evp.h> | 140 | #include <openssl/evp.h> |
144 | #include <openssl/hmac.h> | 141 | #include <openssl/hmac.h> |
145 | #include <openssl/md5.h> | 142 | #include <openssl/md5.h> |
@@ -470,9 +467,6 @@ tls1_change_cipher_state(SSL *s, int which) | |||
470 | const EVP_AEAD *aead; | 467 | const EVP_AEAD *aead; |
471 | char is_read, use_client_keys; | 468 | char is_read, use_client_keys; |
472 | 469 | ||
473 | #ifndef OPENSSL_NO_COMP | ||
474 | const SSL_COMP *comp; | ||
475 | #endif | ||
476 | 470 | ||
477 | cipher = s->s3->tmp.new_sym_enc; | 471 | cipher = s->s3->tmp.new_sym_enc; |
478 | aead = s->s3->tmp.new_aead; | 472 | aead = s->s3->tmp.new_aead; |
@@ -492,41 +486,6 @@ tls1_change_cipher_state(SSL *s, int which) | |||
492 | use_client_keys = ((which == SSL3_CHANGE_CIPHER_CLIENT_WRITE) || | 486 | use_client_keys = ((which == SSL3_CHANGE_CIPHER_CLIENT_WRITE) || |
493 | (which == SSL3_CHANGE_CIPHER_SERVER_READ)); | 487 | (which == SSL3_CHANGE_CIPHER_SERVER_READ)); |
494 | 488 | ||
495 | #ifndef OPENSSL_NO_COMP | ||
496 | comp = s->s3->tmp.new_compression; | ||
497 | if (is_read) { | ||
498 | if (s->expand != NULL) { | ||
499 | COMP_CTX_free(s->expand); | ||
500 | s->expand = NULL; | ||
501 | } | ||
502 | if (comp != NULL) { | ||
503 | s->expand = COMP_CTX_new(comp->method); | ||
504 | if (s->expand == NULL) { | ||
505 | SSLerr(SSL_F_TLS1_CHANGE_CIPHER_STATE, | ||
506 | SSL_R_COMPRESSION_LIBRARY_ERROR); | ||
507 | goto err2; | ||
508 | } | ||
509 | if (s->s3->rrec.comp == NULL) | ||
510 | s->s3->rrec.comp = | ||
511 | malloc(SSL3_RT_MAX_ENCRYPTED_LENGTH); | ||
512 | if (s->s3->rrec.comp == NULL) | ||
513 | goto err; | ||
514 | } | ||
515 | } else { | ||
516 | if (s->compress != NULL) { | ||
517 | COMP_CTX_free(s->compress); | ||
518 | s->compress = NULL; | ||
519 | } | ||
520 | if (comp != NULL) { | ||
521 | s->compress = COMP_CTX_new(comp->method); | ||
522 | if (s->compress == NULL) { | ||
523 | SSLerr(SSL_F_TLS1_CHANGE_CIPHER_STATE, | ||
524 | SSL_R_COMPRESSION_LIBRARY_ERROR); | ||
525 | goto err2; | ||
526 | } | ||
527 | } | ||
528 | } | ||
529 | #endif | ||
530 | 489 | ||
531 | /* | 490 | /* |
532 | * Reset sequence number to zero - for DTLS this is handled in | 491 | * Reset sequence number to zero - for DTLS this is handled in |
@@ -596,8 +555,6 @@ tls1_change_cipher_state(SSL *s, int which) | |||
596 | return tls1_change_cipher_state_cipher(s, is_read, use_client_keys, | 555 | return tls1_change_cipher_state_cipher(s, is_read, use_client_keys, |
597 | mac_secret, mac_secret_size, key, key_len, iv, iv_len); | 556 | mac_secret, mac_secret_size, key, key_len, iv, iv_len); |
598 | 557 | ||
599 | err: | ||
600 | SSLerr(SSL_F_TLS1_CHANGE_CIPHER_STATE, ERR_R_MALLOC_FAILURE); | ||
601 | err2: | 558 | err2: |
602 | return (0); | 559 | return (0); |
603 | } | 560 | } |