ocspcheck size_t printing

2017-05-08 Thread Jonas 'Sortie' Termansen
Hi, When upgrading to libressl-2.5.4 I noticed a couple -Wformat errors due to this code assuming size_t is of type long when it was actually int on this 32-bit system. Here's a patch against cvs that fixes the issue and also prints the variableas unsigned type. Jonas Index: ocspcheck.c

Re: pthread question

2015-10-07 Thread Jonas 'Sortie' Termansen
On 10/07/2015 12:53 PM, Stuart Henderson wrote: > if (pthread_kill(stat_thread, 0)) { pthread_kill sends the specified signal to the thread, but signal 0 just checks whether a signal can be sent and sends no signal.

Re: smtpd domain append fix

2015-01-06 Thread Jonas 'Sortie' Termansen
On 01/06/2015 12:11 PM, Gilles Chehade wrote: Index: smtp_session.c === RCS file: /cvs/src/usr.sbin/smtpd/smtp_session.c,v retrieving revision 1.221 diff -u -p -r1.221 smtp_session.c --- smtp_session.c17 Dec 2014 15:49:23

Re: [PATCH] update zlib to 1.2.8

2014-12-23 Thread Jonas 'Sortie' Termansen
Hi, There's some value in having a newer zlib release. There have been bugfixes, documentation fixes, various improvements, and API additions. I'm not sure how much is backported to the OpenBSD zlib, but a quick glance through your attached patch suggests there's stuff that would be nice to

Re: Violating randomization standards

2014-12-08 Thread Jonas 'Sortie' Termansen
On 12/08/2014 09:55 PM, Theo de Raadt wrote: Index: lib/libc/stdlib/mrand48.c === RCS file: /cvs/src/lib/libc/stdlib/mrand48.c,v retrieving revision 1.3 diff -u -p -u -r1.3 mrand48.c --- lib/libc/stdlib/mrand48.c 8 Aug 2005

Re: Violating randomization standards

2014-12-08 Thread Jonas 'Sortie' Termansen
On 12/09/2014 12:06 AM, Todd C. Miller wrote: Which gets cast to a signed integer in that same range... Except long is larger than 32 bits on 64-bit platforms.

gomoku debug regression

2014-12-07 Thread Jonas 'Sortie' Termansen
Hi, I noticed revision 1.25 of games/gomoku/main.c was faulty: if (!debug) -#ifdef SVR4 - srand(time(0)); -#endif if (interactive) cursinit(); /* initialize curses */ The if (!debug) line should've been removed as well. Now curses isn't

Re: gomoku debug regression

2014-12-07 Thread Jonas 'Sortie' Termansen
I just realized SVR4 wasn't defined in the first place, so this isn't a regression. It was always broken.

crypt_newhash

2014-11-20 Thread Jonas 'Sortie' Termansen
Hi, The flak blog just had an interesting post about why the old crypt() interface should be replaced, and on the new crypt_newhash() and crypt_checkpass() that were added to OpenBSD. I would like to see this API become portable and perhaps standardized, but crypt_newhash is currently tied to

Replace LibreSSL times() call

2014-10-14 Thread Jonas 'Sortie' Termansen
Hi, I noticed libressl's apps.c is using times(3), which is among the functions I am aggressively deprecating in my personal system. This patch switches it to use the clock_gettime and getrusage instead. I pondered using CLOCK_VIRTUAL rather than getrusage, but it turned out to be not be

app_tminterval callers use redundant constants

2014-10-14 Thread Jonas 'Sortie' Termansen
Hi, The app_tminterval utility function in apps.c has a first parameter that is either TM_START or TM_STOP as defined in apps.h. The two files that use this function disregard those constants and define their own along with their own wrapper utility wrapper function. This patch keeps the wrapper

CLOCK_VIRTUAL

2014-10-14 Thread Jonas 'Sortie' Termansen
Hi, I noticed clock_gettime(2) describes a CLOCK_VIRTUAL clock that measures how long a process has run in user-space. However, it is not implemented in sys/kern/kern_time.c where it fails with EINVAL in the default switch case. It does seem to be implemented in FreeBSD and NetBSD along with a

uuid encode breakage

2014-08-31 Thread Jonas 'Sortie' Termansen
Hi, I was looking at the recently imported uuid interface in libc and noticed the encode functions are broken. In particular, this pattern: uint8_t *p = buf; p[0] = htobe32(uuid-time_low); p[4] = htobe16(uuid-time_mid); p[6] = htobe16(uuid-time_hi_and_version);

Re: Miscellaneous LibreSSL portability fixes

2014-07-17 Thread Jonas 'Sortie' Termansen
Thanks for the quick responses and convincing feedback. Mind my goal is not to become a supported platform - at all - but rather to lower the portability barrier where reasonable. I can easily patch around any other concerns locally. Brent: I'll email you the changes that there's agreement on so

Miscellaneous LibreSSL portability fixes

2014-07-16 Thread Jonas 'Sortie' Termansen
should be rewritten to include stdint.h explicitly. Below you'll find the reasonably-finished parts of my local patch that solves some of the above issues. Thanks, Jonas 'Sortie' Termansen diff -Nur libressl-2.0.2/apps/Makefile.am libssl/apps/Makefile.am --- libressl-2.0.2/apps/Makefile.am