diff options
Diffstat (limited to 'src/lib/libssl/d1_enc.c')
-rw-r--r-- | src/lib/libssl/d1_enc.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/lib/libssl/d1_enc.c b/src/lib/libssl/d1_enc.c index 1967e7a95e..24b34b1e87 100644 --- a/src/lib/libssl/d1_enc.c +++ b/src/lib/libssl/d1_enc.c | |||
@@ -122,9 +122,6 @@ | |||
122 | #include <openssl/hmac.h> | 122 | #include <openssl/hmac.h> |
123 | #include <openssl/md5.h> | 123 | #include <openssl/md5.h> |
124 | #include <openssl/rand.h> | 124 | #include <openssl/rand.h> |
125 | #ifdef KSSL_DEBUG | ||
126 | #include <openssl/des.h> | ||
127 | #endif | ||
128 | 125 | ||
129 | /* dtls1_enc encrypts/decrypts the record in |s->wrec| / |s->rrec|, respectively. | 126 | /* dtls1_enc encrypts/decrypts the record in |s->wrec| / |s->rrec|, respectively. |
130 | * | 127 | * |
@@ -177,9 +174,6 @@ dtls1_enc(SSL *s, int send) | |||
177 | enc = EVP_CIPHER_CTX_cipher(s->enc_read_ctx); | 174 | enc = EVP_CIPHER_CTX_cipher(s->enc_read_ctx); |
178 | } | 175 | } |
179 | 176 | ||
180 | #ifdef KSSL_DEBUG | ||
181 | printf("dtls1_enc(%d)\n", send); | ||
182 | #endif /* KSSL_DEBUG */ | ||
183 | 177 | ||
184 | if ((s->session == NULL) || (ds == NULL) || (enc == NULL)) { | 178 | if ((s->session == NULL) || (ds == NULL) || (enc == NULL)) { |
185 | memmove(rec->data, rec->input, rec->length); | 179 | memmove(rec->data, rec->input, rec->length); |
@@ -205,23 +199,6 @@ dtls1_enc(SSL *s, int send) | |||
205 | rec->length += i; | 199 | rec->length += i; |
206 | } | 200 | } |
207 | 201 | ||
208 | #ifdef KSSL_DEBUG | ||
209 | { | ||
210 | unsigned long ui; | ||
211 | printf("EVP_Cipher(ds=%p, rec->data=%p, rec->input=%p, l=%ld) ==>\n", | ||
212 | ds, rec->data, rec->input, l); | ||
213 | printf("\tEVP_CIPHER_CTX: %d buf_len, %d key_len [%d %d], %d iv_len\n", | ||
214 | ds->buf_len, ds->cipher->key_len, | ||
215 | DES_KEY_SZ, DES_SCHEDULE_SZ, | ||
216 | ds->cipher->iv_len); | ||
217 | printf("\t\tIV: "); | ||
218 | for (i = 0; i<ds->cipher->iv_len; i++) printf("%02X", ds->iv[i]); | ||
219 | printf("\n"); | ||
220 | printf("\trec->input="); | ||
221 | for (ui = 0; ui<l; ui++) printf(" %02x", rec->input[ui]); | ||
222 | printf("\n"); | ||
223 | } | ||
224 | #endif /* KSSL_DEBUG */ | ||
225 | 202 | ||
226 | if (!send) { | 203 | if (!send) { |
227 | if (l == 0 || l % bs != 0) | 204 | if (l == 0 || l % bs != 0) |
@@ -230,14 +207,6 @@ dtls1_enc(SSL *s, int send) | |||
230 | 207 | ||
231 | EVP_Cipher(ds, rec->data, rec->input, l); | 208 | EVP_Cipher(ds, rec->data, rec->input, l); |
232 | 209 | ||
233 | #ifdef KSSL_DEBUG | ||
234 | { | ||
235 | unsigned long i; | ||
236 | printf("\trec->data="); | ||
237 | for (i = 0; i < l; i++) | ||
238 | printf(" %02x", rec->data[i]); printf("\n"); | ||
239 | } | ||
240 | #endif /* KSSL_DEBUG */ | ||
241 | 210 | ||
242 | if ((bs != 1) && !send) | 211 | if ((bs != 1) && !send) |
243 | return tls1_cbc_remove_padding(s, rec, bs, mac_size); | 212 | return tls1_cbc_remove_padding(s, rec, bs, mac_size); |