~ubuntu-branches/ubuntu/lucid/openssl/lucid-proposed

« back to all changes in this revision

Viewing changes to ssl/d1_enc.c

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2009-06-13 18:15:46 UTC
  • mto: (11.1.5 squeeze)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090613181546-vbfntai3b009dl1u
Tags: upstream-0.9.8k
ImportĀ upstreamĀ versionĀ 0.9.8k

Show diffs side-by-side

added added

removed removed

Lines of Context:
115
115
 
116
116
#include <stdio.h>
117
117
#include "ssl_locl.h"
 
118
#ifndef OPENSSL_NO_COMP
118
119
#include <openssl/comp.h>
 
120
#endif
119
121
#include <openssl/evp.h>
120
122
#include <openssl/hmac.h>
121
123
#include <openssl/md5.h>
122
124
#include <openssl/rand.h>
123
 
 
 
125
#ifdef KSSL_DEBUG
 
126
#include <openssl/des.h>
 
127
#endif
124
128
 
125
129
int dtls1_enc(SSL *s, int send)
126
130
        {
202
206
                {
203
207
                unsigned long ui;
204
208
                printf("EVP_Cipher(ds=%p,rec->data=%p,rec->input=%p,l=%ld) ==>\n",
205
 
                        ds,rec->data,rec->input,l);
206
 
                printf("\tEVP_CIPHER_CTX: %d buf_len, %d key_len [%d %d], %d iv_len\n",
 
209
                        (void *)ds,rec->data,rec->input,l);
 
210
                printf("\tEVP_CIPHER_CTX: %d buf_len, %d key_len [%ld %ld], %d iv_len\n",
207
211
                        ds->buf_len, ds->cipher->key_len,
208
 
                        DES_KEY_SZ, DES_SCHEDULE_SZ,
 
212
                        (unsigned long)DES_KEY_SZ,
 
213
                        (unsigned long)DES_SCHEDULE_SZ,
209
214
                        ds->cipher->iv_len);
210
215
                printf("\t\tIV: ");
211
216
                for (i=0; i<ds->cipher->iv_len; i++) printf("%02X", ds->iv[i]);
230
235
 
231
236
#ifdef KSSL_DEBUG
232
237
                {
233
 
                unsigned long i;
 
238
                unsigned long ki;
234
239
                printf("\trec->data=");
235
 
                for (i=0; i<l; i++)
236
 
                        printf(" %02x", rec->data[i]);  printf("\n");
 
240
                for (ki=0; ki<l; ki++)
 
241
                        printf(" %02x", rec->data[ki]);  printf("\n");
237
242
                }
238
243
#endif  /* KSSL_DEBUG */
239
244