Commit 7c8ced94 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Change OPENSSL_FIPSEVP to OPENSSL_FIPSAPI as it doesn't just refer

to EVP any more.

Move locking #define into fips.h.

Set FIPS locking callbacks at same time as OpenSSL locking callbacks.
parent d5df1b3f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@
 * sections 3.8 and 4.2 in http://security.ece.orst.edu/koc/papers/r01rsasw.pdf
 */

#define OPENSSL_FIPSEVP
#define OPENSSL_FIPSAPI

#include <stdio.h>
#include "cryptlib.h"
+0 −4
Original line number Diff line number Diff line
@@ -249,10 +249,6 @@ typedef struct openssl_item_st
#define CRYPTO_add(a,b,c)	((*(a))+=(b))
#endif

#if defined(OPENSSL_FIPSCANISTER) && defined(OPENSSL_FIPSEVP)
#define CRYPTO_lock FIPS_lock
#endif

/* Some applications as well as some parts of OpenSSL need to allocate
   and deallocate locks in a dynamic fashion.  The following typedef
   makes this possible in a type-safe manner.  */
+1 −1
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@

#ifndef OPENSSL_NO_SHA

#define OPENSSL_FIPSEVP
#define OPENSSL_FIPSAPI

#include <stdio.h>
#include "cryptlib.h"
+1 −1
Original line number Diff line number Diff line
@@ -551,7 +551,7 @@ int FIPS_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,

#endif

#if defined(OPENSSL_FIPSCANISTER) && defined(OPENSSL_FIPSEVP)
#if defined(OPENSSL_FIPSCANISTER) && defined(OPENSSL_FIPSAPI)

#define EVP_MD_CTX_init FIPS_md_ctx_init
#define EVP_MD_CTX_cleanup FIPS_md_ctx_cleanup
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@
 * [including the GNU Public Licence.]
 */

#define OPENSSL_FIPSEVP
#define OPENSSL_FIPSAPI

#include <stdio.h>
#include <stdlib.h>
Loading