Build when not FIPS.
This commit is contained in:
parent
47954f114c
commit
d3a15e132d
@ -173,7 +173,7 @@ LIBKRB5=
|
|||||||
# we might set SHLIB_MARK to '$(SHARED_LIBS)'.
|
# we might set SHLIB_MARK to '$(SHARED_LIBS)'.
|
||||||
SHLIB_MARK=
|
SHLIB_MARK=
|
||||||
|
|
||||||
DIRS= fips crypto ssl $(SHLIB_MARK) apps test tools
|
DIRS= crypto fips ssl $(SHLIB_MARK) apps test tools
|
||||||
SHLIBDIRS= fips crypto ssl
|
SHLIBDIRS= fips crypto ssl
|
||||||
|
|
||||||
# dirs in crypto to build
|
# dirs in crypto to build
|
||||||
|
@ -836,7 +836,9 @@ int main(int argc, char **argv)
|
|||||||
exit(0);
|
exit(0);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef FIPS
|
||||||
FIPS_mode_set(1);
|
FIPS_mode_set(1);
|
||||||
|
#endif
|
||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
{
|
{
|
||||||
|
@ -68,6 +68,8 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <openssl/fips.h>
|
#include <openssl/fips.h>
|
||||||
|
|
||||||
|
#ifdef FIPS
|
||||||
|
|
||||||
static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
|
static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
|
||||||
static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp);
|
static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp);
|
||||||
static int dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig,
|
static int dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig,
|
||||||
@ -364,3 +366,9 @@ static int dsa_bn_mod_exp(DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
|||||||
{
|
{
|
||||||
return BN_mod_exp_mont(r, a, p, m, ctx, m_ctx);
|
return BN_mod_exp_mont(r, a, p, m, ctx, m_ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else /* ndef FIPS */
|
||||||
|
|
||||||
|
static void *dummy=&dummy;
|
||||||
|
|
||||||
|
#endif /* ndef FIPS */
|
||||||
|
@ -143,8 +143,9 @@ int main(int argc, char **argv)
|
|||||||
unsigned char sig[256];
|
unsigned char sig[256];
|
||||||
unsigned int siglen;
|
unsigned int siglen;
|
||||||
|
|
||||||
|
#ifdef FIPS
|
||||||
FIPS_mode_set(1);
|
FIPS_mode_set(1);
|
||||||
|
#endif
|
||||||
if (bio_err == NULL)
|
if (bio_err == NULL)
|
||||||
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
|
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
|
||||||
|
|
||||||
|
@ -3,5 +3,6 @@
|
|||||||
FP=$1
|
FP=$1
|
||||||
shift
|
shift
|
||||||
|
|
||||||
$TOP/fips/sha1/fips_standalone_sha1 $@ | diff -u $FP -
|
egrep '^CFLAG=.*-DFIPS ' $TOP/Makefile || exit 0
|
||||||
|
|
||||||
|
$TOP/fips/sha1/fips_standalone_sha1 $@ | diff -u $FP -
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
SHA1(fips_sha1dgst.c)= 5b541eae6c5dc9caad9ad4fb90cb840ff48b5904
|
SHA1(fips_sha1dgst.c)= 609e2cbf5d3cdcf318ec10238a0e82b93b78e6b5
|
||||||
SHA1(fips_sha_locl.h)= 677427c495b571991f013939ea7e5dea87828f8c
|
SHA1(fips_sha_locl.h)= 677427c495b571991f013939ea7e5dea87828f8c
|
||||||
SHA1(fips_md32_common.h)= 4f41bcde24750b3b8c99a06bcba2fe06ff8db4d0
|
SHA1(fips_md32_common.h)= 4f41bcde24750b3b8c99a06bcba2fe06ff8db4d0
|
||||||
|
@ -70,7 +70,11 @@ const char *SHA1_version="SHA1" OPENSSL_VERSION_PTEXT;
|
|||||||
|
|
||||||
#include "fips_sha_locl.h"
|
#include "fips_sha_locl.h"
|
||||||
|
|
||||||
#endif /* def FIPS */
|
#else /* ndef FIPS */
|
||||||
|
|
||||||
|
static void *dummy=&dummy;
|
||||||
|
|
||||||
|
#endif /* ndef FIPS */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -52,6 +52,7 @@
|
|||||||
|
|
||||||
int main(int argc,char **argv)
|
int main(int argc,char **argv)
|
||||||
{
|
{
|
||||||
|
#ifdef FIPS
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
if(argc < 2)
|
if(argc < 2)
|
||||||
@ -97,5 +98,6 @@ int main(int argc,char **argv)
|
|||||||
printf("%02x",md[i]);
|
printf("%02x",md[i]);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
SHA1(fips_standalone_sha1.c)= b6c1f9f1ea9a231c0520460ee1e009f721fbc121
|
SHA1(fips_standalone_sha1.c)= b6c1f9f1ea9a231c0520460ee1e009f721fbc121
|
||||||
SHA1(fips_sha1dgst.c)= 5b541eae6c5dc9caad9ad4fb90cb840ff48b5904
|
SHA1(fips_sha1dgst.c)= 609e2cbf5d3cdcf318ec10238a0e82b93b78e6b5
|
||||||
SHA1(fips_sha_locl.h)= 677427c495b571991f013939ea7e5dea87828f8c
|
SHA1(fips_sha_locl.h)= 677427c495b571991f013939ea7e5dea87828f8c
|
||||||
SHA1(fips_md32_common.h)= 4f41bcde24750b3b8c99a06bcba2fe06ff8db4d0
|
SHA1(fips_md32_common.h)= 4f41bcde24750b3b8c99a06bcba2fe06ff8db4d0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user