Land #611, remove libtls-standalone
This commit is contained in:
commit
db8b30ae51
@ -1,13 +0,0 @@
|
||||
libtls is ISC licensed as per OpenBSD's normal licensing policy.
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
@ -1,7 +0,0 @@
|
||||
SUBDIRS = include compat src tests man
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libtls.pc
|
||||
|
||||
EXTRA_DIST = README VERSION
|
@ -1,45 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2014-2015 Brent Cook
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
|
||||
|
||||
noinst_LTLIBRARIES = libcompat.la libcompatnoopt.la
|
||||
|
||||
# compatibility functions that need to be built without optimizations
|
||||
libcompatnoopt_la_CFLAGS = -O0
|
||||
libcompatnoopt_la_SOURCES =
|
||||
|
||||
if !HAVE_EXPLICIT_BZERO
|
||||
libcompatnoopt_la_SOURCES += explicit_bzero.c
|
||||
endif
|
||||
|
||||
# other compatibility functions
|
||||
libcompat_la_CFLAGS = $(CFLAGS) $(USER_CFLAGS)
|
||||
libcompat_la_SOURCES =
|
||||
libcompat_la_LIBADD = $(PLATFORM_LDADD)
|
||||
|
||||
if !HAVE_ASPRINTF
|
||||
libcompat_la_SOURCES += bsd-asprintf.c
|
||||
endif
|
||||
|
||||
if !HAVE_STRLCPY
|
||||
libcompat_la_SOURCES += strlcpy.c
|
||||
endif
|
||||
|
||||
if !HAVE_STRSEP
|
||||
libcompat_la_SOURCES += strsep.c
|
||||
endif
|
||||
|
||||
include Makefile.am.arc4random
|
@ -1,52 +0,0 @@
|
||||
# Copyright (c) 2014-2015 Brent Cook
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
AC_INIT([libtls], m4_esyscmd([tr -d '\n' < VERSION]))
|
||||
AC_SUBST([LIBTLS_VERSION], m4_esyscmd([sed -e 's/\./:/g' VERSION | tr -d '\n']))
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
AM_INIT_AUTOMAKE([subdir-objects])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
# This must be called before AC_PROG_CC
|
||||
USER_CFLAGS="$CFLAGS"
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CC_STDC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_LIBTOOL
|
||||
LT_INIT
|
||||
|
||||
CHECK_OS_OPTIONS
|
||||
|
||||
CHECK_C_HARDENING_OPTIONS
|
||||
|
||||
DISABLE_COMPILER_WARNINGS
|
||||
|
||||
CHECK_LIBC_COMPAT
|
||||
CHECK_LIBC_CRYPTO_COMPAT
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
include/Makefile
|
||||
compat/Makefile
|
||||
man/Makefile
|
||||
src/Makefile
|
||||
tests/Makefile
|
||||
libtls.pc
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
@ -1,5 +0,0 @@
|
||||
noinst_HEADERS = stdlib.h
|
||||
noinst_HEADERS += string.h
|
||||
noinst_HEADERS += unistd.h
|
||||
|
||||
include_HEADERS = tls.h
|
@ -1,87 +0,0 @@
|
||||
/*
|
||||
* Public domain
|
||||
* string.h compatibility shim
|
||||
*/
|
||||
|
||||
#ifndef LIBCRYPTOCOMPAT_STRING_H
|
||||
#define LIBCRYPTOCOMPAT_STRING_H
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if _MSC_VER >= 1900
|
||||
#include <../ucrt/string.h>
|
||||
#else
|
||||
#include <../include/string.h>
|
||||
#endif
|
||||
#else
|
||||
#include_next <string.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#if defined(__sun) || defined(_AIX) || defined(__hpux)
|
||||
/* Some functions historically defined in string.h were placed in strings.h by
|
||||
* SUS. Use the same hack as OS X and FreeBSD use to work around on AIX,
|
||||
* Solaris, and HPUX.
|
||||
*/
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRCASECMP
|
||||
int strcasecmp(const char *s1, const char *s2);
|
||||
int strncasecmp(const char *s1, const char *s2, size_t len);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
size_t strlcpy(char *dst, const char *src, size_t siz);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRLCAT
|
||||
size_t strlcat(char *dst, const char *src, size_t siz);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRNDUP
|
||||
char * strndup(const char *str, size_t maxlen);
|
||||
/* the only user of strnlen is strndup, so only build it if needed */
|
||||
#ifndef HAVE_STRNLEN
|
||||
size_t strnlen(const char *str, size_t maxlen);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRSEP
|
||||
char *strsep(char **stringp, const char *delim);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_EXPLICIT_BZERO
|
||||
void explicit_bzero(void *, size_t);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_TIMINGSAFE_BCMP
|
||||
int timingsafe_bcmp(const void *b1, const void *b2, size_t n);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_TIMINGSAFE_MEMCMP
|
||||
int timingsafe_memcmp(const void *b1, const void *b2, size_t len);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_MEMMEM
|
||||
void * memmem(const void *big, size_t big_len, const void *little,
|
||||
size_t little_len);
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <errno.h>
|
||||
|
||||
static inline char *
|
||||
posix_strerror(int errnum)
|
||||
{
|
||||
if (errnum == ECONNREFUSED) {
|
||||
return "Connection refused";
|
||||
}
|
||||
return strerror(errnum);
|
||||
}
|
||||
|
||||
#define strerror(errnum) posix_strerror(errnum)
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,16 +0,0 @@
|
||||
#libtls pkg-config source file
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: LibreSSL-libtls
|
||||
Description: Secure communications using the TLS socket protocol.
|
||||
Version: @LIBTLS_VERSION@
|
||||
Requires:
|
||||
Requires.private: libcrypto libssl
|
||||
Conflicts:
|
||||
Libs: -L${libdir} -ltls
|
||||
Libs.private: @LIBS@ -lcrypto -lssl
|
||||
Cflags: -I${includedir}
|
@ -1,17 +0,0 @@
|
||||
AM_CFLAGS = -I$(top_srcdir)/include
|
||||
|
||||
lib_LTLIBRARIES = libtls.la
|
||||
|
||||
libtls_la_LDFLAGS = -version-info @LIBTLS_VERSION@ -no-undefined
|
||||
libtls_la_LIBADD = -lcrypto -lssl -lcrypto $(PLATFORM_LDADD)
|
||||
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
|
||||
libtls_la_SOURCES += tls_util.c
|
||||
libtls_la_SOURCES += tls_verify.c
|
||||
noinst_HEADERS = tls_internal.h
|
@ -1,7 +0,0 @@
|
||||
AM_CFLAGS = -I$(top_srcdir)/include
|
||||
|
||||
check_PROGRAMS = test
|
||||
|
||||
TESTS = test
|
||||
test_SOURCES = test.c
|
||||
test_LDADD = -lcrypto -lssl $(top_builddir)/src/libtls.la
|
@ -1,51 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <tls.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
struct tls *tls;
|
||||
struct tls_config *tls_config;
|
||||
ssize_t written, read;
|
||||
char buf[4096];
|
||||
|
||||
if (tls_init() != 0) {
|
||||
fprintf(stderr, "tls_init failed");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ((tls = tls_client()) == NULL)
|
||||
goto err;
|
||||
|
||||
if ((tls_config = tls_config_new()) == NULL)
|
||||
goto err;
|
||||
|
||||
if (tls_config_set_ciphers(tls_config, "compat") != 0)
|
||||
goto err;
|
||||
|
||||
tls_config_insecure_noverifycert(tls_config);
|
||||
tls_config_insecure_noverifyname(tls_config);
|
||||
|
||||
if (tls_configure(tls, tls_config) != 0)
|
||||
goto err;
|
||||
|
||||
if (tls_connect(tls, "google.com", "443") != 0)
|
||||
goto err;
|
||||
|
||||
if ((written = tls_write(tls, "GET /\r\n", 7)) < 0)
|
||||
goto err;
|
||||
|
||||
if ((read = tls_read(tls, buf, sizeof(buf))) < 0)
|
||||
goto err;
|
||||
|
||||
buf[read - 1] = '\0';
|
||||
puts(buf);
|
||||
|
||||
if (tls_close(tls) != 0)
|
||||
goto err;
|
||||
|
||||
return 0;
|
||||
|
||||
err:
|
||||
fprintf(stderr, "%s\n", tls_error(tls));
|
||||
return 1;
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
@@ -22,6 +22,13 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
+#ifdef _MSC_VER
|
||||
+#ifndef LIBRESSL_INTERNAL
|
||||
+#include <basetsd.h>
|
||||
@ -12,21 +12,5 @@
|
||||
+#endif
|
||||
+
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stddef.h>
|
||||
--- libtls-standalone/include/tls.h.orig 2017-02-13 20:21:48.297958529 +0900
|
||||
+++ libtls-standalone/include/tls.h 2017-02-13 20:21:48.296958502 +0900
|
||||
@@ -22,6 +22,13 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
+#ifdef _MSC_VER
|
||||
+#ifndef LIBRESSL_INTERNAL
|
||||
+#include <basetsd.h>
|
||||
+typedef SSIZE_T ssize_t;
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
#include <sys/types.h>
|
||||
|
||||
|
||||
#include <stddef.h>
|
||||
|
21
update.sh
21
update.sh
@ -46,7 +46,6 @@ echo $libssl_version > ssl/VERSION
|
||||
libtls_version=$major:$minor:0
|
||||
echo "libtls version $libtls_version"
|
||||
echo $libtls_version > tls/VERSION
|
||||
echo $major.$minor.0 > libtls-standalone/VERSION
|
||||
|
||||
do_mv() {
|
||||
if ! cmp -s "$1" "$2"
|
||||
@ -76,9 +75,8 @@ $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
|
||||
|
||||
for i in crypto/compat libtls-standalone/compat; do
|
||||
for i in crypto/compat; do
|
||||
for j in $libc_src/crypt/arc4random.c \
|
||||
$libc_src/crypt/arc4random_uniform.c \
|
||||
$libc_src/crypt/chacha_private.h \
|
||||
@ -99,15 +97,6 @@ for i in crypto/compat libtls-standalone/compat; do
|
||||
done
|
||||
done
|
||||
|
||||
$CP include/compat/stdlib.h \
|
||||
include/compat/string.h \
|
||||
include/compat/unistd.h \
|
||||
libtls-standalone/include
|
||||
|
||||
$CP crypto/compat/arc4random*.h \
|
||||
crypto/compat/bsd-asprintf.c \
|
||||
libtls-standalone/compat
|
||||
|
||||
(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 )
|
||||
@ -243,19 +232,11 @@ rm -f tls/*.c tls/*.h libtls/src/*.c libtls/src/*.h
|
||||
for i in `awk '/SOURCES|HEADERS/ { print $3 }' tls/Makefile.am` ; do
|
||||
if [ -e $libtls_src/$i ]; then
|
||||
$CP $libtls_src/$i tls
|
||||
$CP $libtls_src/$i libtls-standalone/src
|
||||
fi
|
||||
done
|
||||
# add the libtls symbol export list
|
||||
$GREP '^[A-Za-z0-9_]' < $libtls_src/Symbols.list > tls/tls.sym
|
||||
|
||||
mkdir -p libtls-standalone/m4
|
||||
$CP m4/check*.m4 \
|
||||
m4/disable*.m4 \
|
||||
libtls-standalone/m4
|
||||
sed -e "s/compat\///" crypto/Makefile.am.arc4random > \
|
||||
libtls-standalone/compat/Makefile.am.arc4random
|
||||
|
||||
# copy nc(1) source
|
||||
echo "copying nc(1) source"
|
||||
$CP $bin_src/nc/nc.1 apps/nc
|
||||
|
Loading…
x
Reference in New Issue
Block a user