From 5636b29d04cda71178f682c9c14877369c58a335 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Sat, 20 Dec 2003 02:28:09 +0000 Subject: [PATCH] * arcfour.c (arcfour_weakkey1, arcfour_weakkey2, arcfour_weakkeys): Now const git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15946 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/enc_provider/ChangeLog | 3 +++ src/lib/crypto/enc_provider/arcfour.c | 15 ++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/lib/crypto/enc_provider/ChangeLog b/src/lib/crypto/enc_provider/ChangeLog index a11976c64..35af03625 100644 --- a/src/lib/crypto/enc_provider/ChangeLog +++ b/src/lib/crypto/enc_provider/ChangeLog @@ -1,5 +1,8 @@ 2003-12-19 Ken Raeburn + * arcfour.c (arcfour_weakkey1, arcfour_weakkey2, + arcfour_weakkeys): Now const. + * des.c (mit_des_zeroblock): Don't define here. * des3.c (mit_des_zeroblock): Don't define here. diff --git a/src/lib/crypto/enc_provider/arcfour.c b/src/lib/crypto/enc_provider/arcfour.c index d3a600b29..685f89a89 100644 --- a/src/lib/crypto/enc_provider/arcfour.c +++ b/src/lib/crypto/enc_provider/arcfour.c @@ -33,13 +33,14 @@ k5_arcfour_docrypt(const krb5_keyblock *, const krb5_data *, static krb5_error_code k5_arcfour_make_key(const krb5_data *, krb5_keyblock *); -static unsigned char arcfour_weakkey1[] = {0x00, 0x00, 0xfd}; -static unsigned char arcfour_weakkey2[] = {0x03, 0xfd, 0xfc}; -static krb5_data arcfour_weakkeys[] = { {KV5M_DATA, sizeof (arcfour_weakkey1), - (char * ) arcfour_weakkey1}, - {KV5M_DATA, sizeof (arcfour_weakkey2), - (char * ) arcfour_weakkey2}, - {KV5M_DATA, 0, 0} +static const unsigned char arcfour_weakkey1[] = {0x00, 0x00, 0xfd}; +static const unsigned char arcfour_weakkey2[] = {0x03, 0xfd, 0xfc}; +static const krb5_data arcfour_weakkeys[] = { + {KV5M_DATA, sizeof (arcfour_weakkey1), + (char * ) arcfour_weakkey1}, + {KV5M_DATA, sizeof (arcfour_weakkey2), + (char * ) arcfour_weakkey2}, + {KV5M_DATA, 0, 0} }; /*xxx we really should check for c9x here and use inline on -- 2.26.2