Compare commits

..

23 Commits

Author SHA1 Message Date
Brent Cook
af624440e2 Land #376, adjust MSVC warnings 2018-01-07 16:22:00 -06:00
Brent Cook
c3210983a5 Land #374, hp-ux compatibility
Merge remote-tracking branch 'upstream/pr/374'
2018-01-07 16:21:11 -06:00
Brent Cook
40e04292a0 Land #375, adjust va_end calls to match scope 2018-01-07 16:19:36 -06:00
kinichiro
0ee8aa8eaf Remove unneeded -ULIBRESSL_INTERNAL 2018-01-06 18:51:45 +09:00
kinichiro
b0e9f0a354 Reconsider MSVC warning list
- Remove C4242 and C4820
- Warning explanation from manual
- Sort by warning code
2018-01-06 18:12:50 +09:00
kinichiro
1f4bfb9a4d Call va_end soon after using variable length variable
- This fix MSVC compiler warning C4702 "unreachable code".
2018-01-06 00:28:49 +09:00
kinichiro
861a6ca1db Modify regress tests/tlsexttest.c for 0 sized array
- Windows and hp-ux ANSI compiler can not handle 0 sized array initialization.
2017-12-30 20:15:56 +09:00
Brent Cook
52c39d42ea Land #373, add app_timer_user for Windows 2017-12-28 03:39:59 -06:00
Brent Cook
9a7fb37405 Land #372, Add CLOCK_MONOTONIC and timersub compatibility stubs 2017-12-28 03:38:41 -06:00
kinichiro
82ce59838e Add app_timer_user for Windows build 2017-12-26 22:49:01 +09:00
kinichiro
965a89108e Add CLOCK_MONOTONIC and timersub for the OS that does not have them 2017-12-25 16:30:49 +09:00
kinichiro
f69775d7b2 Add regress configtest 2017-12-22 23:35:48 +09:00
kinichiro
b38d7f0f8a Add regress asn1evp 2017-12-22 23:33:15 +09:00
Brent Cook
7b6953e9a9 add timerspecsub 2017-12-12 03:31:35 -06:00
Brent Cook
6d0192ff17 update for 2.7.0 2017-12-11 06:14:02 -06:00
Brent Cook
426595b267 update links 2017-12-11 05:08:54 -06:00
Brent Cook
0f7609af9a add release notes 2017-12-11 04:58:15 -06:00
Kyle J. McKay
26b40cb773 netcat.c.patch: eliminate syntax error from patch
If the target system does not define IPV6_TCLASS, this part of
the patch handles that with an ENOPROTOOPT error rather than
failing to compile.

Unfortunately it's missing a trailing semicolon leading to
a compilation error.

Add the missing semicolon to fix the problem.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
2017-12-05 15:22:15 -08:00
Evgen Bodunov
aff3a43fa0
Fixed getpagesize detection on Android 2017-11-23 15:28:25 +03:00
Brent Cook
53b5b56f39 Land #359, create correct certs dir with CMake install 2017-11-23 05:43:27 -06:00
Aric Belsito
653ba21752
Create correct directory in CMake install.
Was creating ${CONFDIR}/cert instead of ${CONFDIR}/certs.
2017-11-06 11:52:03 -08:00
Brent Cook
09ca0f7b8b fetch before update to grab new branches 2017-11-05 17:14:55 -06:00
Brent Cook
b32a92bc44 update changelog 2017-11-05 17:11:46 -06:00
10 changed files with 140 additions and 11 deletions

1
.gitignore vendored
View File

@ -53,6 +53,7 @@ test-driver
*.trs
tests/aes_wrap*
tests/arc4random_fork*
tests/asn1evp*
tests/asn1time*
tests/cipher*
tests/explicit_bzero*

View File

@ -28,6 +28,17 @@ history is also available from Git.
LibreSSL Portable Release Notes:
2.7.0 - Bug fixes and improvements
* Merged more DTLS support into the regular TLS code path, removing
duplicated code.
* Converted ssl3_send_client_hello(), ssl3_send_server_hello() to CBB.
* Rewrite ASN1_TYPE_{get,set}_octetstring() using templated ASN.1.
This removes the last remaining use of the old M_ASN1_* macros
(asn1_mac.h) from API that needs to continue to exist.
2.6.4 - Bug fixes
* Make tls_config_parse_protocols() work correctly when passed a NULL

View File

@ -1 +1 @@
OPENBSD_6_2
master

View File

@ -13,7 +13,7 @@
#include "apps.h"
double
app_tminterval(int stop, int usertime)
app_timer_user(int stop)
{
static unsigned __int64 tmstart;
union {
@ -22,13 +22,11 @@ app_tminterval(int stop, int usertime)
} ct, et, kt, ut;
GetProcessTimes(GetCurrentProcess(), &ct.ft, &et.ft, &kt.ft, &ut.ft);
if (stop == TM_START) {
tmstart = ut.u64 + kt.u64;
} else {
if (stop)
return (ut.u64 + kt.u64 - tmstart) / (double) 10000000;
}
return 0;
tmstart = ut.u64 + kt.u64;
return 0.0;
}
int

View File

@ -13,4 +13,20 @@ int gettimeofday(struct timeval *tp, void *tzp);
#include_next <sys/time.h>
#endif
#ifndef CLOCK_MONOTONIC
#define CLOCK_MONOTONIC CLOCK_REALTIME
#endif
#ifndef timersub
#define timersub(tvp, uvp, vvp) \
do { \
(vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \
(vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \
if ((vvp)->tv_usec < 0) { \
(vvp)->tv_sec--; \
(vvp)->tv_usec += 1000000; \
} \
} while (0)
#endif
#endif

View File

@ -21,3 +21,15 @@ struct tm *__gmtime_r(const time_t * t, struct tm * tm);
#ifndef HAVE_TIMEGM
time_t timegm(struct tm *tm);
#endif
#ifndef timespecsub
#define timespecsub(tsp, usp, vsp) \
do { \
(vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec; \
(vsp)->tv_nsec = (tsp)->tv_nsec - (usp)->tv_nsec; \
if ((vsp)->tv_nsec < 0) { \
(vsp)->tv_sec--; \
(vsp)->tv_nsec += 1000000000L; \
} \
} while (0)
#endif

View File

@ -2052,6 +2052,7 @@ tls_config_verify.3,tls_config_insecure_noverifytime.3
tls_conn_version.3,tls_conn_alpn_selected.3
tls_conn_version.3,tls_conn_cipher.3
tls_conn_version.3,tls_conn_servername.3
tls_conn_version.3,tls_peer_cert_chain_pem.3
tls_conn_version.3,tls_peer_cert_contains_name.3
tls_conn_version.3,tls_peer_cert_hash.3
tls_conn_version.3,tls_peer_cert_issuer.3

View File

@ -1,6 +1,6 @@
--- tests/tlsexttest.c.orig Sun Sep 3 00:44:51 2017
+++ tests/tlsexttest.c Sun Sep 3 00:47:06 2017
@@ -1676,7 +1676,9 @@ static unsigned char tlsext_sni_clienthello[] = {
--- tests/tlsexttest.c.orig 2017-12-30 20:03:09.279079726 +0900
+++ tests/tlsexttest.c 2017-12-30 20:07:21.849939140 +0900
@@ -1676,7 +1676,9 @@ static unsigned char tlsext_sni_clienthe
};
static unsigned char tlsext_sni_serverhello[] = {
@ -39,3 +39,73 @@
if (!tlsext_sni_serverhello_parse(ssl, &cbs, &alert)) {
FAIL("failed to parse serverhello SNI\n");
goto err;
@@ -2741,7 +2743,10 @@ unsigned char tlsext_clienthello_default
0x03, 0x01, 0x03, 0x03, 0x02, 0x01, 0x02, 0x03,
};
-unsigned char tlsext_clienthello_disabled[] = {};
+unsigned char tlsext_clienthello_disabled[] = {
+ 0x00
+};
+const size_t sizeof_tlsext_clienthello_disabled = 0;
static int
test_tlsext_clienthello_build(void)
@@ -2806,18 +2811,18 @@ test_tlsext_clienthello_build(void)
if (!CBB_finish(&cbb, &data, &dlen))
errx(1, "failed to finish CBB");
- if (dlen != sizeof(tlsext_clienthello_disabled)) {
+ if (dlen != sizeof_tlsext_clienthello_disabled) {
FAIL("got clienthello extensions with length %zu, "
"want length %zu\n", dlen,
- sizeof(tlsext_clienthello_disabled));
+ sizeof_tlsext_clienthello_disabled);
compare_data(data, dlen, tlsext_clienthello_disabled,
- sizeof(tlsext_clienthello_disabled));
+ sizeof_tlsext_clienthello_disabled);
goto err;
}
if (memcmp(data, tlsext_clienthello_disabled, dlen) != 0) {
FAIL("clienthello extensions differs:\n");
compare_data(data, dlen, tlsext_clienthello_disabled,
- sizeof(tlsext_clienthello_disabled));
+ sizeof_tlsext_clienthello_disabled);
goto err;
}
@@ -2832,7 +2837,10 @@ test_tlsext_clienthello_build(void)
return (failure);
}
-unsigned char tlsext_serverhello_default[] = {};
+unsigned char tlsext_serverhello_default[] = {
+ 0x00
+};
+const size_t sizeof_tlsext_serverhello_default = 0;
unsigned char tlsext_serverhello_enabled[] = {
0x00, 0x13, 0xff, 0x01, 0x00, 0x01, 0x00, 0x00,
@@ -2872,18 +2880,18 @@ test_tlsext_serverhello_build(void)
if (!CBB_finish(&cbb, &data, &dlen))
errx(1, "failed to finish CBB");
- if (dlen != sizeof(tlsext_serverhello_default)) {
+ if (dlen != sizeof_tlsext_serverhello_default) {
FAIL("got serverhello extensions with length %zu, "
"want length %zu\n", dlen,
- sizeof(tlsext_serverhello_default));
+ sizeof_tlsext_serverhello_default);
compare_data(data, dlen, tlsext_serverhello_default,
- sizeof(tlsext_serverhello_default));
+ sizeof_tlsext_serverhello_default);
goto err;
}
if (memcmp(data, tlsext_serverhello_default, dlen) != 0) {
FAIL("serverhello extensions differs:\n");
compare_data(data, dlen, tlsext_serverhello_default,
- sizeof(tlsext_serverhello_default));
+ sizeof_tlsext_serverhello_default);
goto err;
}

View File

@ -41,6 +41,11 @@ if(NOT CMAKE_HOST_WIN32 AND NOT CMAKE_SYSTEM_NAME MATCHES "MINGW")
add_test(arc4randomforktest ${CMAKE_CURRENT_SOURCE_DIR}/arc4randomforktest.sh)
endif()
# asn1evp
add_executable(asn1evp asn1evp.c)
target_link_libraries(asn1evp ${TESTS_LIBS})
add_test(asn1evp asn1evp)
# asn1test
add_executable(asn1test asn1test.c)
target_link_libraries(asn1test ${TESTS_LIBS})
@ -105,6 +110,11 @@ add_executable(clienttest clienttest.c)
target_link_libraries(clienttest ${TESTS_LIBS})
add_test(clienttest clienttest)
# configtest
add_executable(configtest configtest.c)
target_link_libraries(configtest ${TESTS_LIBS})
add_test(configtest configtest)
# cts128test
add_executable(cts128test cts128test.c)
target_link_libraries(cts128test ${TESTS_LIBS})

View File

@ -43,6 +43,11 @@ arc4randomforktest_SOURCES = arc4randomforktest.c
endif
EXTRA_DIST += arc4randomforktest.sh
# asn1evp
TESTS += asn1evp
check_PROGRAMS += asn1evp
asn1evp_SOURCES = asn1evp.c
# asn1test
TESTS += asn1test
check_PROGRAMS += asn1test
@ -108,6 +113,11 @@ TESTS += clienttest
check_PROGRAMS += clienttest
clienttest_SOURCES = clienttest.c
# configtest
TESTS += configtest
check_PROGRAMS += configtest
configtest_SOURCES = configtest.c
# cts128test
TESTS += cts128test
check_PROGRAMS += cts128test