Use NON_EMPTY_TRANSLATION_UNIT, consistently.
This also closes RT 4123 Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
@@ -108,8 +108,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <openssl/opensslconf.h> /* for OPENSSL_NO_DH */
|
#include <openssl/opensslconf.h>
|
||||||
#ifndef OPENSSL_NO_DH
|
#ifdef OPENSSL_NO_DH
|
||||||
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
|
#else
|
||||||
|
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include <time.h>
|
# include <time.h>
|
||||||
@@ -443,11 +446,4 @@ static int dh_cb(int p, int n, BN_GENCB *cb)
|
|||||||
(void)BIO_flush(BN_GENCB_get_arg(cb));
|
(void)BIO_flush(BN_GENCB_get_arg(cb));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* !OPENSSL_NO_DH */
|
|
||||||
|
|
||||||
# if PEDANTIC
|
|
||||||
static void *dummy = &dummy;
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
13
apps/dsa.c
13
apps/dsa.c
@@ -55,8 +55,11 @@
|
|||||||
* [including the GNU Public Licence.]
|
* [including the GNU Public Licence.]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <openssl/opensslconf.h> /* for OPENSSL_NO_DSA */
|
#include <openssl/opensslconf.h>
|
||||||
#ifndef OPENSSL_NO_DSA
|
#ifdef OPENSSL_NO_DSA
|
||||||
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
|
#else
|
||||||
|
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
@@ -299,10 +302,4 @@ int dsa_main(int argc, char **argv)
|
|||||||
OPENSSL_free(passout);
|
OPENSSL_free(passout);
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
#else /* !OPENSSL_NO_DSA */
|
|
||||||
|
|
||||||
# if PEDANTIC
|
|
||||||
static void *dummy = &dummy;
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -55,9 +55,11 @@
|
|||||||
* [including the GNU Public Licence.]
|
* [including the GNU Public Licence.]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <openssl/opensslconf.h> /* for OPENSSL_NO_DSA */
|
#include <openssl/opensslconf.h>
|
||||||
|
#ifdef OPENSSL_NO_DSA
|
||||||
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
|
#else
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_DSA
|
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include <time.h>
|
# include <time.h>
|
||||||
@@ -347,10 +349,4 @@ static int dsa_cb(int p, int n, BN_GENCB *cb)
|
|||||||
# endif
|
# endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#else /* !OPENSSL_NO_DSA */
|
|
||||||
|
|
||||||
# if PEDANTIC
|
|
||||||
static void *dummy = &dummy;
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
11
apps/ec.c
11
apps/ec.c
@@ -56,7 +56,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <openssl/opensslconf.h>
|
#include <openssl/opensslconf.h>
|
||||||
#ifndef OPENSSL_NO_EC
|
#ifdef OPENSSL_NO_EC
|
||||||
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
|
#else
|
||||||
|
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
@@ -307,10 +310,4 @@ int ec_main(int argc, char **argv)
|
|||||||
OPENSSL_free(passout);
|
OPENSSL_free(passout);
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
#else /* !OPENSSL_NO_EC */
|
|
||||||
|
|
||||||
# if PEDANTIC
|
|
||||||
static void *dummy = &dummy;
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -69,7 +69,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <openssl/opensslconf.h>
|
#include <openssl/opensslconf.h>
|
||||||
#ifndef OPENSSL_NO_EC
|
#ifdef OPENSSL_NO_EC
|
||||||
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
|
#else
|
||||||
|
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include <time.h>
|
# include <time.h>
|
||||||
@@ -502,10 +505,4 @@ int ecparam_main(int argc, char **argv)
|
|||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* !OPENSSL_NO_EC */
|
|
||||||
|
|
||||||
# if PEDANTIC
|
|
||||||
static void *dummy = &dummy;
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -56,12 +56,16 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <openssl/opensslconf.h>
|
||||||
#include <stdlib.h>
|
#ifdef OPENSSL_NO_ENGINE
|
||||||
#include <string.h>
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
#include "apps.h"
|
#else
|
||||||
#include <openssl/err.h>
|
|
||||||
#ifndef OPENSSL_NO_ENGINE
|
# include "apps.h"
|
||||||
|
# include <stdio.h>
|
||||||
|
# include <stdlib.h>
|
||||||
|
# include <string.h>
|
||||||
|
# include <openssl/err.h>
|
||||||
# include <openssl/engine.h>
|
# include <openssl/engine.h>
|
||||||
# include <openssl/ssl.h>
|
# include <openssl/ssl.h>
|
||||||
|
|
||||||
@@ -483,10 +487,4 @@ int engine_main(int argc, char **argv)
|
|||||||
BIO_free_all(out);
|
BIO_free_all(out);
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
|
|
||||||
# if PEDANTIC
|
|
||||||
static void *dummy = &dummy;
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -55,8 +55,11 @@
|
|||||||
* [including the GNU Public Licence.]
|
* [including the GNU Public Licence.]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <openssl/opensslconf.h> /* for OPENSSL_NO_DSA */
|
#include <openssl/opensslconf.h>
|
||||||
#ifndef OPENSSL_NO_DSA
|
#ifdef OPENSSL_NO_DSA
|
||||||
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
|
#else
|
||||||
|
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
@@ -185,10 +188,4 @@ int gendsa_main(int argc, char **argv)
|
|||||||
OPENSSL_free(passout);
|
OPENSSL_free(passout);
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
#else /* !OPENSSL_NO_DSA */
|
|
||||||
|
|
||||||
# if PEDANTIC
|
|
||||||
static void *dummy = &dummy;
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -56,8 +56,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <openssl/opensslconf.h>
|
#include <openssl/opensslconf.h>
|
||||||
|
#ifdef OPENSSL_NO_RSA
|
||||||
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
|
#else
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_RSA
|
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
@@ -232,10 +234,4 @@ static int genrsa_cb(int p, int n, BN_GENCB *cb)
|
|||||||
(void)BIO_flush(BN_GENCB_get_arg(cb));
|
(void)BIO_flush(BN_GENCB_get_arg(cb));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#else /* !OPENSSL_NO_RSA */
|
|
||||||
|
|
||||||
# if PEDANTIC
|
|
||||||
static void *dummy = &dummy;
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
11
apps/rsa.c
11
apps/rsa.c
@@ -104,7 +104,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <openssl/opensslconf.h>
|
#include <openssl/opensslconf.h>
|
||||||
#ifndef OPENSSL_NO_RSA
|
#ifdef OPENSSL_NO_RSA
|
||||||
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
|
#else
|
||||||
|
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
@@ -396,10 +399,4 @@ int rsa_main(int argc, char **argv)
|
|||||||
OPENSSL_free(passout);
|
OPENSSL_free(passout);
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
#else /* !OPENSSL_NO_RSA */
|
|
||||||
|
|
||||||
# if PEDANTIC
|
|
||||||
static void *dummy = &dummy;
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -57,7 +57,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <openssl/opensslconf.h>
|
#include <openssl/opensslconf.h>
|
||||||
#ifndef OPENSSL_NO_RSA
|
#ifdef OPENSSL_NO_RSA
|
||||||
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
|
#else
|
||||||
|
|
||||||
# include "apps.h"
|
# include "apps.h"
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
@@ -319,11 +321,4 @@ int rsautl_main(int argc, char **argv)
|
|||||||
OPENSSL_free(passin);
|
OPENSSL_free(passin);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* !OPENSSL_NO_RSA */
|
|
||||||
|
|
||||||
# if PEDANTIC
|
|
||||||
static void *dummy = &dummy;
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
34
apps/srp.c
34
apps/srp.c
@@ -55,19 +55,22 @@
|
|||||||
* Hudson (tjh@cryptsoft.com).
|
* Hudson (tjh@cryptsoft.com).
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include <openssl/opensslconf.h>
|
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_SRP
|
#include <openssl/opensslconf.h>
|
||||||
#include <stdio.h>
|
#ifdef OPENSSL_NO_SRP
|
||||||
#include <stdlib.h>
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
#include <string.h>
|
#else
|
||||||
#include <openssl/conf.h>
|
|
||||||
#include <openssl/bio.h>
|
# include <stdio.h>
|
||||||
#include <openssl/err.h>
|
# include <stdlib.h>
|
||||||
#include <openssl/txt_db.h>
|
# include <string.h>
|
||||||
#include <openssl/buffer.h>
|
# include <openssl/conf.h>
|
||||||
#include <openssl/srp.h>
|
# include <openssl/bio.h>
|
||||||
#include "apps.h"
|
# include <openssl/err.h>
|
||||||
|
# include <openssl/txt_db.h>
|
||||||
|
# include <openssl/buffer.h>
|
||||||
|
# include <openssl/srp.h>
|
||||||
|
# include "apps.h"
|
||||||
|
|
||||||
# define BASE_SECTION "srp"
|
# define BASE_SECTION "srp"
|
||||||
# define CONFIG_FILE "openssl.cnf"
|
# define CONFIG_FILE "openssl.cnf"
|
||||||
@@ -653,11 +656,4 @@ int srp_main(int argc, char **argv)
|
|||||||
OBJ_cleanup();
|
OBJ_cleanup();
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
# if PEDANTIC
|
|
||||||
static void *dummy = &dummy;
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -33,10 +33,10 @@ GENERAL=Makefile README crypto-lib.com install.com
|
|||||||
LIB= $(TOP)/libcrypto.a
|
LIB= $(TOP)/libcrypto.a
|
||||||
SHARED_LIB= libcrypto$(SHLIB_EXT)
|
SHARED_LIB= libcrypto$(SHLIB_EXT)
|
||||||
LIBSRC= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c cpt_err.c \
|
LIBSRC= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c cpt_err.c \
|
||||||
ebcdic.c uid.c o_time.c o_str.c o_dir.c thr_id.c lock.c fips_ers.c \
|
ebcdic.c uid.c o_time.c o_str.c o_dir.c thr_id.c lock.c \
|
||||||
o_init.c o_fips.c mem_sec.c init.c
|
o_init.c o_fips.c mem_sec.c init.c
|
||||||
LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o cpt_err.o \
|
LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o cpt_err.o \
|
||||||
ebcdic.o uid.o o_time.o o_str.o o_dir.o thr_id.o lock.o fips_ers.o \
|
ebcdic.o uid.o o_time.o o_str.o o_dir.o thr_id.o lock.o \
|
||||||
o_init.o o_fips.o mem_sec.o init.o $(CPUID_OBJ)
|
o_init.o o_fips.o mem_sec.o init.o $(CPUID_OBJ)
|
||||||
|
|
||||||
SRC= $(LIBSRC)
|
SRC= $(LIBSRC)
|
||||||
|
@@ -55,9 +55,13 @@
|
|||||||
* [including the GNU Public Licence.]
|
* [including the GNU Public Licence.]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include "openssl/opensslconf.h"
|
||||||
#include "internal/cryptlib.h"
|
#ifdef OPENSSL_NO_RSA
|
||||||
#ifndef OPENSSL_NO_RSA
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
|
#else
|
||||||
|
|
||||||
|
# include "internal/cryptlib.h"
|
||||||
|
# include <stdio.h>
|
||||||
# include <openssl/rsa.h>
|
# include <openssl/rsa.h>
|
||||||
# include <openssl/objects.h>
|
# include <openssl/objects.h>
|
||||||
# include <openssl/asn1t.h>
|
# include <openssl/asn1t.h>
|
||||||
@@ -103,10 +107,4 @@ IMPLEMENT_ASN1_FUNCTIONS_const(NETSCAPE_PKEY)
|
|||||||
|
|
||||||
# endif /* OPENSSL_NO_RC4 */
|
# endif /* OPENSSL_NO_RC4 */
|
||||||
|
|
||||||
#else /* !OPENSSL_NO_RSA */
|
|
||||||
|
|
||||||
# if PEDANTIC
|
|
||||||
static void *dummy = &dummy;
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -57,16 +57,17 @@
|
|||||||
* slurp this code if applications are using them directly.
|
* slurp this code if applications are using them directly.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <time.h>
|
|
||||||
#include "internal/cryptlib.h"
|
|
||||||
#include "bn_lcl.h"
|
|
||||||
#include <openssl/opensslconf.h>
|
#include <openssl/opensslconf.h>
|
||||||
#include <openssl/rand.h>
|
#if OPENSSL_API_COMPAT >= 0x00908000L
|
||||||
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
|
#else
|
||||||
|
|
||||||
static void *dummy = &dummy;
|
# include <stdio.h>
|
||||||
|
# include <time.h>
|
||||||
|
# include "internal/cryptlib.h"
|
||||||
|
# include "bn_lcl.h"
|
||||||
|
# include <openssl/rand.h>
|
||||||
|
|
||||||
#if OPENSSL_API_COMPAT < 0x00908000L
|
|
||||||
BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
|
BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
|
||||||
const BIGNUM *add, const BIGNUM *rem,
|
const BIGNUM *add, const BIGNUM *rem,
|
||||||
void (*callback) (int, int, void *), void *cb_arg)
|
void (*callback) (int, int, void *), void *cb_arg)
|
||||||
|
@@ -42,7 +42,9 @@
|
|||||||
|
|
||||||
#include "rsaz_exp.h"
|
#include "rsaz_exp.h"
|
||||||
|
|
||||||
#ifdef RSAZ_ENABLED
|
#ifndef RSAZ_ENABLED
|
||||||
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
|
#else
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* See crypto/bn/asm/rsaz-avx2.pl for further details.
|
* See crypto/bn/asm/rsaz-avx2.pl for further details.
|
||||||
@@ -337,10 +339,4 @@ void RSAZ_512_mod_exp(BN_ULONG result[8],
|
|||||||
OPENSSL_cleanse(storage, sizeof(storage));
|
OPENSSL_cleanse(storage, sizeof(storage));
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
# if defined(PEDANTIC) || defined(__DECC) || defined(__clang__)
|
|
||||||
static void *dummy = &dummy;
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
LIBS=../libcrypto
|
LIBS=../libcrypto
|
||||||
SOURCE[../libcrypto]=\
|
SOURCE[../libcrypto]=\
|
||||||
cryptlib.c mem.c mem_dbg.c cversion.c ex_data.c cpt_err.c \
|
cryptlib.c mem.c mem_dbg.c cversion.c ex_data.c cpt_err.c \
|
||||||
ebcdic.c uid.c o_time.c o_str.c o_dir.c thr_id.c lock.c fips_ers.c \
|
ebcdic.c uid.c o_time.c o_str.c o_dir.c thr_id.c lock.c \
|
||||||
o_init.c o_fips.c mem_sec.c init.c {- $target{cpuid_asm_src} -}
|
o_init.c o_fips.c mem_sec.c init.c {- $target{cpuid_asm_src} -}
|
||||||
EXTRA= ../ms/uplink-x86.pl ../ms/uplink.c ../ms/applink.c \
|
EXTRA= ../ms/uplink-x86.pl ../ms/uplink.c ../ms/applink.c \
|
||||||
x86cpuid.pl x86_64cpuid.pl ia64cpuid.S \
|
x86cpuid.pl x86_64cpuid.pl ia64cpuid.S \
|
||||||
|
@@ -217,7 +217,7 @@ $!
|
|||||||
$! Define The Different Encryption "library" Strings.
|
$! Define The Different Encryption "library" Strings.
|
||||||
$!
|
$!
|
||||||
$ LIB_ = "cryptlib,mem,mem_clr,mem_dbg,cversion,ex_data,cpt_err,"+ -
|
$ LIB_ = "cryptlib,mem,mem_clr,mem_dbg,cversion,ex_data,cpt_err,"+ -
|
||||||
"ebcdic,uid,o_time,o_str,o_dir,thr_id,lock,fips_ers,"+ -
|
"ebcdic,uid,o_time,o_str,o_dir,thr_id,lock,"+ -
|
||||||
"o_init,o_fips"
|
"o_init,o_fips"
|
||||||
$ LIB_OBJECTS = "o_names,obj_dat,obj_lib,obj_err,obj_xref"
|
$ LIB_OBJECTS = "o_names,obj_dat,obj_lib,obj_err,obj_xref"
|
||||||
$ LIB_MD2 = "md2_dgst,md2_one"
|
$ LIB_MD2 = "md2_dgst,md2_one"
|
||||||
|
@@ -54,15 +54,16 @@
|
|||||||
|
|
||||||
/* This file contains deprecated functions as wrappers to the new ones */
|
/* This file contains deprecated functions as wrappers to the new ones */
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include "internal/cryptlib.h"
|
|
||||||
#include <openssl/bn.h>
|
|
||||||
#include <openssl/dh.h>
|
|
||||||
#include <openssl/opensslconf.h>
|
#include <openssl/opensslconf.h>
|
||||||
|
#if OPENSSL_API_COMPAT >= 0x00908000L
|
||||||
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
|
#else
|
||||||
|
|
||||||
static void *dummy = &dummy;
|
# include <stdio.h>
|
||||||
|
# include "internal/cryptlib.h"
|
||||||
|
# include <openssl/bn.h>
|
||||||
|
# include <openssl/dh.h>
|
||||||
|
|
||||||
#if OPENSSL_API_COMPAT < 0x00908000L
|
|
||||||
DH *DH_generate_parameters(int prime_len, int generator,
|
DH *DH_generate_parameters(int prime_len, int generator,
|
||||||
void (*callback) (int, int, void *), void *cb_arg)
|
void (*callback) (int, int, void *), void *cb_arg)
|
||||||
{
|
{
|
||||||
|
@@ -64,19 +64,20 @@
|
|||||||
*/
|
*/
|
||||||
#define xxxHASH EVP_sha1()
|
#define xxxHASH EVP_sha1()
|
||||||
|
|
||||||
static void *dummy = &dummy;
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <time.h>
|
|
||||||
#include "internal/cryptlib.h"
|
|
||||||
#include <openssl/evp.h>
|
|
||||||
#include <openssl/bn.h>
|
|
||||||
#include <openssl/dsa.h>
|
|
||||||
#include <openssl/rand.h>
|
|
||||||
#include <openssl/sha.h>
|
|
||||||
#include <openssl/opensslconf.h>
|
#include <openssl/opensslconf.h>
|
||||||
|
#if OPENSSL_API_COMPAT >= 0x00908000L
|
||||||
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
|
#else
|
||||||
|
|
||||||
|
# include <stdio.h>
|
||||||
|
# include <time.h>
|
||||||
|
# include "internal/cryptlib.h"
|
||||||
|
# include <openssl/evp.h>
|
||||||
|
# include <openssl/bn.h>
|
||||||
|
# include <openssl/dsa.h>
|
||||||
|
# include <openssl/rand.h>
|
||||||
|
# include <openssl/sha.h>
|
||||||
|
|
||||||
#if OPENSSL_API_COMPAT < 0x00908000L
|
|
||||||
DSA *DSA_generate_parameters(int bits,
|
DSA *DSA_generate_parameters(int bits,
|
||||||
unsigned char *seed_in, int seed_len,
|
unsigned char *seed_in, int seed_len,
|
||||||
int *counter_ret, unsigned long *h_ret,
|
int *counter_ret, unsigned long *h_ret,
|
||||||
|
@@ -1,14 +1,11 @@
|
|||||||
|
|
||||||
#ifndef CHARSET_EBCDIC
|
|
||||||
|
|
||||||
# include <openssl/e_os2.h>
|
# include <openssl/e_os2.h>
|
||||||
# if defined(PEDANTIC) || defined(__DECC) || defined(OPENSSL_SYS_MACOSX) || defined(__clang__)
|
#ifndef CHARSET_EBCDIC
|
||||||
static void *dummy = &dummy;
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
# endif
|
#else
|
||||||
|
|
||||||
#else /* CHARSET_EBCDIC */
|
|
||||||
|
|
||||||
# include "ebcdic.h"
|
# include "ebcdic.h"
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Initial Port for Apache-1.3 by <Martin.Kraemer@Mch.SNI.De>
|
* Initial Port for Apache-1.3 by <Martin.Kraemer@Mch.SNI.De>
|
||||||
* Adapted for OpenSSL-0.9.4 by <Martin.Kraemer@Mch.SNI.De>
|
* Adapted for OpenSSL-0.9.4 by <Martin.Kraemer@Mch.SNI.De>
|
||||||
|
@@ -25,7 +25,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <openssl/opensslconf.h>
|
#include <openssl/opensslconf.h>
|
||||||
#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
|
#ifdef OPENSSL_NO_EC_NISTP_64_GCC_128
|
||||||
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
|
#else
|
||||||
|
|
||||||
# include <stdint.h>
|
# include <stdint.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
@@ -1677,6 +1679,4 @@ int ec_GFp_nistp224_have_precompute_mult(const EC_GROUP *group)
|
|||||||
return HAVEPRECOMP(group, nistp224);
|
return HAVEPRECOMP(group, nistp224);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
static void *dummy = &dummy;
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -26,7 +26,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <openssl/opensslconf.h>
|
#include <openssl/opensslconf.h>
|
||||||
#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
|
#ifdef OPENSSL_NO_EC_NISTP_64_GCC_128
|
||||||
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
|
#else
|
||||||
|
|
||||||
# include <stdint.h>
|
# include <stdint.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
@@ -2311,6 +2313,4 @@ int ec_GFp_nistp256_have_precompute_mult(const EC_GROUP *group)
|
|||||||
{
|
{
|
||||||
return HAVEPRECOMP(group, nistp256);
|
return HAVEPRECOMP(group, nistp256);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
static void *dummy = &dummy;
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -26,7 +26,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <openssl/opensslconf.h>
|
#include <openssl/opensslconf.h>
|
||||||
#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
|
#ifdef OPENSSL_NO_EC_NISTP_64_GCC_128
|
||||||
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
|
#else
|
||||||
|
|
||||||
# ifndef OPENSSL_SYS_VMS
|
# ifndef OPENSSL_SYS_VMS
|
||||||
# include <stdint.h>
|
# include <stdint.h>
|
||||||
@@ -2106,6 +2108,4 @@ int ec_GFp_nistp521_have_precompute_mult(const EC_GROUP *group)
|
|||||||
return HAVEPRECOMP(group, nistp521);
|
return HAVEPRECOMP(group, nistp521);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
static void *dummy = &dummy;
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -18,7 +18,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <openssl/opensslconf.h>
|
#include <openssl/opensslconf.h>
|
||||||
#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
|
#ifdef OPENSSL_NO_EC_NISTP_64_GCC_128
|
||||||
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
|
#else
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Common utility functions for ecp_nistp224.c, ecp_nistp256.c, ecp_nistp521.c.
|
* Common utility functions for ecp_nistp224.c, ecp_nistp256.c, ecp_nistp521.c.
|
||||||
@@ -212,6 +214,4 @@ void ec_GFp_nistp_recode_scalar_bits(unsigned char *sign,
|
|||||||
*sign = s & 1;
|
*sign = s & 1;
|
||||||
*digit = d;
|
*digit = d;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
static void *dummy = &dummy;
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -53,7 +53,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <openssl/opensslconf.h>
|
#include <openssl/opensslconf.h>
|
||||||
#ifndef OPENSSL_NO_CAMELLIA
|
#ifdef OPENSSL_NO_CAMELLIA
|
||||||
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
|
#else
|
||||||
|
|
||||||
# include <openssl/evp.h>
|
# include <openssl/evp.h>
|
||||||
# include <openssl/err.h>
|
# include <openssl/err.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
@@ -402,10 +405,4 @@ static int camellia_ctr_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
|||||||
BLOCK_CIPHER_generic_pack(NID_camellia, 128, 0)
|
BLOCK_CIPHER_generic_pack(NID_camellia, 128, 0)
|
||||||
BLOCK_CIPHER_generic_pack(NID_camellia, 192, 0)
|
BLOCK_CIPHER_generic_pack(NID_camellia, 192, 0)
|
||||||
BLOCK_CIPHER_generic_pack(NID_camellia, 256, 0)
|
BLOCK_CIPHER_generic_pack(NID_camellia, 256, 0)
|
||||||
#else
|
|
||||||
|
|
||||||
# ifdef PEDANTIC
|
|
||||||
static void *dummy = &dummy;
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -57,9 +57,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <openssl/opensslconf.h>
|
#include <openssl/opensslconf.h>
|
||||||
|
|
||||||
#if OPENSSL_API_COMPAT >= 0x00908000L
|
#if OPENSSL_API_COMPAT >= 0x00908000L
|
||||||
static void *dummy = &dummy;
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
#else
|
#else
|
||||||
|
|
||||||
# include <openssl/evp.h>
|
# include <openssl/evp.h>
|
||||||
|
@@ -55,11 +55,12 @@
|
|||||||
* [including the GNU Public Licence.]
|
* [including the GNU Public Licence.]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include "internal/cryptlib.h"
|
#include "internal/cryptlib.h"
|
||||||
|
#ifdef OPENSSL_NO_RSA
|
||||||
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
|
#else
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_RSA
|
# include <stdio.h>
|
||||||
|
|
||||||
# include <openssl/evp.h>
|
# include <openssl/evp.h>
|
||||||
# include <openssl/objects.h>
|
# include <openssl/objects.h>
|
||||||
# include <openssl/x509.h>
|
# include <openssl/x509.h>
|
||||||
@@ -117,10 +118,4 @@ int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
|
|||||||
i = EVP_DecryptInit_ex(ctx, NULL, NULL, NULL, NULL);
|
i = EVP_DecryptInit_ex(ctx, NULL, NULL, NULL, NULL);
|
||||||
return (i);
|
return (i);
|
||||||
}
|
}
|
||||||
#else /* !OPENSSL_NO_RSA */
|
|
||||||
|
|
||||||
# ifdef PEDANTIC
|
|
||||||
static void *dummy = &dummy;
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#include <openssl/opensslconf.h>
|
#include <openssl/opensslconf.h>
|
||||||
|
|
||||||
#ifdef OPENSSL_FIPS
|
#ifndef OPENSSL_FIPS
|
||||||
# include "fips_err.h"
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
#else
|
#else
|
||||||
static void *dummy = &dummy;
|
# include "fips_err.h"
|
||||||
#endif
|
#endif
|
||||||
|
@@ -53,9 +53,14 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <openssl/crypto.h>
|
#include <openssl/opensslconf.h>
|
||||||
#include <openssl/e_os2.h>
|
#ifdef OPENSSL_NO_EGD
|
||||||
#include <openssl/rand.h>
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
|
#else
|
||||||
|
|
||||||
|
# include <openssl/crypto.h>
|
||||||
|
# include <openssl/e_os2.h>
|
||||||
|
# include <openssl/rand.h>
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Query the EGD <URL: http://www.lothar.com/tech/crypto/>.
|
* Query the EGD <URL: http://www.lothar.com/tech/crypto/>.
|
||||||
@@ -94,8 +99,6 @@
|
|||||||
* RAND_egd() is a wrapper for RAND_egd_bytes() with numbytes=255.
|
* RAND_egd() is a wrapper for RAND_egd_bytes() with numbytes=255.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_EGD
|
|
||||||
|
|
||||||
# if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_NETWARE) || defined(OPENSSL_SYS_VOS) || defined(OPENSSL_SYS_UEFI)
|
# if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_NETWARE) || defined(OPENSSL_SYS_VOS) || defined(OPENSSL_SYS_UEFI)
|
||||||
int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)
|
int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)
|
||||||
{
|
{
|
||||||
@@ -288,8 +291,4 @@ int RAND_egd(const char *path)
|
|||||||
|
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
#else /* OPENSSL_NO_EGD */
|
|
||||||
# if PEDANTIC
|
|
||||||
static void *dummy = &dummy;
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -57,19 +57,18 @@
|
|||||||
* "new" versions).
|
* "new" versions).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <time.h>
|
|
||||||
#include "internal/cryptlib.h"
|
|
||||||
#include <openssl/opensslconf.h>
|
#include <openssl/opensslconf.h>
|
||||||
#include <openssl/bn.h>
|
|
||||||
#include <openssl/rsa.h>
|
|
||||||
|
|
||||||
#if OPENSSL_API_COMPAT >= 0x00908000L
|
#if OPENSSL_API_COMPAT >= 0x00908000L
|
||||||
|
NON_EMPTY_TRANSLATION_UNIT
|
||||||
static void *dummy = &dummy;
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
# include <stdio.h>
|
||||||
|
# include <time.h>
|
||||||
|
# include "internal/cryptlib.h"
|
||||||
|
# include <openssl/bn.h>
|
||||||
|
# include <openssl/rsa.h>
|
||||||
|
|
||||||
RSA *RSA_generate_key(int bits, unsigned long e_value,
|
RSA *RSA_generate_key(int bits, unsigned long e_value,
|
||||||
void (*callback) (int, int, void *), void *cb_arg)
|
void (*callback) (int, int, void *), void *cb_arg)
|
||||||
{
|
{
|
||||||
|
@@ -71,6 +71,12 @@ EOF
|
|||||||
"";
|
"";
|
||||||
-}
|
-}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Sometimes OPENSSSL_NO_xxx ends up with an empty file and some compilers
|
||||||
|
* don't like that. This will hopefully silence them.
|
||||||
|
*/
|
||||||
|
#define NON_EMPTY_TRANSLATION_UNIT static void *dummy = &dummy;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Applications should use -DOPENSSL_API_COMPAT=<version> to suppress the
|
* Applications should use -DOPENSSL_API_COMPAT=<version> to suppress the
|
||||||
* declarations of functions deprecated in or before <version>. Otherwise, they
|
* declarations of functions deprecated in or before <version>. Otherwise, they
|
||||||
|
Reference in New Issue
Block a user