Compare commits

..

27 Commits

Author SHA1 Message Date
Brent Cook
e168f3b0bc More changelog updates 2016-09-23 06:21:43 -05:00
Brent Cook
9ba1224ed4 update changelog 2016-09-23 06:13:08 -05:00
Brent Cook
a896814187 Update changelog 2016-09-23 05:41:25 -05:00
Brent Cook
b7ba692f72 ensure that __STRING works 2016-09-14 23:40:31 -05:00
Brent Cook
df20769977 remove cms 2016-09-14 08:49:53 -05:00
Brent Cook
08837a82b6 more cdefs.h removal 2016-09-04 09:04:01 -05:00
Brent Cook
5532f007d3 Land #203, add libtls callback API 2016-09-04 08:58:30 -05:00
Brent Cook
6f24864a73 cdefs.h should not be required anywhere 2016-09-04 07:57:59 -05:00
Brent Cook
6040ff04b0 wire up sys/types.h to pull in sys/cdefs.h 2016-09-04 07:38:16 -05:00
Brent Cook
93be612b5c rebase nc(1) patch 2016-09-04 05:42:23 -05:00
Brent Cook
5bb829d86d Land #219, build Windows DLLs with CMake 2016-09-04 05:00:31 -05:00
Brent Cook
22dcefee4e update for new repository layout 2016-09-02 12:43:30 -05:00
kinichiro
5ea2a55cc7 enable tls_ext_alpn regression test
- add tls_ext_alpn entry for automake and cmake
- add tests/tls_ext_alpn* to .gitignore
2016-08-30 00:57:10 +09:00
Satoshi Yasushima
829b21581f build Windows DLL on CMake
like below.
* libcrypto-38.dll
* libssl-39.dll
* libtls-11.dll
2016-08-25 18:17:27 +09:00
Satoshi Yasushima
971892766d build MinGW on CMake 2016-08-25 18:17:12 +09:00
Brent Cook
8edd509e2c Land #217, Set _PATH_SSL_CA_FILE to the tarball internal path for regression tests 2016-08-13 11:52:06 -05:00
Brent Cook
439de92dc6 Land #216, check for telnet.h before building nc 2016-08-13 11:44:30 -05:00
Brent Cook
fab6e1f251 Land #215, update cmake builds for darwin 2016-08-13 11:43:38 -05:00
Brent Cook
9e25f75800 remove DEFAULT_CA_FILE patch, since libtls handles this by default 2016-08-13 11:42:21 -05:00
kinichiro
fef54aef36 Set _PATH_SSL_CA_FILE to the tarball internal path for regression tests
- let tests to use the cert.pem in the tarball, for both automake and cmake.
- put this definition out of "if(ENABLE_EXTRATESTS)" since this can be shared by all tests.
2016-08-12 16:27:18 +09:00
jacob berkman
83e9741dc6 Disable netcat if arpa/telnet.h is not available (iOS) 2016-08-09 15:04:45 -07:00
Tamer Saadeh
2d987d32e6 compat gentroy() for macs is called gentropy_osx.c 2016-08-07 11:56:14 +02:00
Geoff Beier
36aafbb241 Set _PATH_SSL_CA_FILE to either CMAKE_INSTALL_PREFIX or OPENSSLDIR for the OCSP tests so that OCSP tests can be executed on a system without /etc/ssl/cert.pem 2016-08-01 21:28:53 -04:00
Brent Cook
7a46efa40d update changelog for 2.4.2 2016-07-31 17:56:21 -05:00
Brent Cook
a7f754a663 set link library dependencies with MSVC, fixes #221 2016-07-31 17:11:19 -05:00
Brent Cook
1fde1eaa44 properly enable strnlen checks for MSVC 2016-07-31 17:10:39 -05:00
Tobias Pape
a69063be10 Portable code part for callbacks in accept/connect
see https://github.com/libressl-portable/openbsd/pull/64
2016-06-28 03:29:54 +02:00
20 changed files with 172 additions and 120 deletions

1
.gitignore vendored
View File

@@ -58,6 +58,7 @@ tests/gost2814789t*
tests/mont*
tests/rfc5280time*
tests/timingsafe*
tests/tls_ext_alpn*
tests/*test
tests/tests.h
tests/*test.c

View File

@@ -49,7 +49,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "MINGW")
set(BUILD_NC false)
endif()
if(MSVC)
if(WIN32)
set(BUILD_NC false)
endif()
@@ -80,14 +80,17 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
add_definitions(-Wno-pointer-sign)
endif()
if(MSVC)
add_definitions(-Dinline=__inline)
if(WIN32)
add_definitions(-Drestrict)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
add_definitions(-D_CRT_DEPRECATED_NO_WARNINGS)
add_definitions(-D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS)
add_definitions(-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0501)
add_definitions(-DCPPFLAGS -DOPENSSL_NO_SPEED -DNO_SYSLOG -DNO_CRYPT)
endif()
if(MSVC)
add_definitions(-Dinline=__inline)
set(MSVC_DISABLED_WARNINGS_LIST
"C4057" # C4057: 'initializing' : 'unsigned char *' differs in
@@ -143,7 +146,7 @@ if(HAVE_STRNDUP)
add_definitions(-DHAVE_STRNDUP)
endif()
if(MSVC)
if(WIN32)
set(HAVE_STRNLEN true)
add_definitions(-DHAVE_STRNLEN)
else()
@@ -237,7 +240,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "SunOS")
set(OPENSSL_LIBS ${OPENSSL_LIBS} nsl socket)
endif()
if(NOT (CMAKE_SYSTEM_NAME MATCHES "(Darwin|MINGW|CYGWIN)" OR MSVC))
if(NOT (CMAKE_SYSTEM_NAME MATCHES "(Darwin|CYGWIN)"))
set(BUILD_SHARED true)
endif()

View File

@@ -28,6 +28,72 @@ history is also available from Git.
LibreSSL Portable Release Notes:
2.5.0 - New APIs, bug fixes and improvements
* libtls now supports ALPN and SNI
* libtls adds a new callback interface for integrating custom IO
functions. Thanks to Tobias Pape.
* libtls now handles 4 cipher suite groups:
"secure" (TLSv1.2+AEAD+PFS)
"compat" (HIGH:!aNULL)
"legacy" (HIGH:MEDIUM:!aNULL)
"insecure" (ALL:!aNULL:!eNULL)
This allows for flexibility and finer grained control, rather than
having two extremes (an issue raised by Marko Kreen some time ago).
* Tightened error handling for tls_config_set_ciphers().
* libtls now always loads CA, key and certificate files at the time the
configuration function is called. This simplifies code and results in
a single memory based code path being used to provide data to libssl.
* Add support for OCSP intermediate certificates.
* Added functions used by stunnel and exim from BoringSSL - this
brings in X509_check_host, X509_check_email, X509_check_ip, and
X509_check_ip_asc.
* Added initial support for iOS, thanks to Jacob Berkman.
* Improved behavior of arc4random on Windows when using memory leak
analysis software.
* Correctly handle an EOF that occurs prior to the TLS handshake
completing. Reported by Vasily Kolobkov, based on a diff from Marko
Kreen.
* Limit the support of the "backward compatible" ssl2 handshake to
only be used if TLS 1.0 is enabled.
* Fix incorrect results in certain cases on 64-bit systems when
BN_mod_word() can return incorrect results. BN_mod_word() now can
return an error condition. Thanks to Brian Smith.
* Added constant-time updates to address CVE-2016-0702
* Fixed undefined behavior in BN_GF2m_mod_arr()
* Removed unused Cryptographic Message Support (CMS)
* More conversions of long long idioms to time_t
* Improved compatibility by avoiding printing NULL strings with
printf.
* Reverted change that cleans up the EVP cipher context in
EVP_EncryptFinal() and EVP_DecryptFinal(). Some software relies on the
previous behaviour.
* Avoid unbounded memory growth in libssl, which can be triggered by a
TLS client repeatedly renegotiating and sending OCSP Status Request
TLS extensions.
* Avoid falling back to a weak digest for (EC)DH when using SNI with
libssl.
2.4.2 - Bug fixes and improvements
* Fixed loading default certificate locations with openssl s_client.

View File

@@ -1 +1 @@
OPENBSD_6_0
master

View File

@@ -17,11 +17,6 @@ nc_LDADD += $(abs_top_builddir)/ssl/libssl.la
nc_LDADD += $(abs_top_builddir)/tls/libtls.la
AM_CPPFLAGS += -I$(top_srcdir)/apps/nc/compat
if OPENSSLDIR_DEFINED
AM_CPPFLAGS += -DDEFAULT_CA_FILE=\"@OPENSSLDIR@/cert.pem\"
else
AM_CPPFLAGS += -DDEFAULT_CA_FILE=\"$(sysconfdir)/ssl/cert.pem\"
endif
nc_SOURCES = atomicio.c
nc_SOURCES += netcat.c

View File

@@ -10,7 +10,6 @@ set(
asn1pars.c
ca.c
ciphers.c
cms.c
crl.c
crl2p7.c
dgst.c

View File

@@ -12,7 +12,6 @@ openssl_SOURCES = apps.c
openssl_SOURCES += asn1pars.c
openssl_SOURCES += ca.c
openssl_SOURCES += ciphers.c
openssl_SOURCES += cms.c
openssl_SOURCES += crl.c
openssl_SOURCES += crl2p7.c
openssl_SOURCES += dgst.c

View File

@@ -715,7 +715,7 @@ if(NOT HAVE_ARC4RANDOM_BUF)
elseif(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
set(CRYPTO_SRC ${CRYPTO_SRC} compat/getentropy_netbsd.c)
elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
set(CRYPTO_SRC ${CRYPTO_SRC} compat/getentropy_darwin.c)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/getentropy_osx.c)
elseif(CMAKE_SYSTEM_NAME MATCHES "SunOS")
set(CRYPTO_SRC ${CRYPTO_SRC} compat/getentropy_solaris.c)
endif()
@@ -752,10 +752,12 @@ if (BUILD_SHARED)
add_library(crypto-objects OBJECT ${CRYPTO_SRC})
add_library(crypto STATIC $<TARGET_OBJECTS:crypto-objects>)
add_library(crypto-shared SHARED $<TARGET_OBJECTS:crypto-objects>)
if (MSVC)
if (WIN32)
target_link_libraries(crypto-shared crypto Ws2_32.lib)
set(CRYPTO_POSTFIX -${CRYPTO_MAJOR_VERSION})
endif()
set_target_properties(crypto-shared PROPERTIES OUTPUT_NAME crypto)
set_target_properties(crypto-shared PROPERTIES
OUTPUT_NAME crypto${CRYPTO_POSTFIX} ARCHIVE_OUTPUT_NAME crypto)
set_target_properties(crypto-shared PROPERTIES VERSION
${CRYPTO_VERSION} SOVERSION ${CRYPTO_MAJOR_VERSION})
install(TARGETS crypto crypto-shared DESTINATION lib)

View File

@@ -29,7 +29,6 @@ noinst_HEADERS += compat/netinet/in.h
noinst_HEADERS += compat/netinet/ip.h
noinst_HEADERS += compat/netinet/tcp.h
noinst_HEADERS += compat/sys/cdefs.h
noinst_HEADERS += compat/sys/ioctl.h
noinst_HEADERS += compat/sys/mman.h
noinst_HEADERS += compat/sys/param.h

View File

@@ -1,31 +0,0 @@
/*
* Public domain
* sys/cdefs.h compatibility shim
*/
#ifndef LIBCRYPTOCOMPAT_SYS_CDEFS_H
#define LIBCRYPTOCOMPAT_SYS_CDEFS_H
#ifdef _WIN32
#define __warn_references(sym,msg)
#else
#include_next <sys/cdefs.h>
#ifndef __warn_references
#if defined(__GNUC__) && defined (HAS_GNU_WARNING_LONG)
#define __warn_references(sym,msg) \
__asm__(".section .gnu.warning." __STRING(sym) \
" ; .ascii \"" msg "\" ; .text");
#else
#define __warn_references(sym,msg)
#endif
#endif /* __warn_references */
#endif /* _WIN32 */
#endif /* LIBCRYPTOCOMPAT_SYS_CDEFS_H */

View File

@@ -44,4 +44,25 @@ typedef SSIZE_T ssize_t;
# define __bounded__(x, y, z)
#endif
#ifdef _WIN32
#define __warn_references(sym,msg)
#else
#ifndef __warn_references
#ifndef __STRING
#define __STRING(x) #x
#endif
#if defined(__GNUC__) && defined (HAS_GNU_WARNING_LONG)
#define __warn_references(sym,msg) \
__asm__(".section .gnu.warning." __STRING(sym) \
" ; .ascii \"" msg "\" ; .text");
#else
#define __warn_references(sym,msg)
#endif
#endif /* __warn_references */
#endif /* _WIN32 */
#endif

View File

@@ -8,6 +8,7 @@ libtls_la_LIBADD += $(top_builddir)/compat/libcompat.la
libtls_la_LIBADD += $(top_builddir)/compat/libcompatnoopt.la
libtls_la_SOURCES = tls.c
libtls_la_SOURCES += tls_bio_cb.c
libtls_la_SOURCES += tls_client.c
libtls_la_SOURCES += tls_config.c
libtls_la_SOURCES += tls_server.c

View File

@@ -21,6 +21,8 @@ case $host_os in
# public source:
# http://www.opensource.apple.com/source/Libc/Libc-997.90.3/gen/FreeBSD/arc4random.c
USE_BUILTIN_ARC4RANDOM=yes
# Not available on iOS
AC_CHECK_HEADER([arpa/telnet.h], [], [BUILD_NC=no])
;;
*freebsd*)
HOST_OS=freebsd

View File

@@ -1,16 +1,6 @@
--- apps/nc/netcat.c.orig Thu Jun 30 19:56:49 2016
+++ apps/nc/netcat.c Thu Jun 30 19:59:09 2016
@@ -65,7 +65,9 @@
#define POLL_NETIN 2
#define POLL_STDOUT 3
#define BUFSIZE 16384
+#ifndef DEFAULT_CA_FILE
#define DEFAULT_CA_FILE "/etc/ssl/cert.pem"
+#endif
#define TLS_LEGACY (1 << 1)
#define TLS_NOVERIFY (1 << 2)
@@ -92,9 +94,13 @@
--- apps/nc/netcat.c.orig Sun Sep 4 05:37:35 2016
+++ apps/nc/netcat.c Sun Sep 4 05:40:24 2016
@@ -92,9 +92,13 @@
int Dflag; /* sodebug */
int Iflag; /* TCP receive buffer size */
int Oflag; /* TCP send buffer size */
@@ -24,7 +14,7 @@
int usetls; /* use TLS */
char *Cflag; /* Public cert file */
@@ -152,7 +158,7 @@
@@ -146,7 +150,7 @@
struct servent *sv;
socklen_t len;
struct sockaddr_storage cliaddr;
@@ -33,7 +23,7 @@
const char *errstr, *proxyhost = "", *proxyport = NULL;
struct addrinfo proxyhints;
char unix_dg_tmp_socket_buf[UNIX_DG_TMP_SOCKET_SIZE];
@@ -262,12 +268,14 @@
@@ -256,12 +260,14 @@
case 'u':
uflag = 1;
break;
@@ -48,7 +38,7 @@
case 'v':
vflag = 1;
break;
@@ -300,9 +308,11 @@
@@ -294,9 +300,11 @@
errx(1, "TCP send window %s: %s",
errstr, optarg);
break;
@@ -60,7 +50,7 @@
case 'T':
errstr = NULL;
errno = 0;
@@ -326,9 +336,11 @@
@@ -320,9 +328,11 @@
argc -= optind;
argv += optind;
@@ -72,31 +62,19 @@
if (family == AF_UNIX) {
if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1)
@@ -480,7 +492,10 @@
errx(1, "-H and -T noverify may not be used"
"together");
tls_config_insecure_noverifycert(tls_cfg);
- }
+ } else {
+ if (Rflag && access(Rflag, R_OK) == -1)
+ errx(1, "unable to find root CA file %s", Rflag);
+ }
}
if (lflag) {
struct tls *tls_cctx = NULL;
@@ -832,7 +847,10 @@
@@ -825,7 +835,10 @@
remote_connect(const char *host, const char *port, struct addrinfo hints)
{
struct addrinfo *res, *res0;
- int s, error, on = 1, save_errno;
+ int s, error, save_errno;
- int s = -1, error, on = 1, save_errno;
+ int s = -1, error, save_errno;
+#ifdef SO_BINDANY
+ int on = 1;
+#endif
if ((error = getaddrinfo(host, port, &hints, &res)))
if ((error = getaddrinfo(host, port, &hints, &res0)))
errx(1, "getaddrinfo: %s", gai_strerror(error));
@@ -847,8 +865,10 @@
@@ -839,8 +852,10 @@
if (sflag || pflag) {
struct addrinfo ahints, *ares;
@@ -105,22 +83,22 @@
setsockopt(s, SOL_SOCKET, SO_BINDANY, &on, sizeof(on));
+#endif
memset(&ahints, 0, sizeof(struct addrinfo));
ahints.ai_family = res0->ai_family;
ahints.ai_family = res->ai_family;
ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM;
@@ -919,7 +939,10 @@
@@ -911,7 +926,10 @@
local_listen(char *host, char *port, struct addrinfo hints)
{
struct addrinfo *res, *res0;
- int s, ret, x = 1, save_errno;
+ int s, save_errno;
- int s = -1, ret, x = 1, save_errno;
+ int s = -1, save_errno;
+#ifdef SO_REUSEPORT
+ int ret, x = 1;
+#endif
int error;
/* Allow nodename to be null. */
@@ -941,9 +964,11 @@
res0->ai_protocol)) < 0)
@@ -932,9 +950,11 @@
res->ai_protocol)) < 0)
continue;
+#ifdef SO_REUSEPORT
@@ -129,9 +107,9 @@
err(1, NULL);
+#endif
set_common_sockopts(s, res0->ai_family);
set_common_sockopts(s, res->ai_family);
@@ -1401,11 +1426,13 @@
@@ -1392,11 +1412,13 @@
{
int x = 1;
@@ -145,7 +123,7 @@
if (Dflag) {
if (setsockopt(s, SOL_SOCKET, SO_DEBUG,
&x, sizeof(x)) == -1)
@@ -1442,13 +1469,17 @@
@@ -1433,13 +1455,17 @@
}
if (minttl != -1) {
@@ -164,7 +142,7 @@
}
}
@@ -1605,14 +1636,22 @@
@@ -1596,14 +1622,22 @@
\t-P proxyuser\tUsername for proxy authentication\n\
\t-p port\t Specify local port for remote connects\n\
\t-R CAfile CA bundle\n\

View File

@@ -52,10 +52,12 @@ if (BUILD_SHARED)
add_library(ssl-objects OBJECT ${SSL_SRC})
add_library(ssl STATIC $<TARGET_OBJECTS:ssl-objects>)
add_library(ssl-shared SHARED $<TARGET_OBJECTS:ssl-objects>)
if (MSVC)
if (WIN32)
target_link_libraries(ssl-shared crypto-shared Ws2_32.lib)
set(SSL_POSTFIX -${SSL_MAJOR_VERSION})
endif()
set_target_properties(ssl-shared PROPERTIES OUTPUT_NAME ssl)
set_target_properties(ssl-shared PROPERTIES
OUTPUT_NAME ssl${SSL_POSTFIX} ARCHIVE_OUTPUT_NAME ssl)
set_target_properties(ssl-shared PROPERTIES VERSION ${SSL_VERSION}
SOVERSION ${SSL_MAJOR_VERSION})
install(TARGETS ssl ssl-shared DESTINATION lib)

View File

@@ -9,6 +9,8 @@ include_directories(
../apps/openssl/compat
)
add_definitions(-D_PATH_SSL_CA_FILE=\"${CMAKE_CURRENT_SOURCE_DIR}/../apps/openssl/cert.pem\")
# aeadtest
add_executable(aeadtest aeadtest.c)
target_link_libraries(aeadtest ${OPENSSL_LIBS})
@@ -199,7 +201,6 @@ if(ENABLE_EXTRATESTS)
add_executable(ocsp_test ocsp_test.c)
target_link_libraries(ocsp_test ${OPENSSL_LIBS})
add_test(ocsptest ${CMAKE_CURRENT_SOURCE_DIR}/ocsptest.sh)
set_tests_properties(ocsptest PROPERTIES ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOURCE_DIR}")
endif()
# optionstest
@@ -304,6 +305,11 @@ add_executable(timingsafe timingsafe.c)
target_link_libraries(timingsafe ${OPENSSL_LIBS})
add_test(timingsafe timingsafe)
# tls_ext_alpn
add_executable(tls_ext_alpn tls_ext_alpn.c)
target_link_libraries(tls_ext_alpn ${OPENSSL_LIBS})
add_test(tls_ext_alpn tls_ext_alpn)
# utf8test
add_executable(utf8test utf8test.c)
target_link_libraries(utf8test ${OPENSSL_LIBS})

View File

@@ -5,6 +5,7 @@ AM_CPPFLAGS += -I $(top_srcdir)/crypto/asn1
AM_CPPFLAGS += -I $(top_srcdir)/ssl
AM_CPPFLAGS += -I $(top_srcdir)/apps/openssl
AM_CPPFLAGS += -I $(top_srcdir)/apps/openssl/compat
AM_CPPFLAGS += -D_PATH_SSL_CA_FILE=\"$(top_srcdir)/apps/openssl/cert.pem\"
LDADD = $(PLATFORM_LDADD) $(PROG_LDADD)
LDADD += $(abs_top_builddir)/ssl/libssl.la
@@ -323,6 +324,11 @@ TESTS += timingsafe
check_PROGRAMS += timingsafe
timingsafe_SOURCES = timingsafe.c
# tls_ext_alpn
TESTS += tls_ext_alpn
check_PROGRAMS += tls_ext_alpn
tls_ext_alpn_SOURCES = tls_ext_alpn.c
# utf8test
TESTS += utf8test
check_PROGRAMS += utf8test

View File

@@ -7,6 +7,7 @@ include_directories(
set(
TLS_SRC
tls.c
tls_bio_cb.c
tls_client.c
tls_config.c
tls_conninfo.c
@@ -31,10 +32,12 @@ if (BUILD_SHARED)
add_library(tls-objects OBJECT ${TLS_SRC})
add_library(tls STATIC $<TARGET_OBJECTS:tls-objects>)
add_library(tls-shared SHARED $<TARGET_OBJECTS:tls-objects>)
if (MSVC)
if (WIN32)
target_link_libraries(tls-shared ssl-shared crypto-shared Ws2_32.lib)
set(TLS_POSTFIX -${TLS_MAJOR_VERSION})
endif()
set_target_properties(tls-shared PROPERTIES OUTPUT_NAME tls)
set_target_properties(tls-shared PROPERTIES
OUTPUT_NAME tls${TLS_POSTFIX} ARCHIVE_OUTPUT_NAME tls)
set_target_properties(tls-shared PROPERTIES VERSION ${TLS_VERSION}
SOVERSION ${TLS_MAJOR_VERSION})
install(TARGETS tls tls-shared DESTINATION lib)

View File

@@ -19,6 +19,7 @@ endif
libtls_la_SOURCES = tls.c
libtls_la_SOURCES += tls_client.c
libtls_la_SOURCES += tls_bio_cb.c
libtls_la_SOURCES += tls_config.c
libtls_la_SOURCES += tls_conninfo.c
libtls_la_SOURCES += tls_server.c

View File

@@ -13,7 +13,6 @@ if [ ! -d openbsd ]; then
fi
fi
(cd openbsd
git fetch
git checkout $openbsd_branch
git pull --rebase)
@@ -30,12 +29,12 @@ libtls_regress=$CWD/openbsd/src/regress/lib/libtls
app_src=$CWD/openbsd/src/usr.bin
# load library versions
. $libcrypto_src/crypto/shlib_version
. $libcrypto_src/shlib_version
libcrypto_version=$major:$minor:0
echo "libcrypto version $libcrypto_version"
echo $libcrypto_version > crypto/VERSION
. $libssl_src/ssl/shlib_version
. $libssl_src/shlib_version
libssl_version=$major:$minor:0
echo "libssl version $libssl_version"
echo $libssl_version > ssl/VERSION
@@ -63,11 +62,11 @@ CP_LIBC='do_cp_libc'
CP='cp -p'
$CP $libssl_src/src/LICENSE COPYING
$CP $libssl_src/LICENSE COPYING
$CP $libcrypto_src/crypto/arch/amd64/opensslconf.h include/openssl
$CP $libssl_src/src/crypto/opensslfeatures.h include/openssl
$CP $libssl_src/src/ssl/pqueue.h include
$CP $libcrypto_src/arch/amd64/opensslconf.h include/openssl
$CP $libcrypto_src/opensslfeatures.h include/openssl
$CP $libssl_src/pqueue.h include
$CP $libtls_src/tls.h include
$CP $libtls_src/tls.h libtls-standalone/include
@@ -85,8 +84,8 @@ for i in crypto/compat libtls-standalone/compat; do
$libc_src/string/strnlen.c \
$libc_src/string/timingsafe_bcmp.c \
$libc_src/string/timingsafe_memcmp.c \
$libcrypto_src/crypto/getentropy_*.c \
$libcrypto_src/crypto/arc4random_*.h; do
$libcrypto_src/arc4random/getentropy_*.c \
$libcrypto_src/arc4random/arc4random_*.h; do
$CP_LIBC $j $i
done
done
@@ -100,20 +99,20 @@ $CP crypto/compat/arc4random*.h \
crypto/compat/bsd-asprintf.c \
libtls-standalone/compat
(cd $libssl_src/src/crypto/objects/;
(cd $libcrypto_src/objects/;
perl objects.pl objects.txt obj_mac.num obj_mac.h;
perl obj_dat.pl obj_mac.h obj_dat.h )
mkdir -p include/openssl crypto/objects
$MV $libssl_src/src/crypto/objects/obj_mac.h ./include/openssl/obj_mac.h
$MV $libssl_src/src/crypto/objects/obj_dat.h ./crypto/objects/obj_dat.h
$MV $libcrypto_src/objects/obj_mac.h ./include/openssl/obj_mac.h
$MV $libcrypto_src/objects/obj_dat.h ./crypto/objects/obj_dat.h
copy_hdrs() {
for file in $2; do
$CP $libssl_src/src/$1/$file include/openssl
$CP $1/$file include/openssl
done
}
copy_hdrs crypto "stack/stack.h lhash/lhash.h stack/safestack.h
copy_hdrs $libcrypto_src "stack/stack.h lhash/lhash.h stack/safestack.h
ossl_typ.h err/err.h crypto.h comp/comp.h x509/x509.h buffer/buffer.h
objects/objects.h asn1/asn1.h bn/bn.h ec/ec.h ecdsa/ecdsa.h
ecdh/ecdh.h rsa/rsa.h sha/sha.h x509/x509_vfy.h pkcs7/pkcs7.h pem/pem.h
@@ -121,15 +120,15 @@ copy_hdrs crypto "stack/stack.h lhash/lhash.h stack/safestack.h
krb5/krb5_asn.h asn1/asn1_mac.h x509v3/x509v3.h conf/conf.h ocsp/ocsp.h
aes/aes.h modes/modes.h asn1/asn1t.h dso/dso.h bf/blowfish.h
bio/bio.h cast/cast.h cmac/cmac.h conf/conf_api.h des/des.h dh/dh.h
dsa/dsa.h cms/cms.h engine/engine.h ui/ui.h pkcs12/pkcs12.h ts/ts.h
dsa/dsa.h engine/engine.h ui/ui.h pkcs12/pkcs12.h ts/ts.h
md4/md4.h ripemd/ripemd.h whrlpool/whrlpool.h idea/idea.h
rc2/rc2.h rc4/rc4.h ui/ui_compat.h txt_db/txt_db.h
chacha/chacha.h evp/evp.h poly1305/poly1305.h camellia/camellia.h
gost/gost.h"
copy_hdrs ssl "srtp.h ssl.h ssl2.h ssl3.h ssl23.h tls1.h dtls1.h"
copy_hdrs $libssl_src "srtp.h ssl.h ssl2.h ssl3.h ssl23.h tls1.h dtls1.h"
$CP $libssl_src/src/crypto/opensslv.h include/openssl
$CP $libcrypto_src/opensslv.h include/openssl
awk '/LIBRESSL_VERSION_TEXT/ {print $4}' < include/openssl/opensslv.h | cut -d\" -f1 > VERSION
echo "LibreSSL version `cat VERSION`"
@@ -140,8 +139,8 @@ for i in `awk '/SOURCES|HEADERS/ { print $3 }' crypto/Makefile.am` ; do
dir=`dirname $i`
mkdir -p crypto/$dir
if [ $dir != "compat" ]; then
if [ -e $libssl_src/src/crypto/$i ]; then
$CP $libssl_src/src/crypto/$i crypto/$i
if [ -e $libcrypto_src/$i ]; then
$CP $libcrypto_src/$i crypto/$i
fi
fi
done
@@ -149,7 +148,7 @@ $CP crypto/compat/b_win.c crypto/bio
$CP crypto/compat/ui_openssl_win.c crypto/ui
# generate assembly crypto algorithms
asm_src=$libssl_src/src/crypto
asm_src=$libcrypto_src
gen_asm_stdout() {
perl $asm_src/$2 $1 > $3.tmp
[ $1 = "elf" ] && cat <<-EOF >> $3.tmp
@@ -239,7 +238,7 @@ done
echo "copying libssl source"
rm -f ssl/*.c ssl/*.h
for i in `awk '/SOURCES|HEADERS/ { print $3 }' ssl/Makefile.am` ; do
$CP $libssl_src/src/ssl/$i ssl
$CP $libssl_src/$i ssl
done
# copy libcrypto tests
@@ -321,7 +320,7 @@ echo "dist_man_MANS += tls_init.3" >> man/Makefile.am
(cd man
# update new-style manpages
for i in `ls -1 $libssl_src/src/doc/ssl/*.3 | sort`; do
for i in `ls -1 $libssl_src/doc/*.3 | sort`; do
NAME=`basename "$i"`
$CP $i .
echo "dist_man_MANS += $NAME" >> Makefile.am
@@ -334,7 +333,7 @@ echo "dist_man_MANS += tls_init.3" >> man/Makefile.am
done
# convert remaining POD manpages
for i in `ls -1 $libssl_src/src/doc/crypto/*.pod | sort`; do
for i in `ls -1 $libcrypto_src/doc/*.pod | sort`; do
BASE=`echo $i|sed -e "s/\.pod//"`
NAME=`basename "$BASE"`
# reformat file if new