diff options
Diffstat (limited to 'src/lib/libssl/t1_enc.c')
| -rw-r--r-- | src/lib/libssl/t1_enc.c | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/src/lib/libssl/t1_enc.c b/src/lib/libssl/t1_enc.c index 7cb3e29a41..3c4dec76d7 100644 --- a/src/lib/libssl/t1_enc.c +++ b/src/lib/libssl/t1_enc.c | |||
| @@ -111,15 +111,10 @@ | |||
| 111 | 111 | ||
| 112 | #include <stdio.h> | 112 | #include <stdio.h> |
| 113 | #include "ssl_locl.h" | 113 | #include "ssl_locl.h" |
| 114 | #ifndef OPENSSL_NO_COMP | ||
| 115 | #include <openssl/comp.h> | 114 | #include <openssl/comp.h> |
| 116 | #endif | ||
| 117 | #include <openssl/evp.h> | 115 | #include <openssl/evp.h> |
| 118 | #include <openssl/hmac.h> | 116 | #include <openssl/hmac.h> |
| 119 | #include <openssl/md5.h> | 117 | #include <openssl/md5.h> |
| 120 | #ifdef KSSL_DEBUG | ||
| 121 | #include <openssl/des.h> | ||
| 122 | #endif | ||
| 123 | 118 | ||
| 124 | static void tls1_P_hash(const EVP_MD *md, const unsigned char *sec, | 119 | static void tls1_P_hash(const EVP_MD *md, const unsigned char *sec, |
| 125 | int sec_len, unsigned char *seed, int seed_len, | 120 | int sec_len, unsigned char *seed, int seed_len, |
| @@ -256,15 +251,15 @@ int tls1_change_cipher_state(SSL *s, int which) | |||
| 256 | #ifdef KSSL_DEBUG | 251 | #ifdef KSSL_DEBUG |
| 257 | printf("tls1_change_cipher_state(which= %d) w/\n", which); | 252 | printf("tls1_change_cipher_state(which= %d) w/\n", which); |
| 258 | printf("\talg= %ld, comp= %p\n", s->s3->tmp.new_cipher->algorithms, | 253 | printf("\talg= %ld, comp= %p\n", s->s3->tmp.new_cipher->algorithms, |
| 259 | (void *)comp); | 254 | comp); |
| 260 | printf("\tevp_cipher == %p ==? &d_cbc_ede_cipher3\n", (void *)c); | 255 | printf("\tevp_cipher == %p ==? &d_cbc_ede_cipher3\n", c); |
| 261 | printf("\tevp_cipher: nid, blksz= %d, %d, keylen=%d, ivlen=%d\n", | 256 | printf("\tevp_cipher: nid, blksz= %d, %d, keylen=%d, ivlen=%d\n", |
| 262 | c->nid,c->block_size,c->key_len,c->iv_len); | 257 | c->nid,c->block_size,c->key_len,c->iv_len); |
| 263 | printf("\tkey_block: len= %d, data= ", s->s3->tmp.key_block_length); | 258 | printf("\tkey_block: len= %d, data= ", s->s3->tmp.key_block_length); |
| 264 | { | 259 | { |
| 265 | int ki; | 260 | int i; |
| 266 | for (ki=0; ki<s->s3->tmp.key_block_length; ki++) | 261 | for (i=0; i<s->s3->tmp.key_block_length; i++) |
| 267 | printf("%02x", key_block[ki]); printf("\n"); | 262 | printf("%02x", key_block[i]); printf("\n"); |
| 268 | } | 263 | } |
| 269 | #endif /* KSSL_DEBUG */ | 264 | #endif /* KSSL_DEBUG */ |
| 270 | 265 | ||
| @@ -420,13 +415,11 @@ printf("which = %04X\nmac key=",which); | |||
| 420 | s->session->key_arg_length=0; | 415 | s->session->key_arg_length=0; |
| 421 | #ifdef KSSL_DEBUG | 416 | #ifdef KSSL_DEBUG |
| 422 | { | 417 | { |
| 423 | int ki; | 418 | int i; |
| 424 | printf("EVP_CipherInit_ex(dd,c,key=,iv=,which)\n"); | 419 | printf("EVP_CipherInit_ex(dd,c,key=,iv=,which)\n"); |
| 425 | printf("\tkey= "); | 420 | printf("\tkey= "); for (i=0; i<c->key_len; i++) printf("%02x", key[i]); |
| 426 | for (ki=0; ki<c->key_len; ki++) printf("%02x", key[ki]); | ||
| 427 | printf("\n"); | 421 | printf("\n"); |
| 428 | printf("\t iv= "); | 422 | printf("\t iv= "); for (i=0; i<c->iv_len; i++) printf("%02x", iv[i]); |
| 429 | for (ki=0; ki<c->iv_len; ki++) printf("%02x", iv[ki]); | ||
| 430 | printf("\n"); | 423 | printf("\n"); |
| 431 | } | 424 | } |
| 432 | #endif /* KSSL_DEBUG */ | 425 | #endif /* KSSL_DEBUG */ |
| @@ -599,11 +592,10 @@ int tls1_enc(SSL *s, int send) | |||
| 599 | { | 592 | { |
| 600 | unsigned long ui; | 593 | unsigned long ui; |
| 601 | printf("EVP_Cipher(ds=%p,rec->data=%p,rec->input=%p,l=%ld) ==>\n", | 594 | printf("EVP_Cipher(ds=%p,rec->data=%p,rec->input=%p,l=%ld) ==>\n", |
| 602 | (void *)ds,rec->data,rec->input,l); | 595 | ds,rec->data,rec->input,l); |
| 603 | printf("\tEVP_CIPHER_CTX: %d buf_len, %d key_len [%ld %ld], %d iv_len\n", | 596 | printf("\tEVP_CIPHER_CTX: %d buf_len, %d key_len [%d %d], %d iv_len\n", |
| 604 | ds->buf_len, ds->cipher->key_len, | 597 | ds->buf_len, ds->cipher->key_len, |
| 605 | (unsigned long)DES_KEY_SZ, | 598 | DES_KEY_SZ, DES_SCHEDULE_SZ, |
| 606 | (unsigned long)DES_SCHEDULE_SZ, | ||
| 607 | ds->cipher->iv_len); | 599 | ds->cipher->iv_len); |
| 608 | printf("\t\tIV: "); | 600 | printf("\t\tIV: "); |
| 609 | for (i=0; i<ds->cipher->iv_len; i++) printf("%02X", ds->iv[i]); | 601 | for (i=0; i<ds->cipher->iv_len; i++) printf("%02X", ds->iv[i]); |
| @@ -628,10 +620,10 @@ int tls1_enc(SSL *s, int send) | |||
| 628 | 620 | ||
| 629 | #ifdef KSSL_DEBUG | 621 | #ifdef KSSL_DEBUG |
| 630 | { | 622 | { |
| 631 | unsigned long ki; | 623 | unsigned long i; |
| 632 | printf("\trec->data="); | 624 | printf("\trec->data="); |
| 633 | for (ki=0; ki<l; i++) | 625 | for (i=0; i<l; i++) |
| 634 | printf(" %02x", rec->data[ki]); printf("\n"); | 626 | printf(" %02x", rec->data[i]); printf("\n"); |
| 635 | } | 627 | } |
| 636 | #endif /* KSSL_DEBUG */ | 628 | #endif /* KSSL_DEBUG */ |
| 637 | 629 | ||
| @@ -815,7 +807,7 @@ int tls1_generate_master_secret(SSL *s, unsigned char *out, unsigned char *p, | |||
| 815 | unsigned char buff[SSL_MAX_MASTER_KEY_LENGTH]; | 807 | unsigned char buff[SSL_MAX_MASTER_KEY_LENGTH]; |
| 816 | 808 | ||
| 817 | #ifdef KSSL_DEBUG | 809 | #ifdef KSSL_DEBUG |
| 818 | printf ("tls1_generate_master_secret(%p,%p, %p, %d)\n", (void *)s,out, p,len); | 810 | printf ("tls1_generate_master_secret(%p,%p, %p, %d)\n", s,out, p,len); |
| 819 | #endif /* KSSL_DEBUG */ | 811 | #endif /* KSSL_DEBUG */ |
| 820 | 812 | ||
| 821 | /* Setup the stuff to munge */ | 813 | /* Setup the stuff to munge */ |
