summaryrefslogtreecommitdiff
path: root/Cryptlib/OpenSSL/crypto/cast/c_enc.c
diff options
context:
space:
mode:
authorMatthew Garrett <mjg@redhat.com>2012-07-02 12:33:42 -0400
committerMatthew Garrett <mjg@redhat.com>2012-07-02 12:33:42 -0400
commitd259b1406044b430fe5786cd57e272bb9c57166d (patch)
tree308e31c8b7338e11843ac324ce20b89d765c3f45 /Cryptlib/OpenSSL/crypto/cast/c_enc.c
parent20094cb55d476c5d053cc73cec6e0d3f2a1c8d9a (diff)
downloadefi-boot-shim-d259b1406044b430fe5786cd57e272bb9c57166d.tar.gz
efi-boot-shim-d259b1406044b430fe5786cd57e272bb9c57166d.zip
Update OpenSSL
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/cast/c_enc.c')
-rwxr-xr-xCryptlib/OpenSSL/crypto/cast/c_enc.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/Cryptlib/OpenSSL/crypto/cast/c_enc.c b/Cryptlib/OpenSSL/crypto/cast/c_enc.c
index 0fe2cffe..357c41eb 100755
--- a/Cryptlib/OpenSSL/crypto/cast/c_enc.c
+++ b/Cryptlib/OpenSSL/crypto/cast/c_enc.c
@@ -59,9 +59,10 @@
#include <openssl/cast.h>
#include "cast_lcl.h"
-void CAST_encrypt(CAST_LONG *data, CAST_KEY *key)
+void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key)
{
- register CAST_LONG l,r,*k,t;
+ register CAST_LONG l,r,t;
+ const register CAST_LONG *k;
k= &(key->data[0]);
l=data[0];
@@ -91,9 +92,10 @@ void CAST_encrypt(CAST_LONG *data, CAST_KEY *key)
data[0]=r&0xffffffffL;
}
-void CAST_decrypt(CAST_LONG *data, CAST_KEY *key)
+void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key)
{
- register CAST_LONG l,r,*k,t;
+ register CAST_LONG l,r,t;
+ const register CAST_LONG *k;
k= &(key->data[0]);
l=data[0];
@@ -124,7 +126,7 @@ void CAST_decrypt(CAST_LONG *data, CAST_KEY *key)
}
void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
- CAST_KEY *ks, unsigned char *iv, int enc)
+ const CAST_KEY *ks, unsigned char *iv, int enc)
{
register CAST_LONG tin0,tin1;
register CAST_LONG tout0,tout1,xor0,xor1;
@@ -204,4 +206,3 @@ void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
tin0=tin1=tout0=tout1=xor0=xor1=0;
tin[0]=tin[1]=0;
}
-