~sbeattie/ubuntu/oneiric/openssl/lp850608

« back to all changes in this revision

Viewing changes to crypto/evp/e_aes.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:
69
69
 
70
70
IMPLEMENT_BLOCK_CIPHER(aes_128, ks, AES, EVP_AES_KEY,
71
71
                       NID_aes_128, 16, 16, 16, 128,
72
 
                       EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_DEFAULT_ASN1,
73
 
                       aes_init_key,
74
 
                       NULL, NULL, NULL, NULL)
 
72
                       0, aes_init_key, NULL, 
 
73
                       EVP_CIPHER_set_asn1_iv,
 
74
                       EVP_CIPHER_get_asn1_iv,
 
75
                       NULL)
75
76
IMPLEMENT_BLOCK_CIPHER(aes_192, ks, AES, EVP_AES_KEY,
76
77
                       NID_aes_192, 16, 24, 16, 128,
77
 
                       EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_DEFAULT_ASN1,
78
 
                       aes_init_key,
79
 
                       NULL, NULL, NULL, NULL)
 
78
                       0, aes_init_key, NULL, 
 
79
                       EVP_CIPHER_set_asn1_iv,
 
80
                       EVP_CIPHER_get_asn1_iv,
 
81
                       NULL)
80
82
IMPLEMENT_BLOCK_CIPHER(aes_256, ks, AES, EVP_AES_KEY,
81
83
                       NID_aes_256, 16, 32, 16, 128,
82
 
                       EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_DEFAULT_ASN1,
83
 
                       aes_init_key,
84
 
                       NULL, NULL, NULL, NULL)
85
 
 
86
 
#define IMPLEMENT_AES_CFBR(ksize,cbits,flags)   IMPLEMENT_CFBR(aes,AES,EVP_AES_KEY,ks,ksize,cbits,16,flags)
87
 
 
88
 
IMPLEMENT_AES_CFBR(128,1,EVP_CIPH_FLAG_FIPS)
89
 
IMPLEMENT_AES_CFBR(192,1,EVP_CIPH_FLAG_FIPS)
90
 
IMPLEMENT_AES_CFBR(256,1,EVP_CIPH_FLAG_FIPS)
91
 
 
92
 
IMPLEMENT_AES_CFBR(128,8,EVP_CIPH_FLAG_FIPS)
93
 
IMPLEMENT_AES_CFBR(192,8,EVP_CIPH_FLAG_FIPS)
94
 
IMPLEMENT_AES_CFBR(256,8,EVP_CIPH_FLAG_FIPS)
 
84
                       0, aes_init_key, NULL, 
 
85
                       EVP_CIPHER_set_asn1_iv,
 
86
                       EVP_CIPHER_get_asn1_iv,
 
87
                       NULL)
 
88
 
 
89
#define IMPLEMENT_AES_CFBR(ksize,cbits) IMPLEMENT_CFBR(aes,AES,EVP_AES_KEY,ks,ksize,cbits,16)
 
90
 
 
91
IMPLEMENT_AES_CFBR(128,1)
 
92
IMPLEMENT_AES_CFBR(192,1)
 
93
IMPLEMENT_AES_CFBR(256,1)
 
94
 
 
95
IMPLEMENT_AES_CFBR(128,8)
 
96
IMPLEMENT_AES_CFBR(192,8)
 
97
IMPLEMENT_AES_CFBR(256,8)
95
98
 
96
99
static int aes_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
97
100
                   const unsigned char *iv, int enc)