summaryrefslogtreecommitdiff
path: root/security/nettle2/files/patch-examples_nettle-openssl.c
blob: dbd034518587446b8224dfb6d1f4cded52093147 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- examples/nettle-openssl.c.orig	Fri Nov  8 16:05:20 2002
+++ examples/nettle-openssl.c	Thu May  1 12:52:10 2003
@@ -93,7 +93,7 @@
 openssl_des_set_key(void *ctx, unsigned length, const uint8_t *key)
 {
   assert(length == 8);
-  des_key_sched((char *) key, ctx);
+  des_key_sched((const_DES_cblock *)key, ctx);
 }
 
 #define DES_BLOCK_SIZE 8
@@ -105,7 +105,7 @@
   assert (!(length % DES_BLOCK_SIZE));
   while (length)
     {
-      des_ecb_encrypt((char *) src, (char *) dst, ctx, DES_ENCRYPT);
+      des_ecb_encrypt((const_DES_cblock *)src, (DES_cblock *)dst, ctx, DES_ENCRYPT);
       length -= DES_BLOCK_SIZE;
       dst += DES_BLOCK_SIZE;
       src += DES_BLOCK_SIZE;
@@ -119,7 +119,7 @@
   assert (!(length % DES_BLOCK_SIZE));
   while (length)
     {
-      des_ecb_encrypt((char *) src, (char *) dst, ctx, DES_DECRYPT);
+      des_ecb_encrypt((const_DES_cblock *) src, (DES_cblock *) dst, ctx, DES_DECRYPT);
       length -= DES_BLOCK_SIZE;
       dst += DES_BLOCK_SIZE;
       src += DES_BLOCK_SIZE;