X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=apps%2Fs_server.c;h=44886c5c26150e48a8862dab24781669fdc837a2;hb=db186beee4ae2af2ea87f75781d62ea34846e440;hp=4ba3bcefb0f2923da93e0386144a0ea968f244e6;hpb=40bace2da6f0737503047e588a2a041e5f4e8f1e;p=oweals%2Fopenssl.git diff --git a/apps/s_server.c b/apps/s_server.c index 4ba3bcefb0..44886c5c26 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -144,6 +144,14 @@ typedef unsigned int u_int; #include #endif +#ifdef OPENSSL_SYS_WINCE +/* Windows CE incorrectly defines fileno as returning void*, so to avoid problems below... */ +#ifdef fileno +#undef fileno +#endif +#define fileno(a) (int)_fileno(a) +#endif + #if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000) /* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */ #undef FIONBIO @@ -860,7 +868,7 @@ end: bio_s_out=NULL; } apps_shutdown(); - EXIT(ret); + OPENSSL_EXIT(ret); } static void print_stats(BIO *bio, SSL_CTX *ssl_ctx) @@ -1176,7 +1184,7 @@ err: BIO_printf(bio_s_out,"CONNECTION CLOSED\n"); if (buf != NULL) { - memset(buf,0,bufsize); + OPENSSL_cleanse(buf,bufsize); OPENSSL_free(buf); } if (ret >= 0)