From 67326634496ef21b4acbf4cef2f05040d34aef9b Mon Sep 17 00:00:00 2001 From: marha Date: Tue, 10 Apr 2012 11:41:26 +0200 Subject: Update to openssl-1.0.1 --- openssl/crypto/seed/seed.c | 13 ++++++++++++- openssl/crypto/seed/seed.h | 4 +++- 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'openssl/crypto/seed') diff --git a/openssl/crypto/seed/seed.c b/openssl/crypto/seed/seed.c index 2bc384a19..3e675a8d7 100644 --- a/openssl/crypto/seed/seed.c +++ b/openssl/crypto/seed/seed.c @@ -32,9 +32,14 @@ #include #endif +#include #include #include "seed_locl.h" +#ifdef SS /* can get defined on Solaris by inclusion of */ +#undef SS +#endif + static const seed_word SS[4][256] = { { 0x2989a1a8, 0x05858184, 0x16c6d2d4, 0x13c3d3d0, 0x14445054, 0x1d0d111c, 0x2c8ca0ac, 0x25052124, 0x1d4d515c, 0x03434340, 0x18081018, 0x1e0e121c, 0x11415150, 0x3cccf0fc, 0x0acac2c8, 0x23436360, @@ -192,8 +197,14 @@ static const seed_word KC[] = { KC0, KC1, KC2, KC3, KC4, KC5, KC6, KC7, KC8, KC9, KC10, KC11, KC12, KC13, KC14, KC15 }; #endif - void SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH], SEED_KEY_SCHEDULE *ks) +#ifdef OPENSSL_FIPS + { + fips_cipher_abort(SEED); + private_SEED_set_key(rawkey, ks); + } +void private_SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH], SEED_KEY_SCHEDULE *ks) +#endif { seed_word x1, x2, x3, x4; seed_word t0, t1; diff --git a/openssl/crypto/seed/seed.h b/openssl/crypto/seed/seed.h index 6ffa5f024..c50fdd360 100644 --- a/openssl/crypto/seed/seed.h +++ b/openssl/crypto/seed/seed.h @@ -116,7 +116,9 @@ typedef struct seed_key_st { #endif } SEED_KEY_SCHEDULE; - +#ifdef OPENSSL_FIPS +void private_SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH], SEED_KEY_SCHEDULE *ks); +#endif void SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH], SEED_KEY_SCHEDULE *ks); void SEED_encrypt(const unsigned char s[SEED_BLOCK_SIZE], unsigned char d[SEED_BLOCK_SIZE], const SEED_KEY_SCHEDULE *ks); -- cgit v1.2.3