diff options
| author | djm <> | 2009-01-09 12:15:52 +0000 |
|---|---|---|
| committer | djm <> | 2009-01-09 12:15:52 +0000 |
| commit | 23f8d96f0f508b8bef2602049feee9c44228d34c (patch) | |
| tree | a2a7787bc00e8f6a29153b8c6d9eb5e8f73d6269 /src/lib/libcrypto/sha | |
| parent | 30562050421d947c3eb3c10edde6e87730b17471 (diff) | |
| download | openbsd-23f8d96f0f508b8bef2602049feee9c44228d34c.tar.gz openbsd-23f8d96f0f508b8bef2602049feee9c44228d34c.tar.bz2 openbsd-23f8d96f0f508b8bef2602049feee9c44228d34c.zip | |
resolve conflicts
Diffstat (limited to 'src/lib/libcrypto/sha')
| -rw-r--r-- | src/lib/libcrypto/sha/sha.h | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/sha/sha1_one.c | 2 | ||||
| -rw-r--r-- | src/lib/libcrypto/sha/sha1dgst.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/sha/sha_dgst.c | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/sha/sha_locl.h | 7 |
5 files changed, 21 insertions, 1 deletions
diff --git a/src/lib/libcrypto/sha/sha.h b/src/lib/libcrypto/sha/sha.h index eed44d7f94..47a2c29f66 100644 --- a/src/lib/libcrypto/sha/sha.h +++ b/src/lib/libcrypto/sha/sha.h | |||
| @@ -106,6 +106,9 @@ typedef struct SHAstate_st | |||
| 106 | } SHA_CTX; | 106 | } SHA_CTX; |
| 107 | 107 | ||
| 108 | #ifndef OPENSSL_NO_SHA0 | 108 | #ifndef OPENSSL_NO_SHA0 |
| 109 | #ifdef OPENSSL_FIPS | ||
| 110 | int private_SHA_Init(SHA_CTX *c); | ||
| 111 | #endif | ||
| 109 | int SHA_Init(SHA_CTX *c); | 112 | int SHA_Init(SHA_CTX *c); |
| 110 | int SHA_Update(SHA_CTX *c, const void *data, size_t len); | 113 | int SHA_Update(SHA_CTX *c, const void *data, size_t len); |
| 111 | int SHA_Final(unsigned char *md, SHA_CTX *c); | 114 | int SHA_Final(unsigned char *md, SHA_CTX *c); |
diff --git a/src/lib/libcrypto/sha/sha1_one.c b/src/lib/libcrypto/sha/sha1_one.c index 7c65b60276..4831174198 100644 --- a/src/lib/libcrypto/sha/sha1_one.c +++ b/src/lib/libcrypto/sha/sha1_one.c | |||
| @@ -61,7 +61,7 @@ | |||
| 61 | #include <openssl/sha.h> | 61 | #include <openssl/sha.h> |
| 62 | #include <openssl/crypto.h> | 62 | #include <openssl/crypto.h> |
| 63 | 63 | ||
| 64 | #ifndef OPENSSL_NO_SHA1 | 64 | #if !defined(OPENSSL_NO_SHA1) |
| 65 | unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md) | 65 | unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md) |
| 66 | { | 66 | { |
| 67 | SHA_CTX c; | 67 | SHA_CTX c; |
diff --git a/src/lib/libcrypto/sha/sha1dgst.c b/src/lib/libcrypto/sha/sha1dgst.c index 50d1925cde..d31f0781a0 100644 --- a/src/lib/libcrypto/sha/sha1dgst.c +++ b/src/lib/libcrypto/sha/sha1dgst.c | |||
| @@ -63,6 +63,10 @@ | |||
| 63 | #define SHA_1 | 63 | #define SHA_1 |
| 64 | 64 | ||
| 65 | #include <openssl/opensslv.h> | 65 | #include <openssl/opensslv.h> |
| 66 | #ifdef OPENSSL_FIPS | ||
| 67 | #include <openssl/fips.h> | ||
| 68 | #endif | ||
| 69 | |||
| 66 | 70 | ||
| 67 | const char SHA1_version[]="SHA1" OPENSSL_VERSION_PTEXT; | 71 | const char SHA1_version[]="SHA1" OPENSSL_VERSION_PTEXT; |
| 68 | 72 | ||
diff --git a/src/lib/libcrypto/sha/sha_dgst.c b/src/lib/libcrypto/sha/sha_dgst.c index 70eb56032c..598f4d721a 100644 --- a/src/lib/libcrypto/sha/sha_dgst.c +++ b/src/lib/libcrypto/sha/sha_dgst.c | |||
| @@ -57,6 +57,12 @@ | |||
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | #include <openssl/opensslconf.h> | 59 | #include <openssl/opensslconf.h> |
| 60 | #include <openssl/crypto.h> | ||
| 61 | #ifdef OPENSSL_FIPS | ||
| 62 | #include <openssl/fips.h> | ||
| 63 | #endif | ||
| 64 | |||
| 65 | #include <openssl/err.h> | ||
| 60 | #if !defined(OPENSSL_NO_SHA0) && !defined(OPENSSL_NO_SHA) | 66 | #if !defined(OPENSSL_NO_SHA0) && !defined(OPENSSL_NO_SHA) |
| 61 | 67 | ||
| 62 | #undef SHA_1 | 68 | #undef SHA_1 |
diff --git a/src/lib/libcrypto/sha/sha_locl.h b/src/lib/libcrypto/sha/sha_locl.h index e37e5726e3..da46ddfe79 100644 --- a/src/lib/libcrypto/sha/sha_locl.h +++ b/src/lib/libcrypto/sha/sha_locl.h | |||
| @@ -122,8 +122,15 @@ void sha1_block_data_order (SHA_CTX *c, const void *p,size_t num); | |||
| 122 | #define INIT_DATA_h3 0x10325476UL | 122 | #define INIT_DATA_h3 0x10325476UL |
| 123 | #define INIT_DATA_h4 0xc3d2e1f0UL | 123 | #define INIT_DATA_h4 0xc3d2e1f0UL |
| 124 | 124 | ||
| 125 | #if defined(SHA_0) && defined(OPENSSL_FIPS) | ||
| 126 | FIPS_NON_FIPS_MD_Init(SHA) | ||
| 127 | #else | ||
| 125 | int HASH_INIT (SHA_CTX *c) | 128 | int HASH_INIT (SHA_CTX *c) |
| 129 | #endif | ||
| 126 | { | 130 | { |
| 131 | #if defined(SHA_1) && defined(OPENSSL_FIPS) | ||
| 132 | FIPS_selftest_check(); | ||
| 133 | #endif | ||
| 127 | c->h0=INIT_DATA_h0; | 134 | c->h0=INIT_DATA_h0; |
| 128 | c->h1=INIT_DATA_h1; | 135 | c->h1=INIT_DATA_h1; |
| 129 | c->h2=INIT_DATA_h2; | 136 | c->h2=INIT_DATA_h2; |
