提交 040d43b3 编写于 作者: R Rich Salz 提交者: Rich Salz

OpenSSLDie --> OPENSSL_die

Also removed a bunch of unused define's from e_os.h
Reviewed-by: NRichard Levitte <levitte@openssl.org>
上级 c7f1fa8e
...@@ -449,11 +449,10 @@ int OPENSSL_isservice(void) ...@@ -449,11 +449,10 @@ int OPENSSL_isservice(void)
} }
#endif #endif
void OpenSSLDie(const char *file, int line, const char *assertion) void OPENSSL_die(const char *message, const char *file, int line)
{ {
OPENSSL_showfatal OPENSSL_showfatal("%s:%d: OpenSSL internal error: %s\n",
("%s(%d): OpenSSL internal error, assertion failed: %s\n", file, line, file, line, message);
assertion);
#if !defined(_WIN32) || defined(__CYGWIN__) #if !defined(_WIN32) || defined(__CYGWIN__)
abort(); abort();
#else #else
......
...@@ -103,7 +103,7 @@ static FILE *(*const vms_fopen)(const char *, const char *, ...) = ...@@ -103,7 +103,7 @@ static FILE *(*const vms_fopen)(const char *, const char *, ...) =
# define VMS_OPEN_ATTRS "shr=get,put,upd,del","ctx=bin,stm","rfm=stm","rat=none","mrs=0" # define VMS_OPEN_ATTRS "shr=get,put,upd,del","ctx=bin,stm","rfm=stm","rat=none","mrs=0"
#endif #endif
/* #define RFILE ".rnd" - defined in ../../e_os.h */ #define RFILE ".rnd"
/* /*
* Note that these functions are intended for seed files only. Entropy * Note that these functions are intended for seed files only. Entropy
......
...@@ -82,7 +82,7 @@ extern "C" { ...@@ -82,7 +82,7 @@ extern "C" {
# if defined(REF_DEBUG) # if defined(REF_DEBUG)
# define REF_ASSERT_ISNT(test) \ # define REF_ASSERT_ISNT(test) \
(void)((test) ? (OpenSSLDie(__FILE__, __LINE__, "refcount error"), 1) : 0) (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
# else # else
# define REF_ASSERT_ISNT(i) # define REF_ASSERT_ISNT(i)
# endif # endif
...@@ -94,6 +94,7 @@ extern "C" { ...@@ -94,6 +94,7 @@ extern "C" {
# endif # endif
# define osslargused(x) (void)x # define osslargused(x) (void)x
# define OPENSSL_CONF "openssl.cnf"
# ifndef DEVRANDOM # ifndef DEVRANDOM
/* /*
...@@ -337,9 +338,6 @@ extern FILE *_imp___iob; ...@@ -337,9 +338,6 @@ extern FILE *_imp___iob;
# ifndef R_OK # ifndef R_OK
# define R_OK 4 # define R_OK 4
# endif # endif
# define OPENSSL_CONF "openssl.cnf"
# define NUL_DEV "nul"
# define RFILE ".rnd"
# ifdef OPENSSL_SYS_WINCE # ifdef OPENSSL_SYS_WINCE
# define DEFAULT_HOME "" # define DEFAULT_HOME ""
# else # else
...@@ -369,10 +367,7 @@ extern FILE *_imp___iob; ...@@ -369,10 +367,7 @@ extern FILE *_imp___iob;
# else # else
# include <unixlib.h> # include <unixlib.h>
# endif # endif
# define OPENSSL_CONF "openssl.cnf"
# define RFILE ".rnd"
# define LIST_SEPARATOR_CHAR ',' # define LIST_SEPARATOR_CHAR ','
# define NUL_DEV "NLA0:"
/* We don't have any well-defined random devices on VMS, yet... */ /* We don't have any well-defined random devices on VMS, yet... */
# undef DEVRANDOM # undef DEVRANDOM
/*- /*-
...@@ -422,8 +417,6 @@ extern int kbhit(void); ...@@ -422,8 +417,6 @@ extern int kbhit(void);
# define _kbhit kbhit # define _kbhit kbhit
# define _O_TEXT O_TEXT # define _O_TEXT O_TEXT
# define _O_BINARY O_BINARY # define _O_BINARY O_BINARY
# define OPENSSL_CONF "openssl.cnf"
# define RFILE ".rnd"
# define LIST_SEPARATOR_CHAR ';' # define LIST_SEPARATOR_CHAR ';'
# define EXIT(n) { if (n) printf("ERROR: %d\n", (int)n); exit(n); } # define EXIT(n) { if (n) printf("ERROR: %d\n", (int)n); exit(n); }
...@@ -442,15 +435,10 @@ extern int kbhit(void); ...@@ -442,15 +435,10 @@ extern int kbhit(void);
# include <fcntl.h> # include <fcntl.h>
# endif # endif
# define OPENSSL_CONF "openssl.cnf"
# define RFILE ".rnd"
# define LIST_SEPARATOR_CHAR ':' # define LIST_SEPARATOR_CHAR ':'
# define NUL_DEV "/dev/null"
# define EXIT(n) exit(n) # define EXIT(n) exit(n)
# endif # endif
# define OpenSSL_getpid() getpid()
# endif # endif
/*************/ /*************/
...@@ -464,8 +452,6 @@ extern int kbhit(void); ...@@ -464,8 +452,6 @@ extern int kbhit(void);
/* windows world */ /* windows world */
# ifdef OPENSSL_NO_SOCK # ifdef OPENSSL_NO_SOCK
# define OpenSSL_Write(a,b,c) (-1)
# define OpenSSL_Read(a,b,c) (-1)
# elif !defined(__DJGPP__) # elif !defined(__DJGPP__)
# if defined(_WIN32_WCE) && _WIN32_WCE<410 # if defined(_WIN32_WCE) && _WIN32_WCE<410
# define getservbyname _masked_declaration_getservbyname # define getservbyname _masked_declaration_getservbyname
...@@ -491,11 +477,7 @@ struct servent *PASCAL getservbyname(const char *, const char *); ...@@ -491,11 +477,7 @@ struct servent *PASCAL getservbyname(const char *, const char *);
# define socket(d,t,p) ((int)socket(d,t,p)) # define socket(d,t,p) ((int)socket(d,t,p))
# define accept(s,f,l) ((int)accept(s,f,l)) # define accept(s,f,l) ((int)accept(s,f,l))
# endif # endif
# define OpenSSL_Write(a,b,c) send((a),(b),(c),0)
# define OpenSSL_Read(a,b,c) recv((a),(b),(c),0)
# else # else
# define OpenSSL_Write(a,b,c) write_s(a,b,c,0)
# define OpenSSL_Read(a,b,c) read_s(a,b,c)
# endif # endif
# elif defined(OPENSSL_SYS_NETWARE) # elif defined(OPENSSL_SYS_NETWARE)
...@@ -517,8 +499,6 @@ struct servent *PASCAL getservbyname(const char *, const char *); ...@@ -517,8 +499,6 @@ struct servent *PASCAL getservbyname(const char *, const char *);
# else # else
# include <novsock2.h> # include <novsock2.h>
# endif # endif
# define OpenSSL_Write(a,b,c) send((a),(b),(c),0)
# define OpenSSL_Read(a,b,c) recv((a),(b),(c),0)
# else # else
...@@ -578,8 +558,6 @@ struct servent *PASCAL getservbyname(const char *, const char *); ...@@ -578,8 +558,6 @@ struct servent *PASCAL getservbyname(const char *, const char *);
# endif # endif
# endif # endif
# define OpenSSL_Read(a,b,c) read((a),(b),(c))
# define OpenSSL_Write(a,b,c) write((a),(b),(c))
# ifndef INVALID_SOCKET # ifndef INVALID_SOCKET
# define INVALID_SOCKET (-1) # define INVALID_SOCKET (-1)
# endif /* INVALID_SOCKET */ # endif /* INVALID_SOCKET */
......
...@@ -482,8 +482,12 @@ int CRYPTO_mem_leaks(struct bio_st *bio); ...@@ -482,8 +482,12 @@ int CRYPTO_mem_leaks(struct bio_st *bio);
# endif # endif
/* die if we have to */ /* die if we have to */
void OpenSSLDie(const char *file, int line, const char *assertion); # if OPENSSL_API_COMPAT < 0x10100000L
# define OPENSSL_assert(e) (void)((e) ? 0 : (OpenSSLDie(OPENSSL_FILE, OPENSSL_LINE, #e),1)) # define OpenSSLDie(f,l,a) OPENSSL_die((a),(f),(l))
# endif
void OPENSSL_die(const char *assertion, const char *file, int line);
# define OPENSSL_assert(e) \
(void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
unsigned int *OPENSSL_ia32cap_loc(void); unsigned int *OPENSSL_ia32cap_loc(void);
# define OPENSSL_ia32cap ((OPENSSL_ia32cap_loc())[0]) # define OPENSSL_ia32cap ((OPENSSL_ia32cap_loc())[0])
......
...@@ -2473,7 +2473,7 @@ ASN1_item_ex_free 2391 1_1_0 EXIST::FUNCTION: ...@@ -2473,7 +2473,7 @@ ASN1_item_ex_free 2391 1_1_0 EXIST::FUNCTION:
X509_SIG_new 2392 1_1_0 EXIST::FUNCTION: X509_SIG_new 2392 1_1_0 EXIST::FUNCTION:
BN_sqr 2393 1_1_0 EXIST::FUNCTION: BN_sqr 2393 1_1_0 EXIST::FUNCTION:
TS_TST_INFO_set_time 2394 1_1_0 EXIST::FUNCTION: TS_TST_INFO_set_time 2394 1_1_0 EXIST::FUNCTION:
OpenSSLDie 2395 1_1_0 EXIST::FUNCTION: OPENSSL_die 2395 1_1_0 EXIST::FUNCTION:
X509_LOOKUP_by_alias 2396 1_1_0 EXIST::FUNCTION: X509_LOOKUP_by_alias 2396 1_1_0 EXIST::FUNCTION:
EC_KEY_set_conv_form 2397 1_1_0 EXIST::FUNCTION:EC EC_KEY_set_conv_form 2397 1_1_0 EXIST::FUNCTION:EC
CRYPTO_lock 2398 1_1_0 EXIST::FUNCTION: CRYPTO_lock 2398 1_1_0 EXIST::FUNCTION:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册