diff options
| author | 2014-04-14 18:53:14 +0000 | |
|---|---|---|
| committer | 2014-04-14 18:53:14 +0000 | |
| commit | bcf91d2ddffe6515f8fae0a0d9ab1c6787ab43ad (patch) | |
| tree | e733f4f136a08eb34c6a7cc50ffa822a1199a765 /lib/libssl/src/ssl/ssltest.c | |
| parent | make OPENSSL_NO_HEARTBLEED the default and only option. ok deraadt miod (diff) | |
| download | wireguard-openbsd-bcf91d2ddffe6515f8fae0a0d9ab1c6787ab43ad.tar.xz wireguard-openbsd-bcf91d2ddffe6515f8fae0a0d9ab1c6787ab43ad.zip | |
Flense all use of BIO_snprintf from ssl source - use the real one instead,
and allow for the normal posix mandated return values instead of the
nonstandard one from BIO_snprintf.
ok miod@
Diffstat (limited to 'lib/libssl/src/ssl/ssltest.c')
| -rw-r--r-- | lib/libssl/src/ssl/ssltest.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libssl/src/ssl/ssltest.c b/lib/libssl/src/ssl/ssltest.c index 269d171615c..664147cb6a8 100644 --- a/lib/libssl/src/ssl/ssltest.c +++ b/lib/libssl/src/ssl/ssltest.c @@ -1820,8 +1820,8 @@ process_proxy_debug(int indent, const char *format, ...) char my_format[256]; va_list args; - BIO_snprintf(my_format, sizeof(my_format), "%*.*s %s", - indent, indent, indentation, format); + (void) snprintf(my_format, sizeof(my_format), "%*.*s %s", + indent, indent, indentation, format); va_start(args, format); vfprintf(stderr, my_format, args); @@ -2311,8 +2311,8 @@ psk_client_callback(SSL *ssl, const char *hint, char *identity, int ret; unsigned int psk_len = 0; - ret = BIO_snprintf(identity, max_identity_len, "Client_identity"); - if (ret < 0) + ret = snprintf(identity, max_identity_len, "Client_identity"); + if (ret >= max_identity_len || ret == -1) goto out_err; if (debug) fprintf(stderr, "client: created identity '%s' len=%d\n", identity, ret); |
