summaryrefslogtreecommitdiffstats
path: root/crypto/cryptlib.c
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2011-10-23 21:41:00 +0200
committerAndy Polyakov <appro@openssl.org>2011-10-23 21:41:00 +0200
commit181fbb77f3357f403b9635c10b696a2165328f27 (patch)
tree12b9bf6e0b853caef3c02f9833067c76f11e0702 /crypto/cryptlib.c
parentNo need for custom flag in XTS mode: block length is 1. (diff)
downloadopenssl-181fbb77f3357f403b9635c10b696a2165328f27.tar.xz
openssl-181fbb77f3357f403b9635c10b696a2165328f27.zip
cryptlib.c: remove stdio dependency in Windows fipscanister.lib.
Diffstat (limited to 'crypto/cryptlib.c')
-rw-r--r--crypto/cryptlib.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c
index 8a8fac3d13..524daf037d 100644
--- a/crypto/cryptlib.c
+++ b/crypto/cryptlib.c
@@ -293,8 +293,12 @@ void OPENSSL_showfatal (const char *fmta,...)
if ((h=GetStdHandle(STD_ERROR_HANDLE)) != NULL &&
GetFileType(h)!=FILE_TYPE_UNKNOWN)
{ /* must be console application */
+ int len;
+ DWORD out;
+
va_start (ap,fmta);
- vfprintf (stderr,fmta,ap);
+ len=_vsnprintf((char *)buf,sizeof(buf),fmt,ap);
+ WriteFile(h,buf,len<0?sizeof(buf):(DWORD)len,&out,NULL);
va_end (ap);
return;
}
@@ -375,4 +379,6 @@ void OpenSSLDie(const char *file,int line,const char *assertion)
#endif
}
+#ifndef OPENSSL_FIPSCANISTER
void *OPENSSL_stderr(void) { return stderr; }
+#endif