~ubuntu-branches/ubuntu/lucid/openssl/lucid-proposed

« back to all changes in this revision

Viewing changes to crypto/evp/evp_locl.h

  • Committer: Bazaar Package Importer
  • Author(s): Nicolas Valcárcel Scerpella (Canonical)
  • Date: 2009-12-06 20:16:24 UTC
  • mfrom: (11.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20091206201624-u126qjpqm2n2uuhu
Tags: 0.9.8k-7ubuntu1
* Merge from debian unstable, remaining changes (LP: #493392):
  - Link using -Bsymbolic-functions
  - Add support for lpia
  - Disable SSLv2 during compile
  - Ship documentation in openssl-doc, suggested by the package.
  - Use a different priority for libssl0.9.8/restart-services
    depending on whether a desktop, or server dist-upgrade is being
    performed.
  - Display a system restart required notification bubble on libssl0.9.8
    upgrade.
  - Replace duplicate files in the doc directory with symlinks.
  - Move runtime libraries to /lib, for the benefit of wpasupplicant
* Strip the patches out of the source into quilt patches
* Disable CVE-2009-3555.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* evp_locl.h */
2
 
/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
 
2
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3
3
 * project 2000.
4
4
 */
5
5
/* ====================================================================
92
92
#define BLOCK_CIPHER_func_cfb(cname, cprefix, cbits, kstruct, ksched) \
93
93
static int cname##_cfb##cbits##_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \
94
94
{\
95
 
        cprefix##_cfb##cbits##_encrypt(in, out, (long)(cbits==1?inl*8:inl), &((kstruct *)ctx->cipher_data)->ksched, ctx->iv, &ctx->num, ctx->encrypt);\
 
95
        cprefix##_cfb##cbits##_encrypt(in, out, (long)((cbits==1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ?inl*8:inl), &((kstruct *)ctx->cipher_data)->ksched, ctx->iv, &ctx->num, ctx->encrypt);\
96
96
        return 1;\
97
97
}
98
98
 
226
226
 
227
227
#define EVP_C_DATA(kstruct, ctx)        ((kstruct *)(ctx)->cipher_data)
228
228
 
229
 
#define IMPLEMENT_CFBR(cipher,cprefix,kstruct,ksched,keysize,cbits,iv_len) \
 
229
#define IMPLEMENT_CFBR(cipher,cprefix,kstruct,ksched,keysize,cbits,iv_len,fl) \
230
230
        BLOCK_CIPHER_func_cfb(cipher##_##keysize,cprefix,cbits,kstruct,ksched) \
231
231
        BLOCK_CIPHER_def_cfb(cipher##_##keysize,kstruct, \
232
232
                             NID_##cipher##_##keysize, keysize/8, iv_len, cbits, \
233
 
                             0, cipher##_init_key, NULL, \
234
 
                             EVP_CIPHER_set_asn1_iv, \
235
 
                             EVP_CIPHER_get_asn1_iv, \
236
 
                             NULL)
 
233
                             (fl)|EVP_CIPH_FLAG_DEFAULT_ASN1, \
 
234
                             cipher##_init_key, NULL, NULL, NULL, NULL)
 
235
 
 
236
#ifdef OPENSSL_FIPS
 
237
#define RC2_set_key     private_RC2_set_key
 
238
#define RC4_set_key     private_RC4_set_key
 
239
#define CAST_set_key    private_CAST_set_key
 
240
#define RC5_32_set_key  private_RC5_32_set_key
 
241
#define BF_set_key      private_BF_set_key
 
242
#define Camellia_set_key private_Camellia_set_key
 
243
#define idea_set_encrypt_key private_idea_set_encrypt_key
 
244
 
 
245
#define MD5_Init        private_MD5_Init
 
246
#define MD4_Init        private_MD4_Init
 
247
#define MD2_Init        private_MD2_Init
 
248
#define MDC2_Init       private_MDC2_Init
 
249
#define SHA_Init        private_SHA_Init
 
250
 
 
251
#endif
 
252