summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/cryptlib.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/lib/libcrypto/cryptlib.c b/src/lib/libcrypto/cryptlib.c
index 5518c66c46..38d31e7ac2 100644
--- a/src/lib/libcrypto/cryptlib.c
+++ b/src/lib/libcrypto/cryptlib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cryptlib.c,v 1.44 2018/11/24 04:11:47 jsing Exp $ */ 1/* $OpenBSD: cryptlib.c,v 1.45 2019/01/26 11:30:32 deraadt Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -118,6 +118,8 @@
118#include <stdarg.h> 118#include <stdarg.h>
119#include <stdio.h> 119#include <stdio.h>
120#include <string.h> 120#include <string.h>
121#include <syslog.h>
122#include <unistd.h>
121 123
122#include <openssl/opensslconf.h> 124#include <openssl/opensslconf.h>
123#include <openssl/crypto.h> 125#include <openssl/crypto.h>
@@ -343,10 +345,11 @@ OPENSSL_cpuid_setup(void)
343static void 345static void
344OPENSSL_showfatal(const char *fmta, ...) 346OPENSSL_showfatal(const char *fmta, ...)
345{ 347{
348 struct syslog_data sdata = SYSLOG_DATA_INIT;
346 va_list ap; 349 va_list ap;
347 350
348 va_start(ap, fmta); 351 va_start(ap, fmta);
349 vfprintf(stderr, fmta, ap); 352 vsyslog_r(LOG_INFO|LOG_LOCAL2, &sdata, fmta, ap);
350 va_end(ap); 353 va_end(ap);
351} 354}
352 355
@@ -354,9 +357,9 @@ void
354OpenSSLDie(const char *file, int line, const char *assertion) 357OpenSSLDie(const char *file, int line, const char *assertion)
355{ 358{
356 OPENSSL_showfatal( 359 OPENSSL_showfatal(
357 "%s(%d): OpenSSL internal error, assertion failed: %s\n", 360 "uid %u cmd %s %s(%d): OpenSSL internal error, assertion failed: %s\n",
358 file, line, assertion); 361 getuid(), getprogname(), file, line, assertion);
359 abort(); 362 _exit(1);
360} 363}
361 364
362int 365int