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/aes | |
| parent | 30562050421d947c3eb3c10edde6e87730b17471 (diff) | |
| download | openbsd-23f8d96f0f508b8bef2602049feee9c44228d34c.tar.gz openbsd-23f8d96f0f508b8bef2602049feee9c44228d34c.tar.bz2 openbsd-23f8d96f0f508b8bef2602049feee9c44228d34c.zip | |
resolve conflicts
Diffstat (limited to 'src/lib/libcrypto/aes')
| -rw-r--r-- | src/lib/libcrypto/aes/aes.h | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/aes/aes_cbc.c | 2 | ||||
| -rw-r--r-- | src/lib/libcrypto/aes/aes_core.c | 8 | ||||
| -rw-r--r-- | src/lib/libcrypto/aes/asm/aes-586.pl | 3 |
4 files changed, 16 insertions, 1 deletions
diff --git a/src/lib/libcrypto/aes/aes.h b/src/lib/libcrypto/aes/aes.h index baf0222d49..450f2b4051 100644 --- a/src/lib/libcrypto/aes/aes.h +++ b/src/lib/libcrypto/aes/aes.h | |||
| @@ -66,6 +66,10 @@ | |||
| 66 | #define AES_MAXNR 14 | 66 | #define AES_MAXNR 14 |
| 67 | #define AES_BLOCK_SIZE 16 | 67 | #define AES_BLOCK_SIZE 16 |
| 68 | 68 | ||
| 69 | #ifdef OPENSSL_FIPS | ||
| 70 | #define FIPS_AES_SIZE_T int | ||
| 71 | #endif | ||
| 72 | |||
| 69 | #ifdef __cplusplus | 73 | #ifdef __cplusplus |
| 70 | extern "C" { | 74 | extern "C" { |
| 71 | #endif | 75 | #endif |
diff --git a/src/lib/libcrypto/aes/aes_cbc.c b/src/lib/libcrypto/aes/aes_cbc.c index d2ba6bcdb4..373864cd4b 100644 --- a/src/lib/libcrypto/aes/aes_cbc.c +++ b/src/lib/libcrypto/aes/aes_cbc.c | |||
| @@ -59,6 +59,7 @@ | |||
| 59 | #include <openssl/aes.h> | 59 | #include <openssl/aes.h> |
| 60 | #include "aes_locl.h" | 60 | #include "aes_locl.h" |
| 61 | 61 | ||
| 62 | #if !defined(OPENSSL_FIPS_AES_ASM) | ||
| 62 | void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, | 63 | void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, |
| 63 | const unsigned long length, const AES_KEY *key, | 64 | const unsigned long length, const AES_KEY *key, |
| 64 | unsigned char *ivec, const int enc) { | 65 | unsigned char *ivec, const int enc) { |
| @@ -129,3 +130,4 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, | |||
| 129 | } | 130 | } |
| 130 | } | 131 | } |
| 131 | } | 132 | } |
| 133 | #endif | ||
diff --git a/src/lib/libcrypto/aes/aes_core.c b/src/lib/libcrypto/aes/aes_core.c index 3a80e18b0a..cffdd4daec 100644 --- a/src/lib/libcrypto/aes/aes_core.c +++ b/src/lib/libcrypto/aes/aes_core.c | |||
| @@ -37,6 +37,10 @@ | |||
| 37 | 37 | ||
| 38 | #include <stdlib.h> | 38 | #include <stdlib.h> |
| 39 | #include <openssl/aes.h> | 39 | #include <openssl/aes.h> |
| 40 | #ifdef OPENSSL_FIPS | ||
| 41 | #include <openssl/fips.h> | ||
| 42 | #endif | ||
| 43 | |||
| 40 | #include "aes_locl.h" | 44 | #include "aes_locl.h" |
| 41 | 45 | ||
| 42 | /* | 46 | /* |
| @@ -631,6 +635,10 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits, | |||
| 631 | int i = 0; | 635 | int i = 0; |
| 632 | u32 temp; | 636 | u32 temp; |
| 633 | 637 | ||
| 638 | #ifdef OPENSSL_FIPS | ||
| 639 | FIPS_selftest_check(); | ||
| 640 | #endif | ||
| 641 | |||
| 634 | if (!userKey || !key) | 642 | if (!userKey || !key) |
| 635 | return -1; | 643 | return -1; |
| 636 | if (bits != 128 && bits != 192 && bits != 256) | 644 | if (bits != 128 && bits != 192 && bits != 256) |
diff --git a/src/lib/libcrypto/aes/asm/aes-586.pl b/src/lib/libcrypto/aes/asm/aes-586.pl index 3da307bef9..e771e83953 100644 --- a/src/lib/libcrypto/aes/asm/aes-586.pl +++ b/src/lib/libcrypto/aes/asm/aes-586.pl | |||
| @@ -955,8 +955,9 @@ my $mark=&DWP(60+240,"esp"); #copy of aes_key->rounds | |||
| 955 | 955 | ||
| 956 | &align (4); | 956 | &align (4); |
| 957 | &set_label("enc_tail"); | 957 | &set_label("enc_tail"); |
| 958 | &push ($key eq "edi" ? $key : ""); # push ivp | 958 | &mov ($s0,$key eq "edi" ? $key : ""); |
| 959 | &mov ($key,$_out); # load out | 959 | &mov ($key,$_out); # load out |
| 960 | &push ($s0); # push ivp | ||
| 960 | &mov ($s1,16); | 961 | &mov ($s1,16); |
| 961 | &sub ($s1,$s2); | 962 | &sub ($s1,$s2); |
| 962 | &cmp ($key,$acc); # compare with inp | 963 | &cmp ($key,$acc); # compare with inp |
