提交 d749e108 编写于 作者: D Dr. Stephen Henson

Experimental symbol renaming to avoid clashes with regular OpenSSL.

Make sure crypto.h is included first in any affected files.
上级 0fbf8f44
......@@ -49,6 +49,7 @@
*
*/
#include <openssl/crypto.h>
#include <openssl/aes.h>
#include <openssl/modes.h>
......
......@@ -49,6 +49,7 @@
*
*/
#include <openssl/crypto.h>
#include <openssl/aes.h>
#include <openssl/modes.h>
......
......@@ -36,6 +36,7 @@
#include <assert.h>
#include <stdlib.h>
#include <openssl/crypto.h>
#include <openssl/aes.h>
#include "aes_locl.h"
......
......@@ -56,6 +56,7 @@
#endif
#include <assert.h>
#include <openssl/crypto.h>
#include <openssl/aes.h>
#include "aes_locl.h"
......
......@@ -49,6 +49,7 @@
*
*/
#include <openssl/crypto.h>
#include <openssl/aes.h>
#include <openssl/modes.h>
......
......@@ -43,6 +43,7 @@
#include <assert.h>
#include <stdlib.h>
#include <crypto/aes.h>
#include <openssl/aes.h>
#include "aes_locl.h"
......
......@@ -63,6 +63,7 @@
#include <stdio.h>
#include <assert.h>
#include <openssl/crypto.h>
#include "cryptlib.h"
#include "bn_lcl.h"
......@@ -428,10 +429,12 @@ BN_ULONG bn_sub_words(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b, int n)
#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) */
......@@ -946,14 +949,16 @@ int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, const BN_U
#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];
bn_sqr_normal(r,a,4,t);
}
#undef bn_sqr_comba8
void bn_sqr_comba8(BN_ULONG *r, const BN_ULONG *a)
{
BN_ULONG t[16];
......
......@@ -143,6 +143,14 @@
one way or another */
#include <openssl/symhacks.h>
/* For FIPS mode rename all OpenSSL symbols to avoid clashes with a
* non-FIPS OpenSSL.
*/
#if defined(OPENSSL_FIPSCANISTER) && defined(OPENSSL_FIPSSYMS)
#include <openssl/fipssyms.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -56,6 +56,7 @@
* [including the GNU Public Licence.]
*/
#include <openssl/crypto.h>
#include "des_locl.h"
#include "e_os.h"
......
......@@ -56,6 +56,7 @@
* [including the GNU Public Licence.]
*/
#include <openssl/crypto.h>
#include "des_locl.h"
/* The input and output encrypted as though 64bit cfb mode is being
......
......@@ -57,6 +57,7 @@
*/
#include "e_os.h"
#include <openssl/crypto.h>
#include "des_locl.h"
#include <assert.h>
......
......@@ -56,6 +56,7 @@
* [including the GNU Public Licence.]
*/
#include <openssl/crypto.h>
#include "des_locl.h"
#include "spr.h"
......
......@@ -56,6 +56,7 @@
* [including the GNU Public Licence.]
*/
#include <openssl/crypto.h>
#include "des_locl.h"
void DES_ecb3_encrypt(const_DES_cblock *input, DES_cblock *output,
......
......@@ -56,6 +56,7 @@
* [including the GNU Public Licence.]
*/
#include <openssl/crypto.h>
#include "des_locl.h"
#include "des_ver.h"
#include <openssl/opensslv.h>
......
......@@ -9,6 +9,8 @@
#include <openssl/ebcdic.h>
#endif
#include <openssl/crypto.h>
/* This version of crypt has been developed from my MIT compatible
* DES library.
* Eric Young (eay@cryptsoft.com)
......
......@@ -57,6 +57,7 @@
*/
#include <stdio.h>
#include <openssl/crypto.h>
/* This version of crypt has been developed from my MIT compatible
* DES library.
......
......@@ -56,6 +56,7 @@
* [including the GNU Public Licence.]
*/
#include <openssl/crypto.h>
#include "des_locl.h"
/* The input and output encrypted as though 64bit ofb mode is being
......
......@@ -63,6 +63,7 @@
* 1.1 added norm_expand_bits
* 1.0 First working version
*/
#include <openssl/crypto.h>
#include "des_locl.h"
OPENSSL_IMPLEMENT_GLOBAL(int,DES_check_key,0) /* defaults to false */
......
......@@ -56,8 +56,8 @@
* [including the GNU Public Licence.]
*/
#include "des_locl.h"
#include <openssl/crypto.h>
#include "des_locl.h"
void DES_string_to_key(const char *str, DES_cblock *key)
{
......
......@@ -48,6 +48,7 @@
*
*/
#include <openssl/crypto.h>
#include "modes_lcl.h"
#include <string.h>
......
......@@ -48,6 +48,7 @@
*
*/
#include <openssl/crypto.h>
#include "modes_lcl.h"
#include <string.h>
......
......@@ -48,6 +48,7 @@
*
*/
#include <openssl/crypto.h>
#include "modes_lcl.h"
#include <string.h>
......
......@@ -48,6 +48,7 @@
*
*/
#include <openssl/crypto.h>
#include "modes_lcl.h"
#include <string.h>
......
......@@ -123,10 +123,10 @@
#include "e_os.h"
#include <openssl/crypto.h>
#include <openssl/rand.h>
#include "rand_lcl.h"
#include <openssl/crypto.h>
#include <openssl/err.h>
#ifdef OPENSSL_FIPS
......@@ -168,7 +168,7 @@ static int ssleay_rand_nopseudo_bytes(unsigned char *buf, int num);
static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num);
static int ssleay_rand_status(void);
RAND_METHOD rand_ssleay_meth={
static RAND_METHOD rand_ssleay_meth={
ssleay_rand_seed,
ssleay_rand_nopseudo_bytes,
ssleay_rand_cleanup,
......
......@@ -54,6 +54,7 @@
*
*/
#include <openssl/crypto.h>
#include <openssl/e_os2.h>
#include <openssl/rand.h>
#include <openssl/buffer.h>
......
......@@ -58,8 +58,8 @@
#include <stdio.h>
#include <string.h>
#include <openssl/sha.h>
#include <openssl/crypto.h>
#include <openssl/sha.h>
#ifndef OPENSSL_NO_SHA1
unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md)
......
......@@ -56,6 +56,7 @@
* [including the GNU Public Licence.]
*/
#include <openssl/crypto.h>
#include <openssl/opensslconf.h>
#if !defined(OPENSSL_NO_SHA1) && !defined(OPENSSL_NO_SHA)
......
......@@ -56,6 +56,7 @@
* [including the GNU Public Licence.]
*/
#include <openssl/crypto.h>
#include <openssl/opensslconf.h>
#if !defined(OPENSSL_NO_SHA0) && !defined(OPENSSL_NO_SHA)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册