# endif
#endif
-#ifdef OPENSSL_FIPSCANISTER
-#include <openssl/fipssyms.h>
-#endif
-
#if !__ASSEMBLER__
extern unsigned int OPENSSL_armcap_P;
#endif
#if defined(BN_MUL_COMBA) && !defined(OPENSSL_SMALL_FOOTPRINT)
-#ifndef OPENSSL_FIPSCANISTER
#undef bn_mul_comba8
#undef bn_mul_comba4
#undef bn_sqr_comba8
#undef bn_sqr_comba4
-#endif
/* mul_add_c(a,b,c0,c1,c2) -- c+=a*b for three word number c=(c2,c1,c0) */
/* mul_add_c2(a,b,c0,c1,c2) -- c+=2*a*b for three word number c=(c2,c1,c0) */
#else /* !BN_MUL_COMBA */
/* hmm... is it faster just to do a multiply? */
-#ifndef OPENSSL_FIPSCANISTER
#undef bn_sqr_comba4
#undef bn_sqr_comba8
-#endif
void bn_sqr_comba4(BN_ULONG *r, const BN_ULONG *a)
{
BN_ULONG t[8];
#endif
}
-#ifndef OPENSSL_FIPSCANISTER
void *OPENSSL_stderr(void) { return stderr; }
-#endif
int CRYPTO_memcmp(const void *in_a, const void *in_b, size_t len)
{
#include <stdio.h>
#endif
-/* Get FIPS renames if needed */
-#if defined(OPENSSL_FIPSCANISTER) && defined(OPENSSL_FIPSAPI)
-#include <openssl/fips.h>
-#endif
-
#include <openssl/stack.h>
#include <openssl/safestack.h>
#include <openssl/opensslv.h>
if (buf) OPENSSL_free(buf);
return(ret);
}
-
-#ifdef OPENSSL_FIPSCANISTER
-/* FIPS stanadlone version of ecdh_check: just return FIPS method */
-ECDH_DATA *fips_ecdh_check(EC_KEY *key)
- {
- static ECDH_DATA rv = {
- 0,0,0,
- &openssl_ecdh_meth
- };
- return &rv;
- }
-#endif
EC_POINT_free(point);
return ret;
}
-
-#ifdef OPENSSL_FIPSCANISTER
-/* FIPS stanadlone version of ecdsa_check: just return FIPS method */
-ECDSA_DATA *fips_ecdsa_check(EC_KEY *key)
- {
- static ECDSA_DATA rv = {
- 0,0,0,
- &openssl_ecdsa_meth
- };
- return &rv;
- }
-/* Standalone digest sign and verify */
-int FIPS_ecdsa_verify_digest(EC_KEY *key,
- const unsigned char *dig, int dlen, ECDSA_SIG *s)
- {
- ECDSA_DATA *ecdsa = ecdsa_check(key);
- if (ecdsa == NULL)
- return 0;
- return ecdsa->meth->ecdsa_do_verify(dig, dlen, s, key);
- }
-ECDSA_SIG * FIPS_ecdsa_sign_digest(EC_KEY *key,
- const unsigned char *dig, int dlen)
- {
- ECDSA_DATA *ecdsa = ecdsa_check(key);
- if (ecdsa == NULL)
- return NULL;
- return ecdsa->meth->ecdsa_do_sign(dig, dlen, NULL, NULL, key);
- }
-#endif
# endif
# endif
# endif
-# if !defined(OPENSSL_FIPSCANISTER)
# include <io.h>
# include <fcntl.h>
-# endif
# ifdef OPENSSL_SYS_WINCE
# define OPENSSL_NO_POSIX_IO