~ubuntu-branches/ubuntu/oneiric/openssl/oneiric

« back to all changes in this revision

Viewing changes to crypto/rc2/rc2_skey.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-05-01 23:51:53 UTC
  • mfrom: (11.1.20 sid)
  • Revision ID: james.westby@ubuntu.com-20110501235153-bjcxitndquaezb68
Tags: 1.0.0d-2ubuntu1
* Resynchronise with Debian (LP: #675566).  Remaining changes:
  - debian/libssl1.0.0.postinst:
    + Display a system restart required notification bubble on libssl1.0.0
      upgrade.
    + Use a different priority for libssl1.0.0/restart-services depending
      on whether a desktop, or server dist-upgrade is being performed.
  - debian/{libssl1.0.0-udeb.dirs, control, rules}: Create
    libssl1.0.0-udeb, for the benefit of wget-udeb (no wget-udeb package
    in Debian).
  - debian/{libcrypto1.0.0-udeb.dirs, libssl1.0.0.dirs, libssl1.0.0.files,
    rules}: Move runtime libraries to /lib, for the benefit of
    wpasupplicant.
  - debian/patches/aesni.patch: Backport Intel AES-NI support, now from
    http://rt.openssl.org/Ticket/Display.html?id=2065 rather than the
    0.9.8 variant.
  - debian/patches/Bsymbolic-functions.patch: Link using
    -Bsymbolic-functions.
  - debian/patches/perlpath-quilt.patch: Don't change perl #! paths under
    .pc.
  - debian/rules:
    + Don't run 'make test' when cross-building.
    + Use host compiler when cross-building.  Patch from Neil Williams.
    + Don't build for processors no longer supported: i486, i586 (on
      i386), v8 (on sparc).
    + Fix Makefile to properly clean up libs/ dirs in clean target.
    + Replace duplicate files in the doc directory with symlinks.
* Update architectures affected by Bsymbolic-functions.patch.
* Drop debian/patches/no-sslv2.patch; Debian now adds the 'no-ssl2'
  configure option, which compiles out SSLv2 support entirely, so this is
  no longer needed.
* Drop openssl-doc in favour of the libssl-doc package introduced by
  Debian.  Add Conflicts/Replaces until the next LTS release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
 */
58
58
 
59
59
#include <openssl/rc2.h>
60
 
#include <openssl/crypto.h>
61
 
#ifdef OPENSSL_FIPS
62
 
#include <openssl/fips.h>
63
 
#endif
64
 
 
65
60
#include "rc2_locl.h"
66
61
 
67
 
static unsigned char key_table[256]={
 
62
static const unsigned char key_table[256]={
68
63
        0xd9,0x78,0xf9,0xc4,0x19,0xdd,0xb5,0xed,0x28,0xe9,0xfd,0x79,
69
64
        0x4a,0xa0,0xd8,0x9d,0xc6,0x7e,0x37,0x83,0x2b,0x76,0x53,0x8e,
70
65
        0x62,0x4c,0x64,0x88,0x44,0x8b,0xfb,0xa2,0x17,0x9a,0x59,0xf5,
99
94
 * BSAFE uses the 'retarded' version.  What I previously shipped is
100
95
 * the same as specifying 1024 for the 'bits' parameter.  Bsafe uses
101
96
 * a version where the bits parameter is the same as len*8 */
102
 
 
103
 
#ifdef OPENSSL_FIPS
104
 
void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits)
105
 
        {
106
 
        if (FIPS_mode())
107
 
                FIPS_BAD_ABORT(RC2)
108
 
        private_RC2_set_key(key, len, data, bits);
109
 
        }
110
 
void private_RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,
111
 
                                                                int bits)
112
 
#else
113
 
void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits)
114
 
#endif
 
97
void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits)
115
98
        {
116
99
        int i,j;
117
100
        unsigned char *k;