aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libtls-standalone/AUTHORS0
-rw-r--r--libtls-standalone/COPYING13
-rw-r--r--libtls-standalone/ChangeLog0
-rw-r--r--libtls-standalone/Makefile.am7
-rw-r--r--libtls-standalone/NEWS0
-rw-r--r--libtls-standalone/README0
-rw-r--r--libtls-standalone/compat/Makefile.am45
-rw-r--r--libtls-standalone/configure.ac52
-rw-r--r--libtls-standalone/include/Makefile.am5
-rw-r--r--libtls-standalone/include/string.h87
-rw-r--r--libtls-standalone/libtls.pc.in16
-rw-r--r--libtls-standalone/src/Makefile.am17
-rw-r--r--libtls-standalone/tests/Makefile.am7
-rw-r--r--libtls-standalone/tests/test.c51
14 files changed, 0 insertions, 300 deletions
diff --git a/libtls-standalone/AUTHORS b/libtls-standalone/AUTHORS
deleted file mode 100644
index e69de29..0000000
--- a/libtls-standalone/AUTHORS
+++ /dev/null
diff --git a/libtls-standalone/COPYING b/libtls-standalone/COPYING
deleted file mode 100644
index c203efe..0000000
--- a/libtls-standalone/COPYING
+++ /dev/null
@@ -1,13 +0,0 @@
1libtls is ISC licensed as per OpenBSD's normal licensing policy.
2
3Permission to use, copy, modify, and distribute this software for any
4purpose with or without fee is hereby granted, provided that the above
5copyright notice and this permission notice appear in all copies.
6
7THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/libtls-standalone/ChangeLog b/libtls-standalone/ChangeLog
deleted file mode 100644
index e69de29..0000000
--- a/libtls-standalone/ChangeLog
+++ /dev/null
diff --git a/libtls-standalone/Makefile.am b/libtls-standalone/Makefile.am
deleted file mode 100644
index 2581717..0000000
--- a/libtls-standalone/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
1SUBDIRS = include compat src tests man
2ACLOCAL_AMFLAGS = -I m4
3
4pkgconfigdir = $(libdir)/pkgconfig
5pkgconfig_DATA = libtls.pc
6
7EXTRA_DIST = README VERSION
diff --git a/libtls-standalone/NEWS b/libtls-standalone/NEWS
deleted file mode 100644
index e69de29..0000000
--- a/libtls-standalone/NEWS
+++ /dev/null
diff --git a/libtls-standalone/README b/libtls-standalone/README
deleted file mode 100644
index e69de29..0000000
--- a/libtls-standalone/README
+++ /dev/null
diff --git a/libtls-standalone/compat/Makefile.am b/libtls-standalone/compat/Makefile.am
deleted file mode 100644
index e1ec939..0000000
--- a/libtls-standalone/compat/Makefile.am
+++ /dev/null
@@ -1,45 +0,0 @@
1#
2# Copyright (c) 2014-2015 Brent Cook
3#
4# Permission to use, copy, modify, and distribute this software for any
5# purpose with or without fee is hereby granted, provided that the above
6# copyright notice and this permission notice appear in all copies.
7#
8# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15
16AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
17
18noinst_LTLIBRARIES = libcompat.la libcompatnoopt.la
19
20# compatibility functions that need to be built without optimizations
21libcompatnoopt_la_CFLAGS = -O0
22libcompatnoopt_la_SOURCES =
23
24if !HAVE_EXPLICIT_BZERO
25libcompatnoopt_la_SOURCES += explicit_bzero.c
26endif
27
28# other compatibility functions
29libcompat_la_CFLAGS = $(CFLAGS) $(USER_CFLAGS)
30libcompat_la_SOURCES =
31libcompat_la_LIBADD = $(PLATFORM_LDADD)
32
33if !HAVE_ASPRINTF
34libcompat_la_SOURCES += bsd-asprintf.c
35endif
36
37if !HAVE_STRLCPY
38libcompat_la_SOURCES += strlcpy.c
39endif
40
41if !HAVE_STRSEP
42libcompat_la_SOURCES += strsep.c
43endif
44
45include Makefile.am.arc4random
diff --git a/libtls-standalone/configure.ac b/libtls-standalone/configure.ac
deleted file mode 100644
index ebdd850..0000000
--- a/libtls-standalone/configure.ac
+++ /dev/null
@@ -1,52 +0,0 @@
1# Copyright (c) 2014-2015 Brent Cook
2#
3# Permission to use, copy, modify, and distribute this software for any
4# purpose with or without fee is hereby granted, provided that the above
5# copyright notice and this permission notice appear in all copies.
6#
7# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14
15AC_INIT([libtls], m4_esyscmd([tr -d '\n' < VERSION]))
16AC_SUBST([LIBTLS_VERSION], m4_esyscmd([sed -e 's/\./:/g' VERSION | tr -d '\n']))
17
18AC_CANONICAL_HOST
19AM_INIT_AUTOMAKE([subdir-objects])
20AC_CONFIG_MACRO_DIR([m4])
21
22m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
23
24# This must be called before AC_PROG_CC
25USER_CFLAGS="$CFLAGS"
26
27AC_PROG_CC
28AC_PROG_CC_STDC
29AM_PROG_CC_C_O
30AC_PROG_LIBTOOL
31LT_INIT
32
33CHECK_OS_OPTIONS
34
35CHECK_C_HARDENING_OPTIONS
36
37DISABLE_COMPILER_WARNINGS
38
39CHECK_LIBC_COMPAT
40CHECK_LIBC_CRYPTO_COMPAT
41
42AC_CONFIG_FILES([
43 Makefile
44 include/Makefile
45 compat/Makefile
46 man/Makefile
47 src/Makefile
48 tests/Makefile
49 libtls.pc
50])
51
52AC_OUTPUT
diff --git a/libtls-standalone/include/Makefile.am b/libtls-standalone/include/Makefile.am
deleted file mode 100644
index 0783318..0000000
--- a/libtls-standalone/include/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
1noinst_HEADERS = stdlib.h
2noinst_HEADERS += string.h
3noinst_HEADERS += unistd.h
4
5include_HEADERS = tls.h
diff --git a/libtls-standalone/include/string.h b/libtls-standalone/include/string.h
deleted file mode 100644
index 4bf7519..0000000
--- a/libtls-standalone/include/string.h
+++ /dev/null
@@ -1,87 +0,0 @@
1/*
2 * Public domain
3 * string.h compatibility shim
4 */
5
6#ifndef LIBCRYPTOCOMPAT_STRING_H
7#define LIBCRYPTOCOMPAT_STRING_H
8
9#ifdef _MSC_VER
10#if _MSC_VER >= 1900
11#include <../ucrt/string.h>
12#else
13#include <../include/string.h>
14#endif
15#else
16#include_next <string.h>
17#endif
18
19#include <sys/types.h>
20
21#if defined(__sun) || defined(_AIX) || defined(__hpux)
22/* Some functions historically defined in string.h were placed in strings.h by
23 * SUS. Use the same hack as OS X and FreeBSD use to work around on AIX,
24 * Solaris, and HPUX.
25 */
26#include <strings.h>
27#endif
28
29#ifndef HAVE_STRCASECMP
30int strcasecmp(const char *s1, const char *s2);
31int strncasecmp(const char *s1, const char *s2, size_t len);
32#endif
33
34#ifndef HAVE_STRLCPY
35size_t strlcpy(char *dst, const char *src, size_t siz);
36#endif
37
38#ifndef HAVE_STRLCAT
39size_t strlcat(char *dst, const char *src, size_t siz);
40#endif
41
42#ifndef HAVE_STRNDUP
43char * strndup(const char *str, size_t maxlen);
44/* the only user of strnlen is strndup, so only build it if needed */
45#ifndef HAVE_STRNLEN
46size_t strnlen(const char *str, size_t maxlen);
47#endif
48#endif
49
50#ifndef HAVE_STRSEP
51char *strsep(char **stringp, const char *delim);
52#endif
53
54#ifndef HAVE_EXPLICIT_BZERO
55void explicit_bzero(void *, size_t);
56#endif
57
58#ifndef HAVE_TIMINGSAFE_BCMP
59int timingsafe_bcmp(const void *b1, const void *b2, size_t n);
60#endif
61
62#ifndef HAVE_TIMINGSAFE_MEMCMP
63int timingsafe_memcmp(const void *b1, const void *b2, size_t len);
64#endif
65
66#ifndef HAVE_MEMMEM
67void * memmem(const void *big, size_t big_len, const void *little,
68 size_t little_len);
69#endif
70
71#ifdef _WIN32
72#include <errno.h>
73
74static inline char *
75posix_strerror(int errnum)
76{
77 if (errnum == ECONNREFUSED) {
78 return "Connection refused";
79 }
80 return strerror(errnum);
81}
82
83#define strerror(errnum) posix_strerror(errnum)
84
85#endif
86
87#endif
diff --git a/libtls-standalone/libtls.pc.in b/libtls-standalone/libtls.pc.in
deleted file mode 100644
index 64d7457..0000000
--- a/libtls-standalone/libtls.pc.in
+++ /dev/null
@@ -1,16 +0,0 @@
1#libtls pkg-config source file
2
3prefix=@prefix@
4exec_prefix=@exec_prefix@
5libdir=@libdir@
6includedir=@includedir@
7
8Name: LibreSSL-libtls
9Description: Secure communications using the TLS socket protocol.
10Version: @LIBTLS_VERSION@
11Requires:
12Requires.private: libcrypto libssl
13Conflicts:
14Libs: -L${libdir} -ltls
15Libs.private: @LIBS@ -lcrypto -lssl
16Cflags: -I${includedir}
diff --git a/libtls-standalone/src/Makefile.am b/libtls-standalone/src/Makefile.am
deleted file mode 100644
index 5f8f55f..0000000
--- a/libtls-standalone/src/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
1AM_CFLAGS = -I$(top_srcdir)/include
2
3lib_LTLIBRARIES = libtls.la
4
5libtls_la_LDFLAGS = -version-info @LIBTLS_VERSION@ -no-undefined
6libtls_la_LIBADD = -lcrypto -lssl -lcrypto $(PLATFORM_LDADD)
7libtls_la_LIBADD += $(top_builddir)/compat/libcompat.la
8libtls_la_LIBADD += $(top_builddir)/compat/libcompatnoopt.la
9
10libtls_la_SOURCES = tls.c
11libtls_la_SOURCES += tls_bio_cb.c
12libtls_la_SOURCES += tls_client.c
13libtls_la_SOURCES += tls_config.c
14libtls_la_SOURCES += tls_server.c
15libtls_la_SOURCES += tls_util.c
16libtls_la_SOURCES += tls_verify.c
17noinst_HEADERS = tls_internal.h
diff --git a/libtls-standalone/tests/Makefile.am b/libtls-standalone/tests/Makefile.am
deleted file mode 100644
index 1a08aef..0000000
--- a/libtls-standalone/tests/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
1AM_CFLAGS = -I$(top_srcdir)/include
2
3check_PROGRAMS = test
4
5TESTS = test
6test_SOURCES = test.c
7test_LDADD = -lcrypto -lssl $(top_builddir)/src/libtls.la
diff --git a/libtls-standalone/tests/test.c b/libtls-standalone/tests/test.c
deleted file mode 100644
index 4069332..0000000
--- a/libtls-standalone/tests/test.c
+++ /dev/null
@@ -1,51 +0,0 @@
1#include <stdio.h>
2#include <tls.h>
3
4int main()
5{
6 struct tls *tls;
7 struct tls_config *tls_config;
8 ssize_t written, read;
9 char buf[4096];
10
11 if (tls_init() != 0) {
12 fprintf(stderr, "tls_init failed");
13 return 1;
14 }
15
16 if ((tls = tls_client()) == NULL)
17 goto err;
18
19 if ((tls_config = tls_config_new()) == NULL)
20 goto err;
21
22 if (tls_config_set_ciphers(tls_config, "compat") != 0)
23 goto err;
24
25 tls_config_insecure_noverifycert(tls_config);
26 tls_config_insecure_noverifyname(tls_config);
27
28 if (tls_configure(tls, tls_config) != 0)
29 goto err;
30
31 if (tls_connect(tls, "google.com", "443") != 0)
32 goto err;
33
34 if ((written = tls_write(tls, "GET /\r\n", 7)) < 0)
35 goto err;
36
37 if ((read = tls_read(tls, buf, sizeof(buf))) < 0)
38 goto err;
39
40 buf[read - 1] = '\0';
41 puts(buf);
42
43 if (tls_close(tls) != 0)
44 goto err;
45
46 return 0;
47
48err:
49 fprintf(stderr, "%s\n", tls_error(tls));
50 return 1;
51}