summaryrefslogtreecommitdiffstats
path: root/fips
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2012-10-14 12:03:34 +0000
committerDr. Stephen Henson <steve@openssl.org>2012-10-14 12:03:34 +0000
commit3e1beaf43e741b47c4bd03e864881d7294cebea7 (patch)
tree5d07ca8a468693ab98f93fdf02439120eda55fb8 /fips
parentea11fc17cf6842eb0b2a95f3ea4839201e133f03 (diff)
Add BSD-ppc85xx support and avoid copying overlapping buffers in fips_dssvs.c
Diffstat (limited to 'fips')
-rw-r--r--fips/aes/fips_gcmtest.c4
-rw-r--r--fips/dsa/fips_dssvs.c3
-rw-r--r--fips/fips_canister.c1
3 files changed, 7 insertions, 1 deletions
diff --git a/fips/aes/fips_gcmtest.c b/fips/aes/fips_gcmtest.c
index 30e4bcc0f4..4000e0763f 100644
--- a/fips/aes/fips_gcmtest.c
+++ b/fips/aes/fips_gcmtest.c
@@ -208,6 +208,8 @@ static void gcmtest(FILE *in, FILE *out, int encrypt)
ct = OPENSSL_malloc(ptlen);
rv = FIPS_cipher(&ctx, ct, pt, ptlen);
}
+ else
+ FIPS_cipher(&ctx, iv, iv, 0);
FIPS_cipher(&ctx, NULL, NULL, 0);
FIPS_cipher_ctx_ctrl(&ctx, EVP_CTRL_GCM_GET_TAG,
taglen, tag);
@@ -242,6 +244,8 @@ static void gcmtest(FILE *in, FILE *out, int encrypt)
pt = OPENSSL_malloc(ptlen);
rv = FIPS_cipher(&ctx, pt, ct, ptlen);
}
+ else
+ FIPS_cipher(&ctx, iv, iv, 0);
rv = FIPS_cipher(&ctx, NULL, NULL, 0);
if (rv < 0)
fprintf(out, "FAIL" RESP_EOL);
diff --git a/fips/dsa/fips_dssvs.c b/fips/dsa/fips_dssvs.c
index e2f2297f00..cee5fb398e 100644
--- a/fips/dsa/fips_dssvs.c
+++ b/fips/dsa/fips_dssvs.c
@@ -46,7 +46,8 @@ static int parse_mod(char *line, int *pdsa2, int *pL, int *pN,
if (strcmp(keyword, "L"))
return 0;
*pL = atoi(value);
- strcpy(line, p + 1);
+ strcpy(lbuf, p + 1);
+ strcpy(line, lbuf);
if (pmd)
p = strchr(line, ',');
else
diff --git a/fips/fips_canister.c b/fips/fips_canister.c
index afe55a1bc7..016d94c976 100644
--- a/fips/fips_canister.c
+++ b/fips/fips_canister.c
@@ -32,6 +32,7 @@ const void *FIPS_text_end(void);
defined(__i386__)|| defined(__i386))) || \
(defined(__vxworks) && (defined(__ppc__) || defined(__ppc) || \
defined(__mips__)|| defined(__mips))) || \
+ (defined(__NetBSD__) && (defined(__powerpc__) || defined(__i386))) || \
(defined(__linux) && ((defined(__PPC__) && !defined(__PPC64__)) || \
defined(__arm__) || defined(__arm))) || \
(defined(__APPLE__) /* verified on all MacOS X & iOS flavors */)|| \