Import Upstream version 1.1~pre8

This commit is contained in:
Guus Sliepen 2019-08-26 13:44:51 +02:00
parent 2ebbac3278
commit f5c641f5cc
151 changed files with 11360 additions and 4420 deletions

View file

@ -4,13 +4,114 @@ sbin_PROGRAMS = tincd tinc sptps_test
EXTRA_DIST = linux bsd solaris cygwin mingw openssl gcrypt
DEFAULT_INCLUDES =
tincd_SOURCES = \
utils.c getopt.c getopt1.c list.c splay_tree.c dropin.c fake-getaddrinfo.c fake-getnameinfo.c hash.c \
buffer.c conf.c connection.c control.c edge.c graph.c logger.c meta.c net.c net_packet.c net_setup.c \
net_socket.c netutl.c node.c process.c protocol.c protocol_auth.c protocol_edge.c protocol_misc.c \
protocol_key.c protocol_subnet.c route.c sptps.c subnet.c subnet_parse.c event.c tincd.c \
dummy_device.c raw_socket_device.c multicast_device.c names.c
buffer.c buffer.h \
cipher.h \
conf.c conf.h \
connection.c connection.h \
control.c control.h \
control_common.h \
crypto.h \
device.h \
digest.h \
dropin.c dropin.h \
dummy_device.c \
ecdh.h \
ecdsa.h \
ecdsagen.h \
edge.c edge.h \
ethernet.h \
event.c event.h \
fake-gai-errnos.h \
fake-getaddrinfo.c fake-getaddrinfo.h \
fake-getnameinfo.c fake-getnameinfo.h \
getopt.c getopt.h \
getopt1.c \
graph.c graph.h \
hash.c hash.h \
have.h \
ipv4.h \
ipv6.h \
list.c list.h \
logger.c logger.h \
meta.c meta.h \
multicast_device.c \
names.c names.h \
net.c net.h \
net_packet.c \
net_setup.c \
net_socket.c \
netutl.c netutl.h \
node.c node.h \
prf.h \
process.c process.h \
protocol.c protocol.h \
protocol_auth.c \
protocol_edge.c \
protocol_key.c \
protocol_misc.c \
protocol_subnet.c \
raw_socket_device.c \
route.c route.h \
rsa.h \
rsagen.h \
splay_tree.c splay_tree.h \
sptps.c sptps.h \
subnet.c subnet.h \
subnet_parse.c \
system.h \
tincd.c \
utils.c utils.h \
xalloc.h
tinc_SOURCES = \
dropin.c dropin.h \
getopt.c getopt.h \
getopt1.c \
info.c info.h \
invitation.c invitation.h \
list.c list.h \
names.c names.h \
netutl.c netutl.h \
sptps.c sptps.h \
subnet_parse.c subnet.h \
tincctl.c tincctl.h \
top.c top.h \
utils.c utils.h
sptps_test_SOURCES = \
logger.c logger.h \
sptps.c sptps.h \
sptps_test.c \
utils.c utils.h
## Conditionally compile device drivers
if LINUX
tincd_SOURCES += linux/device.c
endif
if BSD
tincd_SOURCES += bsd/device.c
if TUNEMU
tincd_SOURCES += bsd/tunemu.c
endif
endif
if SOLARIS
tincd_SOURCES += solaris/device.c
endif
if MINGW
tincd_SOURCES += mingw/device.c
endif
if CYGWIN
tincd_SOURCES += cygwin/device.c
endif
if UML
tincd_SOURCES += uml_device.c
endif
@ -19,38 +120,64 @@ if VDE
tincd_SOURCES += vde_device.c
endif
nodist_tincd_SOURCES = \
device.c cipher.c crypto.c ecdh.c ecdsa.c digest.c prf.c rsa.c
if OPENSSL
tincd_SOURCES += \
openssl/cipher.c \
openssl/crypto.c \
openssl/digest.c \
openssl/ecdh.c \
openssl/ecdsa.c \
openssl/prf.c \
openssl/rsa.c
tinc_SOURCES += \
openssl/cipher.c \
openssl/crypto.c \
openssl/digest.c \
openssl/ecdh.c \
openssl/ecdsa.c \
openssl/ecdsagen.c \
openssl/prf.c \
openssl/rsa.c \
openssl/rsagen.c
sptps_test_SOURCES += \
openssl/cipher.c \
openssl/crypto.c \
openssl/digest.c \
openssl/ecdh.c \
openssl/ecdsa.c \
openssl/prf.c
endif
tinc_SOURCES = \
utils.c getopt.c getopt1.c dropin.c \
info.c list.c subnet_parse.c tincctl.c top.c names.c
nodist_tinc_SOURCES = \
ecdsagen.c rsagen.c
sptps_test_SOURCES = \
logger.c cipher.c crypto.c ecdh.c ecdsa.c digest.c prf.c \
sptps.c sptps_test.c utils.c
if TUNEMU
tincd_SOURCES += bsd/tunemu.c
if GCRYPT
tincd_SOURCES += \
gcrypt/cipher.c \
gcrypt/crypto.c \
gcrypt/digest.c \
gcrypt/ecdh.c \
gcrypt/ecdsa.c \
gcrypt/prf.c \
gcrypt/rsa.c
tinc_SOURCES += \
gcrypt/cipher.c \
gcrypt/crypto.c \
gcrypt/digest.c \
gcrypt/ecdh.c \
gcrypt/ecdsa.c \
gcrypt/ecdsagen.c \
gcrypt/prf.c \
gcrypt/rsa.c \
gcrypt/rsagen.c
sptps_test_SOURCES += \
gcrypt/cipher.c \
gcrypt/crypto.c \
gcrypt/digest.c \
gcrypt/ecdh.c \
gcrypt/ecdsa.c \
gcrypt/prf.c
endif
tinc_LDADD = $(READLINE_LIBS) $(CURSES_LIBS)
DEFAULT_INCLUDES =
INCLUDES = @INCLUDES@ -I$(top_builddir)
noinst_HEADERS = \
xalloc.h utils.h getopt.h list.h splay_tree.h dropin.h fake-getaddrinfo.h fake-getnameinfo.h fake-gai-errnos.h ipv6.h ipv4.h ethernet.h \
buffer.h conf.h connection.h control.h control_common.h device.h edge.h graph.h info.h logger.h meta.h net.h netutl.h node.h process.h \
protocol.h route.h subnet.h sptps.h tincctl.h top.h bsd/tunemu.h hash.h event.h names.h
nodist_noinst_HEADERS = \
cipher.h crypto.h ecdh.h ecdsa.h digest.h prf.h rsa.h ecdsagen.h rsagen.h
LIBS = @LIBS@ @LIBGCRYPT_LIBS@
if TUNEMU

View file

@ -1,9 +1,8 @@
# Makefile.in generated by automake 1.11.6 from Makefile.am.
# Makefile.in generated by automake 1.13.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -15,25 +14,52 @@
@SET_MAKE@
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
test $$am__dry = yes; \
}
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -53,18 +79,79 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
sbin_PROGRAMS = tincd$(EXEEXT) tinc$(EXEEXT) sptps_test$(EXEEXT)
@UML_TRUE@am__append_1 = uml_device.c
@VDE_TRUE@am__append_2 = vde_device.c
@TUNEMU_TRUE@am__append_3 = bsd/tunemu.c
@TUNEMU_TRUE@am__append_4 = -lpcap
@LINUX_TRUE@am__append_1 = linux/device.c
@BSD_TRUE@am__append_2 = bsd/device.c
@BSD_TRUE@@TUNEMU_TRUE@am__append_3 = bsd/tunemu.c
@SOLARIS_TRUE@am__append_4 = solaris/device.c
@MINGW_TRUE@am__append_5 = mingw/device.c
@CYGWIN_TRUE@am__append_6 = cygwin/device.c
@UML_TRUE@am__append_7 = uml_device.c
@VDE_TRUE@am__append_8 = vde_device.c
@OPENSSL_TRUE@am__append_9 = \
@OPENSSL_TRUE@ openssl/cipher.c \
@OPENSSL_TRUE@ openssl/crypto.c \
@OPENSSL_TRUE@ openssl/digest.c \
@OPENSSL_TRUE@ openssl/ecdh.c \
@OPENSSL_TRUE@ openssl/ecdsa.c \
@OPENSSL_TRUE@ openssl/prf.c \
@OPENSSL_TRUE@ openssl/rsa.c
@OPENSSL_TRUE@am__append_10 = \
@OPENSSL_TRUE@ openssl/cipher.c \
@OPENSSL_TRUE@ openssl/crypto.c \
@OPENSSL_TRUE@ openssl/digest.c \
@OPENSSL_TRUE@ openssl/ecdh.c \
@OPENSSL_TRUE@ openssl/ecdsa.c \
@OPENSSL_TRUE@ openssl/ecdsagen.c \
@OPENSSL_TRUE@ openssl/prf.c \
@OPENSSL_TRUE@ openssl/rsa.c \
@OPENSSL_TRUE@ openssl/rsagen.c
@OPENSSL_TRUE@am__append_11 = \
@OPENSSL_TRUE@ openssl/cipher.c \
@OPENSSL_TRUE@ openssl/crypto.c \
@OPENSSL_TRUE@ openssl/digest.c \
@OPENSSL_TRUE@ openssl/ecdh.c \
@OPENSSL_TRUE@ openssl/ecdsa.c \
@OPENSSL_TRUE@ openssl/prf.c
@GCRYPT_TRUE@am__append_12 = \
@GCRYPT_TRUE@ gcrypt/cipher.c \
@GCRYPT_TRUE@ gcrypt/crypto.c \
@GCRYPT_TRUE@ gcrypt/digest.c \
@GCRYPT_TRUE@ gcrypt/ecdh.c \
@GCRYPT_TRUE@ gcrypt/ecdsa.c \
@GCRYPT_TRUE@ gcrypt/prf.c \
@GCRYPT_TRUE@ gcrypt/rsa.c
@GCRYPT_TRUE@am__append_13 = \
@GCRYPT_TRUE@ gcrypt/cipher.c \
@GCRYPT_TRUE@ gcrypt/crypto.c \
@GCRYPT_TRUE@ gcrypt/digest.c \
@GCRYPT_TRUE@ gcrypt/ecdh.c \
@GCRYPT_TRUE@ gcrypt/ecdsa.c \
@GCRYPT_TRUE@ gcrypt/ecdsagen.c \
@GCRYPT_TRUE@ gcrypt/prf.c \
@GCRYPT_TRUE@ gcrypt/rsa.c \
@GCRYPT_TRUE@ gcrypt/rsagen.c
@GCRYPT_TRUE@am__append_14 = \
@GCRYPT_TRUE@ gcrypt/cipher.c \
@GCRYPT_TRUE@ gcrypt/crypto.c \
@GCRYPT_TRUE@ gcrypt/digest.c \
@GCRYPT_TRUE@ gcrypt/ecdh.c \
@GCRYPT_TRUE@ gcrypt/ecdsa.c \
@GCRYPT_TRUE@ gcrypt/prf.c
@TUNEMU_TRUE@am__append_15 = -lpcap
subdir = src
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/attribute.m4 \
$(top_srcdir)/m4/curses.m4 $(top_srcdir)/m4/lzo.m4 \
$(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/readline.m4 \
$(top_srcdir)/m4/zlib.m4 $(top_srcdir)/configure.in
$(top_srcdir)/m4/zlib.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@ -73,76 +160,170 @@ CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(sbindir)"
PROGRAMS = $(sbin_PROGRAMS)
am_sptps_test_OBJECTS = logger.$(OBJEXT) cipher.$(OBJEXT) \
crypto.$(OBJEXT) ecdh.$(OBJEXT) ecdsa.$(OBJEXT) \
digest.$(OBJEXT) prf.$(OBJEXT) sptps.$(OBJEXT) \
sptps_test.$(OBJEXT) utils.$(OBJEXT)
am__sptps_test_SOURCES_DIST = logger.c logger.h sptps.c sptps.h \
sptps_test.c utils.c utils.h openssl/cipher.c openssl/crypto.c \
openssl/digest.c openssl/ecdh.c openssl/ecdsa.c openssl/prf.c \
gcrypt/cipher.c gcrypt/crypto.c gcrypt/digest.c gcrypt/ecdh.c \
gcrypt/ecdsa.c gcrypt/prf.c
am__dirstamp = $(am__leading_dot)dirstamp
@OPENSSL_TRUE@am__objects_1 = openssl/cipher.$(OBJEXT) \
@OPENSSL_TRUE@ openssl/crypto.$(OBJEXT) \
@OPENSSL_TRUE@ openssl/digest.$(OBJEXT) openssl/ecdh.$(OBJEXT) \
@OPENSSL_TRUE@ openssl/ecdsa.$(OBJEXT) openssl/prf.$(OBJEXT)
@GCRYPT_TRUE@am__objects_2 = gcrypt/cipher.$(OBJEXT) \
@GCRYPT_TRUE@ gcrypt/crypto.$(OBJEXT) gcrypt/digest.$(OBJEXT) \
@GCRYPT_TRUE@ gcrypt/ecdh.$(OBJEXT) gcrypt/ecdsa.$(OBJEXT) \
@GCRYPT_TRUE@ gcrypt/prf.$(OBJEXT)
am_sptps_test_OBJECTS = logger.$(OBJEXT) sptps.$(OBJEXT) \
sptps_test.$(OBJEXT) utils.$(OBJEXT) $(am__objects_1) \
$(am__objects_2)
sptps_test_OBJECTS = $(am_sptps_test_OBJECTS)
sptps_test_LDADD = $(LDADD)
am_tinc_OBJECTS = utils.$(OBJEXT) getopt.$(OBJEXT) getopt1.$(OBJEXT) \
dropin.$(OBJEXT) info.$(OBJEXT) list.$(OBJEXT) \
am__tinc_SOURCES_DIST = dropin.c dropin.h getopt.c getopt.h getopt1.c \
info.c info.h invitation.c invitation.h list.c list.h names.c \
names.h netutl.c netutl.h sptps.c sptps.h subnet_parse.c \
subnet.h tincctl.c tincctl.h top.c top.h utils.c utils.h \
openssl/cipher.c openssl/crypto.c openssl/digest.c \
openssl/ecdh.c openssl/ecdsa.c openssl/ecdsagen.c \
openssl/prf.c openssl/rsa.c openssl/rsagen.c gcrypt/cipher.c \
gcrypt/crypto.c gcrypt/digest.c gcrypt/ecdh.c gcrypt/ecdsa.c \
gcrypt/ecdsagen.c gcrypt/prf.c gcrypt/rsa.c gcrypt/rsagen.c
@OPENSSL_TRUE@am__objects_3 = openssl/cipher.$(OBJEXT) \
@OPENSSL_TRUE@ openssl/crypto.$(OBJEXT) \
@OPENSSL_TRUE@ openssl/digest.$(OBJEXT) openssl/ecdh.$(OBJEXT) \
@OPENSSL_TRUE@ openssl/ecdsa.$(OBJEXT) \
@OPENSSL_TRUE@ openssl/ecdsagen.$(OBJEXT) openssl/prf.$(OBJEXT) \
@OPENSSL_TRUE@ openssl/rsa.$(OBJEXT) openssl/rsagen.$(OBJEXT)
@GCRYPT_TRUE@am__objects_4 = gcrypt/cipher.$(OBJEXT) \
@GCRYPT_TRUE@ gcrypt/crypto.$(OBJEXT) gcrypt/digest.$(OBJEXT) \
@GCRYPT_TRUE@ gcrypt/ecdh.$(OBJEXT) gcrypt/ecdsa.$(OBJEXT) \
@GCRYPT_TRUE@ gcrypt/ecdsagen.$(OBJEXT) gcrypt/prf.$(OBJEXT) \
@GCRYPT_TRUE@ gcrypt/rsa.$(OBJEXT) gcrypt/rsagen.$(OBJEXT)
am_tinc_OBJECTS = dropin.$(OBJEXT) getopt.$(OBJEXT) getopt1.$(OBJEXT) \
info.$(OBJEXT) invitation.$(OBJEXT) list.$(OBJEXT) \
names.$(OBJEXT) netutl.$(OBJEXT) sptps.$(OBJEXT) \
subnet_parse.$(OBJEXT) tincctl.$(OBJEXT) top.$(OBJEXT) \
names.$(OBJEXT)
nodist_tinc_OBJECTS = ecdsagen.$(OBJEXT) rsagen.$(OBJEXT)
tinc_OBJECTS = $(am_tinc_OBJECTS) $(nodist_tinc_OBJECTS)
utils.$(OBJEXT) $(am__objects_3) $(am__objects_4)
tinc_OBJECTS = $(am_tinc_OBJECTS)
am__DEPENDENCIES_1 =
tinc_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am__tincd_SOURCES_DIST = utils.c getopt.c getopt1.c list.c \
splay_tree.c dropin.c fake-getaddrinfo.c fake-getnameinfo.c \
hash.c buffer.c conf.c connection.c control.c edge.c graph.c \
logger.c meta.c net.c net_packet.c net_setup.c net_socket.c \
netutl.c node.c process.c protocol.c protocol_auth.c \
protocol_edge.c protocol_misc.c protocol_key.c \
protocol_subnet.c route.c sptps.c subnet.c subnet_parse.c \
event.c tincd.c dummy_device.c raw_socket_device.c \
multicast_device.c names.c uml_device.c vde_device.c \
bsd/tunemu.c
@UML_TRUE@am__objects_1 = uml_device.$(OBJEXT)
@VDE_TRUE@am__objects_2 = vde_device.$(OBJEXT)
@TUNEMU_TRUE@am__objects_3 = tunemu.$(OBJEXT)
am_tincd_OBJECTS = utils.$(OBJEXT) getopt.$(OBJEXT) getopt1.$(OBJEXT) \
list.$(OBJEXT) splay_tree.$(OBJEXT) dropin.$(OBJEXT) \
am__tincd_SOURCES_DIST = buffer.c buffer.h cipher.h conf.c conf.h \
connection.c connection.h control.c control.h control_common.h \
crypto.h device.h digest.h dropin.c dropin.h dummy_device.c \
ecdh.h ecdsa.h ecdsagen.h edge.c edge.h ethernet.h event.c \
event.h fake-gai-errnos.h fake-getaddrinfo.c \
fake-getaddrinfo.h fake-getnameinfo.c fake-getnameinfo.h \
getopt.c getopt.h getopt1.c graph.c graph.h hash.c hash.h \
have.h ipv4.h ipv6.h list.c list.h logger.c logger.h meta.c \
meta.h multicast_device.c names.c names.h net.c net.h \
net_packet.c net_setup.c net_socket.c netutl.c netutl.h node.c \
node.h prf.h process.c process.h protocol.c protocol.h \
protocol_auth.c protocol_edge.c protocol_key.c protocol_misc.c \
protocol_subnet.c raw_socket_device.c route.c route.h rsa.h \
rsagen.h splay_tree.c splay_tree.h sptps.c sptps.h subnet.c \
subnet.h subnet_parse.c system.h tincd.c utils.c utils.h \
xalloc.h linux/device.c bsd/device.c bsd/tunemu.c \
solaris/device.c mingw/device.c cygwin/device.c uml_device.c \
vde_device.c openssl/cipher.c openssl/crypto.c \
openssl/digest.c openssl/ecdh.c openssl/ecdsa.c openssl/prf.c \
openssl/rsa.c gcrypt/cipher.c gcrypt/crypto.c gcrypt/digest.c \
gcrypt/ecdh.c gcrypt/ecdsa.c gcrypt/prf.c gcrypt/rsa.c
@LINUX_TRUE@am__objects_5 = linux/device.$(OBJEXT)
@BSD_TRUE@am__objects_6 = bsd/device.$(OBJEXT)
@BSD_TRUE@@TUNEMU_TRUE@am__objects_7 = bsd/tunemu.$(OBJEXT)
@SOLARIS_TRUE@am__objects_8 = solaris/device.$(OBJEXT)
@MINGW_TRUE@am__objects_9 = mingw/device.$(OBJEXT)
@CYGWIN_TRUE@am__objects_10 = cygwin/device.$(OBJEXT)
@UML_TRUE@am__objects_11 = uml_device.$(OBJEXT)
@VDE_TRUE@am__objects_12 = vde_device.$(OBJEXT)
@OPENSSL_TRUE@am__objects_13 = openssl/cipher.$(OBJEXT) \
@OPENSSL_TRUE@ openssl/crypto.$(OBJEXT) \
@OPENSSL_TRUE@ openssl/digest.$(OBJEXT) openssl/ecdh.$(OBJEXT) \
@OPENSSL_TRUE@ openssl/ecdsa.$(OBJEXT) openssl/prf.$(OBJEXT) \
@OPENSSL_TRUE@ openssl/rsa.$(OBJEXT)
@GCRYPT_TRUE@am__objects_14 = gcrypt/cipher.$(OBJEXT) \
@GCRYPT_TRUE@ gcrypt/crypto.$(OBJEXT) gcrypt/digest.$(OBJEXT) \
@GCRYPT_TRUE@ gcrypt/ecdh.$(OBJEXT) gcrypt/ecdsa.$(OBJEXT) \
@GCRYPT_TRUE@ gcrypt/prf.$(OBJEXT) gcrypt/rsa.$(OBJEXT)
am_tincd_OBJECTS = buffer.$(OBJEXT) conf.$(OBJEXT) \
connection.$(OBJEXT) control.$(OBJEXT) dropin.$(OBJEXT) \
dummy_device.$(OBJEXT) edge.$(OBJEXT) event.$(OBJEXT) \
fake-getaddrinfo.$(OBJEXT) fake-getnameinfo.$(OBJEXT) \
hash.$(OBJEXT) buffer.$(OBJEXT) conf.$(OBJEXT) \
connection.$(OBJEXT) control.$(OBJEXT) edge.$(OBJEXT) \
graph.$(OBJEXT) logger.$(OBJEXT) meta.$(OBJEXT) net.$(OBJEXT) \
getopt.$(OBJEXT) getopt1.$(OBJEXT) graph.$(OBJEXT) \
hash.$(OBJEXT) list.$(OBJEXT) logger.$(OBJEXT) meta.$(OBJEXT) \
multicast_device.$(OBJEXT) names.$(OBJEXT) net.$(OBJEXT) \
net_packet.$(OBJEXT) net_setup.$(OBJEXT) net_socket.$(OBJEXT) \
netutl.$(OBJEXT) node.$(OBJEXT) process.$(OBJEXT) \
protocol.$(OBJEXT) protocol_auth.$(OBJEXT) \
protocol_edge.$(OBJEXT) protocol_misc.$(OBJEXT) \
protocol_key.$(OBJEXT) protocol_subnet.$(OBJEXT) \
route.$(OBJEXT) sptps.$(OBJEXT) subnet.$(OBJEXT) \
subnet_parse.$(OBJEXT) event.$(OBJEXT) tincd.$(OBJEXT) \
dummy_device.$(OBJEXT) raw_socket_device.$(OBJEXT) \
multicast_device.$(OBJEXT) names.$(OBJEXT) $(am__objects_1) \
$(am__objects_2) $(am__objects_3)
nodist_tincd_OBJECTS = device.$(OBJEXT) cipher.$(OBJEXT) \
crypto.$(OBJEXT) ecdh.$(OBJEXT) ecdsa.$(OBJEXT) \
digest.$(OBJEXT) prf.$(OBJEXT) rsa.$(OBJEXT)
tincd_OBJECTS = $(am_tincd_OBJECTS) $(nodist_tincd_OBJECTS)
protocol_edge.$(OBJEXT) protocol_key.$(OBJEXT) \
protocol_misc.$(OBJEXT) protocol_subnet.$(OBJEXT) \
raw_socket_device.$(OBJEXT) route.$(OBJEXT) \
splay_tree.$(OBJEXT) sptps.$(OBJEXT) subnet.$(OBJEXT) \
subnet_parse.$(OBJEXT) tincd.$(OBJEXT) utils.$(OBJEXT) \
$(am__objects_5) $(am__objects_6) $(am__objects_7) \
$(am__objects_8) $(am__objects_9) $(am__objects_10) \
$(am__objects_11) $(am__objects_12) $(am__objects_13) \
$(am__objects_14)
tincd_OBJECTS = $(am_tincd_OBJECTS)
tincd_LDADD = $(LDADD)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(sptps_test_SOURCES) $(tinc_SOURCES) $(nodist_tinc_SOURCES) \
$(tincd_SOURCES) $(nodist_tincd_SOURCES)
DIST_SOURCES = $(sptps_test_SOURCES) $(tinc_SOURCES) \
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(sptps_test_SOURCES) $(tinc_SOURCES) $(tincd_SOURCES)
DIST_SOURCES = $(am__sptps_test_SOURCES_DIST) $(am__tinc_SOURCES_DIST) \
$(am__tincd_SOURCES_DIST)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
HEADERS = $(nodist_noinst_HEADERS) $(noinst_HEADERS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@ -162,7 +343,6 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GREP = @GREP@
INCLUDES = @INCLUDES@ -I$(top_builddir)
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@ -173,10 +353,9 @@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ @LIBGCRYPT_LIBS@ $(am__append_4)
LIBS = @LIBS@ @LIBGCRYPT_LIBS@ $(am__append_15)
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
@ -245,45 +424,40 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = linux bsd solaris cygwin mingw openssl gcrypt
tincd_SOURCES = utils.c getopt.c getopt1.c list.c splay_tree.c \
dropin.c fake-getaddrinfo.c fake-getnameinfo.c hash.c buffer.c \
conf.c connection.c control.c edge.c graph.c logger.c meta.c \
net.c net_packet.c net_setup.c net_socket.c netutl.c node.c \
process.c protocol.c protocol_auth.c protocol_edge.c \
protocol_misc.c protocol_key.c protocol_subnet.c route.c \
sptps.c subnet.c subnet_parse.c event.c tincd.c dummy_device.c \
raw_socket_device.c multicast_device.c names.c $(am__append_1) \
$(am__append_2) $(am__append_3)
nodist_tincd_SOURCES = \
device.c cipher.c crypto.c ecdh.c ecdsa.c digest.c prf.c rsa.c
tinc_SOURCES = \
utils.c getopt.c getopt1.c dropin.c \
info.c list.c subnet_parse.c tincctl.c top.c names.c
nodist_tinc_SOURCES = \
ecdsagen.c rsagen.c
sptps_test_SOURCES = \
logger.c cipher.c crypto.c ecdh.c ecdsa.c digest.c prf.c \
sptps.c sptps_test.c utils.c
tinc_LDADD = $(READLINE_LIBS) $(CURSES_LIBS)
DEFAULT_INCLUDES =
noinst_HEADERS = \
xalloc.h utils.h getopt.h list.h splay_tree.h dropin.h fake-getaddrinfo.h fake-getnameinfo.h fake-gai-errnos.h ipv6.h ipv4.h ethernet.h \
buffer.h conf.h connection.h control.h control_common.h device.h edge.h graph.h info.h logger.h meta.h net.h netutl.h node.h process.h \
protocol.h route.h subnet.h sptps.h tincctl.h top.h bsd/tunemu.h hash.h event.h names.h
nodist_noinst_HEADERS = \
cipher.h crypto.h ecdh.h ecdsa.h digest.h prf.h rsa.h ecdsagen.h rsagen.h
tincd_SOURCES = buffer.c buffer.h cipher.h conf.c conf.h connection.c \
connection.h control.c control.h control_common.h crypto.h \
device.h digest.h dropin.c dropin.h dummy_device.c ecdh.h \
ecdsa.h ecdsagen.h edge.c edge.h ethernet.h event.c event.h \
fake-gai-errnos.h fake-getaddrinfo.c fake-getaddrinfo.h \
fake-getnameinfo.c fake-getnameinfo.h getopt.c getopt.h \
getopt1.c graph.c graph.h hash.c hash.h have.h ipv4.h ipv6.h \
list.c list.h logger.c logger.h meta.c meta.h \
multicast_device.c names.c names.h net.c net.h net_packet.c \
net_setup.c net_socket.c netutl.c netutl.h node.c node.h prf.h \
process.c process.h protocol.c protocol.h protocol_auth.c \
protocol_edge.c protocol_key.c protocol_misc.c \
protocol_subnet.c raw_socket_device.c route.c route.h rsa.h \
rsagen.h splay_tree.c splay_tree.h sptps.c sptps.h subnet.c \
subnet.h subnet_parse.c system.h tincd.c utils.c utils.h \
xalloc.h $(am__append_1) $(am__append_2) $(am__append_3) \
$(am__append_4) $(am__append_5) $(am__append_6) \
$(am__append_7) $(am__append_8) $(am__append_9) \
$(am__append_12)
tinc_SOURCES = dropin.c dropin.h getopt.c getopt.h getopt1.c info.c \
info.h invitation.c invitation.h list.c list.h names.c names.h \
netutl.c netutl.h sptps.c sptps.h subnet_parse.c subnet.h \
tincctl.c tincctl.h top.c top.h utils.c utils.h \
$(am__append_10) $(am__append_13)
sptps_test_SOURCES = logger.c logger.h sptps.c sptps.h sptps_test.c \
utils.c utils.h $(am__append_11) $(am__append_14)
tinc_LDADD = $(READLINE_LIBS) $(CURSES_LIBS)
AM_CFLAGS = -DCONFDIR=\"$(sysconfdir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" -DSBINDIR=\"$(sbindir)\"
all: all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@ -308,9 +482,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@ -322,10 +496,11 @@ install-sbinPROGRAMS: $(sbin_PROGRAMS)
fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p; \
then echo "$$p"; echo "$$p"; else :; fi; \
while read p p1; do if test -f $$p \
; then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
sed -e 'p;s,.*/,,;n;h' \
-e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
@ -346,42 +521,152 @@ uninstall-sbinPROGRAMS:
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
-e 's/$$/$(EXEEXT)/' \
`; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(sbindir)" && rm -f $$files
clean-sbinPROGRAMS:
-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
installcheck-sbinPROGRAMS: $(sbin_PROGRAMS)
bad=0; pid=$$$$; list="$(sbin_PROGRAMS)"; for p in $$list; do \
case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
*" $$p "* | *" $(srcdir)/$$p "*) continue;; \
esac; \
f=`echo "$$p" | \
sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
for opt in --help --version; do \
if "$(DESTDIR)$(sbindir)/$$f" $$opt >c$${pid}_.out \
2>c$${pid}_.err </dev/null \
&& test -n "`cat c$${pid}_.out`" \
&& test -z "`cat c$${pid}_.err`"; then :; \
else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
done; \
done; rm -f c$${pid}_.???; exit $$bad
openssl/$(am__dirstamp):
@$(MKDIR_P) openssl
@: > openssl/$(am__dirstamp)
openssl/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) openssl/$(DEPDIR)
@: > openssl/$(DEPDIR)/$(am__dirstamp)
openssl/cipher.$(OBJEXT): openssl/$(am__dirstamp) \
openssl/$(DEPDIR)/$(am__dirstamp)
openssl/crypto.$(OBJEXT): openssl/$(am__dirstamp) \
openssl/$(DEPDIR)/$(am__dirstamp)
openssl/digest.$(OBJEXT): openssl/$(am__dirstamp) \
openssl/$(DEPDIR)/$(am__dirstamp)
openssl/ecdh.$(OBJEXT): openssl/$(am__dirstamp) \
openssl/$(DEPDIR)/$(am__dirstamp)
openssl/ecdsa.$(OBJEXT): openssl/$(am__dirstamp) \
openssl/$(DEPDIR)/$(am__dirstamp)
openssl/prf.$(OBJEXT): openssl/$(am__dirstamp) \
openssl/$(DEPDIR)/$(am__dirstamp)
gcrypt/$(am__dirstamp):
@$(MKDIR_P) gcrypt
@: > gcrypt/$(am__dirstamp)
gcrypt/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) gcrypt/$(DEPDIR)
@: > gcrypt/$(DEPDIR)/$(am__dirstamp)
gcrypt/cipher.$(OBJEXT): gcrypt/$(am__dirstamp) \
gcrypt/$(DEPDIR)/$(am__dirstamp)
gcrypt/crypto.$(OBJEXT): gcrypt/$(am__dirstamp) \
gcrypt/$(DEPDIR)/$(am__dirstamp)
gcrypt/digest.$(OBJEXT): gcrypt/$(am__dirstamp) \
gcrypt/$(DEPDIR)/$(am__dirstamp)
gcrypt/ecdh.$(OBJEXT): gcrypt/$(am__dirstamp) \
gcrypt/$(DEPDIR)/$(am__dirstamp)
gcrypt/ecdsa.$(OBJEXT): gcrypt/$(am__dirstamp) \
gcrypt/$(DEPDIR)/$(am__dirstamp)
gcrypt/prf.$(OBJEXT): gcrypt/$(am__dirstamp) \
gcrypt/$(DEPDIR)/$(am__dirstamp)
sptps_test$(EXEEXT): $(sptps_test_OBJECTS) $(sptps_test_DEPENDENCIES) $(EXTRA_sptps_test_DEPENDENCIES)
@rm -f sptps_test$(EXEEXT)
$(LINK) $(sptps_test_OBJECTS) $(sptps_test_LDADD) $(LIBS)
$(AM_V_CCLD)$(LINK) $(sptps_test_OBJECTS) $(sptps_test_LDADD) $(LIBS)
openssl/ecdsagen.$(OBJEXT): openssl/$(am__dirstamp) \
openssl/$(DEPDIR)/$(am__dirstamp)
openssl/rsa.$(OBJEXT): openssl/$(am__dirstamp) \
openssl/$(DEPDIR)/$(am__dirstamp)
openssl/rsagen.$(OBJEXT): openssl/$(am__dirstamp) \
openssl/$(DEPDIR)/$(am__dirstamp)
gcrypt/ecdsagen.$(OBJEXT): gcrypt/$(am__dirstamp) \
gcrypt/$(DEPDIR)/$(am__dirstamp)
gcrypt/rsa.$(OBJEXT): gcrypt/$(am__dirstamp) \
gcrypt/$(DEPDIR)/$(am__dirstamp)
gcrypt/rsagen.$(OBJEXT): gcrypt/$(am__dirstamp) \
gcrypt/$(DEPDIR)/$(am__dirstamp)
tinc$(EXEEXT): $(tinc_OBJECTS) $(tinc_DEPENDENCIES) $(EXTRA_tinc_DEPENDENCIES)
@rm -f tinc$(EXEEXT)
$(LINK) $(tinc_OBJECTS) $(tinc_LDADD) $(LIBS)
$(AM_V_CCLD)$(LINK) $(tinc_OBJECTS) $(tinc_LDADD) $(LIBS)
linux/$(am__dirstamp):
@$(MKDIR_P) linux
@: > linux/$(am__dirstamp)
linux/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) linux/$(DEPDIR)
@: > linux/$(DEPDIR)/$(am__dirstamp)
linux/device.$(OBJEXT): linux/$(am__dirstamp) \
linux/$(DEPDIR)/$(am__dirstamp)
bsd/$(am__dirstamp):
@$(MKDIR_P) bsd
@: > bsd/$(am__dirstamp)
bsd/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) bsd/$(DEPDIR)
@: > bsd/$(DEPDIR)/$(am__dirstamp)
bsd/device.$(OBJEXT): bsd/$(am__dirstamp) \
bsd/$(DEPDIR)/$(am__dirstamp)
bsd/tunemu.$(OBJEXT): bsd/$(am__dirstamp) \
bsd/$(DEPDIR)/$(am__dirstamp)
solaris/$(am__dirstamp):
@$(MKDIR_P) solaris
@: > solaris/$(am__dirstamp)
solaris/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) solaris/$(DEPDIR)
@: > solaris/$(DEPDIR)/$(am__dirstamp)
solaris/device.$(OBJEXT): solaris/$(am__dirstamp) \
solaris/$(DEPDIR)/$(am__dirstamp)
mingw/$(am__dirstamp):
@$(MKDIR_P) mingw
@: > mingw/$(am__dirstamp)
mingw/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) mingw/$(DEPDIR)
@: > mingw/$(DEPDIR)/$(am__dirstamp)
mingw/device.$(OBJEXT): mingw/$(am__dirstamp) \
mingw/$(DEPDIR)/$(am__dirstamp)
cygwin/$(am__dirstamp):
@$(MKDIR_P) cygwin
@: > cygwin/$(am__dirstamp)
cygwin/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) cygwin/$(DEPDIR)
@: > cygwin/$(DEPDIR)/$(am__dirstamp)
cygwin/device.$(OBJEXT): cygwin/$(am__dirstamp) \
cygwin/$(DEPDIR)/$(am__dirstamp)
tincd$(EXEEXT): $(tincd_OBJECTS) $(tincd_DEPENDENCIES) $(EXTRA_tincd_DEPENDENCIES)
@rm -f tincd$(EXEEXT)
$(LINK) $(tincd_OBJECTS) $(tincd_LDADD) $(LIBS)
$(AM_V_CCLD)$(LINK) $(tincd_OBJECTS) $(tincd_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
-rm -f bsd/*.$(OBJEXT)
-rm -f cygwin/*.$(OBJEXT)
-rm -f gcrypt/*.$(OBJEXT)
-rm -f linux/*.$(OBJEXT)
-rm -f mingw/*.$(OBJEXT)
-rm -f openssl/*.$(OBJEXT)
-rm -f solaris/*.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cipher.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connection.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/control.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypto.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/device.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/digest.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dropin.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy_device.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecdh.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecdsa.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecdsagen.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edge.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake-getaddrinfo.Po@am__quote@
@ -391,6 +676,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graph.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/invitation.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logger.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/meta.Po@am__quote@
@ -402,7 +688,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net_socket.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netutl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/node.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/process.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_auth.Po@am__quote@
@ -412,8 +697,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_subnet.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raw_socket_device.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/route.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rsa.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rsagen.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splay_tree.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sptps.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sptps_test.Po@am__quote@
@ -422,59 +705,59 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tincctl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tincd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/top.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tunemu.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uml_device.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vde_device.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@bsd/$(DEPDIR)/device.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@bsd/$(DEPDIR)/tunemu.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@cygwin/$(DEPDIR)/device.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gcrypt/$(DEPDIR)/cipher.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gcrypt/$(DEPDIR)/crypto.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gcrypt/$(DEPDIR)/digest.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gcrypt/$(DEPDIR)/ecdh.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gcrypt/$(DEPDIR)/ecdsa.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gcrypt/$(DEPDIR)/ecdsagen.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gcrypt/$(DEPDIR)/prf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gcrypt/$(DEPDIR)/rsa.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gcrypt/$(DEPDIR)/rsagen.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@linux/$(DEPDIR)/device.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@mingw/$(DEPDIR)/device.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@openssl/$(DEPDIR)/cipher.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@openssl/$(DEPDIR)/crypto.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@openssl/$(DEPDIR)/digest.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@openssl/$(DEPDIR)/ecdh.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@openssl/$(DEPDIR)/ecdsa.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@openssl/$(DEPDIR)/ecdsagen.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@openssl/$(DEPDIR)/prf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@openssl/$(DEPDIR)/rsa.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@openssl/$(DEPDIR)/rsagen.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@solaris/$(DEPDIR)/device.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
tunemu.o: bsd/tunemu.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tunemu.o -MD -MP -MF $(DEPDIR)/tunemu.Tpo -c -o tunemu.o `test -f 'bsd/tunemu.c' || echo '$(srcdir)/'`bsd/tunemu.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/tunemu.Tpo $(DEPDIR)/tunemu.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bsd/tunemu.c' object='tunemu.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tunemu.o `test -f 'bsd/tunemu.c' || echo '$(srcdir)/'`bsd/tunemu.c
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags
tunemu.obj: bsd/tunemu.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tunemu.obj -MD -MP -MF $(DEPDIR)/tunemu.Tpo -c -o tunemu.obj `if test -f 'bsd/tunemu.c'; then $(CYGPATH_W) 'bsd/tunemu.c'; else $(CYGPATH_W) '$(srcdir)/bsd/tunemu.c'; fi`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/tunemu.Tpo $(DEPDIR)/tunemu.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bsd/tunemu.c' object='tunemu.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tunemu.obj `if test -f 'bsd/tunemu.c'; then $(CYGPATH_W) 'bsd/tunemu.c'; else $(CYGPATH_W) '$(srcdir)/bsd/tunemu.c'; fi`
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@ -486,15 +769,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
ctags: ctags-am
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@ -503,6 +782,21 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@ -542,7 +836,7 @@ distdir: $(DISTFILES)
dist-hook
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS) $(HEADERS)
all-am: Makefile $(PROGRAMS)
installdirs:
for dir in "$(DESTDIR)$(sbindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
@ -573,6 +867,20 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-rm -f bsd/$(DEPDIR)/$(am__dirstamp)
-rm -f bsd/$(am__dirstamp)
-rm -f cygwin/$(DEPDIR)/$(am__dirstamp)
-rm -f cygwin/$(am__dirstamp)
-rm -f gcrypt/$(DEPDIR)/$(am__dirstamp)
-rm -f gcrypt/$(am__dirstamp)
-rm -f linux/$(DEPDIR)/$(am__dirstamp)
-rm -f linux/$(am__dirstamp)
-rm -f mingw/$(DEPDIR)/$(am__dirstamp)
-rm -f mingw/$(am__dirstamp)
-rm -f openssl/$(DEPDIR)/$(am__dirstamp)
-rm -f openssl/$(am__dirstamp)
-rm -f solaris/$(DEPDIR)/$(am__dirstamp)
-rm -f solaris/$(am__dirstamp)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@ -582,7 +890,7 @@ clean: clean-am
clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -rf ./$(DEPDIR) bsd/$(DEPDIR) cygwin/$(DEPDIR) gcrypt/$(DEPDIR) linux/$(DEPDIR) mingw/$(DEPDIR) openssl/$(DEPDIR) solaris/$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@ -625,10 +933,10 @@ install-ps: install-ps-am
install-ps-am:
installcheck-am:
installcheck-am: installcheck-sbinPROGRAMS
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -rf ./$(DEPDIR) bsd/$(DEPDIR) cygwin/$(DEPDIR) gcrypt/$(DEPDIR) linux/$(DEPDIR) mingw/$(DEPDIR) openssl/$(DEPDIR) solaris/$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@ -648,18 +956,19 @@ uninstall-am: uninstall-sbinPROGRAMS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-sbinPROGRAMS ctags dist-hook distclean distclean-compile \
distclean-generic distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-sbinPROGRAMS install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
uninstall-am uninstall-sbinPROGRAMS
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
clean-sbinPROGRAMS cscopelist-am ctags ctags-am dist-hook \
distclean distclean-compile distclean-generic distclean-tags \
distdir dvi dvi-am html html-am info info-am install \
install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-sbinPROGRAMS install-strip installcheck \
installcheck-am installcheck-sbinPROGRAMS installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am uninstall-sbinPROGRAMS
dist-hook:

1
src/bsd/.deps/device.Po Normal file
View file

@ -0,0 +1 @@
# dummy

1
src/bsd/.deps/tunemu.Po Normal file
View file

@ -0,0 +1 @@
# dummy

View file

@ -19,16 +19,16 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "system.h"
#include "../system.h"
#include "conf.h"
#include "device.h"
#include "logger.h"
#include "names.h"
#include "net.h"
#include "route.h"
#include "utils.h"
#include "xalloc.h"
#include "../conf.h"
#include "../device.h"
#include "../logger.h"
#include "../names.h"
#include "../net.h"
#include "../route.h"
#include "../utils.h"
#include "../xalloc.h"
#ifdef ENABLE_TUNEMU
#include "bsd/tunemu.h"

View file

@ -1,386 +0,0 @@
/*
device.c -- Interaction BSD tun/tap device
Copyright (C) 2001-2005 Ivo Timmermans,
2001-2012 Guus Sliepen <guus@tinc-vpn.org>
2009 Grzegorz Dymarek <gregd72002@googlemail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "system.h"
#include "conf.h"
#include "device.h"
#include "logger.h"
#include "net.h"
#include "route.h"
#include "utils.h"
#include "xalloc.h"
#ifdef ENABLE_TUNEMU
#include "bsd/tunemu.h"
#endif
#define DEFAULT_TUN_DEVICE "/dev/tun0"
#if defined(HAVE_FREEBSD) || defined(HAVE_NETBSD)
#define DEFAULT_TAP_DEVICE "/dev/tap0"
#else
#define DEFAULT_TAP_DEVICE "/dev/tun0"
#endif
typedef enum device_type {
DEVICE_TYPE_TUN,
DEVICE_TYPE_TUNIFHEAD,
DEVICE_TYPE_TAP,
#ifdef ENABLE_TUNEMU
DEVICE_TYPE_TUNEMU,
#endif
} device_type_t;
int device_fd = -1;
char *device = NULL;
char *iface = NULL;
static char *device_info = NULL;
static uint64_t device_total_in = 0;
static uint64_t device_total_out = 0;
#if defined(ENABLE_TUNEMU)
static device_type_t device_type = DEVICE_TYPE_TUNEMU;
#elif defined(HAVE_OPENBSD) || defined(HAVE_FREEBSD) || defined(HAVE_DRAGONFLY)
static device_type_t device_type = DEVICE_TYPE_TUNIFHEAD;
#else
static device_type_t device_type = DEVICE_TYPE_TUN;
#endif
static bool setup_device(void) {
char *type;
if(!get_config_string(lookup_config(config_tree, "Device"), &device)) {
if(routing_mode == RMODE_ROUTER)
device = xstrdup(DEFAULT_TUN_DEVICE);
else
device = xstrdup(DEFAULT_TAP_DEVICE);
}
if(!get_config_string(lookup_config(config_tree, "Interface"), &iface))
iface = xstrdup(strrchr(device, '/') ? strrchr(device, '/') + 1 : device);
if(get_config_string(lookup_config(config_tree, "DeviceType"), &type)) {
if(!strcasecmp(type, "tun"))
<<<<<<< HEAD
/* use default */;
#ifdef HAVE_TUNEMU
=======
/* use default */;
#ifdef ENABLE_TUNEMU
>>>>>>> 2a3e343... Fix support for tunemu on iOS devices.
else if(!strcasecmp(type, "tunemu"))
device_type = DEVICE_TYPE_TUNEMU;
#endif
else if(!strcasecmp(type, "tunnohead"))
device_type = DEVICE_TYPE_TUN;
else if(!strcasecmp(type, "tunifhead"))
device_type = DEVICE_TYPE_TUNIFHEAD;
else if(!strcasecmp(type, "tap"))
device_type = DEVICE_TYPE_TAP;
else {
logger(DEBUG_ALWAYS, LOG_ERR, "Unknown device type %s!", type);
return false;
}
} else {
if(strstr(device, "tap") || routing_mode != RMODE_ROUTER)
device_type = DEVICE_TYPE_TAP;
}
switch(device_type) {
#ifdef ENABLE_TUNEMU
case DEVICE_TYPE_TUNEMU: {
char dynamic_name[256] = "";
device_fd = tunemu_open(dynamic_name);
}
break;
#endif
default:
device_fd = open(device, O_RDWR | O_NONBLOCK);
}
if(device_fd < 0) {
logger(DEBUG_ALWAYS, LOG_ERR, "Could not open %s: %s", device, strerror(errno));
return false;
}
#ifdef FD_CLOEXEC
fcntl(device_fd, F_SETFD, FD_CLOEXEC);
#endif
switch(device_type) {
default:
device_type = DEVICE_TYPE_TUN;
case DEVICE_TYPE_TUN:
#ifdef TUNSIFHEAD
{
const int zero = 0;
if(ioctl(device_fd, TUNSIFHEAD, &zero, sizeof zero) == -1) {
logger(DEBUG_ALWAYS, LOG_ERR, "System call `%s' failed: %s", "ioctl", strerror(errno));
return false;
}
}
#endif
#if defined(TUNSIFMODE) && defined(IFF_BROADCAST) && defined(IFF_MULTICAST)
{
const int mode = IFF_BROADCAST | IFF_MULTICAST;
ioctl(device_fd, TUNSIFMODE, &mode, sizeof mode);
}
#endif
device_info = "Generic BSD tun device";
break;
case DEVICE_TYPE_TUNIFHEAD:
#ifdef TUNSIFHEAD
{
const int one = 1;
if(ioctl(device_fd, TUNSIFHEAD, &one, sizeof one) == -1) {
logger(DEBUG_ALWAYS, LOG_ERR, "System call `%s' failed: %s", "ioctl", strerror(errno));
return false;
}
}
#endif
#if defined(TUNSIFMODE) && defined(IFF_BROADCAST) && defined(IFF_MULTICAST)
{
const int mode = IFF_BROADCAST | IFF_MULTICAST;
ioctl(device_fd, TUNSIFMODE, &mode, sizeof mode);
}
#endif
device_info = "Generic BSD tun device";
break;
case DEVICE_TYPE_TAP:
if(routing_mode == RMODE_ROUTER)
overwrite_mac = true;
device_info = "Generic BSD tap device";
#ifdef TAPGIFNAME
{
struct ifreq ifr;
if(ioctl(device_fd, TAPGIFNAME, (void*)&ifr) == 0) {
if(iface)
free(iface);
iface = xstrdup(ifr.ifr_name);
}
}
#endif
break;
#ifdef ENABLE_TUNEMU
case DEVICE_TYPE_TUNEMU:
device_info = "BSD tunemu device";
break;
#endif
}
logger(DEBUG_ALWAYS, LOG_INFO, "%s is a %s", device, device_info);
return true;
}
static void close_device(void) {
switch(device_type) {
#ifdef ENABLE_TUNEMU
case DEVICE_TYPE_TUNEMU:
tunemu_close(device_fd);
break;
#endif
default:
close(device_fd);
}
free(device);
free(iface);
}
static bool read_packet(vpn_packet_t *packet) {
int inlen;
switch(device_type) {
case DEVICE_TYPE_TUN:
#ifdef ENABLE_TUNEMU
case DEVICE_TYPE_TUNEMU:
if(device_type == DEVICE_TYPE_TUNEMU)
inlen = tunemu_read(device_fd, packet->data + 14, MTU - 14);
else
#endif
inlen = read(device_fd, packet->data + 14, MTU - 14);
if(inlen <= 0) {
logger(DEBUG_ALWAYS, LOG_ERR, "Error while reading from %s %s: %s", device_info,
device, strerror(errno));
return false;
}
switch(packet->data[14] >> 4) {
case 4:
packet->data[12] = 0x08;
packet->data[13] = 0x00;
break;
case 6:
packet->data[12] = 0x86;
packet->data[13] = 0xDD;
break;
default:
logger(DEBUG_TRAFFIC, LOG_ERR,
"Unknown IP version %d while reading packet from %s %s",
packet->data[14] >> 4, device_info, device);
return false;
}
memset(packet->data, 0, 12);
packet->len = inlen + 14;
break;
case DEVICE_TYPE_TUNIFHEAD: {
u_int32_t type;
struct iovec vector[2] = {{&type, sizeof type}, {packet->data + 14, MTU - 14}};
if((inlen = readv(device_fd, vector, 2)) <= 0) {
logger(DEBUG_ALWAYS, LOG_ERR, "Error while reading from %s %s: %s", device_info,
device, strerror(errno));
return false;
}
switch (ntohl(type)) {
case AF_INET:
packet->data[12] = 0x08;
packet->data[13] = 0x00;
break;
case AF_INET6:
packet->data[12] = 0x86;
packet->data[13] = 0xDD;
break;
default:
logger(DEBUG_TRAFFIC, LOG_ERR,
"Unknown address family %x while reading packet from %s %s",
ntohl(type), device_info, device);
return false;
}
memset(packet->data, 0, 12);
packet->len = inlen + 10;
break;
}
case DEVICE_TYPE_TAP:
if((inlen = read(device_fd, packet->data, MTU)) <= 0) {
logger(DEBUG_ALWAYS, LOG_ERR, "Error while reading from %s %s: %s", device_info,
device, strerror(errno));
return false;
}
packet->len = inlen;
break;
default:
return false;
}
device_total_in += packet->len;
logger(DEBUG_TRAFFIC, LOG_DEBUG, "Read packet of %d bytes from %s",
packet->len, device_info);
return true;
}
static bool write_packet(vpn_packet_t *packet) {
logger(DEBUG_TRAFFIC, LOG_DEBUG, "Writing packet of %d bytes to %s",
packet->len, device_info);
switch(device_type) {
case DEVICE_TYPE_TUN:
if(write(device_fd, packet->data + 14, packet->len - 14) < 0) {
logger(DEBUG_ALWAYS, LOG_ERR, "Error while writing to %s %s: %s", device_info,
device, strerror(errno));
return false;
}
break;
case DEVICE_TYPE_TUNIFHEAD: {
u_int32_t type;
struct iovec vector[2] = {{&type, sizeof type}, {packet->data + 14, packet->len - 14}};
int af;
af = (packet->data[12] << 8) + packet->data[13];
switch (af) {
case 0x0800:
type = htonl(AF_INET);
break;
case 0x86DD:
type = htonl(AF_INET6);
break;
default:
logger(DEBUG_TRAFFIC, LOG_ERR,
"Unknown address family %x while writing packet to %s %s",
af, device_info, device);
return false;
}
if(writev(device_fd, vector, 2) < 0) {
logger(DEBUG_ALWAYS, LOG_ERR, "Can't write to %s %s: %s", device_info, device,
strerror(errno));
return false;
}
break;
}
case DEVICE_TYPE_TAP:
if(write(device_fd, packet->data, packet->len) < 0) {
logger(DEBUG_ALWAYS, LOG_ERR, "Error while writing to %s %s: %s", device_info,
device, strerror(errno));
return false;
}
break;
#ifdef ENABLE_TUNEMU
case DEVICE_TYPE_TUNEMU:
if(tunemu_write(device_fd, packet->data + 14, packet->len - 14) < 0) {
logger(DEBUG_ALWAYS, LOG_ERR, "Error while writing to %s %s: %s", device_info,
device, strerror(errno));
return false;
}
break;
#endif
default:
return false;
}
device_total_out += packet->len;
return true;
}
static void dump_device_stats(void) {
logger(DEBUG_ALWAYS, LOG_DEBUG, "Statistics for %s %s:", device_info, device);
logger(DEBUG_ALWAYS, LOG_DEBUG, " total bytes in: %10"PRIu64, device_total_in);
logger(DEBUG_ALWAYS, LOG_DEBUG, " total bytes out: %10"PRIu64, device_total_out);
}
const devops_t os_devops = {
.setup = setup_device,
.close = close_device,
.read = read_packet,
.write = write_packet,
.dump_stats = dump_device_stats,
};

View file

@ -1,218 +0,0 @@
/*
cipher.c -- Symmetric block cipher handling
Copyright (C) 2007-2012 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "system.h"
#include <openssl/rand.h>
#include <openssl/err.h>
#include "cipher.h"
#include "logger.h"
#include "xalloc.h"
typedef struct cipher_counter {
unsigned char counter[EVP_MAX_IV_LENGTH];
unsigned char block[EVP_MAX_IV_LENGTH];
int n;
} cipher_counter_t;
static bool cipher_open(cipher_t *cipher) {
EVP_CIPHER_CTX_init(&cipher->ctx);
return true;
}
bool cipher_open_by_name(cipher_t *cipher, const char *name) {
cipher->cipher = EVP_get_cipherbyname(name);
if(cipher->cipher)
return cipher_open(cipher);
logger(DEBUG_ALWAYS, LOG_ERR, "Unknown cipher name '%s'!", name);
return false;
}
bool cipher_open_by_nid(cipher_t *cipher, int nid) {
cipher->cipher = EVP_get_cipherbynid(nid);
if(cipher->cipher)
return cipher_open(cipher);
logger(DEBUG_ALWAYS, LOG_ERR, "Unknown cipher nid %d!", nid);
return false;
}
bool cipher_open_blowfish_ofb(cipher_t *cipher) {
cipher->cipher = EVP_bf_ofb();
return cipher_open(cipher);
}
void cipher_close(cipher_t *cipher) {
EVP_CIPHER_CTX_cleanup(&cipher->ctx);
free(cipher->counter);
cipher->counter = NULL;
}
size_t cipher_keylength(const cipher_t *cipher) {
return cipher->cipher->key_len + cipher->cipher->block_size;
}
bool cipher_set_key(cipher_t *cipher, void *key, bool encrypt) {
bool result;
if(encrypt)
result = EVP_EncryptInit_ex(&cipher->ctx, cipher->cipher, NULL, (unsigned char *)key, (unsigned char *)key + cipher->cipher->key_len);
else
result = EVP_DecryptInit_ex(&cipher->ctx, cipher->cipher, NULL, (unsigned char *)key, (unsigned char *)key + cipher->cipher->key_len);
if(result)
return true;
logger(DEBUG_ALWAYS, LOG_ERR, "Error while setting key: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
bool cipher_set_key_from_rsa(cipher_t *cipher, void *key, size_t len, bool encrypt) {
bool result;
if(encrypt)
result = EVP_EncryptInit_ex(&cipher->ctx, cipher->cipher, NULL, (unsigned char *)key + len - cipher->cipher->key_len, (unsigned char *)key + len - cipher->cipher->iv_len - cipher->cipher->key_len);
else
result = EVP_DecryptInit_ex(&cipher->ctx, cipher->cipher, NULL, (unsigned char *)key + len - cipher->cipher->key_len, (unsigned char *)key + len - cipher->cipher->iv_len - cipher->cipher->key_len);
if(result)
return true;
logger(DEBUG_ALWAYS, LOG_ERR, "Error while setting key: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
bool cipher_set_counter(cipher_t *cipher, const void *counter, size_t len) {
if(len > cipher->cipher->block_size - 4) {
logger(DEBUG_ALWAYS, LOG_ERR, "Counter too long");
abort();
}
memcpy(cipher->counter->counter + cipher->cipher->block_size - len, counter, len);
memset(cipher->counter->counter, 0, 4);
cipher->counter->n = 0;
return true;
}
bool cipher_set_counter_key(cipher_t *cipher, void *key) {
int result = EVP_EncryptInit_ex(&cipher->ctx, cipher->cipher, NULL, (unsigned char *)key, NULL);
if(!result) {
logger(DEBUG_ALWAYS, LOG_ERR, "Error while setting key: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
if(!cipher->counter)
cipher->counter = xmalloc_and_zero(sizeof *cipher->counter);
else
cipher->counter->n = 0;
memcpy(cipher->counter->counter, (unsigned char *)key + cipher->cipher->key_len, cipher->cipher->block_size);
return true;
}
bool cipher_counter_xor(cipher_t *cipher, const void *indata, size_t inlen, void *outdata) {
if(!cipher->counter) {
logger(DEBUG_ALWAYS, LOG_ERR, "Counter not initialized");
return false;
}
const unsigned char *in = indata;
unsigned char *out = outdata;
while(inlen--) {
// Encrypt the new counter value if we need it
if(!cipher->counter->n) {
int len;
if(!EVP_EncryptUpdate(&cipher->ctx, cipher->counter->block, &len, cipher->counter->counter, cipher->cipher->block_size)) {
logger(DEBUG_ALWAYS, LOG_ERR, "Error while encrypting: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
// Increase the counter value
for(int i = 0; i < cipher->cipher->block_size; i++)
if(++cipher->counter->counter[i])
break;
}
*out++ = *in++ ^ cipher->counter->counter[cipher->counter->n++];
if(cipher->counter->n >= cipher->cipher->block_size)
cipher->counter->n = 0;
}
return true;
}
bool cipher_encrypt(cipher_t *cipher, const void *indata, size_t inlen, void *outdata, size_t *outlen, bool oneshot) {
if(oneshot) {
int len, pad;
if(EVP_EncryptInit_ex(&cipher->ctx, NULL, NULL, NULL, NULL)
&& EVP_EncryptUpdate(&cipher->ctx, (unsigned char *)outdata, &len, indata, inlen)
&& EVP_EncryptFinal(&cipher->ctx, (unsigned char *)outdata + len, &pad)) {
if(outlen) *outlen = len + pad;
return true;
}
} else {
int len;
if(EVP_EncryptUpdate(&cipher->ctx, outdata, &len, indata, inlen)) {
if(outlen) *outlen = len;
return true;
}
}
logger(DEBUG_ALWAYS, LOG_ERR, "Error while encrypting: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
bool cipher_decrypt(cipher_t *cipher, const void *indata, size_t inlen, void *outdata, size_t *outlen, bool oneshot) {
if(oneshot) {
int len, pad;
if(EVP_DecryptInit_ex(&cipher->ctx, NULL, NULL, NULL, NULL)
&& EVP_DecryptUpdate(&cipher->ctx, (unsigned char *)outdata, &len, indata, inlen)
&& EVP_DecryptFinal(&cipher->ctx, (unsigned char *)outdata + len, &pad)) {
if(outlen) *outlen = len + pad;
return true;
}
} else {
int len;
if(EVP_EncryptUpdate(&cipher->ctx, outdata, &len, indata, inlen)) {
if(outlen) *outlen = len;
return true;
}
}
logger(DEBUG_ALWAYS, LOG_ERR, "Error while decrypting: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
int cipher_get_nid(const cipher_t *cipher) {
return cipher->cipher ? cipher->cipher->nid : 0;
}
bool cipher_active(const cipher_t *cipher) {
return cipher->cipher && cipher->cipher->nid != 0;
}

View file

@ -1,6 +1,6 @@
/*
cipher.h -- header file cipher.c
Copyright (C) 2007-2012 Guus Sliepen <guus@tinc-vpn.org>
Copyright (C) 2007-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -20,30 +20,25 @@
#ifndef __TINC_CIPHER_H__
#define __TINC_CIPHER_H__
#include <openssl/evp.h>
#define CIPHER_MAX_BLOCK_SIZE 32
#define CIPHER_MAX_IV_SIZE 16
#define CIPHER_MAX_KEY_SIZE 32
#define CIPHER_MAX_BLOCK_SIZE EVP_MAX_BLOCK_LENGTH
#define CIPHER_MAX_KEY_SIZE EVP_MAX_KEY_LENGTH
#define CIPHER_MAX_IV_SIZE EVP_MAX_IV_LENGTH
typedef struct cipher cipher_t;
typedef struct cipher {
EVP_CIPHER_CTX ctx;
const EVP_CIPHER *cipher;
struct cipher_counter *counter;
} cipher_t;
extern bool cipher_open_by_name(cipher_t *, const char *);
extern bool cipher_open_by_nid(cipher_t *, int);
extern bool cipher_open_blowfish_ofb(cipher_t *);
extern cipher_t *cipher_open_by_name(const char *) __attribute__ ((__malloc__));
extern cipher_t *cipher_open_by_nid(int) __attribute__ ((__malloc__));
extern cipher_t *cipher_open_blowfish_ofb(void) __attribute__ ((__malloc__));
extern void cipher_close(cipher_t *);
extern size_t cipher_keylength(const cipher_t *);
extern bool cipher_set_key(cipher_t *, void *, bool);
extern bool cipher_set_key_from_rsa(cipher_t *, void *, size_t, bool);
extern bool cipher_set_counter(cipher_t *, const void *, size_t);
extern bool cipher_set_counter_key(cipher_t *, void *);
extern bool cipher_encrypt(cipher_t *, const void *indata, size_t inlen, void *outdata, size_t *outlen, bool);
extern bool cipher_decrypt(cipher_t *, const void *indata, size_t inlen, void *outdata, size_t *outlen, bool);
extern bool cipher_counter_xor(cipher_t *, const void *indata, size_t inlen, void *outdata);
extern void cipher_get_key(const cipher_t *, void *);
extern bool cipher_set_key(cipher_t *, void *, bool) __attribute__ ((__warn_unused_result__));
extern bool cipher_set_key_from_rsa(cipher_t *, void *, size_t, bool) __attribute__ ((__warn_unused_result__));
extern bool cipher_set_counter(cipher_t *, const void *, size_t) __attribute__ ((__warn_unused_result__));
extern bool cipher_set_counter_key(cipher_t *, void *) __attribute__ ((__warn_unused_result__));
extern bool cipher_encrypt(cipher_t *, const void *indata, size_t inlen, void *outdata, size_t *outlen, bool oneshot) __attribute__ ((__warn_unused_result__));
extern bool cipher_decrypt(cipher_t *, const void *indata, size_t inlen, void *outdata, size_t *outlen, bool oneshot) __attribute__ ((__warn_unused_result__));
extern bool cipher_counter_xor(cipher_t *, const void *indata, size_t inlen, void *outdata) __attribute__ ((__warn_unused_result__));
extern int cipher_get_nid(const cipher_t *);
extern bool cipher_active(const cipher_t *);

View file

@ -71,7 +71,7 @@ void exit_configuration(splay_tree_t ** config_tree) {
}
config_t *new_config(void) {
return xmalloc_and_zero(sizeof(config_t));
return xzalloc(sizeof(config_t));
}
void free_config(config_t *cfg) {
@ -373,9 +373,10 @@ bool read_server_config(void) {
read_config_options(config_tree, NULL);
xasprintf(&fname, "%s" SLASH "tinc.conf", confbase);
errno = 0;
x = read_config_file(config_tree, fname);
if(!x)
if(!x && errno)
logger(DEBUG_ALWAYS, LOG_ERR, "Failed to read `%s': %s", fname, strerror(errno));
free(fname);

View file

@ -1,6 +1,6 @@
/*
connection.c -- connection list management
Copyright (C) 2000-2012 Guus Sliepen <guus@tinc-vpn.org>,
Copyright (C) 2000-2013 Guus Sliepen <guus@tinc-vpn.org>,
2000-2005 Ivo Timmermans
2008 Max Rijevski <maksuf@gmail.com>
@ -27,6 +27,7 @@
#include "control_common.h"
#include "list.h"
#include "logger.h"
#include "rsa.h"
#include "subnet.h"
#include "utils.h"
#include "xalloc.h"
@ -47,21 +48,21 @@ void exit_connections(void) {
}
connection_t *new_connection(void) {
return xmalloc_and_zero(sizeof(connection_t));
return xzalloc(sizeof(connection_t));
}
void free_connection(connection_t *c) {
if(!c)
return;
cipher_close(&c->incipher);
digest_close(&c->indigest);
cipher_close(&c->outcipher);
digest_close(&c->outdigest);
cipher_close(c->incipher);
digest_close(c->indigest);
cipher_close(c->outcipher);
digest_close(c->outdigest);
sptps_stop(&c->sptps);
ecdsa_free(&c->ecdsa);
rsa_free(&c->rsa);
ecdsa_free(c->ecdsa);
rsa_free(c->rsa);
free(c->hischallenge);

View file

@ -1,6 +1,6 @@
/*
connection.h -- header for connection.c
Copyright (C) 2000-2012 Guus Sliepen <guus@tinc-vpn.org>,
Copyright (C) 2000-2013 Guus Sliepen <guus@tinc-vpn.org>,
2000-2005 Ivo Timmermans
This program is free software; you can redistribute it and/or modify
@ -47,7 +47,9 @@ typedef struct connection_status_t {
unsigned int control:1; /* 1 if this is a control connection */
unsigned int pcap:1; /* 1 if this is a control connection requesting packet capture */
unsigned int log:1; /* 1 if this is a control connection requesting log dump */
unsigned int unused:20;
unsigned int invitation:1; /* 1 if this is an invitation */
unsigned int invitation_used:1; /* 1 if the invitation has been consumed */
unsigned int unused:19;
} connection_status_t;
#include "ecdsa.h"
@ -73,12 +75,12 @@ typedef struct connection_t {
struct node_t *node; /* node associated with the other end */
struct edge_t *edge; /* edge associated with this connection */
rsa_t rsa; /* his public RSA key */
ecdsa_t ecdsa; /* his public ECDSA key */
cipher_t incipher; /* Cipher he will use to send data to us */
cipher_t outcipher; /* Cipher we will use to send data to him */
digest_t indigest;
digest_t outdigest;
rsa_t *rsa; /* his public RSA key */
ecdsa_t *ecdsa; /* his public ECDSA key */
cipher_t *incipher; /* Cipher he will use to send data to us */
cipher_t *outcipher; /* Cipher we will use to send data to him */
digest_t *indigest;
digest_t *outdigest;
sptps_t sptps;
int inmaclength;

View file

@ -137,17 +137,16 @@ bool init_control(void) {
randomize(controlcookie, sizeof controlcookie / 2);
bin2hex(controlcookie, controlcookie, sizeof controlcookie / 2);
mode_t mask = umask(0);
umask(mask | 077);
FILE *f = fopen(pidfilename, "w");
umask(mask);
if(!f) {
logger(DEBUG_ALWAYS, LOG_ERR, "Cannot write control socket cookie file %s: %s", pidfilename, strerror(errno));
return false;
}
#ifdef HAVE_FCHMOD
fchmod(fileno(f), 0600);
#else
chmod(pidfilename, 0600);
#endif
// Get the address and port of the first listening socket
char *localhost = NULL;
@ -157,7 +156,7 @@ bool init_control(void) {
// Make sure we have a valid address, and map 0.0.0.0 and :: to 127.0.0.1 and ::1.
if(getsockname(listen_socket[0].tcp.fd, (struct sockaddr *)&sa, &len)) {
xasprintf(&localhost, "127.0.0.1 port %d", myport);
xasprintf(&localhost, "127.0.0.1 port %s", myport);
} else {
if(sa.sa.sa_family == AF_INET) {
if(sa.in.sin_addr.s_addr == 0)

View file

@ -1,6 +1,6 @@
/*
crypto.h -- header for crypto.c
Copyright (C) 2007 Guus Sliepen <guus@tinc-vpn.org>
Copyright (C) 2007-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View file

@ -0,0 +1 @@
# dummy

View file

@ -18,21 +18,21 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "system.h"
#include "../system.h"
#include <w32api/windows.h>
#include <w32api/winioctl.h>
#include "conf.h"
#include "device.h"
#include "logger.h"
#include "names.h"
#include "net.h"
#include "route.h"
#include "utils.h"
#include "xalloc.h"
#include "../conf.h"
#include "../device.h"
#include "../logger.h"
#include "../names.h"
#include "../net.h"
#include "../route.h"
#include "../utils.h"
#include "../xalloc.h"
#include "mingw/common.h"
#include "../mingw/common.h"
int device_fd = -1;
static HANDLE device_handle = INVALID_HANDLE_VALUE;

View file

@ -1,127 +0,0 @@
/*
digest.c -- Digest handling
Copyright (C) 2007-2012 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "system.h"
#include "utils.h"
#include "xalloc.h"
#include <openssl/err.h>
#include <openssl/hmac.h>
#include "digest.h"
#include "logger.h"
static void set_maclength(digest_t *digest, int maclength) {
int digestlen = EVP_MD_size(digest->digest);
if(maclength > digestlen || maclength < 0)
digest->maclength = digestlen;
else
digest->maclength = maclength;
}
bool digest_open_by_name(digest_t *digest, const char *name, int maclength) {
digest->digest = EVP_get_digestbyname(name);
digest->key = NULL;
if(!digest->digest) {
logger(DEBUG_ALWAYS, LOG_DEBUG, "Unknown digest name '%s'!", name);
return false;
}
set_maclength(digest, maclength);
return true;
}
bool digest_open_by_nid(digest_t *digest, int nid, int maclength) {
digest->digest = EVP_get_digestbynid(nid);
digest->key = NULL;
if(!digest->digest) {
logger(DEBUG_ALWAYS, LOG_DEBUG, "Unknown digest nid %d!", nid);
return false;
}
set_maclength(digest, maclength);
return true;
}
bool digest_open_sha1(digest_t *digest, int maclength) {
digest->digest = EVP_sha1();
digest->key = NULL;
set_maclength(digest, maclength);
return true;
}
bool digest_set_key(digest_t *digest, const void *key, size_t len) {
digest->key = xrealloc(digest->key, len);
memcpy(digest->key, key, len);
digest->keylength = len;
return true;
}
void digest_close(digest_t *digest) {
free(digest->key);
digest->key = NULL;
}
bool digest_create(digest_t *digest, const void *indata, size_t inlen, void *outdata) {
size_t len = EVP_MD_size(digest->digest);
unsigned char tmpdata[len];
if(digest->key) {
HMAC(digest->digest, digest->key, digest->keylength, indata, inlen, tmpdata, NULL);
} else {
EVP_MD_CTX ctx;
if(!EVP_DigestInit(&ctx, digest->digest)
|| !EVP_DigestUpdate(&ctx, indata, inlen)
|| !EVP_DigestFinal(&ctx, tmpdata, NULL)) {
logger(DEBUG_ALWAYS, LOG_DEBUG, "Error creating digest: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
}
memcpy(outdata, tmpdata, digest->maclength);
return true;
}
bool digest_verify(digest_t *digest, const void *indata, size_t inlen, const void *cmpdata) {
size_t len = digest->maclength;
unsigned char outdata[len];
return digest_create(digest, indata, inlen, outdata) && !memcmp(cmpdata, outdata, digest->maclength);
}
int digest_get_nid(const digest_t *digest) {
return digest->digest ? digest->digest->type : 0;
}
size_t digest_keylength(const digest_t *digest) {
return digest->digest->md_size;
}
size_t digest_length(const digest_t *digest) {
return digest->maclength;
}
bool digest_active(const digest_t *digest) {
return digest->digest && digest->digest->type != 0;
}

39
src/digest.h Normal file
View file

@ -0,0 +1,39 @@
/*
digest.h -- header file digest.c
Copyright (C) 2007-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __TINC_DIGEST_H__
#define __TINC_DIGEST_H__
#define DIGEST_MAX_SIZE 64
typedef struct digest digest_t;
extern digest_t *digest_open_by_name(const char *name, int maclength) __attribute__ ((__malloc__));
extern digest_t *digest_open_by_nid(int nid, int maclength) __attribute__ ((__malloc__));
extern digest_t *digest_open_sha1(int maclength) __attribute__ ((__malloc__));
extern void digest_close(digest_t *);
extern bool digest_create(digest_t *, const void *indata, size_t inlen, void *outdata) __attribute__ ((__warn_unused_result__));
extern bool digest_verify(digest_t *, const void *indata, size_t inlen, const void *digestdata) __attribute__ ((__warn_unused_result__));
extern bool digest_set_key(digest_t *, const void *key, size_t len) __attribute__ ((__warn_unused_result__));
extern int digest_get_nid(const digest_t *);
extern size_t digest_keylength(const digest_t *);
extern size_t digest_length(const digest_t *);
extern bool digest_active(const digest_t *);
#endif

View file

@ -1,7 +1,7 @@
/*
dropin.c -- a set of drop-in replacements for libc functions
Copyright (C) 2000-2005 Ivo Timmermans,
2000-2011 Guus Sliepen <guus@tinc-vpn.org>
2000-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View file

@ -1,7 +1,7 @@
/*
dropin.h -- header file for dropin.c
Copyright (C) 2000-2005 Ivo Timmermans,
2000-2011 Guus Sliepen <guus@tinc-vpn.org>
2000-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -63,4 +63,11 @@ extern int usleep(long long usec);
} while (0)
#endif
#ifdef HAVE_MINGW
#define mkdir(a, b) mkdir(a)
#ifndef SHUT_RDWR
#define SHUT_RDWR SD_BOTH
#endif
#endif
#endif /* __DROPIN_H__ */

View file

@ -1,96 +0,0 @@
/*
ecdh.c -- Diffie-Hellman key exchange handling
Copyright (C) 2011-2012 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "system.h"
#include "utils.h"
#include "xalloc.h"
#include <openssl/err.h>
#include <openssl/ec.h>
#include <openssl/obj_mac.h>
#include "ecdh.h"
#include "logger.h"
bool ecdh_generate_public(ecdh_t *ecdh, void *pubkey) {
*ecdh = EC_KEY_new_by_curve_name(NID_secp521r1);
if(!*ecdh) {
logger(DEBUG_ALWAYS, LOG_ERR, "Generating EC key_by_curve_name failed: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
if(!EC_KEY_generate_key(*ecdh)) {
EC_KEY_free(*ecdh);
*ecdh = NULL;
logger(DEBUG_ALWAYS, LOG_ERR, "Generating EC key failed: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
const EC_POINT *point = EC_KEY_get0_public_key(*ecdh);
if(!point) {
EC_KEY_free(*ecdh);
*ecdh = NULL;
logger(DEBUG_ALWAYS, LOG_ERR, "Getting public key failed: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
size_t result = EC_POINT_point2oct(EC_KEY_get0_group(*ecdh), point, POINT_CONVERSION_COMPRESSED, pubkey, ECDH_SIZE, NULL);
if(!result) {
EC_KEY_free(*ecdh);
*ecdh = NULL;
logger(DEBUG_ALWAYS, LOG_ERR, "Converting EC_POINT to binary failed: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
return true;
}
bool ecdh_compute_shared(ecdh_t *ecdh, const void *pubkey, void *shared) {
EC_POINT *point = EC_POINT_new(EC_KEY_get0_group(*ecdh));
if(!point) {
logger(DEBUG_ALWAYS, LOG_ERR, "EC_POINT_new() failed: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
int result = EC_POINT_oct2point(EC_KEY_get0_group(*ecdh), point, pubkey, ECDH_SIZE, NULL);
if(!result) {
EC_POINT_free(point);
logger(DEBUG_ALWAYS, LOG_ERR, "Converting binary to EC_POINT failed: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
result = ECDH_compute_key(shared, ECDH_SIZE, point, *ecdh, NULL);
EC_POINT_free(point);
EC_KEY_free(*ecdh);
*ecdh = NULL;
if(!result) {
logger(DEBUG_ALWAYS, LOG_ERR, "Computing Elliptic Curve Diffie-Hellman shared key failed: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
return true;
}
void ecdh_free(ecdh_t *ecdh) {
if(*ecdh) {
EC_KEY_free(*ecdh);
*ecdh = NULL;
}
}

View file

@ -1,6 +1,6 @@
/*
ecdh.h -- header file for ecdh.c
Copyright (C) 2011 Guus Sliepen <guus@tinc-vpn.org>
Copyright (C) 2011-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -20,15 +20,15 @@
#ifndef __TINC_ECDH_H__
#define __TINC_ECDH_H__
#include <openssl/ecdh.h>
#define ECDH_SIZE 67
#define ECDH_SHARED_SIZE 66
typedef EC_KEY *ecdh_t;
#ifndef __TINC_ECDH_INTERNAL__
typedef struct ecdh ecdh_t;
#endif
extern bool ecdh_generate_public(ecdh_t *ecdh, void *pubkey);
extern bool ecdh_compute_shared(ecdh_t *ecdh, const void *pubkey, void *shared);
extern ecdh_t *ecdh_generate_public(void *pubkey) __attribute__ ((__malloc__));
extern bool ecdh_compute_shared(ecdh_t *ecdh, const void *pubkey, void *shared) __attribute__ ((__warn_unused_result__));
extern void ecdh_free(ecdh_t *ecdh);
#endif

View file

@ -1,130 +0,0 @@
/*
ecdsa.c -- ECDSA key handling
Copyright (C) 2011-2012 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "system.h"
#include <openssl/pem.h>
#include <openssl/err.h>
#include "logger.h"
#include "ecdsa.h"
#include "utils.h"
// Get and set ECDSA keys
//
bool ecdsa_set_base64_public_key(ecdsa_t *ecdsa, const char *p) {
*ecdsa = EC_KEY_new_by_curve_name(NID_secp521r1);
if(!*ecdsa) {
logger(DEBUG_ALWAYS, LOG_DEBUG, "EC_KEY_new_by_curve_name failed: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
int len = strlen(p);
unsigned char pubkey[len / 4 * 3 + 3];
const unsigned char *ppubkey = pubkey;
len = b64decode(p, (char *)pubkey, len);
if(!o2i_ECPublicKey(ecdsa, &ppubkey, len)) {
logger(DEBUG_ALWAYS, LOG_DEBUG, "o2i_ECPublicKey failed: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
return true;
}
char *ecdsa_get_base64_public_key(ecdsa_t *ecdsa) {
unsigned char *pubkey = NULL;
int len = i2o_ECPublicKey(*ecdsa, &pubkey);
char *base64 = malloc(len * 4 / 3 + 5);
b64encode((char *)pubkey, base64, len);
free(pubkey);
return base64;
}
// Read PEM ECDSA keys
bool ecdsa_read_pem_public_key(ecdsa_t *ecdsa, FILE *fp) {
*ecdsa = PEM_read_EC_PUBKEY(fp, ecdsa, NULL, NULL);
if(*ecdsa)
return true;
logger(DEBUG_ALWAYS, LOG_ERR, "Unable to read ECDSA public key: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
bool ecdsa_read_pem_private_key(ecdsa_t *ecdsa, FILE *fp) {
*ecdsa = PEM_read_ECPrivateKey(fp, NULL, NULL, NULL);
if(*ecdsa)
return true;
logger(DEBUG_ALWAYS, LOG_ERR, "Unable to read ECDSA private key: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
size_t ecdsa_size(ecdsa_t *ecdsa) {
return ECDSA_size(*ecdsa);
}
// TODO: standardise output format?
bool ecdsa_sign(ecdsa_t *ecdsa, const void *in, size_t len, void *sig) {
unsigned int siglen = ECDSA_size(*ecdsa);
unsigned char hash[SHA512_DIGEST_LENGTH];
SHA512(in, len, hash);
memset(sig, 0, siglen);
if(!ECDSA_sign(0, hash, sizeof hash, sig, &siglen, *ecdsa)) {
logger(DEBUG_ALWAYS, LOG_DEBUG, "ECDSA_sign() failed: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
return true;
}
bool ecdsa_verify(ecdsa_t *ecdsa, const void *in, size_t len, const void *sig) {
unsigned int siglen = ECDSA_size(*ecdsa);
unsigned char hash[SHA512_DIGEST_LENGTH];
SHA512(in, len, hash);
if(!ECDSA_verify(0, hash, sizeof hash, sig, siglen, *ecdsa)) {
logger(DEBUG_ALWAYS, LOG_DEBUG, "ECDSA_verify() failed: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
return true;
}
bool ecdsa_active(ecdsa_t *ecdsa) {
return *ecdsa;
}
void ecdsa_free(ecdsa_t *ecdsa) {
if(*ecdsa) {
EC_KEY_free(*ecdsa);
*ecdsa = NULL;
}
}

View file

@ -1,6 +1,6 @@
/*
ecdsa.h -- ECDSA key handling
Copyright (C) 2011 Guus Sliepen <guus@tinc-vpn.org>
Copyright (C) 2011-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -20,17 +20,17 @@
#ifndef __TINC_ECDSA_H__
#define __TINC_ECDSA_H__
#include <openssl/ec.h>
#ifndef __TINC_ECDSA_INTERNAL__
typedef struct ecdsa ecdsa_t;
#endif
typedef EC_KEY *ecdsa_t;
extern bool ecdsa_set_base64_public_key(ecdsa_t *ecdsa, const char *p);
extern ecdsa_t *ecdsa_set_base64_public_key(const char *p) __attribute__ ((__malloc__));
extern char *ecdsa_get_base64_public_key(ecdsa_t *ecdsa);
extern bool ecdsa_read_pem_public_key(ecdsa_t *ecdsa, FILE *fp);
extern bool ecdsa_read_pem_private_key(ecdsa_t *ecdsa, FILE *fp);
extern ecdsa_t *ecdsa_read_pem_public_key(FILE *fp) __attribute__ ((__malloc__));
extern ecdsa_t *ecdsa_read_pem_private_key(FILE *fp) __attribute__ ((__malloc__));
extern size_t ecdsa_size(ecdsa_t *ecdsa);
extern bool ecdsa_sign(ecdsa_t *ecdsa, const void *in, size_t inlen, void *out);
extern bool ecdsa_verify(ecdsa_t *ecdsa, const void *in, size_t inlen, const void *out);
extern bool ecdsa_sign(ecdsa_t *ecdsa, const void *in, size_t inlen, void *out) __attribute__ ((__warn_unused_result__));
extern bool ecdsa_verify(ecdsa_t *ecdsa, const void *in, size_t inlen, const void *out) __attribute__ ((__warn_unused_result__));
extern bool ecdsa_active(ecdsa_t *ecdsa);
extern void ecdsa_free(ecdsa_t *ecdsa);

View file

@ -1,6 +1,6 @@
/*
ecdsagen.h -- ECDSA key generation and export
Copyright (C) 2011 Guus Sliepen <guus@tinc-vpn.org>
Copyright (C) 2011-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -22,9 +22,8 @@
#include "ecdsa.h"
extern bool ecdsa_generate(ecdsa_t *ecdsa);
extern bool ecdsa_write_pem_public_key(ecdsa_t *ecdsa, FILE *fp);
extern bool ecdsa_write_pem_private_key(ecdsa_t *ecdsa, FILE *fp);
extern char *ecdsa_get_base64_public_key(ecdsa_t *ecdsa);
extern ecdsa_t *ecdsa_generate(void) __attribute__ ((__malloc__));
extern bool ecdsa_write_pem_public_key(ecdsa_t *ecdsa, FILE *fp) __attribute__ ((__warn_unused_result__));
extern bool ecdsa_write_pem_private_key(ecdsa_t *ecdsa, FILE *fp) __attribute__ ((__warn_unused_result__));
#endif

View file

@ -1,6 +1,6 @@
/*
edge.c -- edge tree management
Copyright (C) 2000-2012 Guus Sliepen <guus@tinc-vpn.org>,
Copyright (C) 2000-2013 Guus Sliepen <guus@tinc-vpn.org>,
2000-2005 Ivo Timmermans
This program is free software; you can redistribute it and/or modify
@ -70,7 +70,7 @@ void exit_edges(void) {
/* Creation and deletion of connection elements */
edge_t *new_edge(void) {
return xmalloc_and_zero(sizeof(edge_t));
return xzalloc(sizeof(edge_t));
}
void free_edge(edge_t *e) {

View file

@ -1,6 +1,6 @@
/*
event.c -- I/O, timeout and signal event handling
Copyright (C) 2012 Guus Sliepen <guus@tinc-vpn.org>
Copyright (C) 2012-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View file

@ -1,6 +1,6 @@
/*
event.h -- I/O, timeout and signal event handling
Copyright (C) 2012 Guus Sliepen <guus@tinc-vpn.org>
Copyright (C) 2012-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View file

@ -17,3 +17,7 @@
#ifndef EAI_FAMILY
#define EAI_FAMILY 3
#endif
#ifndef EAI_SYSTEM
#define EAI_SYSTEM 4
#endif

View file

@ -48,7 +48,7 @@ void freeaddrinfo(struct addrinfo *ai) {
static struct addrinfo *malloc_ai(uint16_t port, uint32_t addr) {
struct addrinfo *ai;
ai = xmalloc_and_zero(sizeof(struct addrinfo) + sizeof(struct sockaddr_in));
ai = xzalloc(sizeof(struct addrinfo) + sizeof(struct sockaddr_in));
ai->ai_addr = (struct sockaddr *)(ai + 1);
ai->ai_addrlen = sizeof(struct sockaddr_in);

View file

@ -0,0 +1 @@
# dummy

View file

@ -0,0 +1 @@
# dummy

View file

@ -0,0 +1 @@
# dummy

1
src/gcrypt/.deps/ecdh.Po Normal file
View file

@ -0,0 +1 @@
# dummy

View file

@ -0,0 +1 @@
# dummy

View file

@ -0,0 +1 @@
# dummy

1
src/gcrypt/.deps/prf.Po Normal file
View file

@ -0,0 +1 @@
# dummy

1
src/gcrypt/.deps/rsa.Po Normal file
View file

@ -0,0 +1 @@
# dummy

View file

@ -0,0 +1 @@
# dummy

37
src/gcrypt/ecdh.c Normal file
View file

@ -0,0 +1,37 @@
/*
ecdh.c -- Diffie-Hellman key exchange handling
Copyright (C) 2011-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "../system.h"
#include "../ecdh.h"
#include "../logger.h"
#include "../utils.h"
#include "../xalloc.h"
ecdh_t *ecdh_generate_public(void *pubkey) {
logger(DEBUG_ALWAYS, LOG_ERR, "EC support using libgcrypt not implemented");
return NULL;
}
bool ecdh_compute_shared(ecdh_t *ecdh, const void *pubkey, void *shared) {
return false
}
void ecdh_free(ecdh_t *ecdh) {
}

67
src/gcrypt/ecdsa.c Normal file
View file

@ -0,0 +1,67 @@
/*
ecdsa.c -- ECDSA key handling
Copyright (C) 2011-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "../system.h"
#include "../logger.h"
#include "../ecdsa.h"
#include "../utils.h"
#include "../xalloc.h"
// Get and set ECDSA keys
//
ecdsa_t *ecdsa_set_base64_public_key(const char *p) {
logger(DEBUG_ALWAYS, LOG_ERR, "EC support using libgcrypt not implemented");
return NULL;
}
char *ecdsa_get_base64_public_key(ecdsa_t *ecdsa) {
return NULL;
}
// Read PEM ECDSA keys
ecdsa_t *ecdsa_read_pem_public_key(FILE *fp) {
logger(DEBUG_ALWAYS, LOG_ERR, "EC support using libgcrypt not implemented");
return NULL;
}
ecdsa_t *ecdsa_read_pem_private_key(FILE *fp) {
logger(DEBUG_ALWAYS, LOG_ERR, "EC support using libgcrypt not implemented");
return NULL;
}
size_t ecdsa_size(ecdsa_t *ecdsa) {
return 0;
}
bool ecdsa_sign(ecdsa_t *ecdsa, const void *in, size_t len, void *sig) {
return false;
}
bool ecdsa_verify(ecdsa_t *ecdsa, const void *in, size_t len, const void *sig) {
return false;
}
bool ecdsa_active(ecdsa_t *ecdsa) {
return false;
}
void ecdsa_free(ecdsa_t *ecdsa) {
}

View file

@ -1,6 +1,6 @@
/*
crypto.c -- Cryptographic miscellaneous functions and initialisation
Copyright (C) 2007 Guus Sliepen <guus@tinc-vpn.org>
ecdsagen.c -- ECDSA key generation and export
Copyright (C) 2011-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -17,27 +17,25 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "system.h"
#include "../system.h"
#include <openssl/rand.h>
#include <openssl/evp.h>
#include <openssl/engine.h>
#include "../ecdsagen.h"
#include "../utils.h"
#include "../xalloc.h"
#include "crypto.h"
// Generate ECDSA key
void crypto_init(void) {
RAND_load_file("/dev/urandom", 1024);
ENGINE_load_builtin_engines();
ENGINE_register_all_complete();
OpenSSL_add_all_algorithms();
ecdsa_t *ecdsa_generate(void) {
logger(DEBUG_ALWAYS, LOG_ERR, "EC support using libgcrypt not implemented");
return NULL;
}
void crypto_exit(void) {
EVP_cleanup();
// Write PEM ECDSA keys
bool ecdsa_write_pem_public_key(ecdsa_t *ecdsa, FILE *fp) {
return false;
}
void randomize(void *out, size_t outlen) {
RAND_pseudo_bytes(out, outlen);
bool ecdsa_write_pem_private_key(ecdsa_t *ecdsa, FILE *fp) {
return false;
}

29
src/gcrypt/prf.c Normal file
View file

@ -0,0 +1,29 @@
/*
prf.c -- Pseudo-Random Function for key material generation
Copyright (C) 2011-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "../system.h"
#include "digest.h"
#include "../digest.h"
#include "../prf.h"
bool prf(const char *secret, size_t secretlen, char *seed, size_t seedlen, char *out, size_t outlen) {
logger(DEBUG_ALWAYS, LOG_ERR, "PRF support using libgcrypt not implemented");
return false;
}

View file

@ -31,7 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#endif
#ifdef HAVE_CONFIG_H
#include <config.h>
#include "../config.h"
#endif
#if !defined (__STDC__) || !__STDC__

View file

@ -20,7 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#include "../config.h"
#endif
#include "getopt.h"

View file

@ -44,7 +44,6 @@
#include "system.h"
#include "config.h"
#include "connection.h"
#include "device.h"
#include "edge.h"
@ -236,7 +235,7 @@ static void check_reachability(void) {
char *name;
char *address;
char *port;
char *envp[7];
char *envp[8] = {NULL};
xasprintf(&envp[0], "NETNAME=%s", netname ? : "");
xasprintf(&envp[1], "DEVICE=%s", device ? : "");
@ -245,7 +244,7 @@ static void check_reachability(void) {
sockaddr2str(&n->address, &address, &port);
xasprintf(&envp[4], "REMOTEADDRESS=%s", address);
xasprintf(&envp[5], "REMOTEPORT=%s", port);
envp[6] = NULL;
xasprintf(&envp[6], "NAME=%s", myself->name);
execute_script(n->status.reachable ? "host-up" : "host-down", envp);
@ -256,7 +255,7 @@ static void check_reachability(void) {
free(address);
free(port);
for(int i = 0; i < 6; i++)
for(int i = 0; i < 7; i++)
free(envp[i]);
subnet_update(n, NULL, n->status.reachable);

View file

@ -1,6 +1,6 @@
/*
hash.c -- hash table management
Copyright (C) 2012 Guus Sliepen <guus@tinc-vpn.org>
Copyright (C) 2012-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -29,7 +29,7 @@ static uint32_t hash_function(const void *p, size_t len) {
uint32_t hash = 0;
while(true) {
for(int i = len > 4 ? 4 : len; --i;)
hash += q[i] << (8 * i);
hash += q[len - i] << (8 * i);
hash *= 0x9e370001UL; // Golden ratio prime.
if(len <= 4)
break;
@ -52,11 +52,11 @@ static uint32_t modulo(uint32_t hash, size_t n) {
/* (De)allocation */
hash_t *hash_alloc(size_t n, size_t size) {
hash_t *hash = xmalloc_and_zero(sizeof *hash);
hash_t *hash = xzalloc(sizeof *hash);
hash->n = n;
hash->size = size;
hash->keys = xmalloc_and_zero(hash->n * hash->size);
hash->values = xmalloc_and_zero(hash->n * sizeof *hash->values);
hash->keys = xzalloc(hash->n * hash->size);
hash->values = xzalloc(hash->n * sizeof *hash->values);
return hash;
}

205
src/have.h Normal file
View file

@ -0,0 +1,205 @@
/*
have.h -- include headers which are known to exist
Copyright (C) 1998-2005 Ivo Timmermans
2003-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __TINC_HAVE_H__
#define __TINC_HAVE_H__
#ifdef HAVE_MINGW
#ifdef WITH_WINDOWS2000
#define WINVER Windows2000
#else
#define WINVER WindowsXP
#endif
#define WIN32_LEAN_AND_MEAN
#endif
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include <signal.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#ifdef HAVE_MINGW
#include <w32api.h>
#include <winsock2.h>
#include <windows.h>
#include <ws2tcpip.h>
#endif
#ifdef HAVE_STDBOOL_H
#include <stdbool.h>
#endif
#ifdef HAVE_TERMIOS_H
#include <termios.h>
#endif
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
/* Include system specific headers */
#ifdef HAVE_SYSLOG_H
#include <syslog.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_TIME_H
#include <time.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#ifdef HAVE_SYS_FILE_H
#include <sys/file.h>
#endif
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
#ifdef HAVE_SYS_UN_H
#include <sys/un.h>
#endif
#ifdef HAVE_DIRENT_H
#include <dirent.h>
#endif
/* SunOS really wants sys/socket.h BEFORE net/if.h,
and FreeBSD wants these lines below the rest. */
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_NET_IF_H
#include <net/if.h>
#endif
#ifdef HAVE_NET_IF_TYPES_H
#include <net/if_types.h>
#endif
#ifdef HAVE_NET_IF_TUN_H
#include <net/if_tun.h>
#endif
#ifdef HAVE_NET_TUN_IF_TUN_H
#include <net/tun/if_tun.h>
#endif
#ifdef HAVE_NET_IF_TAP_H
#include <net/if_tap.h>
#endif
#ifdef HAVE_NET_TAP_IF_TAP_H
#include <net/tap/if_tap.h>
#endif
#ifdef HAVE_NETINET_IN_SYSTM_H
#include <netinet/in_systm.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#ifdef HAVE_NETINET_IP_H
#include <netinet/ip.h>
#endif
#ifdef HAVE_NETINET_TCP_H
#include <netinet/tcp.h>
#endif
#ifdef HAVE_NETINET_IN6_H
#include <netinet/in6.h>
#endif
#ifdef HAVE_NETINET_IP6_H
#include <netinet/ip6.h>
#endif
#ifdef HAVE_NET_ETHERNET_H
#include <net/ethernet.h>
#endif
#ifdef HAVE_NET_IF_ARP_H
#include <net/if_arp.h>
#endif
#ifdef HAVE_NETINET_IP_ICMP_H
#include <netinet/ip_icmp.h>
#endif
#ifdef HAVE_NETINET_ICMP6_H
#include <netinet/icmp6.h>
#endif
#ifdef HAVE_NETINET_IF_ETHER_H
#include <netinet/if_ether.h>
#endif
#ifdef HAVE_MINGW
#define SLASH "\\"
#else
#define SLASH "/"
#endif
#endif /* __TINC_SYSTEM_H__ */

View file

@ -1,6 +1,6 @@
/*
info.c -- Show information about a node, subnet or address
Copyright (C) 2012 Guus Sliepen <guus@tinc-vpn.org>
Copyright (C) 2012-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -31,6 +31,7 @@ void logger(int level, int priority, const char *format, ...) {
va_start(ap, format);
vfprintf(stderr, format, ap);
va_end(ap);
fputc('\n', stderr);
}
char *strip_weight(char *netstr) {

939
src/invitation.c Normal file
View file

@ -0,0 +1,939 @@
/*
invitation.c -- Create and accept invitations
Copyright (C) 2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "system.h"
#include "control_common.h"
#include "crypto.h"
#include "ecdsa.h"
#include "ecdsagen.h"
#include "invitation.h"
#include "names.h"
#include "netutl.h"
#include "rsagen.h"
#include "sptps.h"
#include "tincctl.h"
#include "utils.h"
#include "xalloc.h"
#ifdef HAVE_MINGW
#define SCRIPTEXTENSION ".bat"
#else
#define SCRIPTEXTENSION ""
#endif
int addressfamily = AF_UNSPEC;
char *get_my_hostname() {
char *hostname = NULL;
char *port = NULL;
char *hostport = NULL;
char *name = get_my_name(false);
char *filename = NULL;
// Use first Address statement in own host config file
if(check_id(name)) {
xasprintf(&filename, "%s" SLASH "hosts" SLASH "%s", confbase, name);
FILE *f = fopen(filename, "r");
if(f) {
while(fgets(line, sizeof line, f)) {
if(!rstrip(line))
continue;
char *p = line, *q;
p += strcspn(p, "\t =");
if(!*p)
continue;
q = p + strspn(p, "\t ");
if(*q == '=')
q += 1 + strspn(q + 1, "\t ");
*p = 0;
p = q + strcspn(q, "\t ");
if(*p)
*p++ = 0;
p += strspn(p, "\t ");
p[strcspn(p, "\t ")] = 0;
if(!port && !strcasecmp(line, "Port")) {
port = xstrdup(q);
continue;
}
if(strcasecmp(line, "Address"))
continue;
hostname = xstrdup(q);
if(*p) {
free(port);
port = xstrdup(p);
}
break;
}
fclose(f);
}
}
if(hostname)
goto done;
// If that doesn't work, guess externally visible hostname
fprintf(stderr, "Trying to discover externally visible hostname...\n");
struct addrinfo *ai = str2addrinfo("ifconfig.me", "80", SOCK_STREAM);
static const char request[] = "GET /host HTTP/1.0\r\n\r\n";
if(ai) {
int s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
if(s >= 0) {
if(connect(s, ai->ai_addr, ai->ai_addrlen)) {
closesocket(s);
s = -1;
}
}
if(s >= 0) {
send(s, request, sizeof request - 1, 0);
int len = recv(s, line, sizeof line - 1, MSG_WAITALL);
if(len > 0) {
line[len] = 0;
if(line[len - 1] == '\n')
line[--len] = 0;
char *p = strrchr(line, '\n');
if(p && p[1])
hostname = xstrdup(p + 1);
}
closesocket(s);
}
freeaddrinfo(ai);
}
// Check that the hostname is reasonable
if(hostname) {
for(char *p = hostname; *p; p++) {
if(isalnum(*p) || *p == '-' || *p == '.')
continue;
// If not, forget it.
free(hostname);
hostname = NULL;
break;
}
}
again:
printf("Please enter your host's external address or hostname");
if(hostname)
printf(" [%s]", hostname);
printf(": ");
fflush(stdout);
if(!fgets(line, sizeof line, stdin)) {
fprintf(stderr, "Error while reading stdin: %s\n", strerror(errno));
free(hostname);
return NULL;
}
if(!rstrip(line)) {
if(hostname)
goto save;
else
goto again;
}
for(char *p = line; *p; p++) {
if(isalnum(*p) || *p == '-' || *p == '.')
continue;
fprintf(stderr, "Invalid address or hostname.\n");
goto again;
}
free(hostname);
hostname = xstrdup(line);
save:
if(filename) {
FILE *f = fopen(filename, "a");
if(f) {
fprintf(f, "\nAddress = %s\n", hostname);
fclose(f);
} else {
fprintf(stderr, "Could not append Address to %s: %s\n", filename, strerror(errno));
}
}
done:
if(port) {
if(strchr(hostname, ':'))
xasprintf(&hostport, "[%s]:%s", hostname, port);
else
xasprintf(&hostport, "%s:%s", hostname, port);
} else {
hostport = hostname;
hostname = NULL;
}
free(hostname);
free(port);
free(filename);
return hostport;
}
static bool fcopy(FILE *out, const char *filename) {
FILE *in = fopen(filename, "r");
if(!in) {
fprintf(stderr, "Could not open %s: %s\n", filename, strerror(errno));
return false;
}
char buf[1024];
size_t len;
while((len = fread(buf, 1, sizeof buf, in)))
fwrite(buf, len, 1, out);
fclose(in);
return true;
}
int cmd_invite(int argc, char *argv[]) {
if(argc < 2) {
fprintf(stderr, "Not enough arguments!\n");
return 1;
}
// Check validity of the new node's name
if(!check_id(argv[1])) {
fprintf(stderr, "Invalid name for node.\n");
return 1;
}
char *myname = get_my_name(true);
if(!myname)
return 1;
// Ensure no host configuration file with that name exists
char *filename = NULL;
xasprintf(&filename, "%s" SLASH "hosts" SLASH "%s", confbase, argv[1]);
if(!access(filename, F_OK)) {
free(filename);
fprintf(stderr, "A host config file for %s already exists!\n", argv[1]);
return 1;
}
free(filename);
// If a daemon is running, ensure no other nodes now about this name
bool found = false;
if(connect_tincd(false)) {
sendline(fd, "%d %d", CONTROL, REQ_DUMP_NODES);
while(recvline(fd, line, sizeof line)) {
char node[4096];
int code, req;
if(sscanf(line, "%d %d %s", &code, &req, node) != 3)
break;
if(!strcmp(node, argv[1]))
found = true;
}
if(found) {
fprintf(stderr, "A node with name %s is already known!\n", argv[1]);
return 1;
}
}
char hash[25];
xasprintf(&filename, "%s" SLASH "invitations", confbase);
if(mkdir(filename, 0700) && errno != EEXIST) {
fprintf(stderr, "Could not create directory %s: %s\n", filename, strerror(errno));
free(filename);
return 1;
}
// Count the number of valid invitations, clean up old ones
DIR *dir = opendir(filename);
if(!dir) {
fprintf(stderr, "Could not read directory %s: %s\n", filename, strerror(errno));
free(filename);
return 1;
}
errno = 0;
int count = 0;
struct dirent *ent;
time_t deadline = time(NULL) - 604800; // 1 week in the past
while((ent = readdir(dir))) {
if(strlen(ent->d_name) != 24)
continue;
char *invname;
struct stat st;
xasprintf(&invname, "%s" SLASH "%s", filename, ent->d_name);
if(!stat(invname, &st)) {
if(deadline < st.st_mtime)
count++;
else
unlink(invname);
} else {
fprintf(stderr, "Could not stat %s: %s\n", invname, strerror(errno));
errno = 0;
}
free(invname);
}
if(errno) {
fprintf(stderr, "Error while reading directory %s: %s\n", filename, strerror(errno));
closedir(dir);
free(filename);
return 1;
}
closedir(dir);
free(filename);
ecdsa_t *key;
xasprintf(&filename, "%s" SLASH "invitations" SLASH "ecdsa_key.priv", confbase);
// Remove the key if there are no outstanding invitations.
if(!count)
unlink(filename);
// Create a new key if necessary.
FILE *f = fopen(filename, "r");
if(!f) {
if(errno != ENOENT) {
fprintf(stderr, "Could not read %s: %s\n", filename, strerror(errno));
free(filename);
return 1;
}
key = ecdsa_generate();
if(!key) {
free(filename);
return 1;
}
f = fopen(filename, "w");
if(!f) {
fprintf(stderr, "Could not write %s: %s\n", filename, strerror(errno));
free(filename);
return 1;
}
chmod(filename, 0600);
ecdsa_write_pem_private_key(key, f);
} else {
key = ecdsa_read_pem_private_key(f);
if(!key)
fprintf(stderr, "Could not read private key from %s\n", filename);
}
fclose(f);
free(filename);
if(!key)
return 1;
// Create a hash of the key.
char *fingerprint = ecdsa_get_base64_public_key(key);
digest_t *digest = digest_open_by_name("sha256", 18);
if(!digest)
abort();
digest_create(digest, fingerprint, strlen(fingerprint), hash);
b64encode_urlsafe(hash, hash, 18);
// Create a random cookie for this invitation.
char cookie[25];
randomize(cookie, 18);
b64encode_urlsafe(cookie, cookie, 18);
// Create a file containing the details of the invitation.
xasprintf(&filename, "%s" SLASH "invitations" SLASH "%s", confbase, cookie);
int ifd = open(filename, O_RDWR | O_CREAT | O_EXCL, 0600);
if(!ifd) {
fprintf(stderr, "Could not create invitation file %s: %s\n", filename, strerror(errno));
free(filename);
return 1;
}
free(filename);
f = fdopen(ifd, "w");
if(!f)
abort();
// Fill in the details.
fprintf(f, "Name = %s\n", argv[1]);
if(netname)
fprintf(f, "NetName = %s\n", netname);
fprintf(f, "ConnectTo = %s\n", myname);
// TODO: copy Broadcast and Mode
fprintf(f, "#---------------------------------------------------------------#\n");
fprintf(f, "Name = %s\n", myname);
xasprintf(&filename, "%s" SLASH "hosts" SLASH "%s", confbase, myname);
fcopy(f, filename);
fclose(f);
// Create an URL from the local address, key hash and cookie
char *address = get_my_hostname();
printf("%s/%s%s\n", address, hash, cookie);
free(filename);
free(address);
return 0;
}
static int sock;
static char cookie[18];
static sptps_t sptps;
static char *data;
static size_t datalen;
static bool success = false;
static char cookie[18], hash[18];
static char *get_line(const char **data) {
if(!data || !*data)
return NULL;
if(!**data) {
*data = NULL;
return NULL;
}
static char line[1024];
const char *end = strchr(*data, '\n');
size_t len = end ? end - *data : strlen(*data);
if(len >= sizeof line) {
fprintf(stderr, "Maximum line length exceeded!\n");
return NULL;
}
if(len && !isprint(**data))
abort();
memcpy(line, *data, len);
line[len] = 0;
if(end)
*data = end + 1;
else
*data = NULL;
return line;
}
static char *get_value(const char *data, const char *var) {
char *line = get_line(&data);
if(!line)
return NULL;
char *sep = line + strcspn(line, " \t=");
char *val = sep + strspn(sep, " \t");
if(*val == '=')
val += 1 + strspn(val + 1, " \t");
*sep = 0;
if(strcasecmp(line, var))
return NULL;
return val;
}
static char *grep(const char *data, const char *var) {
static char value[1024];
const char *p = data;
int varlen = strlen(var);
// Skip all lines not starting with var
while(strncasecmp(p, var, varlen) || !strchr(" \t=", p[varlen])) {
p = strchr(p, '\n');
if(!p)
break;
else
p++;
}
if(!p)
return NULL;
p += varlen;
p += strspn(p, " \t");
if(*p == '=')
p += 1 + strspn(p + 1, " \t");
const char *e = strchr(p, '\n');
if(!e)
return xstrdup(p);
if(e - p >= sizeof value) {
fprintf(stderr, "Maximum line length exceeded!\n");
return NULL;
}
memcpy(value, p, e - p);
value[e - p] = 0;
return value;
}
static bool finalize_join(void) {
char *name = xstrdup(get_value(data, "Name"));
if(!name) {
fprintf(stderr, "No Name found in invitation!\n");
return false;
}
if(!check_id(name)) {
fprintf(stderr, "Invalid Name found in invitation: %s!\n", name);
return false;
}
if(!netname)
netname = grep(data, "NetName");
bool ask_netname = false;
char temp_netname[32];
make_names:
if(!confbasegiven) {
free(confbase);
confbase = NULL;
}
make_names();
free(tinc_conf);
free(hosts_dir);
xasprintf(&tinc_conf, "%s" SLASH "tinc.conf", confbase);
xasprintf(&hosts_dir, "%s" SLASH "hosts", confbase);
if(!access(tinc_conf, F_OK)) {
fprintf(stderr, "Configuration file %s already exists!\n", tinc_conf);
if(!tty || confbasegiven)
return false;
// Generate a random netname, ask for a better one later.
ask_netname = true;
snprintf(temp_netname, sizeof temp_netname, "join_%x", rand());
netname = temp_netname;
goto make_names;
}
if(mkdir(confbase, 0777) && errno != EEXIST) {
fprintf(stderr, "Could not create directory %s: %s\n", confbase, strerror(errno));
return false;
}
if(mkdir(hosts_dir, 0777) && errno != EEXIST) {
fprintf(stderr, "Could not create directory %s: %s\n", hosts_dir, strerror(errno));
return false;
}
FILE *f = fopen(tinc_conf, "w");
if(!f) {
fprintf(stderr, "Could not create file %s: %s\n", tinc_conf, strerror(errno));
return false;
}
fprintf(f, "Name = %s\n", name);
char *filename;
xasprintf(&filename, "%s" SLASH "%s", hosts_dir, name);
FILE *fh = fopen(filename, "w");
if(!fh) {
fprintf(stderr, "Could not create file %s: %s\n", filename, strerror(errno));
return false;
}
// Filter first chunk on approved keywords, split between tinc.conf and hosts/Name
// Other chunks go unfiltered to their respective host config files
const char *p = data;
char *l, *value;
while((l = get_line(&p))) {
// Ignore comments
if(*l == '#')
continue;
// Split line into variable and value
int len = strcspn(l, "\t =");
value = l + len;
value += strspn(value, "\t ");
if(*value == '=') {
value++;
value += strspn(value, "\t ");
}
l[len] = 0;
// Is it a Name?
if(!strcasecmp(l, "Name"))
if(strcmp(value, name))
break;
else
continue;
else if(!strcasecmp(l, "NetName"))
continue;
// Check the list of known variables
bool found = false;
int i;
for(i = 0; variables[i].name; i++) {
if(strcasecmp(l, variables[i].name))
continue;
found = true;
break;
}
// Ignore unknown and unsafe variables
if(!found) {
fprintf(stderr, "Ignoring unknown variable '%s' in invitation.\n", l);
continue;
} else if(!(variables[i].type & VAR_SAFE)) {
fprintf(stderr, "Ignoring unsafe variable '%s' in invitation.\n", l);
continue;
}
// Copy the safe variable to the right config file
fprintf(variables[i].type & VAR_HOST ? fh : f, "%s = %s\n", l, value);
}
fclose(f);
free(filename);
while(l && !strcasecmp(l, "Name")) {
if(!check_id(value)) {
fprintf(stderr, "Invalid Name found in invitation.\n");
return false;
}
if(!strcmp(value, name)) {
fprintf(stderr, "Secondary chunk would overwrite our own host config file.\n");
return false;
}
xasprintf(&filename, "%s" SLASH "%s", hosts_dir, value);
f = fopen(filename, "w");
if(!f) {
fprintf(stderr, "Could not create file %s: %s\n", filename, strerror(errno));
return false;
}
while((l = get_line(&p))) {
if(!strcmp(l, "#---------------------------------------------------------------#"))
continue;
int len = strcspn(l, "\t =");
if(len == 4 && !strncasecmp(l, "Name", 4)) {
value = l + len;
value += strspn(value, "\t ");
if(*value == '=') {
value++;
value += strspn(value, "\t ");
}
l[len] = 0;
break;
}
fputs(l, f);
fputc('\n', f);
}
fclose(f);
free(filename);
}
// Generate our key and send a copy to the server
ecdsa_t *key = ecdsa_generate();
if(!key)
return false;
char *b64key = ecdsa_get_base64_public_key(key);
if(!b64key)
return false;
xasprintf(&filename, "%s" SLASH "ecdsa_key.priv", confbase);
f = fopenmask(filename, "w", 0600);
if(!ecdsa_write_pem_private_key(key, f)) {
fprintf(stderr, "Error writing private key!\n");
ecdsa_free(key);
fclose(f);
return false;
}
fclose(f);
fprintf(fh, "ECDSAPublicKey = %s\n", b64key);
sptps_send_record(&sptps, 1, b64key, strlen(b64key));
free(b64key);
rsa_t *rsa = rsa_generate(2048, 0x1001);
xasprintf(&filename, "%s" SLASH "rsa_key.priv", confbase);
f = fopenmask(filename, "w", 0600);
rsa_write_pem_private_key(rsa, f);
fclose(f);
rsa_write_pem_public_key(rsa, fh);
fclose(fh);
ecdsa_free(key);
rsa_free(rsa);
check_port(name);
fprintf(stderr, "Invitation succesfully accepted.\n");
shutdown(sock, SHUT_RDWR);
success = true;
ask_netname:
if(ask_netname) {
fprintf(stderr, "Enter a new netname: ");
if(!fgets(line, sizeof line, stdin)) {
fprintf(stderr, "Error while reading stdin: %s\n", strerror(errno));
return false;
}
if(!*line || *line == '\n')
goto ask_netname;
line[strlen(line) - 1] = 0;
char *newbase;
xasprintf(&newbase, CONFDIR SLASH "tinc" SLASH "%s", line);
if(rename(confbase, newbase)) {
fprintf(stderr, "Error trying to rename %s to %s: %s\n", confbase, newbase, strerror(errno));
free(newbase);
goto ask_netname;
}
free(newbase);
netname = line;
make_names();
}
return true;
}
static bool invitation_send(void *handle, uint8_t type, const char *data, size_t len) {
while(len) {
int result = send(sock, data, len, 0);
if(result == -1 && errno == EINTR)
continue;
else if(result <= 0)
return false;
data += result;
len -= result;
}
return true;
}
static bool invitation_receive(void *handle, uint8_t type, const char *msg, uint16_t len) {
switch(type) {
case SPTPS_HANDSHAKE:
return sptps_send_record(&sptps, 0, cookie, sizeof cookie);
case 0:
data = xrealloc(data, datalen + len + 1);
memcpy(data + datalen, msg, len);
datalen += len;
data[datalen] = 0;
break;
case 1:
return finalize_join();
default:
return false;
}
return true;
}
int cmd_join(int argc, char *argv[]) {
free(data);
data = NULL;
datalen = 0;
if(argc > 2) {
fprintf(stderr, "Too many arguments!\n");
return 1;
}
// Make sure confbase exists and is accessible.
if(strcmp(confdir, confbase) && mkdir(confdir, 0755) && errno != EEXIST) {
fprintf(stderr, "Could not create directory %s: %s\n", confdir, strerror(errno));
return 1;
}
if(mkdir(confbase, 0777) && errno != EEXIST) {
fprintf(stderr, "Could not create directory %s: %s\n", confbase, strerror(errno));
return 1;
}
if(access(confbase, R_OK | W_OK | X_OK)) {
fprintf(stderr, "No permission to write in directory %s: %s\n", confbase, strerror(errno));
return 1;
}
// If a netname or explicit configuration directory is specified, check for an existing tinc.conf.
if((netname || confbasegiven) && !access(tinc_conf, F_OK)) {
fprintf(stderr, "Configuration file %s already exists!\n", tinc_conf);
return 1;
}
// Either read the invitation from the command line or from stdin.
char *invitation;
if(argc > 1) {
invitation = argv[1];
} else {
if(tty) {
printf("Enter invitation URL: ");
fflush(stdout);
}
errno = EPIPE;
if(!fgets(line, sizeof line, stdin)) {
fprintf(stderr, "Error while reading stdin: %s\n", strerror(errno));
return false;
}
invitation = line;
}
// Parse the invitation URL.
rstrip(line);
char *slash = strchr(invitation, '/');
if(!slash)
goto invalid;
*slash++ = 0;
if(strlen(slash) != 48)
goto invalid;
char *address = invitation;
char *port = NULL;
if(*address == '[') {
address++;
char *bracket = strchr(address, ']');
if(!bracket)
goto invalid;
*bracket = 0;
if(bracket[1] == ':')
port = bracket + 2;
} else {
port = strchr(address, ':');
if(port)
*port++ = 0;
}
if(!port || !*port)
port = "655";
if(!b64decode(slash, hash, 18) || !b64decode(slash + 24, cookie, 18))
goto invalid;
// Generate a throw-away key for the invitation.
ecdsa_t *key = ecdsa_generate();
if(!key)
return 1;
char *b64key = ecdsa_get_base64_public_key(key);
// Connect to the tinc daemon mentioned in the URL.
struct addrinfo *ai = str2addrinfo(address, port, SOCK_STREAM);
if(!ai)
return 1;
sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
if(sock <= 0) {
fprintf(stderr, "Could not open socket: %s\n", strerror(errno));
return 1;
}
if(connect(sock, ai->ai_addr, ai->ai_addrlen)) {
fprintf(stderr, "Could not connect to %s port %s: %s\n", address, port, strerror(errno));
closesocket(sock);
return 1;
}
fprintf(stderr, "Connected to %s port %s...\n", address, port);
// Tell him we have an invitation, and give him our throw-away key.
int len = snprintf(line, sizeof line, "0 ?%s %d.%d\n", b64key, PROT_MAJOR, PROT_MINOR);
if(len <= 0 || len >= sizeof line)
abort();
if(!sendline(sock, "0 ?%s %d.%d", b64key, PROT_MAJOR, 1)) {
fprintf(stderr, "Error sending request to %s port %s: %s\n", address, port, strerror(errno));
closesocket(sock);
return 1;
}
char hisname[4096] = "";
int code, hismajor, hisminor = 0;
if(!recvline(sock, line, sizeof line) || sscanf(line, "%d %s %d.%d", &code, hisname, &hismajor, &hisminor) < 3 || code != 0 || hismajor != PROT_MAJOR || !check_id(hisname) || !recvline(sock, line, sizeof line) || !rstrip(line) || sscanf(line, "%d ", &code) != 1 || code != ACK || strlen(line) < 3) {
fprintf(stderr, "Cannot read greeting from peer\n");
closesocket(sock);
return 1;
}
// Check if the hash of the key he gave us matches the hash in the URL.
char *fingerprint = line + 2;
digest_t *digest = digest_open_by_name("sha256", 18);
if(!digest)
abort();
char hishash[18];
if(!digest_create(digest, fingerprint, strlen(fingerprint), hishash)) {
fprintf(stderr, "Could not create digest\n%s\n", line + 2);
return 1;
}
if(memcmp(hishash, hash, 18)) {
fprintf(stderr, "Peer has an invalid key!\n%s\n", line + 2);
return 1;
}
ecdsa_t *hiskey = ecdsa_set_base64_public_key(fingerprint);
if(!hiskey)
return 1;
// Start an SPTPS session
if(!sptps_start(&sptps, NULL, true, false, key, hiskey, "tinc invitation", 15, invitation_send, invitation_receive))
return 1;
// Feed rest of input buffer to SPTPS
if(!sptps_receive_data(&sptps, buffer, blen))
return 1;
while((len = recv(sock, line, sizeof line, 0))) {
if(len < 0) {
if(errno == EINTR)
continue;
fprintf(stderr, "Error reading data from %s port %s: %s\n", address, port, strerror(errno));
return 1;
}
if(!sptps_receive_data(&sptps, line, len))
return 1;
}
sptps_stop(&sptps);
ecdsa_free(hiskey);
ecdsa_free(key);
closesocket(sock);
if(!success) {
fprintf(stderr, "Connection closed by peer, invitation cancelled.\n");
return 1;
}
return 0;
invalid:
fprintf(stderr, "Invalid invitation URL.\n");
return 1;
}

27
src/invitation.h Normal file
View file

@ -0,0 +1,27 @@
/*
invitation.h -- header for invitation.c.
Copyright (C) 2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __TINC_INVITATION_H__
#define __TINC_INVITATION_H__
bool recvdata(int fd, char *data, size_t len);
int cmd_invite(int argc, char *argv[]);
int cmd_join(int argc, char *argv[]);
#endif

View file

467
src/linux/.deps/device.Po Normal file
View file

@ -0,0 +1,467 @@
linux/device.o: linux/device.c /usr/include/stdc-predef.h \
/usr/include/x86_64-linux-gnu/bits/predefs.h linux/../system.h \
linux/../../config.h linux/../have.h /usr/include/stdio.h \
/usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h \
/usr/include/x86_64-linux-gnu/bits/types.h \
/usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/libio.h \
/usr/include/_G_config.h /usr/include/wchar.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h \
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
/usr/include/x86_64-linux-gnu/bits/stdio.h /usr/include/stdlib.h \
/usr/include/x86_64-linux-gnu/bits/waitflags.h \
/usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \
/usr/include/x86_64-linux-gnu/bits/endian.h \
/usr/include/x86_64-linux-gnu/bits/byteswap.h \
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/xlocale.h \
/usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
/usr/include/x86_64-linux-gnu/sys/select.h \
/usr/include/x86_64-linux-gnu/bits/select.h \
/usr/include/x86_64-linux-gnu/bits/sigset.h \
/usr/include/x86_64-linux-gnu/bits/time.h \
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h /usr/include/string.h \
/usr/include/x86_64-linux-gnu/bits/string.h \
/usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/ctype.h \
/usr/include/signal.h /usr/include/x86_64-linux-gnu/bits/signum.h \
/usr/include/x86_64-linux-gnu/bits/siginfo.h \
/usr/include/x86_64-linux-gnu/bits/sigaction.h \
/usr/include/x86_64-linux-gnu/bits/sigcontext.h \
/usr/include/x86_64-linux-gnu/bits/sigstack.h \
/usr/include/x86_64-linux-gnu/sys/ucontext.h \
/usr/include/x86_64-linux-gnu/bits/sigthread.h /usr/include/errno.h \
/usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
/usr/include/x86_64-linux-gnu/asm/errno.h \
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
/usr/include/fcntl.h /usr/include/x86_64-linux-gnu/bits/fcntl.h \
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \
/usr/include/x86_64-linux-gnu/bits/uio.h \
/usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/unistd.h \
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
/usr/include/x86_64-linux-gnu/bits/environments.h \
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdbool.h \
/usr/include/inttypes.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h /usr/include/stdint.h \
/usr/include/x86_64-linux-gnu/bits/wchar.h /usr/include/syslog.h \
/usr/include/x86_64-linux-gnu/sys/syslog.h \
/usr/include/x86_64-linux-gnu/bits/syslog-path.h \
/usr/include/x86_64-linux-gnu/sys/time.h \
/usr/include/x86_64-linux-gnu/bits/timex.h \
/usr/include/x86_64-linux-gnu/sys/stat.h \
/usr/include/x86_64-linux-gnu/sys/file.h \
/usr/include/x86_64-linux-gnu/sys/wait.h \
/usr/include/x86_64-linux-gnu/sys/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctls.h \
/usr/include/x86_64-linux-gnu/asm/ioctls.h \
/usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \
/usr/include/x86_64-linux-gnu/asm/ioctl.h \
/usr/include/asm-generic/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h \
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h \
/usr/include/x86_64-linux-gnu/sys/param.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h \
/usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
/usr/include/x86_64-linux-gnu/bits/local_lim.h \
/usr/include/linux/limits.h \
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h \
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h \
/usr/include/x86_64-linux-gnu/bits/param.h /usr/include/linux/param.h \
/usr/include/x86_64-linux-gnu/asm/param.h \
/usr/include/asm-generic/param.h \
/usr/include/x86_64-linux-gnu/sys/resource.h \
/usr/include/x86_64-linux-gnu/bits/resource.h \
/usr/include/x86_64-linux-gnu/sys/uio.h \
/usr/include/x86_64-linux-gnu/sys/un.h \
/usr/include/x86_64-linux-gnu/bits/sockaddr.h /usr/include/dirent.h \
/usr/include/x86_64-linux-gnu/bits/dirent.h /usr/include/netdb.h \
/usr/include/netinet/in.h /usr/include/x86_64-linux-gnu/sys/socket.h \
/usr/include/x86_64-linux-gnu/bits/socket.h \
/usr/include/x86_64-linux-gnu/bits/socket_type.h \
/usr/include/x86_64-linux-gnu/asm/socket.h \
/usr/include/asm-generic/socket.h \
/usr/include/x86_64-linux-gnu/asm/sockios.h \
/usr/include/asm-generic/sockios.h \
/usr/include/x86_64-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \
/usr/include/x86_64-linux-gnu/bits/netdb.h /usr/include/net/if.h \
/usr/include/netinet/in_systm.h /usr/include/arpa/inet.h \
/usr/include/netinet/ip.h /usr/include/netinet/tcp.h \
/usr/include/netinet/ip6.h /usr/include/net/ethernet.h \
/usr/include/linux/if_ether.h /usr/include/linux/types.h \
/usr/include/x86_64-linux-gnu/asm/types.h \
/usr/include/asm-generic/types.h /usr/include/asm-generic/int-ll64.h \
/usr/include/x86_64-linux-gnu/asm/bitsperlong.h \
/usr/include/asm-generic/bitsperlong.h /usr/include/linux/posix_types.h \
/usr/include/linux/stddef.h \
/usr/include/x86_64-linux-gnu/asm/posix_types.h \
/usr/include/x86_64-linux-gnu/asm/posix_types_64.h \
/usr/include/asm-generic/posix_types.h /usr/include/net/if_arp.h \
/usr/include/netinet/ip_icmp.h /usr/include/netinet/icmp6.h \
/usr/include/netinet/if_ether.h linux/../dropin.h \
linux/../fake-getaddrinfo.h linux/../fake-gai-errnos.h \
linux/../fake-getnameinfo.h /usr/include/linux/if_tun.h \
/usr/include/linux/filter.h linux/../conf.h linux/../splay_tree.h \
linux/../list.h linux/../subnet.h linux/../net.h linux/../ipv6.h \
linux/../cipher.h linux/../digest.h linux/../event.h linux/../conf.h \
linux/../connection.h linux/../buffer.h linux/../rsa.h linux/../sptps.h \
linux/../system.h linux/../ecdh.h linux/../ecdsa.h linux/../edge.h \
linux/../node.h linux/../device.h linux/../logger.h linux/../names.h \
linux/../net.h linux/../route.h linux/../utils.h linux/../xalloc.h
/usr/include/stdc-predef.h:
/usr/include/x86_64-linux-gnu/bits/predefs.h:
linux/../system.h:
linux/../../config.h:
linux/../have.h:
/usr/include/stdio.h:
/usr/include/features.h:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h:
/usr/include/x86_64-linux-gnu/bits/types.h:
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
/usr/include/libio.h:
/usr/include/_G_config.h:
/usr/include/wchar.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h:
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:
/usr/include/x86_64-linux-gnu/bits/stdio.h:
/usr/include/stdlib.h:
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
/usr/include/endian.h:
/usr/include/x86_64-linux-gnu/bits/endian.h:
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
/usr/include/xlocale.h:
/usr/include/x86_64-linux-gnu/sys/types.h:
/usr/include/time.h:
/usr/include/x86_64-linux-gnu/sys/select.h:
/usr/include/x86_64-linux-gnu/bits/select.h:
/usr/include/x86_64-linux-gnu/bits/sigset.h:
/usr/include/x86_64-linux-gnu/bits/time.h:
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
/usr/include/alloca.h:
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
/usr/include/string.h:
/usr/include/x86_64-linux-gnu/bits/string.h:
/usr/include/x86_64-linux-gnu/bits/string2.h:
/usr/include/ctype.h:
/usr/include/signal.h:
/usr/include/x86_64-linux-gnu/bits/signum.h:
/usr/include/x86_64-linux-gnu/bits/siginfo.h:
/usr/include/x86_64-linux-gnu/bits/sigaction.h:
/usr/include/x86_64-linux-gnu/bits/sigcontext.h:
/usr/include/x86_64-linux-gnu/bits/sigstack.h:
/usr/include/x86_64-linux-gnu/sys/ucontext.h:
/usr/include/x86_64-linux-gnu/bits/sigthread.h:
/usr/include/errno.h:
/usr/include/x86_64-linux-gnu/bits/errno.h:
/usr/include/linux/errno.h:
/usr/include/x86_64-linux-gnu/asm/errno.h:
/usr/include/asm-generic/errno.h:
/usr/include/asm-generic/errno-base.h:
/usr/include/fcntl.h:
/usr/include/x86_64-linux-gnu/bits/fcntl.h:
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:
/usr/include/x86_64-linux-gnu/bits/uio.h:
/usr/include/x86_64-linux-gnu/bits/stat.h:
/usr/include/unistd.h:
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
/usr/include/x86_64-linux-gnu/bits/environments.h:
/usr/include/x86_64-linux-gnu/bits/confname.h:
/usr/include/getopt.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdbool.h:
/usr/include/inttypes.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h:
/usr/include/stdint.h:
/usr/include/x86_64-linux-gnu/bits/wchar.h:
/usr/include/syslog.h:
/usr/include/x86_64-linux-gnu/sys/syslog.h:
/usr/include/x86_64-linux-gnu/bits/syslog-path.h:
/usr/include/x86_64-linux-gnu/sys/time.h:
/usr/include/x86_64-linux-gnu/bits/timex.h:
/usr/include/x86_64-linux-gnu/sys/stat.h:
/usr/include/x86_64-linux-gnu/sys/file.h:
/usr/include/x86_64-linux-gnu/sys/wait.h:
/usr/include/x86_64-linux-gnu/sys/ioctl.h:
/usr/include/x86_64-linux-gnu/bits/ioctls.h:
/usr/include/x86_64-linux-gnu/asm/ioctls.h:
/usr/include/asm-generic/ioctls.h:
/usr/include/linux/ioctl.h:
/usr/include/x86_64-linux-gnu/asm/ioctl.h:
/usr/include/asm-generic/ioctl.h:
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h:
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h:
/usr/include/x86_64-linux-gnu/sys/param.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h:
/usr/include/limits.h:
/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
/usr/include/x86_64-linux-gnu/bits/local_lim.h:
/usr/include/linux/limits.h:
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h:
/usr/include/x86_64-linux-gnu/bits/param.h:
/usr/include/linux/param.h:
/usr/include/x86_64-linux-gnu/asm/param.h:
/usr/include/asm-generic/param.h:
/usr/include/x86_64-linux-gnu/sys/resource.h:
/usr/include/x86_64-linux-gnu/bits/resource.h:
/usr/include/x86_64-linux-gnu/sys/uio.h:
/usr/include/x86_64-linux-gnu/sys/un.h:
/usr/include/x86_64-linux-gnu/bits/sockaddr.h:
/usr/include/dirent.h:
/usr/include/x86_64-linux-gnu/bits/dirent.h:
/usr/include/netdb.h:
/usr/include/netinet/in.h:
/usr/include/x86_64-linux-gnu/sys/socket.h:
/usr/include/x86_64-linux-gnu/bits/socket.h:
/usr/include/x86_64-linux-gnu/bits/socket_type.h:
/usr/include/x86_64-linux-gnu/asm/socket.h:
/usr/include/asm-generic/socket.h:
/usr/include/x86_64-linux-gnu/asm/sockios.h:
/usr/include/asm-generic/sockios.h:
/usr/include/x86_64-linux-gnu/bits/in.h:
/usr/include/rpc/netdb.h:
/usr/include/x86_64-linux-gnu/bits/netdb.h:
/usr/include/net/if.h:
/usr/include/netinet/in_systm.h:
/usr/include/arpa/inet.h:
/usr/include/netinet/ip.h:
/usr/include/netinet/tcp.h:
/usr/include/netinet/ip6.h:
/usr/include/net/ethernet.h:
/usr/include/linux/if_ether.h:
/usr/include/linux/types.h:
/usr/include/x86_64-linux-gnu/asm/types.h:
/usr/include/asm-generic/types.h:
/usr/include/asm-generic/int-ll64.h:
/usr/include/x86_64-linux-gnu/asm/bitsperlong.h:
/usr/include/asm-generic/bitsperlong.h:
/usr/include/linux/posix_types.h:
/usr/include/linux/stddef.h:
/usr/include/x86_64-linux-gnu/asm/posix_types.h:
/usr/include/x86_64-linux-gnu/asm/posix_types_64.h:
/usr/include/asm-generic/posix_types.h:
/usr/include/net/if_arp.h:
/usr/include/netinet/ip_icmp.h:
/usr/include/netinet/icmp6.h:
/usr/include/netinet/if_ether.h:
linux/../dropin.h:
linux/../fake-getaddrinfo.h:
linux/../fake-gai-errnos.h:
linux/../fake-getnameinfo.h:
/usr/include/linux/if_tun.h:
/usr/include/linux/filter.h:
linux/../conf.h:
linux/../splay_tree.h:
linux/../list.h:
linux/../subnet.h:
linux/../net.h:
linux/../ipv6.h:
linux/../cipher.h:
linux/../digest.h:
linux/../event.h:
linux/../conf.h:
linux/../connection.h:
linux/../buffer.h:
linux/../rsa.h:
linux/../sptps.h:
linux/../system.h:
linux/../ecdh.h:
linux/../ecdsa.h:
linux/../edge.h:
linux/../node.h:
linux/../device.h:
linux/../logger.h:
linux/../names.h:
linux/../net.h:
linux/../route.h:
linux/../utils.h:
linux/../xalloc.h:

0
src/linux/.dirstamp Normal file
View file

View file

@ -18,20 +18,20 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "system.h"
#include "../system.h"
#include <linux/if_tun.h>
#define DEFAULT_DEVICE "/dev/net/tun"
#include "conf.h"
#include "device.h"
#include "logger.h"
#include "names.h"
#include "net.h"
#include "route.h"
#include "utils.h"
#include "xalloc.h"
#include "device.h"
#include "../conf.h"
#include "../device.h"
#include "../logger.h"
#include "../names.h"
#include "../net.h"
#include "../route.h"
#include "../utils.h"
#include "../xalloc.h"
#include "../device.h"
typedef enum device_type_t {
DEVICE_TYPE_TUN,
@ -84,6 +84,8 @@ static bool setup_device(void) {
device_type = DEVICE_TYPE_TUN;
device_info = "Linux tun/tap device (tun mode)";
} else {
if (routing_mode == RMODE_ROUTER)
overwrite_mac = true;
ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
device_type = DEVICE_TYPE_TAP;
device_info = "Linux tun/tap device (tap mode)";

BIN
src/linux/device.o Normal file

Binary file not shown.

View file

@ -1,7 +1,7 @@
/*
list.c -- functions to deal with double linked lists
Copyright (C) 2000-2005 Ivo Timmermans
2000-2012 Guus Sliepen <guus@tinc-vpn.org>
2000-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -26,7 +26,7 @@
/* (De)constructors */
list_t *list_alloc(list_action_t delete) {
list_t *list = xmalloc_and_zero(sizeof(list_t));
list_t *list = xzalloc(sizeof(list_t));
list->delete = delete;
return list;
@ -37,7 +37,7 @@ void list_free(list_t *list) {
}
list_node_t *list_alloc_node(void) {
return xmalloc_and_zero(sizeof(list_node_t));
return xzalloc(sizeof(list_node_t));
}
void list_free_node(list_t *list, list_node_t *node) {

View file

@ -1,6 +1,6 @@
/*
meta.c -- handle the meta communication
Copyright (C) 2000-2012 Guus Sliepen <guus@tinc-vpn.org>,
Copyright (C) 2000-2013 Guus Sliepen <guus@tinc-vpn.org>,
2000-2005 Ivo Timmermans
2006 Scott Lamb <slamb@slamb.org>
@ -60,7 +60,7 @@ bool send_meta(connection_t *c, const char *buffer, int length) {
if(c->status.encryptout) {
size_t outlen = length;
if(!cipher_encrypt(&c->outcipher, buffer, length, buffer_prepare(&c->outbuf, length), &outlen, false) || outlen != length) {
if(!cipher_encrypt(c->outcipher, buffer, length, buffer_prepare(&c->outbuf, length), &outlen, false) || outlen != length) {
logger(DEBUG_ALWAYS, LOG_ERR, "Error while encrypting metadata to %s (%s)",
c->name, c->hostname);
return false;
@ -171,7 +171,7 @@ bool receive_meta(connection_t *c) {
} else {
size_t outlen = inlen;
if(!cipher_decrypt(&c->incipher, bufp, inlen, buffer_prepare(&c->inbuf, inlen), &outlen, false) || inlen != outlen) {
if(!cipher_decrypt(c->incipher, bufp, inlen, buffer_prepare(&c->inbuf, inlen), &outlen, false) || inlen != outlen) {
logger(DEBUG_ALWAYS, LOG_ERR, "Error while decrypting metadata from %s (%s)",
c->name, c->hostname);
return false;

View file

@ -0,0 +1 @@
# dummy

View file

@ -18,21 +18,21 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "system.h"
#include "../system.h"
#include <windows.h>
#include <winioctl.h>
#include "conf.h"
#include "device.h"
#include "logger.h"
#include "names.h"
#include "net.h"
#include "route.h"
#include "utils.h"
#include "xalloc.h"
#include "../conf.h"
#include "../device.h"
#include "../logger.h"
#include "../names.h"
#include "../net.h"
#include "../route.h"
#include "../utils.h"
#include "../xalloc.h"
#include "mingw/common.h"
#include "common.h"
int device_fd = -1;
static HANDLE device_handle = INVALID_HANDLE_VALUE;

View file

@ -1,7 +1,7 @@
/*
device.c -- multicast socket
Copyright (C) 2002-2005 Ivo Timmermans,
2002-2012 Guus Sliepen <guus@tinc-vpn.org>
2002-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View file

@ -42,6 +42,9 @@ void make_names(void) {
DWORD len = sizeof installdir;
#endif
if(netname && confbase)
logger(DEBUG_ALWAYS, LOG_INFO, "Both netname and configuration directory given, using the latter...");
if(netname)
xasprintf(&identname, "tinc.%s", netname);
else
@ -84,13 +87,10 @@ void make_names(void) {
strcpy(unixsocketname + len, ".socket");
}
if(netname) {
if(!confbase)
if(!confbase) {
if(netname)
xasprintf(&confbase, CONFDIR SLASH "tinc" SLASH "%s", netname);
else
logger(DEBUG_ALWAYS, LOG_INFO, "Both netname and configuration directory given, using the latter...");
} else {
if(!confbase)
xasprintf(&confbase, CONFDIR SLASH "tinc");
}
}

View file

@ -41,6 +41,8 @@ int contradicting_add_edge = 0;
int contradicting_del_edge = 0;
static int sleeptime = 10;
time_t last_config_check = 0;
static timeout_t pingtimer;
static timeout_t periodictimer;
/* Purge edges and subnets of unreachable nodes. Use carefully. */
@ -224,7 +226,7 @@ static void periodic_handler(void *data) {
if(!found) {
logger(DEBUG_CONNECTIONS, LOG_INFO, "Autoconnecting to %s", n->name);
outgoing_t *outgoing = xmalloc_and_zero(sizeof *outgoing);
outgoing_t *outgoing = xzalloc(sizeof *outgoing);
outgoing->name = xstrdup(n->name);
list_insert_tail(outgoing_list, outgoing);
setup_outgoing_connection(outgoing);
@ -296,7 +298,8 @@ static void sigterm_handler(void *data) {
static void sighup_handler(void *data) {
logger(DEBUG_ALWAYS, LOG_NOTICE, "Got %s signal", strsignal(((signal_t *)data)->signum));
reopenlogger();
reload_configuration();
if(reload_configuration())
exit(1);
}
static void sigalrm_handler(void *data) {
@ -306,7 +309,7 @@ static void sigalrm_handler(void *data) {
#endif
int reload_configuration(void) {
char *fname;
char *fname = NULL;
/* Reread our own configuration file */
@ -314,8 +317,7 @@ int reload_configuration(void) {
init_configuration(&config_tree);
if(!read_server_config()) {
logger(DEBUG_ALWAYS, LOG_ERR, "Unable to reread configuration file, exitting.");
event_exit();
logger(DEBUG_ALWAYS, LOG_ERR, "Unable to reread configuration file.");
return EINVAL;
}
@ -412,24 +414,27 @@ int reload_configuration(void) {
}
void retry(void) {
for list_each(connection_t, c, connection_list) {
if(c->outgoing && !c->node) {
timeout_del(&c->outgoing->ev);
if(c->status.connecting)
close(c->socket);
c->outgoing->timeout = 0;
terminate_connection(c, c->status.active);
}
/* Reset the reconnection timers for all outgoing connections */
for list_each(outgoing_t, outgoing, outgoing_list) {
outgoing->timeout = 0;
if(outgoing->ev.cb)
timeout_set(&outgoing->ev, &(struct timeval){0, 0});
}
/* Check for outgoing connections that are in progress, and reset their ping timers */
for list_each(connection_t, c, connection_list) {
if(c->outgoing && !c->node)
c->last_ping_time = 0;
}
/* Kick the ping timeout handler */
timeout_set(&pingtimer, &(struct timeval){0, 0});
}
/*
this is where it all happens...
*/
int main_loop(void) {
timeout_t pingtimer = {{0}};
timeout_t periodictimer = {{0}};
timeout_add(&pingtimer, timeout_handler, &pingtimer, &(struct timeval){pingtimeout, rand() % 100000});
timeout_add(&periodictimer, periodic_handler, &periodictimer, &(struct timeval){pingtimeout, rand() % 100000});
@ -454,9 +459,10 @@ int main_loop(void) {
#ifndef HAVE_MINGW
signal_del(&sighup);
signal_del(&sigalrm);
signal_del(&sigquit);
signal_del(&sigterm);
signal_del(&sigquit);
signal_del(&sigint);
signal_del(&sigalrm);
#endif
timeout_del(&periodictimer);

View file

@ -125,6 +125,7 @@ extern int seconds_till_retry;
extern int addressfamily;
extern unsigned replaywin;
extern bool localdiscovery;
extern sockaddr_t localdiscovery_address;
extern listen_socket_t listen_socket[MAXSOCKETS];
extern int listen_sockets;
@ -132,6 +133,7 @@ extern io_t unix_socket;
extern int keylifetime;
extern int udp_rcvbuf;
extern int udp_sndbuf;
extern int max_connection_burst;
extern bool do_prune;
extern char *myport;
extern int autoconnect;

View file

@ -56,6 +56,7 @@ static void send_udppacket(node_t *, vpn_packet_t *);
unsigned replaywin = 16;
bool localdiscovery = false;
sockaddr_t localdiscovery_address;
#define MAX_SEQNO 1073741824
@ -178,12 +179,25 @@ void send_mtu_probe(node_t *n) {
}
static void mtu_probe_h(node_t *n, vpn_packet_t *packet, length_t len) {
logger(DEBUG_TRAFFIC, LOG_INFO, "Got MTU probe length %d from %s (%s)", packet->len, n->name, n->hostname);
if(!packet->data[0]) {
logger(DEBUG_TRAFFIC, LOG_INFO, "Got MTU probe request %d from %s (%s)", packet->len, n->name, n->hostname);
/* It's a probe request, send back a reply */
packet->data[0] = 1;
/* Type 2 probe replies were introduced in protocol 17.3 */
if ((n->options >> 24) == 3) {
uint8_t* data = packet->data;
*data++ = 2;
uint16_t len16 = htons(len); memcpy(data, &len16, 2); data += 2;
struct timeval now;
gettimeofday(&now, NULL);
uint32_t sec = htonl(now.tv_sec); memcpy(data, &sec, 4); data += 4;
uint32_t usec = htonl(now.tv_usec); memcpy(data, &usec, 4); data += 4;
packet->len = data - packet->data;
} else {
/* Legacy protocol: n won't understand type 2 probe replies. */
packet->data[0] = 1;
}
/* Temporarily set udp_confirmed, so that the reply is sent
back exactly the way it came in. */
@ -193,6 +207,16 @@ static void mtu_probe_h(node_t *n, vpn_packet_t *packet, length_t len) {
send_udppacket(n, packet);
n->status.udp_confirmed = udp_confirmed;
} else {
length_t probelen = len;
if (packet->data[0] == 2) {
if (len < 3)
logger(DEBUG_TRAFFIC, LOG_WARNING, "Received invalid (too short) MTU probe reply from %s (%s)", n->name, n->hostname);
else {
uint16_t probelen16; memcpy(&probelen16, packet->data + 1, 2); probelen = ntohs(probelen16);
}
}
logger(DEBUG_TRAFFIC, LOG_INFO, "Got type %d MTU probe reply %d from %s (%s)", packet->data[0], probelen, n->name, n->hostname);
/* It's a valid reply: now we know bidirectional communication
is possible using the address and socket that the reply
packet used. */
@ -202,7 +226,7 @@ static void mtu_probe_h(node_t *n, vpn_packet_t *packet, length_t len) {
/* If we haven't established the PMTU yet, restart the discovery process. */
if(n->mtuprobes > 30) {
if (len == n->maxmtu + 8) {
if (probelen == n->maxmtu + 8) {
logger(DEBUG_TRAFFIC, LOG_INFO, "Increase in PMTU to %s (%s) detected, restarting PMTU discovery", n->name, n->hostname);
n->maxmtu = MTU;
n->mtuprobes = 10;
@ -217,27 +241,38 @@ static void mtu_probe_h(node_t *n, vpn_packet_t *packet, length_t len) {
/* If applicable, raise the minimum supported MTU */
if(len > n->maxmtu)
len = n->maxmtu;
if(n->minmtu < len)
n->minmtu = len;
if(probelen > n->maxmtu)
probelen = n->maxmtu;
if(n->minmtu < probelen)
n->minmtu = probelen;
/* Calculate RTT and bandwidth.
The RTT is the time between the MTU probe burst was sent and the first
reply is received. The bandwidth is measured using the time between the
arrival of the first and third probe reply.
arrival of the first and third probe reply (or type 2 probe requests).
*/
struct timeval now, diff;
gettimeofday(&now, NULL);
timersub(&now, &n->probe_time, &diff);
struct timeval probe_timestamp = now;
if (packet->data[0] == 2 && packet->len >= 11) {
uint32_t sec; memcpy(&sec, packet->data + 3, 4);
uint32_t usec; memcpy(&usec, packet->data + 7, 4);
probe_timestamp.tv_sec = ntohl(sec);
probe_timestamp.tv_usec = ntohl(usec);
}
n->probe_counter++;
if(n->probe_counter == 1) {
n->rtt = diff.tv_sec + diff.tv_usec * 1e-6;
n->probe_time = now;
n->probe_time = probe_timestamp;
} else if(n->probe_counter == 3) {
n->bandwidth = 2.0 * len / (diff.tv_sec + diff.tv_usec * 1e-6);
struct timeval probe_timestamp_diff;
timersub(&probe_timestamp, &n->probe_time, &probe_timestamp_diff);
n->bandwidth = 2.0 * probelen / (probe_timestamp_diff.tv_sec + probe_timestamp_diff.tv_usec * 1e-6);
logger(DEBUG_TRAFFIC, LOG_DEBUG, "%s (%s) RTT %.2f ms, burst bandwidth %.3f Mbit/s, rx packet loss %.2f %%", n->name, n->hostname, n->rtt * 1e3, n->bandwidth * 8e-6, n->packetloss * 1e2);
}
}
@ -318,10 +353,10 @@ static bool try_mac(node_t *n, const vpn_packet_t *inpkt) {
if(n->status.sptps)
return sptps_verify_datagram(&n->sptps, (char *)&inpkt->seqno, inpkt->len);
if(!digest_active(&n->indigest) || inpkt->len < sizeof inpkt->seqno + digest_length(&n->indigest))
if(!digest_active(n->indigest) || inpkt->len < sizeof inpkt->seqno + digest_length(n->indigest))
return false;
return digest_verify(&n->indigest, &inpkt->seqno, inpkt->len - n->indigest.maclength, (const char *)&inpkt->seqno + inpkt->len - n->indigest.maclength);
return digest_verify(n->indigest, &inpkt->seqno, inpkt->len - digest_length(n->indigest), (const char *)&inpkt->seqno + inpkt->len - digest_length(n->indigest));
}
static void receive_udppacket(node_t *n, vpn_packet_t *inpkt) {
@ -332,19 +367,27 @@ static void receive_udppacket(node_t *n, vpn_packet_t *inpkt) {
size_t outlen;
if(n->status.sptps) {
if(!n->sptps.state) {
if(!n->status.waitingforkey) {
logger(DEBUG_TRAFFIC, LOG_DEBUG, "Got packet from %s (%s) but we haven't exchanged keys yet", n->name, n->hostname);
send_req_key(n);
} else {
logger(DEBUG_TRAFFIC, LOG_DEBUG, "Got packet from %s (%s) but he hasn't got our key yet", n->name, n->hostname);
}
return;
}
sptps_receive_data(&n->sptps, (char *)&inpkt->seqno, inpkt->len);
return;
}
if(!cipher_active(&n->incipher)) {
logger(DEBUG_TRAFFIC, LOG_DEBUG, "Got packet from %s (%s) but he hasn't got our key yet",
n->name, n->hostname);
if(!cipher_active(n->incipher)) {
logger(DEBUG_TRAFFIC, LOG_DEBUG, "Got packet from %s (%s) but he hasn't got our key yet", n->name, n->hostname);
return;
}
/* Check packet length */
if(inpkt->len < sizeof inpkt->seqno + digest_length(&n->indigest)) {
if(inpkt->len < sizeof inpkt->seqno + digest_length(n->indigest)) {
logger(DEBUG_TRAFFIC, LOG_DEBUG, "Got too short packet from %s (%s)",
n->name, n->hostname);
return;
@ -352,20 +395,20 @@ static void receive_udppacket(node_t *n, vpn_packet_t *inpkt) {
/* Check the message authentication code */
if(digest_active(&n->indigest)) {
inpkt->len -= n->indigest.maclength;
if(!digest_verify(&n->indigest, &inpkt->seqno, inpkt->len, (const char *)&inpkt->seqno + inpkt->len)) {
if(digest_active(n->indigest)) {
inpkt->len -= digest_length(n->indigest);
if(!digest_verify(n->indigest, &inpkt->seqno, inpkt->len, (const char *)&inpkt->seqno + inpkt->len)) {
logger(DEBUG_TRAFFIC, LOG_DEBUG, "Got unauthenticated packet from %s (%s)", n->name, n->hostname);
return;
}
}
/* Decrypt the packet */
if(cipher_active(&n->incipher)) {
if(cipher_active(n->incipher)) {
outpkt = pkt[nextpkt++];
outlen = MAXSIZE;
if(!cipher_decrypt(&n->incipher, &inpkt->seqno, inpkt->len, &outpkt->seqno, &outlen, true)) {
if(!cipher_decrypt(n->incipher, &inpkt->seqno, inpkt->len, &outpkt->seqno, &outlen, true)) {
logger(DEBUG_TRAFFIC, LOG_DEBUG, "Error decrypting packet from %s (%s)", n->name, n->hostname);
return;
}
@ -572,12 +615,22 @@ static void choose_broadcast_address(const node_t *n, const sockaddr_t **sa, int
*sock = rand() % listen_sockets;
if(listen_socket[*sock].sa.sa.sa_family == AF_INET6) {
broadcast_ipv6.in6.sin6_port = n->prevedge->address.in.sin_port;
broadcast_ipv6.in6.sin6_scope_id = listen_socket[*sock].sa.in6.sin6_scope_id;
*sa = &broadcast_ipv6;
if(localdiscovery_address.sa.sa_family == AF_INET6) {
localdiscovery_address.in6.sin6_port = n->prevedge->address.in.sin_port;
*sa = &localdiscovery_address;
} else {
broadcast_ipv6.in6.sin6_port = n->prevedge->address.in.sin_port;
broadcast_ipv6.in6.sin6_scope_id = listen_socket[*sock].sa.in6.sin6_scope_id;
*sa = &broadcast_ipv6;
}
} else {
broadcast_ipv4.in.sin_port = n->prevedge->address.in.sin_port;
*sa = &broadcast_ipv4;
if(localdiscovery_address.sa.sa_family == AF_INET) {
localdiscovery_address.in.sin_port = n->prevedge->address.in.sin_port;
*sa = &localdiscovery_address;
} else {
broadcast_ipv4.in.sin_port = n->prevedge->address.in.sin_port;
*sa = &broadcast_ipv4;
}
}
}
@ -653,11 +706,11 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) {
/* Encrypt the packet */
if(cipher_active(&n->outcipher)) {
if(cipher_active(n->outcipher)) {
outpkt = pkt[nextpkt++];
outlen = MAXSIZE;
if(!cipher_encrypt(&n->outcipher, &inpkt->seqno, inpkt->len, &outpkt->seqno, &outlen, true)) {
if(!cipher_encrypt(n->outcipher, &inpkt->seqno, inpkt->len, &outpkt->seqno, &outlen, true)) {
logger(DEBUG_TRAFFIC, LOG_ERR, "Error while encrypting packet to %s (%s)", n->name, n->hostname);
goto end;
}
@ -668,9 +721,13 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) {
/* Add the message authentication code */
if(digest_active(&n->outdigest)) {
digest_create(&n->outdigest, &inpkt->seqno, inpkt->len, (char *)&inpkt->seqno + inpkt->len);
inpkt->len += digest_length(&n->outdigest);
if(digest_active(n->outdigest)) {
if(!digest_create(n->outdigest, &inpkt->seqno, inpkt->len, (char *)&inpkt->seqno + inpkt->len)) {
logger(DEBUG_TRAFFIC, LOG_ERR, "Error while encrypting packet to %s (%s)", n->name, n->hostname);
goto end;
}
inpkt->len += digest_length(n->outdigest);
}
/* Send the packet */
@ -719,10 +776,12 @@ bool send_sptps_data(void *handle, uint8_t type, const char *data, size_t len) {
b64encode(data, buf, len);
/* If no valid key is known yet, send the packets using ANS_KEY requests,
to ensure we get to learn the reflexive UDP address. */
if(!to->status.validkey)
return send_request(to->nexthop->connection, "%d %s %s %s -1 -1 -1 %d", ANS_KEY, myself->name, to->name, buf, myself->incompression);
else
if(!to->status.validkey) {
to->incompression = myself->incompression;
return send_request(to->nexthop->connection, "%d %s %s %s -1 -1 -1 %d", ANS_KEY, myself->name, to->name, buf, to->incompression);
} else {
return send_request(to->nexthop->connection, "%d %s %s %d %s", REQ_KEY, myself->name, to->name, REQ_SPTPS, buf);
}
}
/* Otherwise, send the packet via UDP */
@ -902,7 +961,7 @@ void broadcast_packet(const node_t *from, vpn_packet_t *packet) {
break;
for splay_each(node_t, n, node_tree)
if(n->status.reachable && ((n->via == myself && n->nexthop == n) || n->via == n))
if(n->status.reachable && n != myself && ((n->via == myself && n->nexthop == n) || n->via == n))
send_packet(n, packet);
break;

View file

@ -58,25 +58,22 @@ char *scriptinterpreter;
char *scriptextension;
bool node_read_ecdsa_public_key(node_t *n) {
if(ecdsa_active(&n->ecdsa))
if(ecdsa_active(n->ecdsa))
return true;
splay_tree_t *config_tree;
FILE *fp;
char *pubname = NULL, *hcfname = NULL;
char *pubname = NULL;
char *p;
bool result = false;
xasprintf(&hcfname, "%s" SLASH "hosts" SLASH "%s", confbase, n->name);
init_configuration(&config_tree);
if(!read_config_file(config_tree, hcfname))
if(!read_host_config(config_tree, n->name))
goto exit;
/* First, check for simple ECDSAPublicKey statement */
if(get_config_string(lookup_config(config_tree, "ECDSAPublicKey"), &p)) {
result = ecdsa_set_base64_public_key(&n->ecdsa, p);
n->ecdsa = ecdsa_set_base64_public_key(p);
free(p);
goto exit;
}
@ -93,28 +90,35 @@ bool node_read_ecdsa_public_key(node_t *n) {
goto exit;
}
result = ecdsa_read_pem_public_key(&n->ecdsa, fp);
n->ecdsa = ecdsa_read_pem_public_key(fp);
fclose(fp);
exit:
exit_configuration(&config_tree);
free(hcfname);
free(pubname);
return result;
return n->ecdsa;
}
bool read_ecdsa_public_key(connection_t *c) {
if(ecdsa_active(c->ecdsa))
return true;
FILE *fp;
char *fname;
char *p;
bool result;
if(!c->config_tree) {
init_configuration(&c->config_tree);
if(!read_host_config(c->config_tree, c->name))
return false;
}
/* First, check for simple ECDSAPublicKey statement */
if(get_config_string(lookup_config(c->config_tree, "ECDSAPublicKey"), &p)) {
result = ecdsa_set_base64_public_key(&c->ecdsa, p);
c->ecdsa = ecdsa_set_base64_public_key(p);
free(p);
return result;
return c->ecdsa;
}
/* Else, check for ECDSAPublicKeyFile statement and read it */
@ -131,27 +135,29 @@ bool read_ecdsa_public_key(connection_t *c) {
return false;
}
result = ecdsa_read_pem_public_key(&c->ecdsa, fp);
c->ecdsa = ecdsa_read_pem_public_key(fp);
fclose(fp);
if(!result)
if(!c->ecdsa)
logger(DEBUG_ALWAYS, LOG_ERR, "Parsing ECDSA public key file `%s' failed.", fname);
free(fname);
return result;
return c->ecdsa;
}
bool read_rsa_public_key(connection_t *c) {
if(ecdsa_active(c->ecdsa))
return true;
FILE *fp;
char *fname;
char *n;
bool result;
/* First, check for simple PublicKey statement */
if(get_config_string(lookup_config(c->config_tree, "PublicKey"), &n)) {
result = rsa_set_hex_public_key(&c->rsa, n, "FFFF");
c->rsa = rsa_set_hex_public_key(n, "FFFF");
free(n);
return result;
return c->rsa;
}
/* Else, check for PublicKeyFile statement and read it */
@ -167,19 +173,18 @@ bool read_rsa_public_key(connection_t *c) {
return false;
}
result = rsa_read_pem_public_key(&c->rsa, fp);
c->rsa = rsa_read_pem_public_key(fp);
fclose(fp);
if(!result)
if(!c->rsa)
logger(DEBUG_ALWAYS, LOG_ERR, "Reading RSA public key file `%s' failed: %s", fname, strerror(errno));
free(fname);
return result;
return c->rsa;
}
static bool read_ecdsa_private_key(void) {
FILE *fp;
char *fname;
bool result;
/* Check for PrivateKeyFile statement and read it */
@ -190,6 +195,8 @@ static bool read_ecdsa_private_key(void) {
if(!fp) {
logger(DEBUG_ALWAYS, LOG_ERR, "Error reading ECDSA private key file `%s': %s", fname, strerror(errno));
if(errno == ENOENT)
logger(DEBUG_ALWAYS, LOG_INFO, "Create an ECDSA keypair with `tinc -n %s generate-ecdsa-keys'.", netname ?: ".");
free(fname);
return false;
}
@ -207,20 +214,43 @@ static bool read_ecdsa_private_key(void) {
logger(DEBUG_ALWAYS, LOG_WARNING, "Warning: insecure file permissions for ECDSA private key file `%s'!", fname);
#endif
result = ecdsa_read_pem_private_key(&myself->connection->ecdsa, fp);
myself->connection->ecdsa = ecdsa_read_pem_private_key(fp);
fclose(fp);
if(!result)
if(!myself->connection->ecdsa)
logger(DEBUG_ALWAYS, LOG_ERR, "Reading ECDSA private key file `%s' failed: %s", fname, strerror(errno));
free(fname);
return result;
return myself->connection->ecdsa;
}
static bool read_invitation_key(void) {
FILE *fp;
char *fname;
if(invitation_key) {
ecdsa_free(invitation_key);
invitation_key = NULL;
}
xasprintf(&fname, "%s" SLASH "invitations" SLASH "ecdsa_key.priv", confbase);
fp = fopen(fname, "r");
if(fp) {
invitation_key = ecdsa_read_pem_private_key(fp);
fclose(fp);
if(!invitation_key)
logger(DEBUG_ALWAYS, LOG_ERR, "Reading ECDSA private key file `%s' failed: %s", fname, strerror(errno));
}
free(fname);
return invitation_key;
}
static bool read_rsa_private_key(void) {
FILE *fp;
char *fname;
char *n, *d;
bool result;
/* First, check for simple PrivateKey statement */
@ -230,10 +260,10 @@ static bool read_rsa_private_key(void) {
free(d);
return false;
}
result = rsa_set_hex_private_key(&myself->connection->rsa, n, "FFFF", d);
myself->connection->rsa = rsa_set_hex_private_key(n, "FFFF", d);
free(n);
free(d);
return result;
return myself->connection->rsa;
}
/* Else, check for PrivateKeyFile statement and read it */
@ -263,13 +293,13 @@ static bool read_rsa_private_key(void) {
logger(DEBUG_ALWAYS, LOG_WARNING, "Warning: insecure file permissions for RSA private key file `%s'!", fname);
#endif
result = rsa_read_pem_private_key(&myself->connection->rsa, fp);
myself->connection->rsa = rsa_read_pem_private_key(fp);
fclose(fp);
if(!result)
if(!myself->connection->rsa)
logger(DEBUG_ALWAYS, LOG_ERR, "Reading RSA private key file `%s' failed: %s", fname, strerror(errno));
free(fname);
return result;
return myself->connection->rsa;
}
static timeout_t keyexpire_timeout;
@ -310,14 +340,10 @@ void load_all_subnets(void) {
// continue;
#endif
char *fname;
xasprintf(&fname, "%s" SLASH "hosts" SLASH "%s", confbase, ent->d_name);
splay_tree_t *config_tree;
init_configuration(&config_tree);
read_config_options(config_tree, ent->d_name);
read_config_file(config_tree, fname);
free(fname);
read_host_config(config_tree, ent->d_name);
if(!n) {
n = new_node();
@ -418,6 +444,7 @@ bool setup_myself_reloadable(void) {
char *fmode = NULL;
char *bmode = NULL;
char *afname = NULL;
char *address = NULL;
char *space;
bool choice;
@ -508,6 +535,16 @@ bool setup_myself_reloadable(void) {
get_config_bool(lookup_config(config_tree, "DirectOnly"), &directonly);
get_config_bool(lookup_config(config_tree, "LocalDiscovery"), &localdiscovery);
memset(&localdiscovery_address, 0, sizeof localdiscovery_address);
if(get_config_string(lookup_config(config_tree, "LocalDiscoveryAddress"), &address)) {
struct addrinfo *ai = str2addrinfo(address, myport, SOCK_DGRAM);
free(address);
if(!ai)
return false;
memcpy(&localdiscovery_address, ai->ai_addr, ai->ai_addrlen);
}
if(get_config_string(lookup_config(config_tree, "Mode"), &rmode)) {
if(!strcasecmp(rmode, "router"))
routing_mode = RMODE_ROUTER;
@ -601,6 +638,8 @@ bool setup_myself_reloadable(void) {
get_config_bool(lookup_config(config_tree, "DisableBuggyPeers"), &disablebuggypeers);
read_invitation_key();
return true;
}
@ -609,7 +648,6 @@ bool setup_myself_reloadable(void) {
*/
static bool setup_myself(void) {
char *name, *hostname, *cipher, *digest, *type;
char *fname = NULL;
char *address = NULL;
if(!(name = get_name())) {
@ -621,10 +659,7 @@ static bool setup_myself(void) {
myself->connection = new_connection();
myself->name = name;
myself->connection->name = xstrdup(name);
xasprintf(&fname, "%s" SLASH "hosts" SLASH "%s", confbase, name);
read_config_options(config_tree, name);
read_config_file(config_tree, fname);
free(fname);
read_host_config(config_tree, name);
if(!get_config_string(lookup_config(config_tree, "Port"), &myport))
myport = xstrdup("655");
@ -676,7 +711,12 @@ static bool setup_myself(void) {
get_config_bool(lookup_config(config_tree, "TunnelServer"), &tunnelserver);
strictsubnets |= tunnelserver;
if(get_config_int(lookup_config(config_tree, "MaxConnectionBurst"), &max_connection_burst)) {
if(max_connection_burst <= 0) {
logger(DEBUG_ALWAYS, LOG_ERR, "MaxConnectionBurst cannot be negative!");
return false;
}
}
if(get_config_int(lookup_config(config_tree, "UDPRcvBuf"), &udp_rcvbuf)) {
if(udp_rcvbuf <= 0) {
@ -707,7 +747,7 @@ static bool setup_myself(void) {
if(!get_config_string(lookup_config(config_tree, "Cipher"), &cipher))
cipher = xstrdup("blowfish");
if(!cipher_open_by_name(&myself->incipher, cipher)) {
if(!(myself->incipher = cipher_open_by_name(cipher))) {
logger(DEBUG_ALWAYS, LOG_ERR, "Unrecognized cipher type!");
return false;
}
@ -730,7 +770,7 @@ static bool setup_myself(void) {
if(!get_config_string(lookup_config(config_tree, "Digest"), &digest))
digest = xstrdup("sha1");
if(!digest_open_by_name(&myself->indigest, digest, maclength)) {
if(!(myself->indigest = digest_open_by_name(digest, maclength))) {
logger(DEBUG_ALWAYS, LOG_ERR, "Unrecognized digest type!");
return false;
}
@ -793,12 +833,11 @@ static bool setup_myself(void) {
io_add(&device_io, handle_device_data, NULL, device_fd, IO_READ);
/* Run tinc-up script to further initialize the tap interface */
char *envp[5];
char *envp[5] = {NULL};
xasprintf(&envp[0], "NETNAME=%s", netname ? : "");
xasprintf(&envp[1], "DEVICE=%s", device ? : "");
xasprintf(&envp[2], "INTERFACE=%s", iface ? : "");
xasprintf(&envp[3], "NAME=%s", myself->name);
envp[4] = NULL;
execute_script("tinc-up", envp);
@ -829,7 +868,12 @@ static bool setup_myself(void) {
unlink(unixsocketname);
if(bind(unix_fd, (struct sockaddr *)&sa, sizeof sa) < 0) {
mode_t mask = umask(0);
umask(mask | 077);
int result = bind(unix_fd, (struct sockaddr *)&sa, sizeof sa);
umask(mask);
if(result < 0) {
logger(DEBUG_ALWAYS, LOG_ERR, "Could not bind UNIX socket to %s: %s", unixsocketname, sockstrerror(errno));
return false;
}
@ -914,8 +958,7 @@ static bool setup_myself(void) {
free(address);
if(err || !ai) {
logger(DEBUG_ALWAYS, LOG_ERR, "System call `%s' failed: %s", "getaddrinfo",
gai_strerror(err));
logger(DEBUG_ALWAYS, LOG_ERR, "System call `%s' failed: %s", "getaddrinfo", err == EAI_SYSTEM ? strerror(err) : gai_strerror(err));
return false;
}
@ -1031,12 +1074,11 @@ void close_network_connections(void) {
close(unix_socket.fd);
#endif
char *envp[5];
char *envp[5] = {NULL};
xasprintf(&envp[0], "NETNAME=%s", netname ? : "");
xasprintf(&envp[1], "DEVICE=%s", device ? : "");
xasprintf(&envp[2], "INTERFACE=%s", iface ? : "");
xasprintf(&envp[3], "NAME=%s", myself->name);
envp[4] = NULL;
exit_requests();
exit_edges();

View file

@ -45,6 +45,7 @@ int maxtimeout = 900;
int seconds_till_retry = 5;
int udp_rcvbuf = 0;
int udp_sndbuf = 0;
int max_connection_burst = 100;
listen_socket_t listen_socket[MAXSOCKETS];
int listen_sockets;
@ -561,6 +562,47 @@ void handle_new_meta_connection(void *data, int flags) {
sockaddrunmap(&sa);
// Check if we get many connections from the same host
static sockaddr_t prev_sa;
static time_t prev_time;
static int tarpit = -1;
if(tarpit >= 0) {
closesocket(tarpit);
tarpit = -1;
}
if(prev_time == now.tv_sec && !sockaddrcmp_noport(&sa, &prev_sa)) {
// if so, keep the connection open but ignore it completely.
tarpit = fd;
return;
}
memcpy(&prev_sa, &sa, sizeof sa);
prev_time = now.tv_sec;
// Check if we get many connections from different hosts
static int connection_burst;
static int connection_burst_time;
if(now.tv_sec - connection_burst_time > connection_burst)
connection_burst = 0;
else
connection_burst -= now.tv_sec - connection_burst_time;
connection_burst_time = now.tv_sec;
connection_burst++;
if(connection_burst >= max_connection_burst) {
connection_burst = max_connection_burst;
tarpit = fd;
return;
}
// Accept the new connection
c = new_connection();
c->name = xstrdup("<unknown>");
c->outcipher = myself->connection->outcipher;
@ -674,7 +716,7 @@ void try_outgoing_connections(void) {
}
if(!found) {
outgoing_t *outgoing = xmalloc_and_zero(sizeof *outgoing);
outgoing_t *outgoing = xzalloc(sizeof *outgoing);
outgoing->name = name;
list_insert_tail(outgoing_list, outgoing);
setup_outgoing_connection(outgoing);

View file

@ -1,7 +1,7 @@
/*
netutl.c -- some supporting network utility code
Copyright (C) 1998-2005 Ivo Timmermans
2000-2012 Guus Sliepen <guus@tinc-vpn.org>
2000-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -42,8 +42,7 @@ struct addrinfo *str2addrinfo(const char *address, const char *service, int sock
err = getaddrinfo(address, service, &hint, &ai);
if(err) {
logger(DEBUG_ALWAYS, LOG_WARNING, "Error looking up %s port %s: %s", address,
service, gai_strerror(err));
logger(DEBUG_ALWAYS, LOG_WARNING, "Error looking up %s port %s: %s", address, service, err == EAI_SYSTEM ? strerror(errno) : gai_strerror(err));
return NULL;
}
@ -92,8 +91,7 @@ void sockaddr2str(const sockaddr_t *sa, char **addrstr, char **portstr) {
err = getnameinfo(&sa->sa, SALEN(sa->sa), address, sizeof address, port, sizeof port, NI_NUMERICHOST | NI_NUMERICSERV);
if(err) {
logger(DEBUG_ALWAYS, LOG_ERR, "Error while translating addresses: %s",
gai_strerror(err));
logger(DEBUG_ALWAYS, LOG_ERR, "Error while translating addresses: %s", err == EAI_SYSTEM ? strerror(errno) : gai_strerror(err));
abort();
}
@ -122,8 +120,7 @@ char *sockaddr2hostname(const sockaddr_t *sa) {
err = getnameinfo(&sa->sa, SALEN(sa->sa), address, sizeof address, port, sizeof port,
hostnames ? 0 : (NI_NUMERICHOST | NI_NUMERICSERV));
if(err) {
logger(DEBUG_ALWAYS, LOG_ERR, "Error while looking up hostname: %s",
gai_strerror(err));
logger(DEBUG_ALWAYS, LOG_ERR, "Error while looking up hostname: %s", err == EAI_SYSTEM ? strerror(errno) : gai_strerror(err));
}
xasprintf(&str, "%s port %s", address, port);

View file

@ -1,7 +1,7 @@
/*
netutl.h -- header file for netutl.c
Copyright (C) 1998-2005 Ivo Timmermans
2000-2012 Guus Sliepen <guus@tinc-vpn.org>
2000-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -25,10 +25,10 @@
extern bool hostnames;
extern struct addrinfo *str2addrinfo(const char *, const char *, int);
extern struct addrinfo *str2addrinfo(const char *, const char *, int) __attribute__ ((__malloc__));
extern sockaddr_t str2sockaddr(const char *, const char *);
extern void sockaddr2str(const sockaddr_t *, char **, char **);
extern char *sockaddr2hostname(const sockaddr_t *);
extern char *sockaddr2hostname(const sockaddr_t *) __attribute__ ((__malloc__));
extern int sockaddrcmp(const sockaddr_t *, const sockaddr_t *);
extern int sockaddrcmp_noport(const sockaddr_t *, const sockaddr_t *);
extern void sockaddrunmap(sockaddr_t *);

View file

@ -1,6 +1,6 @@
/*
node.c -- node tree management
Copyright (C) 2001-2012 Guus Sliepen <guus@tinc-vpn.org>,
Copyright (C) 2001-2013 Guus Sliepen <guus@tinc-vpn.org>,
2001-2005 Ivo Timmermans
This program is free software; you can redistribute it and/or modify
@ -50,9 +50,9 @@ void exit_nodes(void) {
}
node_t *new_node(void) {
node_t *n = xmalloc_and_zero(sizeof *n);
node_t *n = xzalloc(sizeof *n);
if(replaywin) n->late = xmalloc_and_zero(replaywin);
if(replaywin) n->late = xzalloc(replaywin);
n->subnet_tree = new_subnet_tree();
n->edge_tree = new_edge_tree();
n->mtu = MTU;
@ -70,12 +70,12 @@ void free_node(node_t *n) {
sockaddrfree(&n->address);
cipher_close(&n->incipher);
digest_close(&n->indigest);
cipher_close(&n->outcipher);
digest_close(&n->outdigest);
cipher_close(n->incipher);
digest_close(n->indigest);
cipher_close(n->outcipher);
digest_close(n->outdigest);
ecdsa_free(&n->ecdsa);
ecdsa_free(n->ecdsa);
sptps_stop(&n->sptps);
timeout_del(&n->mtutimeout);
@ -145,8 +145,8 @@ void update_node_udp(node_t *n, const sockaddr_t *sa) {
bool dump_nodes(connection_t *c) {
for splay_each(node_t, n, node_tree)
send_request(c, "%d %d %s %s %d %d %d %d %x %x %s %s %d %hd %hd %hd %ld", CONTROL, REQ_DUMP_NODES,
n->name, n->hostname ?: "unknown port unknown", cipher_get_nid(&n->outcipher),
digest_get_nid(&n->outdigest), (int)digest_length(&n->outdigest), n->outcompression,
n->name, n->hostname ?: "unknown port unknown", cipher_get_nid(n->outcipher),
digest_get_nid(n->outdigest), (int)digest_length(n->outdigest), n->outcompression,
n->options, bitfield_to_int(&n->status, sizeof n->status), n->nexthop ? n->nexthop->name : "-",
n->via ? n->via->name ?: "-" : "-", n->distance, n->mtu, n->minmtu, n->maxmtu, (long)n->last_state_change);

View file

@ -52,14 +52,14 @@ typedef struct node_t {
time_t last_state_change;
time_t last_req_key;
ecdsa_t ecdsa; /* His public ECDSA key */
ecdsa_t *ecdsa; /* His public ECDSA key */
sptps_t sptps;
cipher_t incipher; /* Cipher for UDP packets */
digest_t indigest; /* Digest for UDP packets */
cipher_t *incipher; /* Cipher for UDP packets */
digest_t *indigest; /* Digest for UDP packets */
cipher_t outcipher; /* Cipher for UDP packets */
digest_t outdigest; /* Digest for UDP packets */
cipher_t *outcipher; /* Cipher for UDP packets */
digest_t *outdigest; /* Digest for UDP packets */
int incompression; /* Compressionlevel, 0 = no compression */
int outcompression; /* Compressionlevel, 0 = no compression */

View file

454
src/openssl/.deps/cipher.Po Normal file
View file

@ -0,0 +1,454 @@
openssl/cipher.o: openssl/cipher.c /usr/include/stdc-predef.h \
/usr/include/x86_64-linux-gnu/bits/predefs.h openssl/../system.h \
openssl/../../config.h openssl/../have.h /usr/include/stdio.h \
/usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h \
/usr/include/x86_64-linux-gnu/bits/types.h \
/usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/libio.h \
/usr/include/_G_config.h /usr/include/wchar.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h \
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
/usr/include/x86_64-linux-gnu/bits/stdio.h /usr/include/stdlib.h \
/usr/include/x86_64-linux-gnu/bits/waitflags.h \
/usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \
/usr/include/x86_64-linux-gnu/bits/endian.h \
/usr/include/x86_64-linux-gnu/bits/byteswap.h \
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/xlocale.h \
/usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
/usr/include/x86_64-linux-gnu/sys/select.h \
/usr/include/x86_64-linux-gnu/bits/select.h \
/usr/include/x86_64-linux-gnu/bits/sigset.h \
/usr/include/x86_64-linux-gnu/bits/time.h \
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h /usr/include/string.h \
/usr/include/x86_64-linux-gnu/bits/string.h \
/usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/ctype.h \
/usr/include/signal.h /usr/include/x86_64-linux-gnu/bits/signum.h \
/usr/include/x86_64-linux-gnu/bits/siginfo.h \
/usr/include/x86_64-linux-gnu/bits/sigaction.h \
/usr/include/x86_64-linux-gnu/bits/sigcontext.h \
/usr/include/x86_64-linux-gnu/bits/sigstack.h \
/usr/include/x86_64-linux-gnu/sys/ucontext.h \
/usr/include/x86_64-linux-gnu/bits/sigthread.h /usr/include/errno.h \
/usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
/usr/include/x86_64-linux-gnu/asm/errno.h \
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
/usr/include/fcntl.h /usr/include/x86_64-linux-gnu/bits/fcntl.h \
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \
/usr/include/x86_64-linux-gnu/bits/uio.h \
/usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/unistd.h \
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
/usr/include/x86_64-linux-gnu/bits/environments.h \
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdbool.h \
/usr/include/inttypes.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h /usr/include/stdint.h \
/usr/include/x86_64-linux-gnu/bits/wchar.h /usr/include/syslog.h \
/usr/include/x86_64-linux-gnu/sys/syslog.h \
/usr/include/x86_64-linux-gnu/bits/syslog-path.h \
/usr/include/x86_64-linux-gnu/sys/time.h \
/usr/include/x86_64-linux-gnu/bits/timex.h \
/usr/include/x86_64-linux-gnu/sys/stat.h \
/usr/include/x86_64-linux-gnu/sys/file.h \
/usr/include/x86_64-linux-gnu/sys/wait.h \
/usr/include/x86_64-linux-gnu/sys/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctls.h \
/usr/include/x86_64-linux-gnu/asm/ioctls.h \
/usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \
/usr/include/x86_64-linux-gnu/asm/ioctl.h \
/usr/include/asm-generic/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h \
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h \
/usr/include/x86_64-linux-gnu/sys/param.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h \
/usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
/usr/include/x86_64-linux-gnu/bits/local_lim.h \
/usr/include/linux/limits.h \
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h \
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h \
/usr/include/x86_64-linux-gnu/bits/param.h /usr/include/linux/param.h \
/usr/include/x86_64-linux-gnu/asm/param.h \
/usr/include/asm-generic/param.h \
/usr/include/x86_64-linux-gnu/sys/resource.h \
/usr/include/x86_64-linux-gnu/bits/resource.h \
/usr/include/x86_64-linux-gnu/sys/uio.h \
/usr/include/x86_64-linux-gnu/sys/un.h \
/usr/include/x86_64-linux-gnu/bits/sockaddr.h /usr/include/dirent.h \
/usr/include/x86_64-linux-gnu/bits/dirent.h /usr/include/netdb.h \
/usr/include/netinet/in.h /usr/include/x86_64-linux-gnu/sys/socket.h \
/usr/include/x86_64-linux-gnu/bits/socket.h \
/usr/include/x86_64-linux-gnu/bits/socket_type.h \
/usr/include/x86_64-linux-gnu/asm/socket.h \
/usr/include/asm-generic/socket.h \
/usr/include/x86_64-linux-gnu/asm/sockios.h \
/usr/include/asm-generic/sockios.h \
/usr/include/x86_64-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \
/usr/include/x86_64-linux-gnu/bits/netdb.h /usr/include/net/if.h \
/usr/include/netinet/in_systm.h /usr/include/arpa/inet.h \
/usr/include/netinet/ip.h /usr/include/netinet/tcp.h \
/usr/include/netinet/ip6.h /usr/include/net/ethernet.h \
/usr/include/linux/if_ether.h /usr/include/linux/types.h \
/usr/include/x86_64-linux-gnu/asm/types.h \
/usr/include/asm-generic/types.h /usr/include/asm-generic/int-ll64.h \
/usr/include/x86_64-linux-gnu/asm/bitsperlong.h \
/usr/include/asm-generic/bitsperlong.h /usr/include/linux/posix_types.h \
/usr/include/linux/stddef.h \
/usr/include/x86_64-linux-gnu/asm/posix_types.h \
/usr/include/x86_64-linux-gnu/asm/posix_types_64.h \
/usr/include/asm-generic/posix_types.h /usr/include/net/if_arp.h \
/usr/include/netinet/ip_icmp.h /usr/include/netinet/icmp6.h \
/usr/include/netinet/if_ether.h openssl/../dropin.h \
openssl/../fake-getaddrinfo.h openssl/../fake-gai-errnos.h \
openssl/../fake-getnameinfo.h /usr/include/openssl/rand.h \
/usr/include/openssl/ossl_typ.h /usr/include/openssl/e_os2.h \
/usr/include/x86_64-linux-gnu/openssl/opensslconf.h \
/usr/include/openssl/err.h /usr/include/openssl/bio.h \
/usr/include/openssl/crypto.h /usr/include/openssl/stack.h \
/usr/include/openssl/safestack.h /usr/include/openssl/opensslv.h \
/usr/include/openssl/symhacks.h /usr/include/openssl/lhash.h \
/usr/include/openssl/evp.h /usr/include/openssl/objects.h \
/usr/include/openssl/obj_mac.h /usr/include/openssl/asn1.h \
/usr/include/openssl/bn.h openssl/../cipher.h openssl/../logger.h \
openssl/../xalloc.h
/usr/include/stdc-predef.h:
/usr/include/x86_64-linux-gnu/bits/predefs.h:
openssl/../system.h:
openssl/../../config.h:
openssl/../have.h:
/usr/include/stdio.h:
/usr/include/features.h:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h:
/usr/include/x86_64-linux-gnu/bits/types.h:
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
/usr/include/libio.h:
/usr/include/_G_config.h:
/usr/include/wchar.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h:
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:
/usr/include/x86_64-linux-gnu/bits/stdio.h:
/usr/include/stdlib.h:
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
/usr/include/endian.h:
/usr/include/x86_64-linux-gnu/bits/endian.h:
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
/usr/include/xlocale.h:
/usr/include/x86_64-linux-gnu/sys/types.h:
/usr/include/time.h:
/usr/include/x86_64-linux-gnu/sys/select.h:
/usr/include/x86_64-linux-gnu/bits/select.h:
/usr/include/x86_64-linux-gnu/bits/sigset.h:
/usr/include/x86_64-linux-gnu/bits/time.h:
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
/usr/include/alloca.h:
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
/usr/include/string.h:
/usr/include/x86_64-linux-gnu/bits/string.h:
/usr/include/x86_64-linux-gnu/bits/string2.h:
/usr/include/ctype.h:
/usr/include/signal.h:
/usr/include/x86_64-linux-gnu/bits/signum.h:
/usr/include/x86_64-linux-gnu/bits/siginfo.h:
/usr/include/x86_64-linux-gnu/bits/sigaction.h:
/usr/include/x86_64-linux-gnu/bits/sigcontext.h:
/usr/include/x86_64-linux-gnu/bits/sigstack.h:
/usr/include/x86_64-linux-gnu/sys/ucontext.h:
/usr/include/x86_64-linux-gnu/bits/sigthread.h:
/usr/include/errno.h:
/usr/include/x86_64-linux-gnu/bits/errno.h:
/usr/include/linux/errno.h:
/usr/include/x86_64-linux-gnu/asm/errno.h:
/usr/include/asm-generic/errno.h:
/usr/include/asm-generic/errno-base.h:
/usr/include/fcntl.h:
/usr/include/x86_64-linux-gnu/bits/fcntl.h:
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:
/usr/include/x86_64-linux-gnu/bits/uio.h:
/usr/include/x86_64-linux-gnu/bits/stat.h:
/usr/include/unistd.h:
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
/usr/include/x86_64-linux-gnu/bits/environments.h:
/usr/include/x86_64-linux-gnu/bits/confname.h:
/usr/include/getopt.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdbool.h:
/usr/include/inttypes.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h:
/usr/include/stdint.h:
/usr/include/x86_64-linux-gnu/bits/wchar.h:
/usr/include/syslog.h:
/usr/include/x86_64-linux-gnu/sys/syslog.h:
/usr/include/x86_64-linux-gnu/bits/syslog-path.h:
/usr/include/x86_64-linux-gnu/sys/time.h:
/usr/include/x86_64-linux-gnu/bits/timex.h:
/usr/include/x86_64-linux-gnu/sys/stat.h:
/usr/include/x86_64-linux-gnu/sys/file.h:
/usr/include/x86_64-linux-gnu/sys/wait.h:
/usr/include/x86_64-linux-gnu/sys/ioctl.h:
/usr/include/x86_64-linux-gnu/bits/ioctls.h:
/usr/include/x86_64-linux-gnu/asm/ioctls.h:
/usr/include/asm-generic/ioctls.h:
/usr/include/linux/ioctl.h:
/usr/include/x86_64-linux-gnu/asm/ioctl.h:
/usr/include/asm-generic/ioctl.h:
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h:
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h:
/usr/include/x86_64-linux-gnu/sys/param.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h:
/usr/include/limits.h:
/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
/usr/include/x86_64-linux-gnu/bits/local_lim.h:
/usr/include/linux/limits.h:
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h:
/usr/include/x86_64-linux-gnu/bits/param.h:
/usr/include/linux/param.h:
/usr/include/x86_64-linux-gnu/asm/param.h:
/usr/include/asm-generic/param.h:
/usr/include/x86_64-linux-gnu/sys/resource.h:
/usr/include/x86_64-linux-gnu/bits/resource.h:
/usr/include/x86_64-linux-gnu/sys/uio.h:
/usr/include/x86_64-linux-gnu/sys/un.h:
/usr/include/x86_64-linux-gnu/bits/sockaddr.h:
/usr/include/dirent.h:
/usr/include/x86_64-linux-gnu/bits/dirent.h:
/usr/include/netdb.h:
/usr/include/netinet/in.h:
/usr/include/x86_64-linux-gnu/sys/socket.h:
/usr/include/x86_64-linux-gnu/bits/socket.h:
/usr/include/x86_64-linux-gnu/bits/socket_type.h:
/usr/include/x86_64-linux-gnu/asm/socket.h:
/usr/include/asm-generic/socket.h:
/usr/include/x86_64-linux-gnu/asm/sockios.h:
/usr/include/asm-generic/sockios.h:
/usr/include/x86_64-linux-gnu/bits/in.h:
/usr/include/rpc/netdb.h:
/usr/include/x86_64-linux-gnu/bits/netdb.h:
/usr/include/net/if.h:
/usr/include/netinet/in_systm.h:
/usr/include/arpa/inet.h:
/usr/include/netinet/ip.h:
/usr/include/netinet/tcp.h:
/usr/include/netinet/ip6.h:
/usr/include/net/ethernet.h:
/usr/include/linux/if_ether.h:
/usr/include/linux/types.h:
/usr/include/x86_64-linux-gnu/asm/types.h:
/usr/include/asm-generic/types.h:
/usr/include/asm-generic/int-ll64.h:
/usr/include/x86_64-linux-gnu/asm/bitsperlong.h:
/usr/include/asm-generic/bitsperlong.h:
/usr/include/linux/posix_types.h:
/usr/include/linux/stddef.h:
/usr/include/x86_64-linux-gnu/asm/posix_types.h:
/usr/include/x86_64-linux-gnu/asm/posix_types_64.h:
/usr/include/asm-generic/posix_types.h:
/usr/include/net/if_arp.h:
/usr/include/netinet/ip_icmp.h:
/usr/include/netinet/icmp6.h:
/usr/include/netinet/if_ether.h:
openssl/../dropin.h:
openssl/../fake-getaddrinfo.h:
openssl/../fake-gai-errnos.h:
openssl/../fake-getnameinfo.h:
/usr/include/openssl/rand.h:
/usr/include/openssl/ossl_typ.h:
/usr/include/openssl/e_os2.h:
/usr/include/x86_64-linux-gnu/openssl/opensslconf.h:
/usr/include/openssl/err.h:
/usr/include/openssl/bio.h:
/usr/include/openssl/crypto.h:
/usr/include/openssl/stack.h:
/usr/include/openssl/safestack.h:
/usr/include/openssl/opensslv.h:
/usr/include/openssl/symhacks.h:
/usr/include/openssl/lhash.h:
/usr/include/openssl/evp.h:
/usr/include/openssl/objects.h:
/usr/include/openssl/obj_mac.h:
/usr/include/openssl/asn1.h:
/usr/include/openssl/bn.h:
openssl/../cipher.h:
openssl/../logger.h:
openssl/../xalloc.h:

482
src/openssl/.deps/crypto.Po Normal file
View file

@ -0,0 +1,482 @@
openssl/crypto.o: openssl/crypto.c /usr/include/stdc-predef.h \
/usr/include/x86_64-linux-gnu/bits/predefs.h openssl/../system.h \
openssl/../../config.h openssl/../have.h /usr/include/stdio.h \
/usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h \
/usr/include/x86_64-linux-gnu/bits/types.h \
/usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/libio.h \
/usr/include/_G_config.h /usr/include/wchar.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h \
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
/usr/include/x86_64-linux-gnu/bits/stdio.h /usr/include/stdlib.h \
/usr/include/x86_64-linux-gnu/bits/waitflags.h \
/usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \
/usr/include/x86_64-linux-gnu/bits/endian.h \
/usr/include/x86_64-linux-gnu/bits/byteswap.h \
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/xlocale.h \
/usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
/usr/include/x86_64-linux-gnu/sys/select.h \
/usr/include/x86_64-linux-gnu/bits/select.h \
/usr/include/x86_64-linux-gnu/bits/sigset.h \
/usr/include/x86_64-linux-gnu/bits/time.h \
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h /usr/include/string.h \
/usr/include/x86_64-linux-gnu/bits/string.h \
/usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/ctype.h \
/usr/include/signal.h /usr/include/x86_64-linux-gnu/bits/signum.h \
/usr/include/x86_64-linux-gnu/bits/siginfo.h \
/usr/include/x86_64-linux-gnu/bits/sigaction.h \
/usr/include/x86_64-linux-gnu/bits/sigcontext.h \
/usr/include/x86_64-linux-gnu/bits/sigstack.h \
/usr/include/x86_64-linux-gnu/sys/ucontext.h \
/usr/include/x86_64-linux-gnu/bits/sigthread.h /usr/include/errno.h \
/usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
/usr/include/x86_64-linux-gnu/asm/errno.h \
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
/usr/include/fcntl.h /usr/include/x86_64-linux-gnu/bits/fcntl.h \
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \
/usr/include/x86_64-linux-gnu/bits/uio.h \
/usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/unistd.h \
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
/usr/include/x86_64-linux-gnu/bits/environments.h \
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdbool.h \
/usr/include/inttypes.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h /usr/include/stdint.h \
/usr/include/x86_64-linux-gnu/bits/wchar.h /usr/include/syslog.h \
/usr/include/x86_64-linux-gnu/sys/syslog.h \
/usr/include/x86_64-linux-gnu/bits/syslog-path.h \
/usr/include/x86_64-linux-gnu/sys/time.h \
/usr/include/x86_64-linux-gnu/bits/timex.h \
/usr/include/x86_64-linux-gnu/sys/stat.h \
/usr/include/x86_64-linux-gnu/sys/file.h \
/usr/include/x86_64-linux-gnu/sys/wait.h \
/usr/include/x86_64-linux-gnu/sys/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctls.h \
/usr/include/x86_64-linux-gnu/asm/ioctls.h \
/usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \
/usr/include/x86_64-linux-gnu/asm/ioctl.h \
/usr/include/asm-generic/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h \
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h \
/usr/include/x86_64-linux-gnu/sys/param.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h \
/usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
/usr/include/x86_64-linux-gnu/bits/local_lim.h \
/usr/include/linux/limits.h \
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h \
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h \
/usr/include/x86_64-linux-gnu/bits/param.h /usr/include/linux/param.h \
/usr/include/x86_64-linux-gnu/asm/param.h \
/usr/include/asm-generic/param.h \
/usr/include/x86_64-linux-gnu/sys/resource.h \
/usr/include/x86_64-linux-gnu/bits/resource.h \
/usr/include/x86_64-linux-gnu/sys/uio.h \
/usr/include/x86_64-linux-gnu/sys/un.h \
/usr/include/x86_64-linux-gnu/bits/sockaddr.h /usr/include/dirent.h \
/usr/include/x86_64-linux-gnu/bits/dirent.h /usr/include/netdb.h \
/usr/include/netinet/in.h /usr/include/x86_64-linux-gnu/sys/socket.h \
/usr/include/x86_64-linux-gnu/bits/socket.h \
/usr/include/x86_64-linux-gnu/bits/socket_type.h \
/usr/include/x86_64-linux-gnu/asm/socket.h \
/usr/include/asm-generic/socket.h \
/usr/include/x86_64-linux-gnu/asm/sockios.h \
/usr/include/asm-generic/sockios.h \
/usr/include/x86_64-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \
/usr/include/x86_64-linux-gnu/bits/netdb.h /usr/include/net/if.h \
/usr/include/netinet/in_systm.h /usr/include/arpa/inet.h \
/usr/include/netinet/ip.h /usr/include/netinet/tcp.h \
/usr/include/netinet/ip6.h /usr/include/net/ethernet.h \
/usr/include/linux/if_ether.h /usr/include/linux/types.h \
/usr/include/x86_64-linux-gnu/asm/types.h \
/usr/include/asm-generic/types.h /usr/include/asm-generic/int-ll64.h \
/usr/include/x86_64-linux-gnu/asm/bitsperlong.h \
/usr/include/asm-generic/bitsperlong.h /usr/include/linux/posix_types.h \
/usr/include/linux/stddef.h \
/usr/include/x86_64-linux-gnu/asm/posix_types.h \
/usr/include/x86_64-linux-gnu/asm/posix_types_64.h \
/usr/include/asm-generic/posix_types.h /usr/include/net/if_arp.h \
/usr/include/netinet/ip_icmp.h /usr/include/netinet/icmp6.h \
/usr/include/netinet/if_ether.h openssl/../dropin.h \
openssl/../fake-getaddrinfo.h openssl/../fake-gai-errnos.h \
openssl/../fake-getnameinfo.h /usr/include/openssl/rand.h \
/usr/include/openssl/ossl_typ.h /usr/include/openssl/e_os2.h \
/usr/include/x86_64-linux-gnu/openssl/opensslconf.h \
/usr/include/openssl/evp.h /usr/include/openssl/symhacks.h \
/usr/include/openssl/bio.h /usr/include/openssl/crypto.h \
/usr/include/openssl/stack.h /usr/include/openssl/safestack.h \
/usr/include/openssl/opensslv.h /usr/include/openssl/objects.h \
/usr/include/openssl/obj_mac.h /usr/include/openssl/asn1.h \
/usr/include/openssl/bn.h /usr/include/openssl/engine.h \
/usr/include/openssl/rsa.h /usr/include/openssl/dsa.h \
/usr/include/openssl/dh.h /usr/include/openssl/ecdh.h \
/usr/include/openssl/ec.h /usr/include/openssl/ecdsa.h \
/usr/include/openssl/ui.h /usr/include/openssl/err.h \
/usr/include/openssl/lhash.h /usr/include/openssl/x509.h \
/usr/include/openssl/buffer.h /usr/include/openssl/sha.h \
/usr/include/openssl/x509_vfy.h /usr/include/openssl/pkcs7.h \
openssl/../crypto.h
/usr/include/stdc-predef.h:
/usr/include/x86_64-linux-gnu/bits/predefs.h:
openssl/../system.h:
openssl/../../config.h:
openssl/../have.h:
/usr/include/stdio.h:
/usr/include/features.h:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h:
/usr/include/x86_64-linux-gnu/bits/types.h:
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
/usr/include/libio.h:
/usr/include/_G_config.h:
/usr/include/wchar.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h:
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:
/usr/include/x86_64-linux-gnu/bits/stdio.h:
/usr/include/stdlib.h:
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
/usr/include/endian.h:
/usr/include/x86_64-linux-gnu/bits/endian.h:
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
/usr/include/xlocale.h:
/usr/include/x86_64-linux-gnu/sys/types.h:
/usr/include/time.h:
/usr/include/x86_64-linux-gnu/sys/select.h:
/usr/include/x86_64-linux-gnu/bits/select.h:
/usr/include/x86_64-linux-gnu/bits/sigset.h:
/usr/include/x86_64-linux-gnu/bits/time.h:
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
/usr/include/alloca.h:
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
/usr/include/string.h:
/usr/include/x86_64-linux-gnu/bits/string.h:
/usr/include/x86_64-linux-gnu/bits/string2.h:
/usr/include/ctype.h:
/usr/include/signal.h:
/usr/include/x86_64-linux-gnu/bits/signum.h:
/usr/include/x86_64-linux-gnu/bits/siginfo.h:
/usr/include/x86_64-linux-gnu/bits/sigaction.h:
/usr/include/x86_64-linux-gnu/bits/sigcontext.h:
/usr/include/x86_64-linux-gnu/bits/sigstack.h:
/usr/include/x86_64-linux-gnu/sys/ucontext.h:
/usr/include/x86_64-linux-gnu/bits/sigthread.h:
/usr/include/errno.h:
/usr/include/x86_64-linux-gnu/bits/errno.h:
/usr/include/linux/errno.h:
/usr/include/x86_64-linux-gnu/asm/errno.h:
/usr/include/asm-generic/errno.h:
/usr/include/asm-generic/errno-base.h:
/usr/include/fcntl.h:
/usr/include/x86_64-linux-gnu/bits/fcntl.h:
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:
/usr/include/x86_64-linux-gnu/bits/uio.h:
/usr/include/x86_64-linux-gnu/bits/stat.h:
/usr/include/unistd.h:
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
/usr/include/x86_64-linux-gnu/bits/environments.h:
/usr/include/x86_64-linux-gnu/bits/confname.h:
/usr/include/getopt.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdbool.h:
/usr/include/inttypes.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h:
/usr/include/stdint.h:
/usr/include/x86_64-linux-gnu/bits/wchar.h:
/usr/include/syslog.h:
/usr/include/x86_64-linux-gnu/sys/syslog.h:
/usr/include/x86_64-linux-gnu/bits/syslog-path.h:
/usr/include/x86_64-linux-gnu/sys/time.h:
/usr/include/x86_64-linux-gnu/bits/timex.h:
/usr/include/x86_64-linux-gnu/sys/stat.h:
/usr/include/x86_64-linux-gnu/sys/file.h:
/usr/include/x86_64-linux-gnu/sys/wait.h:
/usr/include/x86_64-linux-gnu/sys/ioctl.h:
/usr/include/x86_64-linux-gnu/bits/ioctls.h:
/usr/include/x86_64-linux-gnu/asm/ioctls.h:
/usr/include/asm-generic/ioctls.h:
/usr/include/linux/ioctl.h:
/usr/include/x86_64-linux-gnu/asm/ioctl.h:
/usr/include/asm-generic/ioctl.h:
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h:
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h:
/usr/include/x86_64-linux-gnu/sys/param.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h:
/usr/include/limits.h:
/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
/usr/include/x86_64-linux-gnu/bits/local_lim.h:
/usr/include/linux/limits.h:
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h:
/usr/include/x86_64-linux-gnu/bits/param.h:
/usr/include/linux/param.h:
/usr/include/x86_64-linux-gnu/asm/param.h:
/usr/include/asm-generic/param.h:
/usr/include/x86_64-linux-gnu/sys/resource.h:
/usr/include/x86_64-linux-gnu/bits/resource.h:
/usr/include/x86_64-linux-gnu/sys/uio.h:
/usr/include/x86_64-linux-gnu/sys/un.h:
/usr/include/x86_64-linux-gnu/bits/sockaddr.h:
/usr/include/dirent.h:
/usr/include/x86_64-linux-gnu/bits/dirent.h:
/usr/include/netdb.h:
/usr/include/netinet/in.h:
/usr/include/x86_64-linux-gnu/sys/socket.h:
/usr/include/x86_64-linux-gnu/bits/socket.h:
/usr/include/x86_64-linux-gnu/bits/socket_type.h:
/usr/include/x86_64-linux-gnu/asm/socket.h:
/usr/include/asm-generic/socket.h:
/usr/include/x86_64-linux-gnu/asm/sockios.h:
/usr/include/asm-generic/sockios.h:
/usr/include/x86_64-linux-gnu/bits/in.h:
/usr/include/rpc/netdb.h:
/usr/include/x86_64-linux-gnu/bits/netdb.h:
/usr/include/net/if.h:
/usr/include/netinet/in_systm.h:
/usr/include/arpa/inet.h:
/usr/include/netinet/ip.h:
/usr/include/netinet/tcp.h:
/usr/include/netinet/ip6.h:
/usr/include/net/ethernet.h:
/usr/include/linux/if_ether.h:
/usr/include/linux/types.h:
/usr/include/x86_64-linux-gnu/asm/types.h:
/usr/include/asm-generic/types.h:
/usr/include/asm-generic/int-ll64.h:
/usr/include/x86_64-linux-gnu/asm/bitsperlong.h:
/usr/include/asm-generic/bitsperlong.h:
/usr/include/linux/posix_types.h:
/usr/include/linux/stddef.h:
/usr/include/x86_64-linux-gnu/asm/posix_types.h:
/usr/include/x86_64-linux-gnu/asm/posix_types_64.h:
/usr/include/asm-generic/posix_types.h:
/usr/include/net/if_arp.h:
/usr/include/netinet/ip_icmp.h:
/usr/include/netinet/icmp6.h:
/usr/include/netinet/if_ether.h:
openssl/../dropin.h:
openssl/../fake-getaddrinfo.h:
openssl/../fake-gai-errnos.h:
openssl/../fake-getnameinfo.h:
/usr/include/openssl/rand.h:
/usr/include/openssl/ossl_typ.h:
/usr/include/openssl/e_os2.h:
/usr/include/x86_64-linux-gnu/openssl/opensslconf.h:
/usr/include/openssl/evp.h:
/usr/include/openssl/symhacks.h:
/usr/include/openssl/bio.h:
/usr/include/openssl/crypto.h:
/usr/include/openssl/stack.h:
/usr/include/openssl/safestack.h:
/usr/include/openssl/opensslv.h:
/usr/include/openssl/objects.h:
/usr/include/openssl/obj_mac.h:
/usr/include/openssl/asn1.h:
/usr/include/openssl/bn.h:
/usr/include/openssl/engine.h:
/usr/include/openssl/rsa.h:
/usr/include/openssl/dsa.h:
/usr/include/openssl/dh.h:
/usr/include/openssl/ecdh.h:
/usr/include/openssl/ec.h:
/usr/include/openssl/ecdsa.h:
/usr/include/openssl/ui.h:
/usr/include/openssl/err.h:
/usr/include/openssl/lhash.h:
/usr/include/openssl/x509.h:
/usr/include/openssl/buffer.h:
/usr/include/openssl/sha.h:
/usr/include/openssl/x509_vfy.h:
/usr/include/openssl/pkcs7.h:
openssl/../crypto.h:

458
src/openssl/.deps/digest.Po Normal file
View file

@ -0,0 +1,458 @@
openssl/digest.o: openssl/digest.c /usr/include/stdc-predef.h \
/usr/include/x86_64-linux-gnu/bits/predefs.h openssl/../system.h \
openssl/../../config.h openssl/../have.h /usr/include/stdio.h \
/usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h \
/usr/include/x86_64-linux-gnu/bits/types.h \
/usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/libio.h \
/usr/include/_G_config.h /usr/include/wchar.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h \
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
/usr/include/x86_64-linux-gnu/bits/stdio.h /usr/include/stdlib.h \
/usr/include/x86_64-linux-gnu/bits/waitflags.h \
/usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \
/usr/include/x86_64-linux-gnu/bits/endian.h \
/usr/include/x86_64-linux-gnu/bits/byteswap.h \
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/xlocale.h \
/usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
/usr/include/x86_64-linux-gnu/sys/select.h \
/usr/include/x86_64-linux-gnu/bits/select.h \
/usr/include/x86_64-linux-gnu/bits/sigset.h \
/usr/include/x86_64-linux-gnu/bits/time.h \
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h /usr/include/string.h \
/usr/include/x86_64-linux-gnu/bits/string.h \
/usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/ctype.h \
/usr/include/signal.h /usr/include/x86_64-linux-gnu/bits/signum.h \
/usr/include/x86_64-linux-gnu/bits/siginfo.h \
/usr/include/x86_64-linux-gnu/bits/sigaction.h \
/usr/include/x86_64-linux-gnu/bits/sigcontext.h \
/usr/include/x86_64-linux-gnu/bits/sigstack.h \
/usr/include/x86_64-linux-gnu/sys/ucontext.h \
/usr/include/x86_64-linux-gnu/bits/sigthread.h /usr/include/errno.h \
/usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
/usr/include/x86_64-linux-gnu/asm/errno.h \
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
/usr/include/fcntl.h /usr/include/x86_64-linux-gnu/bits/fcntl.h \
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \
/usr/include/x86_64-linux-gnu/bits/uio.h \
/usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/unistd.h \
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
/usr/include/x86_64-linux-gnu/bits/environments.h \
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdbool.h \
/usr/include/inttypes.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h /usr/include/stdint.h \
/usr/include/x86_64-linux-gnu/bits/wchar.h /usr/include/syslog.h \
/usr/include/x86_64-linux-gnu/sys/syslog.h \
/usr/include/x86_64-linux-gnu/bits/syslog-path.h \
/usr/include/x86_64-linux-gnu/sys/time.h \
/usr/include/x86_64-linux-gnu/bits/timex.h \
/usr/include/x86_64-linux-gnu/sys/stat.h \
/usr/include/x86_64-linux-gnu/sys/file.h \
/usr/include/x86_64-linux-gnu/sys/wait.h \
/usr/include/x86_64-linux-gnu/sys/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctls.h \
/usr/include/x86_64-linux-gnu/asm/ioctls.h \
/usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \
/usr/include/x86_64-linux-gnu/asm/ioctl.h \
/usr/include/asm-generic/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h \
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h \
/usr/include/x86_64-linux-gnu/sys/param.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h \
/usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
/usr/include/x86_64-linux-gnu/bits/local_lim.h \
/usr/include/linux/limits.h \
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h \
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h \
/usr/include/x86_64-linux-gnu/bits/param.h /usr/include/linux/param.h \
/usr/include/x86_64-linux-gnu/asm/param.h \
/usr/include/asm-generic/param.h \
/usr/include/x86_64-linux-gnu/sys/resource.h \
/usr/include/x86_64-linux-gnu/bits/resource.h \
/usr/include/x86_64-linux-gnu/sys/uio.h \
/usr/include/x86_64-linux-gnu/sys/un.h \
/usr/include/x86_64-linux-gnu/bits/sockaddr.h /usr/include/dirent.h \
/usr/include/x86_64-linux-gnu/bits/dirent.h /usr/include/netdb.h \
/usr/include/netinet/in.h /usr/include/x86_64-linux-gnu/sys/socket.h \
/usr/include/x86_64-linux-gnu/bits/socket.h \
/usr/include/x86_64-linux-gnu/bits/socket_type.h \
/usr/include/x86_64-linux-gnu/asm/socket.h \
/usr/include/asm-generic/socket.h \
/usr/include/x86_64-linux-gnu/asm/sockios.h \
/usr/include/asm-generic/sockios.h \
/usr/include/x86_64-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \
/usr/include/x86_64-linux-gnu/bits/netdb.h /usr/include/net/if.h \
/usr/include/netinet/in_systm.h /usr/include/arpa/inet.h \
/usr/include/netinet/ip.h /usr/include/netinet/tcp.h \
/usr/include/netinet/ip6.h /usr/include/net/ethernet.h \
/usr/include/linux/if_ether.h /usr/include/linux/types.h \
/usr/include/x86_64-linux-gnu/asm/types.h \
/usr/include/asm-generic/types.h /usr/include/asm-generic/int-ll64.h \
/usr/include/x86_64-linux-gnu/asm/bitsperlong.h \
/usr/include/asm-generic/bitsperlong.h /usr/include/linux/posix_types.h \
/usr/include/linux/stddef.h \
/usr/include/x86_64-linux-gnu/asm/posix_types.h \
/usr/include/x86_64-linux-gnu/asm/posix_types_64.h \
/usr/include/asm-generic/posix_types.h /usr/include/net/if_arp.h \
/usr/include/netinet/ip_icmp.h /usr/include/netinet/icmp6.h \
/usr/include/netinet/if_ether.h openssl/../dropin.h \
openssl/../fake-getaddrinfo.h openssl/../fake-gai-errnos.h \
openssl/../fake-getnameinfo.h openssl/../utils.h openssl/../xalloc.h \
/usr/include/openssl/err.h /usr/include/openssl/e_os2.h \
/usr/include/x86_64-linux-gnu/openssl/opensslconf.h \
/usr/include/openssl/ossl_typ.h /usr/include/openssl/bio.h \
/usr/include/openssl/crypto.h /usr/include/openssl/stack.h \
/usr/include/openssl/safestack.h /usr/include/openssl/opensslv.h \
/usr/include/openssl/symhacks.h /usr/include/openssl/lhash.h \
/usr/include/openssl/hmac.h /usr/include/openssl/evp.h \
/usr/include/openssl/objects.h /usr/include/openssl/obj_mac.h \
/usr/include/openssl/asn1.h /usr/include/openssl/bn.h openssl/digest.h \
openssl/../digest.h openssl/../logger.h
/usr/include/stdc-predef.h:
/usr/include/x86_64-linux-gnu/bits/predefs.h:
openssl/../system.h:
openssl/../../config.h:
openssl/../have.h:
/usr/include/stdio.h:
/usr/include/features.h:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h:
/usr/include/x86_64-linux-gnu/bits/types.h:
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
/usr/include/libio.h:
/usr/include/_G_config.h:
/usr/include/wchar.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h:
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:
/usr/include/x86_64-linux-gnu/bits/stdio.h:
/usr/include/stdlib.h:
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
/usr/include/endian.h:
/usr/include/x86_64-linux-gnu/bits/endian.h:
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
/usr/include/xlocale.h:
/usr/include/x86_64-linux-gnu/sys/types.h:
/usr/include/time.h:
/usr/include/x86_64-linux-gnu/sys/select.h:
/usr/include/x86_64-linux-gnu/bits/select.h:
/usr/include/x86_64-linux-gnu/bits/sigset.h:
/usr/include/x86_64-linux-gnu/bits/time.h:
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
/usr/include/alloca.h:
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
/usr/include/string.h:
/usr/include/x86_64-linux-gnu/bits/string.h:
/usr/include/x86_64-linux-gnu/bits/string2.h:
/usr/include/ctype.h:
/usr/include/signal.h:
/usr/include/x86_64-linux-gnu/bits/signum.h:
/usr/include/x86_64-linux-gnu/bits/siginfo.h:
/usr/include/x86_64-linux-gnu/bits/sigaction.h:
/usr/include/x86_64-linux-gnu/bits/sigcontext.h:
/usr/include/x86_64-linux-gnu/bits/sigstack.h:
/usr/include/x86_64-linux-gnu/sys/ucontext.h:
/usr/include/x86_64-linux-gnu/bits/sigthread.h:
/usr/include/errno.h:
/usr/include/x86_64-linux-gnu/bits/errno.h:
/usr/include/linux/errno.h:
/usr/include/x86_64-linux-gnu/asm/errno.h:
/usr/include/asm-generic/errno.h:
/usr/include/asm-generic/errno-base.h:
/usr/include/fcntl.h:
/usr/include/x86_64-linux-gnu/bits/fcntl.h:
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:
/usr/include/x86_64-linux-gnu/bits/uio.h:
/usr/include/x86_64-linux-gnu/bits/stat.h:
/usr/include/unistd.h:
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
/usr/include/x86_64-linux-gnu/bits/environments.h:
/usr/include/x86_64-linux-gnu/bits/confname.h:
/usr/include/getopt.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdbool.h:
/usr/include/inttypes.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h:
/usr/include/stdint.h:
/usr/include/x86_64-linux-gnu/bits/wchar.h:
/usr/include/syslog.h:
/usr/include/x86_64-linux-gnu/sys/syslog.h:
/usr/include/x86_64-linux-gnu/bits/syslog-path.h:
/usr/include/x86_64-linux-gnu/sys/time.h:
/usr/include/x86_64-linux-gnu/bits/timex.h:
/usr/include/x86_64-linux-gnu/sys/stat.h:
/usr/include/x86_64-linux-gnu/sys/file.h:
/usr/include/x86_64-linux-gnu/sys/wait.h:
/usr/include/x86_64-linux-gnu/sys/ioctl.h:
/usr/include/x86_64-linux-gnu/bits/ioctls.h:
/usr/include/x86_64-linux-gnu/asm/ioctls.h:
/usr/include/asm-generic/ioctls.h:
/usr/include/linux/ioctl.h:
/usr/include/x86_64-linux-gnu/asm/ioctl.h:
/usr/include/asm-generic/ioctl.h:
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h:
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h:
/usr/include/x86_64-linux-gnu/sys/param.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h:
/usr/include/limits.h:
/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
/usr/include/x86_64-linux-gnu/bits/local_lim.h:
/usr/include/linux/limits.h:
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h:
/usr/include/x86_64-linux-gnu/bits/param.h:
/usr/include/linux/param.h:
/usr/include/x86_64-linux-gnu/asm/param.h:
/usr/include/asm-generic/param.h:
/usr/include/x86_64-linux-gnu/sys/resource.h:
/usr/include/x86_64-linux-gnu/bits/resource.h:
/usr/include/x86_64-linux-gnu/sys/uio.h:
/usr/include/x86_64-linux-gnu/sys/un.h:
/usr/include/x86_64-linux-gnu/bits/sockaddr.h:
/usr/include/dirent.h:
/usr/include/x86_64-linux-gnu/bits/dirent.h:
/usr/include/netdb.h:
/usr/include/netinet/in.h:
/usr/include/x86_64-linux-gnu/sys/socket.h:
/usr/include/x86_64-linux-gnu/bits/socket.h:
/usr/include/x86_64-linux-gnu/bits/socket_type.h:
/usr/include/x86_64-linux-gnu/asm/socket.h:
/usr/include/asm-generic/socket.h:
/usr/include/x86_64-linux-gnu/asm/sockios.h:
/usr/include/asm-generic/sockios.h:
/usr/include/x86_64-linux-gnu/bits/in.h:
/usr/include/rpc/netdb.h:
/usr/include/x86_64-linux-gnu/bits/netdb.h:
/usr/include/net/if.h:
/usr/include/netinet/in_systm.h:
/usr/include/arpa/inet.h:
/usr/include/netinet/ip.h:
/usr/include/netinet/tcp.h:
/usr/include/netinet/ip6.h:
/usr/include/net/ethernet.h:
/usr/include/linux/if_ether.h:
/usr/include/linux/types.h:
/usr/include/x86_64-linux-gnu/asm/types.h:
/usr/include/asm-generic/types.h:
/usr/include/asm-generic/int-ll64.h:
/usr/include/x86_64-linux-gnu/asm/bitsperlong.h:
/usr/include/asm-generic/bitsperlong.h:
/usr/include/linux/posix_types.h:
/usr/include/linux/stddef.h:
/usr/include/x86_64-linux-gnu/asm/posix_types.h:
/usr/include/x86_64-linux-gnu/asm/posix_types_64.h:
/usr/include/asm-generic/posix_types.h:
/usr/include/net/if_arp.h:
/usr/include/netinet/ip_icmp.h:
/usr/include/netinet/icmp6.h:
/usr/include/netinet/if_ether.h:
openssl/../dropin.h:
openssl/../fake-getaddrinfo.h:
openssl/../fake-gai-errnos.h:
openssl/../fake-getnameinfo.h:
openssl/../utils.h:
openssl/../xalloc.h:
/usr/include/openssl/err.h:
/usr/include/openssl/e_os2.h:
/usr/include/x86_64-linux-gnu/openssl/opensslconf.h:
/usr/include/openssl/ossl_typ.h:
/usr/include/openssl/bio.h:
/usr/include/openssl/crypto.h:
/usr/include/openssl/stack.h:
/usr/include/openssl/safestack.h:
/usr/include/openssl/opensslv.h:
/usr/include/openssl/symhacks.h:
/usr/include/openssl/lhash.h:
/usr/include/openssl/hmac.h:
/usr/include/openssl/evp.h:
/usr/include/openssl/objects.h:
/usr/include/openssl/obj_mac.h:
/usr/include/openssl/asn1.h:
/usr/include/openssl/bn.h:
openssl/digest.h:
openssl/../digest.h:
openssl/../logger.h:

454
src/openssl/.deps/ecdh.Po Normal file
View file

@ -0,0 +1,454 @@
openssl/ecdh.o: openssl/ecdh.c /usr/include/stdc-predef.h \
/usr/include/x86_64-linux-gnu/bits/predefs.h openssl/../system.h \
openssl/../../config.h openssl/../have.h /usr/include/stdio.h \
/usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h \
/usr/include/x86_64-linux-gnu/bits/types.h \
/usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/libio.h \
/usr/include/_G_config.h /usr/include/wchar.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h \
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
/usr/include/x86_64-linux-gnu/bits/stdio.h /usr/include/stdlib.h \
/usr/include/x86_64-linux-gnu/bits/waitflags.h \
/usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \
/usr/include/x86_64-linux-gnu/bits/endian.h \
/usr/include/x86_64-linux-gnu/bits/byteswap.h \
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/xlocale.h \
/usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
/usr/include/x86_64-linux-gnu/sys/select.h \
/usr/include/x86_64-linux-gnu/bits/select.h \
/usr/include/x86_64-linux-gnu/bits/sigset.h \
/usr/include/x86_64-linux-gnu/bits/time.h \
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h /usr/include/string.h \
/usr/include/x86_64-linux-gnu/bits/string.h \
/usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/ctype.h \
/usr/include/signal.h /usr/include/x86_64-linux-gnu/bits/signum.h \
/usr/include/x86_64-linux-gnu/bits/siginfo.h \
/usr/include/x86_64-linux-gnu/bits/sigaction.h \
/usr/include/x86_64-linux-gnu/bits/sigcontext.h \
/usr/include/x86_64-linux-gnu/bits/sigstack.h \
/usr/include/x86_64-linux-gnu/sys/ucontext.h \
/usr/include/x86_64-linux-gnu/bits/sigthread.h /usr/include/errno.h \
/usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
/usr/include/x86_64-linux-gnu/asm/errno.h \
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
/usr/include/fcntl.h /usr/include/x86_64-linux-gnu/bits/fcntl.h \
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \
/usr/include/x86_64-linux-gnu/bits/uio.h \
/usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/unistd.h \
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
/usr/include/x86_64-linux-gnu/bits/environments.h \
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdbool.h \
/usr/include/inttypes.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h /usr/include/stdint.h \
/usr/include/x86_64-linux-gnu/bits/wchar.h /usr/include/syslog.h \
/usr/include/x86_64-linux-gnu/sys/syslog.h \
/usr/include/x86_64-linux-gnu/bits/syslog-path.h \
/usr/include/x86_64-linux-gnu/sys/time.h \
/usr/include/x86_64-linux-gnu/bits/timex.h \
/usr/include/x86_64-linux-gnu/sys/stat.h \
/usr/include/x86_64-linux-gnu/sys/file.h \
/usr/include/x86_64-linux-gnu/sys/wait.h \
/usr/include/x86_64-linux-gnu/sys/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctls.h \
/usr/include/x86_64-linux-gnu/asm/ioctls.h \
/usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \
/usr/include/x86_64-linux-gnu/asm/ioctl.h \
/usr/include/asm-generic/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h \
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h \
/usr/include/x86_64-linux-gnu/sys/param.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h \
/usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
/usr/include/x86_64-linux-gnu/bits/local_lim.h \
/usr/include/linux/limits.h \
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h \
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h \
/usr/include/x86_64-linux-gnu/bits/param.h /usr/include/linux/param.h \
/usr/include/x86_64-linux-gnu/asm/param.h \
/usr/include/asm-generic/param.h \
/usr/include/x86_64-linux-gnu/sys/resource.h \
/usr/include/x86_64-linux-gnu/bits/resource.h \
/usr/include/x86_64-linux-gnu/sys/uio.h \
/usr/include/x86_64-linux-gnu/sys/un.h \
/usr/include/x86_64-linux-gnu/bits/sockaddr.h /usr/include/dirent.h \
/usr/include/x86_64-linux-gnu/bits/dirent.h /usr/include/netdb.h \
/usr/include/netinet/in.h /usr/include/x86_64-linux-gnu/sys/socket.h \
/usr/include/x86_64-linux-gnu/bits/socket.h \
/usr/include/x86_64-linux-gnu/bits/socket_type.h \
/usr/include/x86_64-linux-gnu/asm/socket.h \
/usr/include/asm-generic/socket.h \
/usr/include/x86_64-linux-gnu/asm/sockios.h \
/usr/include/asm-generic/sockios.h \
/usr/include/x86_64-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \
/usr/include/x86_64-linux-gnu/bits/netdb.h /usr/include/net/if.h \
/usr/include/netinet/in_systm.h /usr/include/arpa/inet.h \
/usr/include/netinet/ip.h /usr/include/netinet/tcp.h \
/usr/include/netinet/ip6.h /usr/include/net/ethernet.h \
/usr/include/linux/if_ether.h /usr/include/linux/types.h \
/usr/include/x86_64-linux-gnu/asm/types.h \
/usr/include/asm-generic/types.h /usr/include/asm-generic/int-ll64.h \
/usr/include/x86_64-linux-gnu/asm/bitsperlong.h \
/usr/include/asm-generic/bitsperlong.h /usr/include/linux/posix_types.h \
/usr/include/linux/stddef.h \
/usr/include/x86_64-linux-gnu/asm/posix_types.h \
/usr/include/x86_64-linux-gnu/asm/posix_types_64.h \
/usr/include/asm-generic/posix_types.h /usr/include/net/if_arp.h \
/usr/include/netinet/ip_icmp.h /usr/include/netinet/icmp6.h \
/usr/include/netinet/if_ether.h openssl/../dropin.h \
openssl/../fake-getaddrinfo.h openssl/../fake-gai-errnos.h \
openssl/../fake-getnameinfo.h /usr/include/openssl/err.h \
/usr/include/openssl/e_os2.h \
/usr/include/x86_64-linux-gnu/openssl/opensslconf.h \
/usr/include/openssl/ossl_typ.h /usr/include/openssl/bio.h \
/usr/include/openssl/crypto.h /usr/include/openssl/stack.h \
/usr/include/openssl/safestack.h /usr/include/openssl/opensslv.h \
/usr/include/openssl/symhacks.h /usr/include/openssl/lhash.h \
/usr/include/openssl/ec.h /usr/include/openssl/asn1.h \
/usr/include/openssl/bn.h /usr/include/openssl/ecdh.h \
/usr/include/openssl/obj_mac.h openssl/../ecdh.h openssl/../logger.h \
openssl/../utils.h openssl/../xalloc.h
/usr/include/stdc-predef.h:
/usr/include/x86_64-linux-gnu/bits/predefs.h:
openssl/../system.h:
openssl/../../config.h:
openssl/../have.h:
/usr/include/stdio.h:
/usr/include/features.h:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h:
/usr/include/x86_64-linux-gnu/bits/types.h:
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
/usr/include/libio.h:
/usr/include/_G_config.h:
/usr/include/wchar.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h:
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:
/usr/include/x86_64-linux-gnu/bits/stdio.h:
/usr/include/stdlib.h:
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
/usr/include/endian.h:
/usr/include/x86_64-linux-gnu/bits/endian.h:
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
/usr/include/xlocale.h:
/usr/include/x86_64-linux-gnu/sys/types.h:
/usr/include/time.h:
/usr/include/x86_64-linux-gnu/sys/select.h:
/usr/include/x86_64-linux-gnu/bits/select.h:
/usr/include/x86_64-linux-gnu/bits/sigset.h:
/usr/include/x86_64-linux-gnu/bits/time.h:
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
/usr/include/alloca.h:
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
/usr/include/string.h:
/usr/include/x86_64-linux-gnu/bits/string.h:
/usr/include/x86_64-linux-gnu/bits/string2.h:
/usr/include/ctype.h:
/usr/include/signal.h:
/usr/include/x86_64-linux-gnu/bits/signum.h:
/usr/include/x86_64-linux-gnu/bits/siginfo.h:
/usr/include/x86_64-linux-gnu/bits/sigaction.h:
/usr/include/x86_64-linux-gnu/bits/sigcontext.h:
/usr/include/x86_64-linux-gnu/bits/sigstack.h:
/usr/include/x86_64-linux-gnu/sys/ucontext.h:
/usr/include/x86_64-linux-gnu/bits/sigthread.h:
/usr/include/errno.h:
/usr/include/x86_64-linux-gnu/bits/errno.h:
/usr/include/linux/errno.h:
/usr/include/x86_64-linux-gnu/asm/errno.h:
/usr/include/asm-generic/errno.h:
/usr/include/asm-generic/errno-base.h:
/usr/include/fcntl.h:
/usr/include/x86_64-linux-gnu/bits/fcntl.h:
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:
/usr/include/x86_64-linux-gnu/bits/uio.h:
/usr/include/x86_64-linux-gnu/bits/stat.h:
/usr/include/unistd.h:
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
/usr/include/x86_64-linux-gnu/bits/environments.h:
/usr/include/x86_64-linux-gnu/bits/confname.h:
/usr/include/getopt.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdbool.h:
/usr/include/inttypes.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h:
/usr/include/stdint.h:
/usr/include/x86_64-linux-gnu/bits/wchar.h:
/usr/include/syslog.h:
/usr/include/x86_64-linux-gnu/sys/syslog.h:
/usr/include/x86_64-linux-gnu/bits/syslog-path.h:
/usr/include/x86_64-linux-gnu/sys/time.h:
/usr/include/x86_64-linux-gnu/bits/timex.h:
/usr/include/x86_64-linux-gnu/sys/stat.h:
/usr/include/x86_64-linux-gnu/sys/file.h:
/usr/include/x86_64-linux-gnu/sys/wait.h:
/usr/include/x86_64-linux-gnu/sys/ioctl.h:
/usr/include/x86_64-linux-gnu/bits/ioctls.h:
/usr/include/x86_64-linux-gnu/asm/ioctls.h:
/usr/include/asm-generic/ioctls.h:
/usr/include/linux/ioctl.h:
/usr/include/x86_64-linux-gnu/asm/ioctl.h:
/usr/include/asm-generic/ioctl.h:
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h:
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h:
/usr/include/x86_64-linux-gnu/sys/param.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h:
/usr/include/limits.h:
/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
/usr/include/x86_64-linux-gnu/bits/local_lim.h:
/usr/include/linux/limits.h:
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h:
/usr/include/x86_64-linux-gnu/bits/param.h:
/usr/include/linux/param.h:
/usr/include/x86_64-linux-gnu/asm/param.h:
/usr/include/asm-generic/param.h:
/usr/include/x86_64-linux-gnu/sys/resource.h:
/usr/include/x86_64-linux-gnu/bits/resource.h:
/usr/include/x86_64-linux-gnu/sys/uio.h:
/usr/include/x86_64-linux-gnu/sys/un.h:
/usr/include/x86_64-linux-gnu/bits/sockaddr.h:
/usr/include/dirent.h:
/usr/include/x86_64-linux-gnu/bits/dirent.h:
/usr/include/netdb.h:
/usr/include/netinet/in.h:
/usr/include/x86_64-linux-gnu/sys/socket.h:
/usr/include/x86_64-linux-gnu/bits/socket.h:
/usr/include/x86_64-linux-gnu/bits/socket_type.h:
/usr/include/x86_64-linux-gnu/asm/socket.h:
/usr/include/asm-generic/socket.h:
/usr/include/x86_64-linux-gnu/asm/sockios.h:
/usr/include/asm-generic/sockios.h:
/usr/include/x86_64-linux-gnu/bits/in.h:
/usr/include/rpc/netdb.h:
/usr/include/x86_64-linux-gnu/bits/netdb.h:
/usr/include/net/if.h:
/usr/include/netinet/in_systm.h:
/usr/include/arpa/inet.h:
/usr/include/netinet/ip.h:
/usr/include/netinet/tcp.h:
/usr/include/netinet/ip6.h:
/usr/include/net/ethernet.h:
/usr/include/linux/if_ether.h:
/usr/include/linux/types.h:
/usr/include/x86_64-linux-gnu/asm/types.h:
/usr/include/asm-generic/types.h:
/usr/include/asm-generic/int-ll64.h:
/usr/include/x86_64-linux-gnu/asm/bitsperlong.h:
/usr/include/asm-generic/bitsperlong.h:
/usr/include/linux/posix_types.h:
/usr/include/linux/stddef.h:
/usr/include/x86_64-linux-gnu/asm/posix_types.h:
/usr/include/x86_64-linux-gnu/asm/posix_types_64.h:
/usr/include/asm-generic/posix_types.h:
/usr/include/net/if_arp.h:
/usr/include/netinet/ip_icmp.h:
/usr/include/netinet/icmp6.h:
/usr/include/netinet/if_ether.h:
openssl/../dropin.h:
openssl/../fake-getaddrinfo.h:
openssl/../fake-gai-errnos.h:
openssl/../fake-getnameinfo.h:
/usr/include/openssl/err.h:
/usr/include/openssl/e_os2.h:
/usr/include/x86_64-linux-gnu/openssl/opensslconf.h:
/usr/include/openssl/ossl_typ.h:
/usr/include/openssl/bio.h:
/usr/include/openssl/crypto.h:
/usr/include/openssl/stack.h:
/usr/include/openssl/safestack.h:
/usr/include/openssl/opensslv.h:
/usr/include/openssl/symhacks.h:
/usr/include/openssl/lhash.h:
/usr/include/openssl/ec.h:
/usr/include/openssl/asn1.h:
/usr/include/openssl/bn.h:
/usr/include/openssl/ecdh.h:
/usr/include/openssl/obj_mac.h:
openssl/../ecdh.h:
openssl/../logger.h:
openssl/../utils.h:
openssl/../xalloc.h:

487
src/openssl/.deps/ecdsa.Po Normal file
View file

@ -0,0 +1,487 @@
openssl/ecdsa.o: openssl/ecdsa.c /usr/include/stdc-predef.h \
/usr/include/x86_64-linux-gnu/bits/predefs.h openssl/../system.h \
openssl/../../config.h openssl/../have.h /usr/include/stdio.h \
/usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h \
/usr/include/x86_64-linux-gnu/bits/types.h \
/usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/libio.h \
/usr/include/_G_config.h /usr/include/wchar.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h \
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
/usr/include/x86_64-linux-gnu/bits/stdio.h /usr/include/stdlib.h \
/usr/include/x86_64-linux-gnu/bits/waitflags.h \
/usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \
/usr/include/x86_64-linux-gnu/bits/endian.h \
/usr/include/x86_64-linux-gnu/bits/byteswap.h \
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/xlocale.h \
/usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
/usr/include/x86_64-linux-gnu/sys/select.h \
/usr/include/x86_64-linux-gnu/bits/select.h \
/usr/include/x86_64-linux-gnu/bits/sigset.h \
/usr/include/x86_64-linux-gnu/bits/time.h \
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h /usr/include/string.h \
/usr/include/x86_64-linux-gnu/bits/string.h \
/usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/ctype.h \
/usr/include/signal.h /usr/include/x86_64-linux-gnu/bits/signum.h \
/usr/include/x86_64-linux-gnu/bits/siginfo.h \
/usr/include/x86_64-linux-gnu/bits/sigaction.h \
/usr/include/x86_64-linux-gnu/bits/sigcontext.h \
/usr/include/x86_64-linux-gnu/bits/sigstack.h \
/usr/include/x86_64-linux-gnu/sys/ucontext.h \
/usr/include/x86_64-linux-gnu/bits/sigthread.h /usr/include/errno.h \
/usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
/usr/include/x86_64-linux-gnu/asm/errno.h \
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
/usr/include/fcntl.h /usr/include/x86_64-linux-gnu/bits/fcntl.h \
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \
/usr/include/x86_64-linux-gnu/bits/uio.h \
/usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/unistd.h \
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
/usr/include/x86_64-linux-gnu/bits/environments.h \
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdbool.h \
/usr/include/inttypes.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h /usr/include/stdint.h \
/usr/include/x86_64-linux-gnu/bits/wchar.h /usr/include/syslog.h \
/usr/include/x86_64-linux-gnu/sys/syslog.h \
/usr/include/x86_64-linux-gnu/bits/syslog-path.h \
/usr/include/x86_64-linux-gnu/sys/time.h \
/usr/include/x86_64-linux-gnu/bits/timex.h \
/usr/include/x86_64-linux-gnu/sys/stat.h \
/usr/include/x86_64-linux-gnu/sys/file.h \
/usr/include/x86_64-linux-gnu/sys/wait.h \
/usr/include/x86_64-linux-gnu/sys/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctls.h \
/usr/include/x86_64-linux-gnu/asm/ioctls.h \
/usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \
/usr/include/x86_64-linux-gnu/asm/ioctl.h \
/usr/include/asm-generic/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h \
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h \
/usr/include/x86_64-linux-gnu/sys/param.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h \
/usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
/usr/include/x86_64-linux-gnu/bits/local_lim.h \
/usr/include/linux/limits.h \
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h \
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h \
/usr/include/x86_64-linux-gnu/bits/param.h /usr/include/linux/param.h \
/usr/include/x86_64-linux-gnu/asm/param.h \
/usr/include/asm-generic/param.h \
/usr/include/x86_64-linux-gnu/sys/resource.h \
/usr/include/x86_64-linux-gnu/bits/resource.h \
/usr/include/x86_64-linux-gnu/sys/uio.h \
/usr/include/x86_64-linux-gnu/sys/un.h \
/usr/include/x86_64-linux-gnu/bits/sockaddr.h /usr/include/dirent.h \
/usr/include/x86_64-linux-gnu/bits/dirent.h /usr/include/netdb.h \
/usr/include/netinet/in.h /usr/include/x86_64-linux-gnu/sys/socket.h \
/usr/include/x86_64-linux-gnu/bits/socket.h \
/usr/include/x86_64-linux-gnu/bits/socket_type.h \
/usr/include/x86_64-linux-gnu/asm/socket.h \
/usr/include/asm-generic/socket.h \
/usr/include/x86_64-linux-gnu/asm/sockios.h \
/usr/include/asm-generic/sockios.h \
/usr/include/x86_64-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \
/usr/include/x86_64-linux-gnu/bits/netdb.h /usr/include/net/if.h \
/usr/include/netinet/in_systm.h /usr/include/arpa/inet.h \
/usr/include/netinet/ip.h /usr/include/netinet/tcp.h \
/usr/include/netinet/ip6.h /usr/include/net/ethernet.h \
/usr/include/linux/if_ether.h /usr/include/linux/types.h \
/usr/include/x86_64-linux-gnu/asm/types.h \
/usr/include/asm-generic/types.h /usr/include/asm-generic/int-ll64.h \
/usr/include/x86_64-linux-gnu/asm/bitsperlong.h \
/usr/include/asm-generic/bitsperlong.h /usr/include/linux/posix_types.h \
/usr/include/linux/stddef.h \
/usr/include/x86_64-linux-gnu/asm/posix_types.h \
/usr/include/x86_64-linux-gnu/asm/posix_types_64.h \
/usr/include/asm-generic/posix_types.h /usr/include/net/if_arp.h \
/usr/include/netinet/ip_icmp.h /usr/include/netinet/icmp6.h \
/usr/include/netinet/if_ether.h openssl/../dropin.h \
openssl/../fake-getaddrinfo.h openssl/../fake-gai-errnos.h \
openssl/../fake-getnameinfo.h /usr/include/openssl/pem.h \
/usr/include/openssl/e_os2.h \
/usr/include/x86_64-linux-gnu/openssl/opensslconf.h \
/usr/include/openssl/bio.h /usr/include/openssl/crypto.h \
/usr/include/openssl/stack.h /usr/include/openssl/safestack.h \
/usr/include/openssl/opensslv.h /usr/include/openssl/ossl_typ.h \
/usr/include/openssl/symhacks.h /usr/include/openssl/evp.h \
/usr/include/openssl/objects.h /usr/include/openssl/obj_mac.h \
/usr/include/openssl/asn1.h /usr/include/openssl/bn.h \
/usr/include/openssl/x509.h /usr/include/openssl/buffer.h \
/usr/include/openssl/ec.h /usr/include/openssl/ecdsa.h \
/usr/include/openssl/ecdh.h /usr/include/openssl/rsa.h \
/usr/include/openssl/dsa.h /usr/include/openssl/dh.h \
/usr/include/openssl/sha.h /usr/include/openssl/x509_vfy.h \
/usr/include/openssl/lhash.h /usr/include/openssl/pkcs7.h \
/usr/include/openssl/pem2.h /usr/include/openssl/err.h \
openssl/../logger.h openssl/../ecdsa.h openssl/../utils.h \
openssl/../xalloc.h
/usr/include/stdc-predef.h:
/usr/include/x86_64-linux-gnu/bits/predefs.h:
openssl/../system.h:
openssl/../../config.h:
openssl/../have.h:
/usr/include/stdio.h:
/usr/include/features.h:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h:
/usr/include/x86_64-linux-gnu/bits/types.h:
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
/usr/include/libio.h:
/usr/include/_G_config.h:
/usr/include/wchar.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h:
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:
/usr/include/x86_64-linux-gnu/bits/stdio.h:
/usr/include/stdlib.h:
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
/usr/include/endian.h:
/usr/include/x86_64-linux-gnu/bits/endian.h:
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
/usr/include/xlocale.h:
/usr/include/x86_64-linux-gnu/sys/types.h:
/usr/include/time.h:
/usr/include/x86_64-linux-gnu/sys/select.h:
/usr/include/x86_64-linux-gnu/bits/select.h:
/usr/include/x86_64-linux-gnu/bits/sigset.h:
/usr/include/x86_64-linux-gnu/bits/time.h:
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
/usr/include/alloca.h:
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
/usr/include/string.h:
/usr/include/x86_64-linux-gnu/bits/string.h:
/usr/include/x86_64-linux-gnu/bits/string2.h:
/usr/include/ctype.h:
/usr/include/signal.h:
/usr/include/x86_64-linux-gnu/bits/signum.h:
/usr/include/x86_64-linux-gnu/bits/siginfo.h:
/usr/include/x86_64-linux-gnu/bits/sigaction.h:
/usr/include/x86_64-linux-gnu/bits/sigcontext.h:
/usr/include/x86_64-linux-gnu/bits/sigstack.h:
/usr/include/x86_64-linux-gnu/sys/ucontext.h:
/usr/include/x86_64-linux-gnu/bits/sigthread.h:
/usr/include/errno.h:
/usr/include/x86_64-linux-gnu/bits/errno.h:
/usr/include/linux/errno.h:
/usr/include/x86_64-linux-gnu/asm/errno.h:
/usr/include/asm-generic/errno.h:
/usr/include/asm-generic/errno-base.h:
/usr/include/fcntl.h:
/usr/include/x86_64-linux-gnu/bits/fcntl.h:
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:
/usr/include/x86_64-linux-gnu/bits/uio.h:
/usr/include/x86_64-linux-gnu/bits/stat.h:
/usr/include/unistd.h:
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
/usr/include/x86_64-linux-gnu/bits/environments.h:
/usr/include/x86_64-linux-gnu/bits/confname.h:
/usr/include/getopt.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdbool.h:
/usr/include/inttypes.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h:
/usr/include/stdint.h:
/usr/include/x86_64-linux-gnu/bits/wchar.h:
/usr/include/syslog.h:
/usr/include/x86_64-linux-gnu/sys/syslog.h:
/usr/include/x86_64-linux-gnu/bits/syslog-path.h:
/usr/include/x86_64-linux-gnu/sys/time.h:
/usr/include/x86_64-linux-gnu/bits/timex.h:
/usr/include/x86_64-linux-gnu/sys/stat.h:
/usr/include/x86_64-linux-gnu/sys/file.h:
/usr/include/x86_64-linux-gnu/sys/wait.h:
/usr/include/x86_64-linux-gnu/sys/ioctl.h:
/usr/include/x86_64-linux-gnu/bits/ioctls.h:
/usr/include/x86_64-linux-gnu/asm/ioctls.h:
/usr/include/asm-generic/ioctls.h:
/usr/include/linux/ioctl.h:
/usr/include/x86_64-linux-gnu/asm/ioctl.h:
/usr/include/asm-generic/ioctl.h:
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h:
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h:
/usr/include/x86_64-linux-gnu/sys/param.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h:
/usr/include/limits.h:
/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
/usr/include/x86_64-linux-gnu/bits/local_lim.h:
/usr/include/linux/limits.h:
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h:
/usr/include/x86_64-linux-gnu/bits/param.h:
/usr/include/linux/param.h:
/usr/include/x86_64-linux-gnu/asm/param.h:
/usr/include/asm-generic/param.h:
/usr/include/x86_64-linux-gnu/sys/resource.h:
/usr/include/x86_64-linux-gnu/bits/resource.h:
/usr/include/x86_64-linux-gnu/sys/uio.h:
/usr/include/x86_64-linux-gnu/sys/un.h:
/usr/include/x86_64-linux-gnu/bits/sockaddr.h:
/usr/include/dirent.h:
/usr/include/x86_64-linux-gnu/bits/dirent.h:
/usr/include/netdb.h:
/usr/include/netinet/in.h:
/usr/include/x86_64-linux-gnu/sys/socket.h:
/usr/include/x86_64-linux-gnu/bits/socket.h:
/usr/include/x86_64-linux-gnu/bits/socket_type.h:
/usr/include/x86_64-linux-gnu/asm/socket.h:
/usr/include/asm-generic/socket.h:
/usr/include/x86_64-linux-gnu/asm/sockios.h:
/usr/include/asm-generic/sockios.h:
/usr/include/x86_64-linux-gnu/bits/in.h:
/usr/include/rpc/netdb.h:
/usr/include/x86_64-linux-gnu/bits/netdb.h:
/usr/include/net/if.h:
/usr/include/netinet/in_systm.h:
/usr/include/arpa/inet.h:
/usr/include/netinet/ip.h:
/usr/include/netinet/tcp.h:
/usr/include/netinet/ip6.h:
/usr/include/net/ethernet.h:
/usr/include/linux/if_ether.h:
/usr/include/linux/types.h:
/usr/include/x86_64-linux-gnu/asm/types.h:
/usr/include/asm-generic/types.h:
/usr/include/asm-generic/int-ll64.h:
/usr/include/x86_64-linux-gnu/asm/bitsperlong.h:
/usr/include/asm-generic/bitsperlong.h:
/usr/include/linux/posix_types.h:
/usr/include/linux/stddef.h:
/usr/include/x86_64-linux-gnu/asm/posix_types.h:
/usr/include/x86_64-linux-gnu/asm/posix_types_64.h:
/usr/include/asm-generic/posix_types.h:
/usr/include/net/if_arp.h:
/usr/include/netinet/ip_icmp.h:
/usr/include/netinet/icmp6.h:
/usr/include/netinet/if_ether.h:
openssl/../dropin.h:
openssl/../fake-getaddrinfo.h:
openssl/../fake-gai-errnos.h:
openssl/../fake-getnameinfo.h:
/usr/include/openssl/pem.h:
/usr/include/openssl/e_os2.h:
/usr/include/x86_64-linux-gnu/openssl/opensslconf.h:
/usr/include/openssl/bio.h:
/usr/include/openssl/crypto.h:
/usr/include/openssl/stack.h:
/usr/include/openssl/safestack.h:
/usr/include/openssl/opensslv.h:
/usr/include/openssl/ossl_typ.h:
/usr/include/openssl/symhacks.h:
/usr/include/openssl/evp.h:
/usr/include/openssl/objects.h:
/usr/include/openssl/obj_mac.h:
/usr/include/openssl/asn1.h:
/usr/include/openssl/bn.h:
/usr/include/openssl/x509.h:
/usr/include/openssl/buffer.h:
/usr/include/openssl/ec.h:
/usr/include/openssl/ecdsa.h:
/usr/include/openssl/ecdh.h:
/usr/include/openssl/rsa.h:
/usr/include/openssl/dsa.h:
/usr/include/openssl/dh.h:
/usr/include/openssl/sha.h:
/usr/include/openssl/x509_vfy.h:
/usr/include/openssl/lhash.h:
/usr/include/openssl/pkcs7.h:
/usr/include/openssl/pem2.h:
/usr/include/openssl/err.h:
openssl/../logger.h:
openssl/../ecdsa.h:
openssl/../utils.h:
openssl/../xalloc.h:

View file

@ -0,0 +1,487 @@
openssl/ecdsagen.o: openssl/ecdsagen.c /usr/include/stdc-predef.h \
/usr/include/x86_64-linux-gnu/bits/predefs.h openssl/../system.h \
openssl/../../config.h openssl/../have.h /usr/include/stdio.h \
/usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h \
/usr/include/x86_64-linux-gnu/bits/types.h \
/usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/libio.h \
/usr/include/_G_config.h /usr/include/wchar.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h \
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
/usr/include/x86_64-linux-gnu/bits/stdio.h /usr/include/stdlib.h \
/usr/include/x86_64-linux-gnu/bits/waitflags.h \
/usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \
/usr/include/x86_64-linux-gnu/bits/endian.h \
/usr/include/x86_64-linux-gnu/bits/byteswap.h \
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/xlocale.h \
/usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
/usr/include/x86_64-linux-gnu/sys/select.h \
/usr/include/x86_64-linux-gnu/bits/select.h \
/usr/include/x86_64-linux-gnu/bits/sigset.h \
/usr/include/x86_64-linux-gnu/bits/time.h \
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h /usr/include/string.h \
/usr/include/x86_64-linux-gnu/bits/string.h \
/usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/ctype.h \
/usr/include/signal.h /usr/include/x86_64-linux-gnu/bits/signum.h \
/usr/include/x86_64-linux-gnu/bits/siginfo.h \
/usr/include/x86_64-linux-gnu/bits/sigaction.h \
/usr/include/x86_64-linux-gnu/bits/sigcontext.h \
/usr/include/x86_64-linux-gnu/bits/sigstack.h \
/usr/include/x86_64-linux-gnu/sys/ucontext.h \
/usr/include/x86_64-linux-gnu/bits/sigthread.h /usr/include/errno.h \
/usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
/usr/include/x86_64-linux-gnu/asm/errno.h \
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
/usr/include/fcntl.h /usr/include/x86_64-linux-gnu/bits/fcntl.h \
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \
/usr/include/x86_64-linux-gnu/bits/uio.h \
/usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/unistd.h \
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
/usr/include/x86_64-linux-gnu/bits/environments.h \
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdbool.h \
/usr/include/inttypes.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h /usr/include/stdint.h \
/usr/include/x86_64-linux-gnu/bits/wchar.h /usr/include/syslog.h \
/usr/include/x86_64-linux-gnu/sys/syslog.h \
/usr/include/x86_64-linux-gnu/bits/syslog-path.h \
/usr/include/x86_64-linux-gnu/sys/time.h \
/usr/include/x86_64-linux-gnu/bits/timex.h \
/usr/include/x86_64-linux-gnu/sys/stat.h \
/usr/include/x86_64-linux-gnu/sys/file.h \
/usr/include/x86_64-linux-gnu/sys/wait.h \
/usr/include/x86_64-linux-gnu/sys/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctls.h \
/usr/include/x86_64-linux-gnu/asm/ioctls.h \
/usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \
/usr/include/x86_64-linux-gnu/asm/ioctl.h \
/usr/include/asm-generic/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h \
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h \
/usr/include/x86_64-linux-gnu/sys/param.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h \
/usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
/usr/include/x86_64-linux-gnu/bits/local_lim.h \
/usr/include/linux/limits.h \
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h \
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h \
/usr/include/x86_64-linux-gnu/bits/param.h /usr/include/linux/param.h \
/usr/include/x86_64-linux-gnu/asm/param.h \
/usr/include/asm-generic/param.h \
/usr/include/x86_64-linux-gnu/sys/resource.h \
/usr/include/x86_64-linux-gnu/bits/resource.h \
/usr/include/x86_64-linux-gnu/sys/uio.h \
/usr/include/x86_64-linux-gnu/sys/un.h \
/usr/include/x86_64-linux-gnu/bits/sockaddr.h /usr/include/dirent.h \
/usr/include/x86_64-linux-gnu/bits/dirent.h /usr/include/netdb.h \
/usr/include/netinet/in.h /usr/include/x86_64-linux-gnu/sys/socket.h \
/usr/include/x86_64-linux-gnu/bits/socket.h \
/usr/include/x86_64-linux-gnu/bits/socket_type.h \
/usr/include/x86_64-linux-gnu/asm/socket.h \
/usr/include/asm-generic/socket.h \
/usr/include/x86_64-linux-gnu/asm/sockios.h \
/usr/include/asm-generic/sockios.h \
/usr/include/x86_64-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \
/usr/include/x86_64-linux-gnu/bits/netdb.h /usr/include/net/if.h \
/usr/include/netinet/in_systm.h /usr/include/arpa/inet.h \
/usr/include/netinet/ip.h /usr/include/netinet/tcp.h \
/usr/include/netinet/ip6.h /usr/include/net/ethernet.h \
/usr/include/linux/if_ether.h /usr/include/linux/types.h \
/usr/include/x86_64-linux-gnu/asm/types.h \
/usr/include/asm-generic/types.h /usr/include/asm-generic/int-ll64.h \
/usr/include/x86_64-linux-gnu/asm/bitsperlong.h \
/usr/include/asm-generic/bitsperlong.h /usr/include/linux/posix_types.h \
/usr/include/linux/stddef.h \
/usr/include/x86_64-linux-gnu/asm/posix_types.h \
/usr/include/x86_64-linux-gnu/asm/posix_types_64.h \
/usr/include/asm-generic/posix_types.h /usr/include/net/if_arp.h \
/usr/include/netinet/ip_icmp.h /usr/include/netinet/icmp6.h \
/usr/include/netinet/if_ether.h openssl/../dropin.h \
openssl/../fake-getaddrinfo.h openssl/../fake-gai-errnos.h \
openssl/../fake-getnameinfo.h /usr/include/openssl/pem.h \
/usr/include/openssl/e_os2.h \
/usr/include/x86_64-linux-gnu/openssl/opensslconf.h \
/usr/include/openssl/bio.h /usr/include/openssl/crypto.h \
/usr/include/openssl/stack.h /usr/include/openssl/safestack.h \
/usr/include/openssl/opensslv.h /usr/include/openssl/ossl_typ.h \
/usr/include/openssl/symhacks.h /usr/include/openssl/evp.h \
/usr/include/openssl/objects.h /usr/include/openssl/obj_mac.h \
/usr/include/openssl/asn1.h /usr/include/openssl/bn.h \
/usr/include/openssl/x509.h /usr/include/openssl/buffer.h \
/usr/include/openssl/ec.h /usr/include/openssl/ecdsa.h \
/usr/include/openssl/ecdh.h /usr/include/openssl/rsa.h \
/usr/include/openssl/dsa.h /usr/include/openssl/dh.h \
/usr/include/openssl/sha.h /usr/include/openssl/x509_vfy.h \
/usr/include/openssl/lhash.h /usr/include/openssl/pkcs7.h \
/usr/include/openssl/pem2.h /usr/include/openssl/err.h \
openssl/../ecdsagen.h openssl/../ecdsa.h openssl/../utils.h \
openssl/../xalloc.h
/usr/include/stdc-predef.h:
/usr/include/x86_64-linux-gnu/bits/predefs.h:
openssl/../system.h:
openssl/../../config.h:
openssl/../have.h:
/usr/include/stdio.h:
/usr/include/features.h:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h:
/usr/include/x86_64-linux-gnu/bits/types.h:
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
/usr/include/libio.h:
/usr/include/_G_config.h:
/usr/include/wchar.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h:
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:
/usr/include/x86_64-linux-gnu/bits/stdio.h:
/usr/include/stdlib.h:
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
/usr/include/endian.h:
/usr/include/x86_64-linux-gnu/bits/endian.h:
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
/usr/include/xlocale.h:
/usr/include/x86_64-linux-gnu/sys/types.h:
/usr/include/time.h:
/usr/include/x86_64-linux-gnu/sys/select.h:
/usr/include/x86_64-linux-gnu/bits/select.h:
/usr/include/x86_64-linux-gnu/bits/sigset.h:
/usr/include/x86_64-linux-gnu/bits/time.h:
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
/usr/include/alloca.h:
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
/usr/include/string.h:
/usr/include/x86_64-linux-gnu/bits/string.h:
/usr/include/x86_64-linux-gnu/bits/string2.h:
/usr/include/ctype.h:
/usr/include/signal.h:
/usr/include/x86_64-linux-gnu/bits/signum.h:
/usr/include/x86_64-linux-gnu/bits/siginfo.h:
/usr/include/x86_64-linux-gnu/bits/sigaction.h:
/usr/include/x86_64-linux-gnu/bits/sigcontext.h:
/usr/include/x86_64-linux-gnu/bits/sigstack.h:
/usr/include/x86_64-linux-gnu/sys/ucontext.h:
/usr/include/x86_64-linux-gnu/bits/sigthread.h:
/usr/include/errno.h:
/usr/include/x86_64-linux-gnu/bits/errno.h:
/usr/include/linux/errno.h:
/usr/include/x86_64-linux-gnu/asm/errno.h:
/usr/include/asm-generic/errno.h:
/usr/include/asm-generic/errno-base.h:
/usr/include/fcntl.h:
/usr/include/x86_64-linux-gnu/bits/fcntl.h:
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:
/usr/include/x86_64-linux-gnu/bits/uio.h:
/usr/include/x86_64-linux-gnu/bits/stat.h:
/usr/include/unistd.h:
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
/usr/include/x86_64-linux-gnu/bits/environments.h:
/usr/include/x86_64-linux-gnu/bits/confname.h:
/usr/include/getopt.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdbool.h:
/usr/include/inttypes.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h:
/usr/include/stdint.h:
/usr/include/x86_64-linux-gnu/bits/wchar.h:
/usr/include/syslog.h:
/usr/include/x86_64-linux-gnu/sys/syslog.h:
/usr/include/x86_64-linux-gnu/bits/syslog-path.h:
/usr/include/x86_64-linux-gnu/sys/time.h:
/usr/include/x86_64-linux-gnu/bits/timex.h:
/usr/include/x86_64-linux-gnu/sys/stat.h:
/usr/include/x86_64-linux-gnu/sys/file.h:
/usr/include/x86_64-linux-gnu/sys/wait.h:
/usr/include/x86_64-linux-gnu/sys/ioctl.h:
/usr/include/x86_64-linux-gnu/bits/ioctls.h:
/usr/include/x86_64-linux-gnu/asm/ioctls.h:
/usr/include/asm-generic/ioctls.h:
/usr/include/linux/ioctl.h:
/usr/include/x86_64-linux-gnu/asm/ioctl.h:
/usr/include/asm-generic/ioctl.h:
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h:
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h:
/usr/include/x86_64-linux-gnu/sys/param.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h:
/usr/include/limits.h:
/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
/usr/include/x86_64-linux-gnu/bits/local_lim.h:
/usr/include/linux/limits.h:
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h:
/usr/include/x86_64-linux-gnu/bits/param.h:
/usr/include/linux/param.h:
/usr/include/x86_64-linux-gnu/asm/param.h:
/usr/include/asm-generic/param.h:
/usr/include/x86_64-linux-gnu/sys/resource.h:
/usr/include/x86_64-linux-gnu/bits/resource.h:
/usr/include/x86_64-linux-gnu/sys/uio.h:
/usr/include/x86_64-linux-gnu/sys/un.h:
/usr/include/x86_64-linux-gnu/bits/sockaddr.h:
/usr/include/dirent.h:
/usr/include/x86_64-linux-gnu/bits/dirent.h:
/usr/include/netdb.h:
/usr/include/netinet/in.h:
/usr/include/x86_64-linux-gnu/sys/socket.h:
/usr/include/x86_64-linux-gnu/bits/socket.h:
/usr/include/x86_64-linux-gnu/bits/socket_type.h:
/usr/include/x86_64-linux-gnu/asm/socket.h:
/usr/include/asm-generic/socket.h:
/usr/include/x86_64-linux-gnu/asm/sockios.h:
/usr/include/asm-generic/sockios.h:
/usr/include/x86_64-linux-gnu/bits/in.h:
/usr/include/rpc/netdb.h:
/usr/include/x86_64-linux-gnu/bits/netdb.h:
/usr/include/net/if.h:
/usr/include/netinet/in_systm.h:
/usr/include/arpa/inet.h:
/usr/include/netinet/ip.h:
/usr/include/netinet/tcp.h:
/usr/include/netinet/ip6.h:
/usr/include/net/ethernet.h:
/usr/include/linux/if_ether.h:
/usr/include/linux/types.h:
/usr/include/x86_64-linux-gnu/asm/types.h:
/usr/include/asm-generic/types.h:
/usr/include/asm-generic/int-ll64.h:
/usr/include/x86_64-linux-gnu/asm/bitsperlong.h:
/usr/include/asm-generic/bitsperlong.h:
/usr/include/linux/posix_types.h:
/usr/include/linux/stddef.h:
/usr/include/x86_64-linux-gnu/asm/posix_types.h:
/usr/include/x86_64-linux-gnu/asm/posix_types_64.h:
/usr/include/asm-generic/posix_types.h:
/usr/include/net/if_arp.h:
/usr/include/netinet/ip_icmp.h:
/usr/include/netinet/icmp6.h:
/usr/include/netinet/if_ether.h:
openssl/../dropin.h:
openssl/../fake-getaddrinfo.h:
openssl/../fake-gai-errnos.h:
openssl/../fake-getnameinfo.h:
/usr/include/openssl/pem.h:
/usr/include/openssl/e_os2.h:
/usr/include/x86_64-linux-gnu/openssl/opensslconf.h:
/usr/include/openssl/bio.h:
/usr/include/openssl/crypto.h:
/usr/include/openssl/stack.h:
/usr/include/openssl/safestack.h:
/usr/include/openssl/opensslv.h:
/usr/include/openssl/ossl_typ.h:
/usr/include/openssl/symhacks.h:
/usr/include/openssl/evp.h:
/usr/include/openssl/objects.h:
/usr/include/openssl/obj_mac.h:
/usr/include/openssl/asn1.h:
/usr/include/openssl/bn.h:
/usr/include/openssl/x509.h:
/usr/include/openssl/buffer.h:
/usr/include/openssl/ec.h:
/usr/include/openssl/ecdsa.h:
/usr/include/openssl/ecdh.h:
/usr/include/openssl/rsa.h:
/usr/include/openssl/dsa.h:
/usr/include/openssl/dh.h:
/usr/include/openssl/sha.h:
/usr/include/openssl/x509_vfy.h:
/usr/include/openssl/lhash.h:
/usr/include/openssl/pkcs7.h:
/usr/include/openssl/pem2.h:
/usr/include/openssl/err.h:
openssl/../ecdsagen.h:
openssl/../ecdsa.h:
openssl/../utils.h:
openssl/../xalloc.h:

446
src/openssl/.deps/prf.Po Normal file
View file

@ -0,0 +1,446 @@
openssl/prf.o: openssl/prf.c /usr/include/stdc-predef.h \
/usr/include/x86_64-linux-gnu/bits/predefs.h openssl/../system.h \
openssl/../../config.h openssl/../have.h /usr/include/stdio.h \
/usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h \
/usr/include/x86_64-linux-gnu/bits/types.h \
/usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/libio.h \
/usr/include/_G_config.h /usr/include/wchar.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h \
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
/usr/include/x86_64-linux-gnu/bits/stdio.h /usr/include/stdlib.h \
/usr/include/x86_64-linux-gnu/bits/waitflags.h \
/usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \
/usr/include/x86_64-linux-gnu/bits/endian.h \
/usr/include/x86_64-linux-gnu/bits/byteswap.h \
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/xlocale.h \
/usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
/usr/include/x86_64-linux-gnu/sys/select.h \
/usr/include/x86_64-linux-gnu/bits/select.h \
/usr/include/x86_64-linux-gnu/bits/sigset.h \
/usr/include/x86_64-linux-gnu/bits/time.h \
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h /usr/include/string.h \
/usr/include/x86_64-linux-gnu/bits/string.h \
/usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/ctype.h \
/usr/include/signal.h /usr/include/x86_64-linux-gnu/bits/signum.h \
/usr/include/x86_64-linux-gnu/bits/siginfo.h \
/usr/include/x86_64-linux-gnu/bits/sigaction.h \
/usr/include/x86_64-linux-gnu/bits/sigcontext.h \
/usr/include/x86_64-linux-gnu/bits/sigstack.h \
/usr/include/x86_64-linux-gnu/sys/ucontext.h \
/usr/include/x86_64-linux-gnu/bits/sigthread.h /usr/include/errno.h \
/usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
/usr/include/x86_64-linux-gnu/asm/errno.h \
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
/usr/include/fcntl.h /usr/include/x86_64-linux-gnu/bits/fcntl.h \
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \
/usr/include/x86_64-linux-gnu/bits/uio.h \
/usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/unistd.h \
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
/usr/include/x86_64-linux-gnu/bits/environments.h \
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdbool.h \
/usr/include/inttypes.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h /usr/include/stdint.h \
/usr/include/x86_64-linux-gnu/bits/wchar.h /usr/include/syslog.h \
/usr/include/x86_64-linux-gnu/sys/syslog.h \
/usr/include/x86_64-linux-gnu/bits/syslog-path.h \
/usr/include/x86_64-linux-gnu/sys/time.h \
/usr/include/x86_64-linux-gnu/bits/timex.h \
/usr/include/x86_64-linux-gnu/sys/stat.h \
/usr/include/x86_64-linux-gnu/sys/file.h \
/usr/include/x86_64-linux-gnu/sys/wait.h \
/usr/include/x86_64-linux-gnu/sys/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctls.h \
/usr/include/x86_64-linux-gnu/asm/ioctls.h \
/usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \
/usr/include/x86_64-linux-gnu/asm/ioctl.h \
/usr/include/asm-generic/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h \
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h \
/usr/include/x86_64-linux-gnu/sys/param.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h \
/usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
/usr/include/x86_64-linux-gnu/bits/local_lim.h \
/usr/include/linux/limits.h \
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h \
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h \
/usr/include/x86_64-linux-gnu/bits/param.h /usr/include/linux/param.h \
/usr/include/x86_64-linux-gnu/asm/param.h \
/usr/include/asm-generic/param.h \
/usr/include/x86_64-linux-gnu/sys/resource.h \
/usr/include/x86_64-linux-gnu/bits/resource.h \
/usr/include/x86_64-linux-gnu/sys/uio.h \
/usr/include/x86_64-linux-gnu/sys/un.h \
/usr/include/x86_64-linux-gnu/bits/sockaddr.h /usr/include/dirent.h \
/usr/include/x86_64-linux-gnu/bits/dirent.h /usr/include/netdb.h \
/usr/include/netinet/in.h /usr/include/x86_64-linux-gnu/sys/socket.h \
/usr/include/x86_64-linux-gnu/bits/socket.h \
/usr/include/x86_64-linux-gnu/bits/socket_type.h \
/usr/include/x86_64-linux-gnu/asm/socket.h \
/usr/include/asm-generic/socket.h \
/usr/include/x86_64-linux-gnu/asm/sockios.h \
/usr/include/asm-generic/sockios.h \
/usr/include/x86_64-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \
/usr/include/x86_64-linux-gnu/bits/netdb.h /usr/include/net/if.h \
/usr/include/netinet/in_systm.h /usr/include/arpa/inet.h \
/usr/include/netinet/ip.h /usr/include/netinet/tcp.h \
/usr/include/netinet/ip6.h /usr/include/net/ethernet.h \
/usr/include/linux/if_ether.h /usr/include/linux/types.h \
/usr/include/x86_64-linux-gnu/asm/types.h \
/usr/include/asm-generic/types.h /usr/include/asm-generic/int-ll64.h \
/usr/include/x86_64-linux-gnu/asm/bitsperlong.h \
/usr/include/asm-generic/bitsperlong.h /usr/include/linux/posix_types.h \
/usr/include/linux/stddef.h \
/usr/include/x86_64-linux-gnu/asm/posix_types.h \
/usr/include/x86_64-linux-gnu/asm/posix_types_64.h \
/usr/include/asm-generic/posix_types.h /usr/include/net/if_arp.h \
/usr/include/netinet/ip_icmp.h /usr/include/netinet/icmp6.h \
/usr/include/netinet/if_ether.h openssl/../dropin.h \
openssl/../fake-getaddrinfo.h openssl/../fake-gai-errnos.h \
openssl/../fake-getnameinfo.h /usr/include/openssl/obj_mac.h \
openssl/digest.h /usr/include/openssl/evp.h \
/usr/include/x86_64-linux-gnu/openssl/opensslconf.h \
/usr/include/openssl/ossl_typ.h /usr/include/openssl/e_os2.h \
/usr/include/openssl/symhacks.h /usr/include/openssl/bio.h \
/usr/include/openssl/crypto.h /usr/include/openssl/stack.h \
/usr/include/openssl/safestack.h /usr/include/openssl/opensslv.h \
/usr/include/openssl/objects.h /usr/include/openssl/asn1.h \
/usr/include/openssl/bn.h openssl/../digest.h openssl/../prf.h
/usr/include/stdc-predef.h:
/usr/include/x86_64-linux-gnu/bits/predefs.h:
openssl/../system.h:
openssl/../../config.h:
openssl/../have.h:
/usr/include/stdio.h:
/usr/include/features.h:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h:
/usr/include/x86_64-linux-gnu/bits/types.h:
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
/usr/include/libio.h:
/usr/include/_G_config.h:
/usr/include/wchar.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h:
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:
/usr/include/x86_64-linux-gnu/bits/stdio.h:
/usr/include/stdlib.h:
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
/usr/include/endian.h:
/usr/include/x86_64-linux-gnu/bits/endian.h:
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
/usr/include/xlocale.h:
/usr/include/x86_64-linux-gnu/sys/types.h:
/usr/include/time.h:
/usr/include/x86_64-linux-gnu/sys/select.h:
/usr/include/x86_64-linux-gnu/bits/select.h:
/usr/include/x86_64-linux-gnu/bits/sigset.h:
/usr/include/x86_64-linux-gnu/bits/time.h:
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
/usr/include/alloca.h:
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
/usr/include/string.h:
/usr/include/x86_64-linux-gnu/bits/string.h:
/usr/include/x86_64-linux-gnu/bits/string2.h:
/usr/include/ctype.h:
/usr/include/signal.h:
/usr/include/x86_64-linux-gnu/bits/signum.h:
/usr/include/x86_64-linux-gnu/bits/siginfo.h:
/usr/include/x86_64-linux-gnu/bits/sigaction.h:
/usr/include/x86_64-linux-gnu/bits/sigcontext.h:
/usr/include/x86_64-linux-gnu/bits/sigstack.h:
/usr/include/x86_64-linux-gnu/sys/ucontext.h:
/usr/include/x86_64-linux-gnu/bits/sigthread.h:
/usr/include/errno.h:
/usr/include/x86_64-linux-gnu/bits/errno.h:
/usr/include/linux/errno.h:
/usr/include/x86_64-linux-gnu/asm/errno.h:
/usr/include/asm-generic/errno.h:
/usr/include/asm-generic/errno-base.h:
/usr/include/fcntl.h:
/usr/include/x86_64-linux-gnu/bits/fcntl.h:
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:
/usr/include/x86_64-linux-gnu/bits/uio.h:
/usr/include/x86_64-linux-gnu/bits/stat.h:
/usr/include/unistd.h:
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
/usr/include/x86_64-linux-gnu/bits/environments.h:
/usr/include/x86_64-linux-gnu/bits/confname.h:
/usr/include/getopt.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdbool.h:
/usr/include/inttypes.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h:
/usr/include/stdint.h:
/usr/include/x86_64-linux-gnu/bits/wchar.h:
/usr/include/syslog.h:
/usr/include/x86_64-linux-gnu/sys/syslog.h:
/usr/include/x86_64-linux-gnu/bits/syslog-path.h:
/usr/include/x86_64-linux-gnu/sys/time.h:
/usr/include/x86_64-linux-gnu/bits/timex.h:
/usr/include/x86_64-linux-gnu/sys/stat.h:
/usr/include/x86_64-linux-gnu/sys/file.h:
/usr/include/x86_64-linux-gnu/sys/wait.h:
/usr/include/x86_64-linux-gnu/sys/ioctl.h:
/usr/include/x86_64-linux-gnu/bits/ioctls.h:
/usr/include/x86_64-linux-gnu/asm/ioctls.h:
/usr/include/asm-generic/ioctls.h:
/usr/include/linux/ioctl.h:
/usr/include/x86_64-linux-gnu/asm/ioctl.h:
/usr/include/asm-generic/ioctl.h:
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h:
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h:
/usr/include/x86_64-linux-gnu/sys/param.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h:
/usr/include/limits.h:
/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
/usr/include/x86_64-linux-gnu/bits/local_lim.h:
/usr/include/linux/limits.h:
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h:
/usr/include/x86_64-linux-gnu/bits/param.h:
/usr/include/linux/param.h:
/usr/include/x86_64-linux-gnu/asm/param.h:
/usr/include/asm-generic/param.h:
/usr/include/x86_64-linux-gnu/sys/resource.h:
/usr/include/x86_64-linux-gnu/bits/resource.h:
/usr/include/x86_64-linux-gnu/sys/uio.h:
/usr/include/x86_64-linux-gnu/sys/un.h:
/usr/include/x86_64-linux-gnu/bits/sockaddr.h:
/usr/include/dirent.h:
/usr/include/x86_64-linux-gnu/bits/dirent.h:
/usr/include/netdb.h:
/usr/include/netinet/in.h:
/usr/include/x86_64-linux-gnu/sys/socket.h:
/usr/include/x86_64-linux-gnu/bits/socket.h:
/usr/include/x86_64-linux-gnu/bits/socket_type.h:
/usr/include/x86_64-linux-gnu/asm/socket.h:
/usr/include/asm-generic/socket.h:
/usr/include/x86_64-linux-gnu/asm/sockios.h:
/usr/include/asm-generic/sockios.h:
/usr/include/x86_64-linux-gnu/bits/in.h:
/usr/include/rpc/netdb.h:
/usr/include/x86_64-linux-gnu/bits/netdb.h:
/usr/include/net/if.h:
/usr/include/netinet/in_systm.h:
/usr/include/arpa/inet.h:
/usr/include/netinet/ip.h:
/usr/include/netinet/tcp.h:
/usr/include/netinet/ip6.h:
/usr/include/net/ethernet.h:
/usr/include/linux/if_ether.h:
/usr/include/linux/types.h:
/usr/include/x86_64-linux-gnu/asm/types.h:
/usr/include/asm-generic/types.h:
/usr/include/asm-generic/int-ll64.h:
/usr/include/x86_64-linux-gnu/asm/bitsperlong.h:
/usr/include/asm-generic/bitsperlong.h:
/usr/include/linux/posix_types.h:
/usr/include/linux/stddef.h:
/usr/include/x86_64-linux-gnu/asm/posix_types.h:
/usr/include/x86_64-linux-gnu/asm/posix_types_64.h:
/usr/include/asm-generic/posix_types.h:
/usr/include/net/if_arp.h:
/usr/include/netinet/ip_icmp.h:
/usr/include/netinet/icmp6.h:
/usr/include/netinet/if_ether.h:
openssl/../dropin.h:
openssl/../fake-getaddrinfo.h:
openssl/../fake-gai-errnos.h:
openssl/../fake-getnameinfo.h:
/usr/include/openssl/obj_mac.h:
openssl/digest.h:
/usr/include/openssl/evp.h:
/usr/include/x86_64-linux-gnu/openssl/opensslconf.h:
/usr/include/openssl/ossl_typ.h:
/usr/include/openssl/e_os2.h:
/usr/include/openssl/symhacks.h:
/usr/include/openssl/bio.h:
/usr/include/openssl/crypto.h:
/usr/include/openssl/stack.h:
/usr/include/openssl/safestack.h:
/usr/include/openssl/opensslv.h:
/usr/include/openssl/objects.h:
/usr/include/openssl/asn1.h:
/usr/include/openssl/bn.h:
openssl/../digest.h:
openssl/../prf.h:

482
src/openssl/.deps/rsa.Po Normal file
View file

@ -0,0 +1,482 @@
openssl/rsa.o: openssl/rsa.c /usr/include/stdc-predef.h \
/usr/include/x86_64-linux-gnu/bits/predefs.h openssl/../system.h \
openssl/../../config.h openssl/../have.h /usr/include/stdio.h \
/usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h \
/usr/include/x86_64-linux-gnu/bits/types.h \
/usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/libio.h \
/usr/include/_G_config.h /usr/include/wchar.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h \
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
/usr/include/x86_64-linux-gnu/bits/stdio.h /usr/include/stdlib.h \
/usr/include/x86_64-linux-gnu/bits/waitflags.h \
/usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \
/usr/include/x86_64-linux-gnu/bits/endian.h \
/usr/include/x86_64-linux-gnu/bits/byteswap.h \
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/xlocale.h \
/usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
/usr/include/x86_64-linux-gnu/sys/select.h \
/usr/include/x86_64-linux-gnu/bits/select.h \
/usr/include/x86_64-linux-gnu/bits/sigset.h \
/usr/include/x86_64-linux-gnu/bits/time.h \
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h /usr/include/string.h \
/usr/include/x86_64-linux-gnu/bits/string.h \
/usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/ctype.h \
/usr/include/signal.h /usr/include/x86_64-linux-gnu/bits/signum.h \
/usr/include/x86_64-linux-gnu/bits/siginfo.h \
/usr/include/x86_64-linux-gnu/bits/sigaction.h \
/usr/include/x86_64-linux-gnu/bits/sigcontext.h \
/usr/include/x86_64-linux-gnu/bits/sigstack.h \
/usr/include/x86_64-linux-gnu/sys/ucontext.h \
/usr/include/x86_64-linux-gnu/bits/sigthread.h /usr/include/errno.h \
/usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
/usr/include/x86_64-linux-gnu/asm/errno.h \
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
/usr/include/fcntl.h /usr/include/x86_64-linux-gnu/bits/fcntl.h \
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \
/usr/include/x86_64-linux-gnu/bits/uio.h \
/usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/unistd.h \
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
/usr/include/x86_64-linux-gnu/bits/environments.h \
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdbool.h \
/usr/include/inttypes.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h /usr/include/stdint.h \
/usr/include/x86_64-linux-gnu/bits/wchar.h /usr/include/syslog.h \
/usr/include/x86_64-linux-gnu/sys/syslog.h \
/usr/include/x86_64-linux-gnu/bits/syslog-path.h \
/usr/include/x86_64-linux-gnu/sys/time.h \
/usr/include/x86_64-linux-gnu/bits/timex.h \
/usr/include/x86_64-linux-gnu/sys/stat.h \
/usr/include/x86_64-linux-gnu/sys/file.h \
/usr/include/x86_64-linux-gnu/sys/wait.h \
/usr/include/x86_64-linux-gnu/sys/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctls.h \
/usr/include/x86_64-linux-gnu/asm/ioctls.h \
/usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \
/usr/include/x86_64-linux-gnu/asm/ioctl.h \
/usr/include/asm-generic/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h \
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h \
/usr/include/x86_64-linux-gnu/sys/param.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h \
/usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
/usr/include/x86_64-linux-gnu/bits/local_lim.h \
/usr/include/linux/limits.h \
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h \
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h \
/usr/include/x86_64-linux-gnu/bits/param.h /usr/include/linux/param.h \
/usr/include/x86_64-linux-gnu/asm/param.h \
/usr/include/asm-generic/param.h \
/usr/include/x86_64-linux-gnu/sys/resource.h \
/usr/include/x86_64-linux-gnu/bits/resource.h \
/usr/include/x86_64-linux-gnu/sys/uio.h \
/usr/include/x86_64-linux-gnu/sys/un.h \
/usr/include/x86_64-linux-gnu/bits/sockaddr.h /usr/include/dirent.h \
/usr/include/x86_64-linux-gnu/bits/dirent.h /usr/include/netdb.h \
/usr/include/netinet/in.h /usr/include/x86_64-linux-gnu/sys/socket.h \
/usr/include/x86_64-linux-gnu/bits/socket.h \
/usr/include/x86_64-linux-gnu/bits/socket_type.h \
/usr/include/x86_64-linux-gnu/asm/socket.h \
/usr/include/asm-generic/socket.h \
/usr/include/x86_64-linux-gnu/asm/sockios.h \
/usr/include/asm-generic/sockios.h \
/usr/include/x86_64-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \
/usr/include/x86_64-linux-gnu/bits/netdb.h /usr/include/net/if.h \
/usr/include/netinet/in_systm.h /usr/include/arpa/inet.h \
/usr/include/netinet/ip.h /usr/include/netinet/tcp.h \
/usr/include/netinet/ip6.h /usr/include/net/ethernet.h \
/usr/include/linux/if_ether.h /usr/include/linux/types.h \
/usr/include/x86_64-linux-gnu/asm/types.h \
/usr/include/asm-generic/types.h /usr/include/asm-generic/int-ll64.h \
/usr/include/x86_64-linux-gnu/asm/bitsperlong.h \
/usr/include/asm-generic/bitsperlong.h /usr/include/linux/posix_types.h \
/usr/include/linux/stddef.h \
/usr/include/x86_64-linux-gnu/asm/posix_types.h \
/usr/include/x86_64-linux-gnu/asm/posix_types_64.h \
/usr/include/asm-generic/posix_types.h /usr/include/net/if_arp.h \
/usr/include/netinet/ip_icmp.h /usr/include/netinet/icmp6.h \
/usr/include/netinet/if_ether.h openssl/../dropin.h \
openssl/../fake-getaddrinfo.h openssl/../fake-gai-errnos.h \
openssl/../fake-getnameinfo.h /usr/include/openssl/pem.h \
/usr/include/openssl/e_os2.h \
/usr/include/x86_64-linux-gnu/openssl/opensslconf.h \
/usr/include/openssl/bio.h /usr/include/openssl/crypto.h \
/usr/include/openssl/stack.h /usr/include/openssl/safestack.h \
/usr/include/openssl/opensslv.h /usr/include/openssl/ossl_typ.h \
/usr/include/openssl/symhacks.h /usr/include/openssl/evp.h \
/usr/include/openssl/objects.h /usr/include/openssl/obj_mac.h \
/usr/include/openssl/asn1.h /usr/include/openssl/bn.h \
/usr/include/openssl/x509.h /usr/include/openssl/buffer.h \
/usr/include/openssl/ec.h /usr/include/openssl/ecdsa.h \
/usr/include/openssl/ecdh.h /usr/include/openssl/rsa.h \
/usr/include/openssl/dsa.h /usr/include/openssl/dh.h \
/usr/include/openssl/sha.h /usr/include/openssl/x509_vfy.h \
/usr/include/openssl/lhash.h /usr/include/openssl/pkcs7.h \
/usr/include/openssl/pem2.h /usr/include/openssl/err.h \
openssl/../logger.h openssl/../rsa.h
/usr/include/stdc-predef.h:
/usr/include/x86_64-linux-gnu/bits/predefs.h:
openssl/../system.h:
openssl/../../config.h:
openssl/../have.h:
/usr/include/stdio.h:
/usr/include/features.h:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h:
/usr/include/x86_64-linux-gnu/bits/types.h:
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
/usr/include/libio.h:
/usr/include/_G_config.h:
/usr/include/wchar.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h:
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:
/usr/include/x86_64-linux-gnu/bits/stdio.h:
/usr/include/stdlib.h:
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
/usr/include/endian.h:
/usr/include/x86_64-linux-gnu/bits/endian.h:
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
/usr/include/xlocale.h:
/usr/include/x86_64-linux-gnu/sys/types.h:
/usr/include/time.h:
/usr/include/x86_64-linux-gnu/sys/select.h:
/usr/include/x86_64-linux-gnu/bits/select.h:
/usr/include/x86_64-linux-gnu/bits/sigset.h:
/usr/include/x86_64-linux-gnu/bits/time.h:
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
/usr/include/alloca.h:
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
/usr/include/string.h:
/usr/include/x86_64-linux-gnu/bits/string.h:
/usr/include/x86_64-linux-gnu/bits/string2.h:
/usr/include/ctype.h:
/usr/include/signal.h:
/usr/include/x86_64-linux-gnu/bits/signum.h:
/usr/include/x86_64-linux-gnu/bits/siginfo.h:
/usr/include/x86_64-linux-gnu/bits/sigaction.h:
/usr/include/x86_64-linux-gnu/bits/sigcontext.h:
/usr/include/x86_64-linux-gnu/bits/sigstack.h:
/usr/include/x86_64-linux-gnu/sys/ucontext.h:
/usr/include/x86_64-linux-gnu/bits/sigthread.h:
/usr/include/errno.h:
/usr/include/x86_64-linux-gnu/bits/errno.h:
/usr/include/linux/errno.h:
/usr/include/x86_64-linux-gnu/asm/errno.h:
/usr/include/asm-generic/errno.h:
/usr/include/asm-generic/errno-base.h:
/usr/include/fcntl.h:
/usr/include/x86_64-linux-gnu/bits/fcntl.h:
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:
/usr/include/x86_64-linux-gnu/bits/uio.h:
/usr/include/x86_64-linux-gnu/bits/stat.h:
/usr/include/unistd.h:
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
/usr/include/x86_64-linux-gnu/bits/environments.h:
/usr/include/x86_64-linux-gnu/bits/confname.h:
/usr/include/getopt.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdbool.h:
/usr/include/inttypes.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h:
/usr/include/stdint.h:
/usr/include/x86_64-linux-gnu/bits/wchar.h:
/usr/include/syslog.h:
/usr/include/x86_64-linux-gnu/sys/syslog.h:
/usr/include/x86_64-linux-gnu/bits/syslog-path.h:
/usr/include/x86_64-linux-gnu/sys/time.h:
/usr/include/x86_64-linux-gnu/bits/timex.h:
/usr/include/x86_64-linux-gnu/sys/stat.h:
/usr/include/x86_64-linux-gnu/sys/file.h:
/usr/include/x86_64-linux-gnu/sys/wait.h:
/usr/include/x86_64-linux-gnu/sys/ioctl.h:
/usr/include/x86_64-linux-gnu/bits/ioctls.h:
/usr/include/x86_64-linux-gnu/asm/ioctls.h:
/usr/include/asm-generic/ioctls.h:
/usr/include/linux/ioctl.h:
/usr/include/x86_64-linux-gnu/asm/ioctl.h:
/usr/include/asm-generic/ioctl.h:
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h:
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h:
/usr/include/x86_64-linux-gnu/sys/param.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h:
/usr/include/limits.h:
/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
/usr/include/x86_64-linux-gnu/bits/local_lim.h:
/usr/include/linux/limits.h:
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h:
/usr/include/x86_64-linux-gnu/bits/param.h:
/usr/include/linux/param.h:
/usr/include/x86_64-linux-gnu/asm/param.h:
/usr/include/asm-generic/param.h:
/usr/include/x86_64-linux-gnu/sys/resource.h:
/usr/include/x86_64-linux-gnu/bits/resource.h:
/usr/include/x86_64-linux-gnu/sys/uio.h:
/usr/include/x86_64-linux-gnu/sys/un.h:
/usr/include/x86_64-linux-gnu/bits/sockaddr.h:
/usr/include/dirent.h:
/usr/include/x86_64-linux-gnu/bits/dirent.h:
/usr/include/netdb.h:
/usr/include/netinet/in.h:
/usr/include/x86_64-linux-gnu/sys/socket.h:
/usr/include/x86_64-linux-gnu/bits/socket.h:
/usr/include/x86_64-linux-gnu/bits/socket_type.h:
/usr/include/x86_64-linux-gnu/asm/socket.h:
/usr/include/asm-generic/socket.h:
/usr/include/x86_64-linux-gnu/asm/sockios.h:
/usr/include/asm-generic/sockios.h:
/usr/include/x86_64-linux-gnu/bits/in.h:
/usr/include/rpc/netdb.h:
/usr/include/x86_64-linux-gnu/bits/netdb.h:
/usr/include/net/if.h:
/usr/include/netinet/in_systm.h:
/usr/include/arpa/inet.h:
/usr/include/netinet/ip.h:
/usr/include/netinet/tcp.h:
/usr/include/netinet/ip6.h:
/usr/include/net/ethernet.h:
/usr/include/linux/if_ether.h:
/usr/include/linux/types.h:
/usr/include/x86_64-linux-gnu/asm/types.h:
/usr/include/asm-generic/types.h:
/usr/include/asm-generic/int-ll64.h:
/usr/include/x86_64-linux-gnu/asm/bitsperlong.h:
/usr/include/asm-generic/bitsperlong.h:
/usr/include/linux/posix_types.h:
/usr/include/linux/stddef.h:
/usr/include/x86_64-linux-gnu/asm/posix_types.h:
/usr/include/x86_64-linux-gnu/asm/posix_types_64.h:
/usr/include/asm-generic/posix_types.h:
/usr/include/net/if_arp.h:
/usr/include/netinet/ip_icmp.h:
/usr/include/netinet/icmp6.h:
/usr/include/netinet/if_ether.h:
openssl/../dropin.h:
openssl/../fake-getaddrinfo.h:
openssl/../fake-gai-errnos.h:
openssl/../fake-getnameinfo.h:
/usr/include/openssl/pem.h:
/usr/include/openssl/e_os2.h:
/usr/include/x86_64-linux-gnu/openssl/opensslconf.h:
/usr/include/openssl/bio.h:
/usr/include/openssl/crypto.h:
/usr/include/openssl/stack.h:
/usr/include/openssl/safestack.h:
/usr/include/openssl/opensslv.h:
/usr/include/openssl/ossl_typ.h:
/usr/include/openssl/symhacks.h:
/usr/include/openssl/evp.h:
/usr/include/openssl/objects.h:
/usr/include/openssl/obj_mac.h:
/usr/include/openssl/asn1.h:
/usr/include/openssl/bn.h:
/usr/include/openssl/x509.h:
/usr/include/openssl/buffer.h:
/usr/include/openssl/ec.h:
/usr/include/openssl/ecdsa.h:
/usr/include/openssl/ecdh.h:
/usr/include/openssl/rsa.h:
/usr/include/openssl/dsa.h:
/usr/include/openssl/dh.h:
/usr/include/openssl/sha.h:
/usr/include/openssl/x509_vfy.h:
/usr/include/openssl/lhash.h:
/usr/include/openssl/pkcs7.h:
/usr/include/openssl/pem2.h:
/usr/include/openssl/err.h:
openssl/../logger.h:
openssl/../rsa.h:

484
src/openssl/.deps/rsagen.Po Normal file
View file

@ -0,0 +1,484 @@
openssl/rsagen.o: openssl/rsagen.c /usr/include/stdc-predef.h \
/usr/include/x86_64-linux-gnu/bits/predefs.h openssl/../system.h \
openssl/../../config.h openssl/../have.h /usr/include/stdio.h \
/usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h \
/usr/include/x86_64-linux-gnu/bits/types.h \
/usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/libio.h \
/usr/include/_G_config.h /usr/include/wchar.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h \
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
/usr/include/x86_64-linux-gnu/bits/stdio.h /usr/include/stdlib.h \
/usr/include/x86_64-linux-gnu/bits/waitflags.h \
/usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \
/usr/include/x86_64-linux-gnu/bits/endian.h \
/usr/include/x86_64-linux-gnu/bits/byteswap.h \
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/xlocale.h \
/usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
/usr/include/x86_64-linux-gnu/sys/select.h \
/usr/include/x86_64-linux-gnu/bits/select.h \
/usr/include/x86_64-linux-gnu/bits/sigset.h \
/usr/include/x86_64-linux-gnu/bits/time.h \
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h /usr/include/string.h \
/usr/include/x86_64-linux-gnu/bits/string.h \
/usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/ctype.h \
/usr/include/signal.h /usr/include/x86_64-linux-gnu/bits/signum.h \
/usr/include/x86_64-linux-gnu/bits/siginfo.h \
/usr/include/x86_64-linux-gnu/bits/sigaction.h \
/usr/include/x86_64-linux-gnu/bits/sigcontext.h \
/usr/include/x86_64-linux-gnu/bits/sigstack.h \
/usr/include/x86_64-linux-gnu/sys/ucontext.h \
/usr/include/x86_64-linux-gnu/bits/sigthread.h /usr/include/errno.h \
/usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
/usr/include/x86_64-linux-gnu/asm/errno.h \
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
/usr/include/fcntl.h /usr/include/x86_64-linux-gnu/bits/fcntl.h \
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \
/usr/include/x86_64-linux-gnu/bits/uio.h \
/usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/unistd.h \
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
/usr/include/x86_64-linux-gnu/bits/environments.h \
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdbool.h \
/usr/include/inttypes.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h /usr/include/stdint.h \
/usr/include/x86_64-linux-gnu/bits/wchar.h /usr/include/syslog.h \
/usr/include/x86_64-linux-gnu/sys/syslog.h \
/usr/include/x86_64-linux-gnu/bits/syslog-path.h \
/usr/include/x86_64-linux-gnu/sys/time.h \
/usr/include/x86_64-linux-gnu/bits/timex.h \
/usr/include/x86_64-linux-gnu/sys/stat.h \
/usr/include/x86_64-linux-gnu/sys/file.h \
/usr/include/x86_64-linux-gnu/sys/wait.h \
/usr/include/x86_64-linux-gnu/sys/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctls.h \
/usr/include/x86_64-linux-gnu/asm/ioctls.h \
/usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \
/usr/include/x86_64-linux-gnu/asm/ioctl.h \
/usr/include/asm-generic/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h \
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h \
/usr/include/x86_64-linux-gnu/sys/param.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h \
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h \
/usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
/usr/include/x86_64-linux-gnu/bits/local_lim.h \
/usr/include/linux/limits.h \
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h \
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h \
/usr/include/x86_64-linux-gnu/bits/param.h /usr/include/linux/param.h \
/usr/include/x86_64-linux-gnu/asm/param.h \
/usr/include/asm-generic/param.h \
/usr/include/x86_64-linux-gnu/sys/resource.h \
/usr/include/x86_64-linux-gnu/bits/resource.h \
/usr/include/x86_64-linux-gnu/sys/uio.h \
/usr/include/x86_64-linux-gnu/sys/un.h \
/usr/include/x86_64-linux-gnu/bits/sockaddr.h /usr/include/dirent.h \
/usr/include/x86_64-linux-gnu/bits/dirent.h /usr/include/netdb.h \
/usr/include/netinet/in.h /usr/include/x86_64-linux-gnu/sys/socket.h \
/usr/include/x86_64-linux-gnu/bits/socket.h \
/usr/include/x86_64-linux-gnu/bits/socket_type.h \
/usr/include/x86_64-linux-gnu/asm/socket.h \
/usr/include/asm-generic/socket.h \
/usr/include/x86_64-linux-gnu/asm/sockios.h \
/usr/include/asm-generic/sockios.h \
/usr/include/x86_64-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \
/usr/include/x86_64-linux-gnu/bits/netdb.h /usr/include/net/if.h \
/usr/include/netinet/in_systm.h /usr/include/arpa/inet.h \
/usr/include/netinet/ip.h /usr/include/netinet/tcp.h \
/usr/include/netinet/ip6.h /usr/include/net/ethernet.h \
/usr/include/linux/if_ether.h /usr/include/linux/types.h \
/usr/include/x86_64-linux-gnu/asm/types.h \
/usr/include/asm-generic/types.h /usr/include/asm-generic/int-ll64.h \
/usr/include/x86_64-linux-gnu/asm/bitsperlong.h \
/usr/include/asm-generic/bitsperlong.h /usr/include/linux/posix_types.h \
/usr/include/linux/stddef.h \
/usr/include/x86_64-linux-gnu/asm/posix_types.h \
/usr/include/x86_64-linux-gnu/asm/posix_types_64.h \
/usr/include/asm-generic/posix_types.h /usr/include/net/if_arp.h \
/usr/include/netinet/ip_icmp.h /usr/include/netinet/icmp6.h \
/usr/include/netinet/if_ether.h openssl/../dropin.h \
openssl/../fake-getaddrinfo.h openssl/../fake-gai-errnos.h \
openssl/../fake-getnameinfo.h /usr/include/openssl/pem.h \
/usr/include/openssl/e_os2.h \
/usr/include/x86_64-linux-gnu/openssl/opensslconf.h \
/usr/include/openssl/bio.h /usr/include/openssl/crypto.h \
/usr/include/openssl/stack.h /usr/include/openssl/safestack.h \
/usr/include/openssl/opensslv.h /usr/include/openssl/ossl_typ.h \
/usr/include/openssl/symhacks.h /usr/include/openssl/evp.h \
/usr/include/openssl/objects.h /usr/include/openssl/obj_mac.h \
/usr/include/openssl/asn1.h /usr/include/openssl/bn.h \
/usr/include/openssl/x509.h /usr/include/openssl/buffer.h \
/usr/include/openssl/ec.h /usr/include/openssl/ecdsa.h \
/usr/include/openssl/ecdh.h /usr/include/openssl/rsa.h \
/usr/include/openssl/dsa.h /usr/include/openssl/dh.h \
/usr/include/openssl/sha.h /usr/include/openssl/x509_vfy.h \
/usr/include/openssl/lhash.h /usr/include/openssl/pkcs7.h \
/usr/include/openssl/pem2.h /usr/include/openssl/err.h \
openssl/../logger.h openssl/../rsagen.h openssl/../rsa.h
/usr/include/stdc-predef.h:
/usr/include/x86_64-linux-gnu/bits/predefs.h:
openssl/../system.h:
openssl/../../config.h:
openssl/../have.h:
/usr/include/stdio.h:
/usr/include/features.h:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h:
/usr/include/x86_64-linux-gnu/bits/types.h:
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
/usr/include/libio.h:
/usr/include/_G_config.h:
/usr/include/wchar.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h:
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:
/usr/include/x86_64-linux-gnu/bits/stdio.h:
/usr/include/stdlib.h:
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
/usr/include/endian.h:
/usr/include/x86_64-linux-gnu/bits/endian.h:
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
/usr/include/xlocale.h:
/usr/include/x86_64-linux-gnu/sys/types.h:
/usr/include/time.h:
/usr/include/x86_64-linux-gnu/sys/select.h:
/usr/include/x86_64-linux-gnu/bits/select.h:
/usr/include/x86_64-linux-gnu/bits/sigset.h:
/usr/include/x86_64-linux-gnu/bits/time.h:
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
/usr/include/alloca.h:
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
/usr/include/string.h:
/usr/include/x86_64-linux-gnu/bits/string.h:
/usr/include/x86_64-linux-gnu/bits/string2.h:
/usr/include/ctype.h:
/usr/include/signal.h:
/usr/include/x86_64-linux-gnu/bits/signum.h:
/usr/include/x86_64-linux-gnu/bits/siginfo.h:
/usr/include/x86_64-linux-gnu/bits/sigaction.h:
/usr/include/x86_64-linux-gnu/bits/sigcontext.h:
/usr/include/x86_64-linux-gnu/bits/sigstack.h:
/usr/include/x86_64-linux-gnu/sys/ucontext.h:
/usr/include/x86_64-linux-gnu/bits/sigthread.h:
/usr/include/errno.h:
/usr/include/x86_64-linux-gnu/bits/errno.h:
/usr/include/linux/errno.h:
/usr/include/x86_64-linux-gnu/asm/errno.h:
/usr/include/asm-generic/errno.h:
/usr/include/asm-generic/errno-base.h:
/usr/include/fcntl.h:
/usr/include/x86_64-linux-gnu/bits/fcntl.h:
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:
/usr/include/x86_64-linux-gnu/bits/uio.h:
/usr/include/x86_64-linux-gnu/bits/stat.h:
/usr/include/unistd.h:
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
/usr/include/x86_64-linux-gnu/bits/environments.h:
/usr/include/x86_64-linux-gnu/bits/confname.h:
/usr/include/getopt.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdbool.h:
/usr/include/inttypes.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h:
/usr/include/stdint.h:
/usr/include/x86_64-linux-gnu/bits/wchar.h:
/usr/include/syslog.h:
/usr/include/x86_64-linux-gnu/sys/syslog.h:
/usr/include/x86_64-linux-gnu/bits/syslog-path.h:
/usr/include/x86_64-linux-gnu/sys/time.h:
/usr/include/x86_64-linux-gnu/bits/timex.h:
/usr/include/x86_64-linux-gnu/sys/stat.h:
/usr/include/x86_64-linux-gnu/sys/file.h:
/usr/include/x86_64-linux-gnu/sys/wait.h:
/usr/include/x86_64-linux-gnu/sys/ioctl.h:
/usr/include/x86_64-linux-gnu/bits/ioctls.h:
/usr/include/x86_64-linux-gnu/asm/ioctls.h:
/usr/include/asm-generic/ioctls.h:
/usr/include/linux/ioctl.h:
/usr/include/x86_64-linux-gnu/asm/ioctl.h:
/usr/include/asm-generic/ioctl.h:
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h:
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h:
/usr/include/x86_64-linux-gnu/sys/param.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h:
/usr/include/limits.h:
/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
/usr/include/x86_64-linux-gnu/bits/local_lim.h:
/usr/include/linux/limits.h:
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h:
/usr/include/x86_64-linux-gnu/bits/param.h:
/usr/include/linux/param.h:
/usr/include/x86_64-linux-gnu/asm/param.h:
/usr/include/asm-generic/param.h:
/usr/include/x86_64-linux-gnu/sys/resource.h:
/usr/include/x86_64-linux-gnu/bits/resource.h:
/usr/include/x86_64-linux-gnu/sys/uio.h:
/usr/include/x86_64-linux-gnu/sys/un.h:
/usr/include/x86_64-linux-gnu/bits/sockaddr.h:
/usr/include/dirent.h:
/usr/include/x86_64-linux-gnu/bits/dirent.h:
/usr/include/netdb.h:
/usr/include/netinet/in.h:
/usr/include/x86_64-linux-gnu/sys/socket.h:
/usr/include/x86_64-linux-gnu/bits/socket.h:
/usr/include/x86_64-linux-gnu/bits/socket_type.h:
/usr/include/x86_64-linux-gnu/asm/socket.h:
/usr/include/asm-generic/socket.h:
/usr/include/x86_64-linux-gnu/asm/sockios.h:
/usr/include/asm-generic/sockios.h:
/usr/include/x86_64-linux-gnu/bits/in.h:
/usr/include/rpc/netdb.h:
/usr/include/x86_64-linux-gnu/bits/netdb.h:
/usr/include/net/if.h:
/usr/include/netinet/in_systm.h:
/usr/include/arpa/inet.h:
/usr/include/netinet/ip.h:
/usr/include/netinet/tcp.h:
/usr/include/netinet/ip6.h:
/usr/include/net/ethernet.h:
/usr/include/linux/if_ether.h:
/usr/include/linux/types.h:
/usr/include/x86_64-linux-gnu/asm/types.h:
/usr/include/asm-generic/types.h:
/usr/include/asm-generic/int-ll64.h:
/usr/include/x86_64-linux-gnu/asm/bitsperlong.h:
/usr/include/asm-generic/bitsperlong.h:
/usr/include/linux/posix_types.h:
/usr/include/linux/stddef.h:
/usr/include/x86_64-linux-gnu/asm/posix_types.h:
/usr/include/x86_64-linux-gnu/asm/posix_types_64.h:
/usr/include/asm-generic/posix_types.h:
/usr/include/net/if_arp.h:
/usr/include/netinet/ip_icmp.h:
/usr/include/netinet/icmp6.h:
/usr/include/netinet/if_ether.h:
openssl/../dropin.h:
openssl/../fake-getaddrinfo.h:
openssl/../fake-gai-errnos.h:
openssl/../fake-getnameinfo.h:
/usr/include/openssl/pem.h:
/usr/include/openssl/e_os2.h:
/usr/include/x86_64-linux-gnu/openssl/opensslconf.h:
/usr/include/openssl/bio.h:
/usr/include/openssl/crypto.h:
/usr/include/openssl/stack.h:
/usr/include/openssl/safestack.h:
/usr/include/openssl/opensslv.h:
/usr/include/openssl/ossl_typ.h:
/usr/include/openssl/symhacks.h:
/usr/include/openssl/evp.h:
/usr/include/openssl/objects.h:
/usr/include/openssl/obj_mac.h:
/usr/include/openssl/asn1.h:
/usr/include/openssl/bn.h:
/usr/include/openssl/x509.h:
/usr/include/openssl/buffer.h:
/usr/include/openssl/ec.h:
/usr/include/openssl/ecdsa.h:
/usr/include/openssl/ecdh.h:
/usr/include/openssl/rsa.h:
/usr/include/openssl/dsa.h:
/usr/include/openssl/dh.h:
/usr/include/openssl/sha.h:
/usr/include/openssl/x509_vfy.h:
/usr/include/openssl/lhash.h:
/usr/include/openssl/pkcs7.h:
/usr/include/openssl/pem2.h:
/usr/include/openssl/err.h:
openssl/../logger.h:
openssl/../rsagen.h:
openssl/../rsa.h:

0
src/openssl/.dirstamp Normal file
View file

View file

@ -1,6 +1,6 @@
/*
cipher.c -- Symmetric block cipher handling
Copyright (C) 2007-2012 Guus Sliepen <guus@tinc-vpn.org>
Copyright (C) 2007-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -17,59 +17,73 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "system.h"
#include "../system.h"
#include <openssl/rand.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include "cipher.h"
#include "logger.h"
#include "xalloc.h"
#include "../cipher.h"
#include "../logger.h"
#include "../xalloc.h"
struct cipher {
EVP_CIPHER_CTX ctx;
const EVP_CIPHER *cipher;
struct cipher_counter *counter;
};
typedef struct cipher_counter {
unsigned char counter[EVP_MAX_IV_LENGTH];
unsigned char block[EVP_MAX_IV_LENGTH];
unsigned char counter[CIPHER_MAX_IV_SIZE];
unsigned char block[CIPHER_MAX_IV_SIZE];
int n;
} cipher_counter_t;
static bool cipher_open(cipher_t *cipher) {
static cipher_t *cipher_open(const EVP_CIPHER *evp_cipher) {
cipher_t *cipher = xzalloc(sizeof *cipher);
cipher->cipher = evp_cipher;
EVP_CIPHER_CTX_init(&cipher->ctx);
return true;
return cipher;
}
bool cipher_open_by_name(cipher_t *cipher, const char *name) {
cipher->cipher = EVP_get_cipherbyname(name);
cipher_t *cipher_open_by_name(const char *name) {
const EVP_CIPHER *evp_cipher = EVP_get_cipherbyname(name);
if(!evp_cipher) {
logger(DEBUG_ALWAYS, LOG_ERR, "Unknown cipher name '%s'!", name);
return NULL;
}
if(cipher->cipher)
return cipher_open(cipher);
logger(DEBUG_ALWAYS, LOG_ERR, "Unknown cipher name '%s'!", name);
return false;
return cipher_open(evp_cipher);
}
bool cipher_open_by_nid(cipher_t *cipher, int nid) {
cipher->cipher = EVP_get_cipherbynid(nid);
cipher_t *cipher_open_by_nid(int nid) {
const EVP_CIPHER *evp_cipher = EVP_get_cipherbynid(nid);
if(!evp_cipher) {
logger(DEBUG_ALWAYS, LOG_ERR, "Unknown cipher nid %d!", nid);
return NULL;
}
if(cipher->cipher)
return cipher_open(cipher);
logger(DEBUG_ALWAYS, LOG_ERR, "Unknown cipher nid %d!", nid);
return false;
return cipher_open(evp_cipher);
}
bool cipher_open_blowfish_ofb(cipher_t *cipher) {
cipher->cipher = EVP_bf_ofb();
return cipher_open(cipher);
cipher_t *cipher_open_blowfish_ofb(void) {
return cipher_open(EVP_bf_ofb());
}
void cipher_close(cipher_t *cipher) {
if(!cipher)
return;
EVP_CIPHER_CTX_cleanup(&cipher->ctx);
free(cipher->counter);
cipher->counter = NULL;
free(cipher);
}
size_t cipher_keylength(const cipher_t *cipher) {
if(!cipher || !cipher->cipher)
return 0;
return cipher->cipher->key_len + cipher->cipher->block_size;
}
@ -124,7 +138,7 @@ bool cipher_set_counter_key(cipher_t *cipher, void *key) {
}
if(!cipher->counter)
cipher->counter = xmalloc_and_zero(sizeof *cipher->counter);
cipher->counter = xzalloc(sizeof *cipher->counter);
else
cipher->counter->n = 0;
@ -210,9 +224,12 @@ bool cipher_decrypt(cipher_t *cipher, const void *indata, size_t inlen, void *ou
}
int cipher_get_nid(const cipher_t *cipher) {
return cipher->cipher ? cipher->cipher->nid : 0;
if(!cipher || !cipher->cipher)
return 0;
return cipher->cipher->nid;
}
bool cipher_active(const cipher_t *cipher) {
return cipher->cipher && cipher->cipher->nid != 0;
return cipher && cipher->cipher && cipher->cipher->nid != 0;
}

BIN
src/openssl/cipher.o Normal file

Binary file not shown.

View file

@ -1,6 +1,6 @@
/*
crypto.c -- Cryptographic miscellaneous functions and initialisation
Copyright (C) 2007 Guus Sliepen <guus@tinc-vpn.org>
Copyright (C) 2007-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -17,13 +17,13 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "system.h"
#include "../system.h"
#include <openssl/rand.h>
#include <openssl/evp.h>
#include <openssl/engine.h>
#include "crypto.h"
#include "../crypto.h"
void crypto_init(void) {
RAND_load_file("/dev/urandom", 1024);
@ -31,7 +31,13 @@ void crypto_init(void) {
ENGINE_load_builtin_engines();
ENGINE_register_all_complete();
ERR_load_crypto_strings();
OpenSSL_add_all_algorithms();
if(!RAND_status()) {
fprintf(stderr, "Not enough entropy for the PRNG!\n");
abort();
}
}
void crypto_exit(void) {

BIN
src/openssl/crypto.o Normal file

Binary file not shown.

View file

@ -1,6 +1,6 @@
/*
digest.c -- Digest handling
Copyright (C) 2007-2012 Guus Sliepen <guus@tinc-vpn.org>
Copyright (C) 2007-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -17,57 +17,55 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "system.h"
#include "utils.h"
#include "xalloc.h"
#include "../system.h"
#include "../utils.h"
#include "../xalloc.h"
#include <openssl/err.h>
#include <openssl/hmac.h>
#include "digest.h"
#include "logger.h"
#include "../digest.h"
#include "../logger.h"
static digest_t *digest_open(const EVP_MD *evp_md, int maclength) {
digest_t *digest = xzalloc(sizeof *digest);
digest->digest = evp_md;
static void set_maclength(digest_t *digest, int maclength) {
int digestlen = EVP_MD_size(digest->digest);
if(maclength > digestlen || maclength < 0)
digest->maclength = digestlen;
else
digest->maclength = maclength;
return digest;
}
bool digest_open_by_name(digest_t *digest, const char *name, int maclength) {
digest->digest = EVP_get_digestbyname(name);
digest->key = NULL;
digest_t *digest_open_by_name(const char *name, int maclength) {
const EVP_MD *evp_md = EVP_get_digestbyname(name);
if(!digest->digest) {
if(!evp_md) {
logger(DEBUG_ALWAYS, LOG_DEBUG, "Unknown digest name '%s'!", name);
return false;
}
set_maclength(digest, maclength);
return true;
return digest_open(evp_md, maclength);
}
bool digest_open_by_nid(digest_t *digest, int nid, int maclength) {
digest->digest = EVP_get_digestbynid(nid);
digest->key = NULL;
digest_t *digest_open_by_nid(int nid, int maclength) {
const EVP_MD *evp_md = EVP_get_digestbynid(nid);
if(!digest->digest) {
if(!evp_md) {
logger(DEBUG_ALWAYS, LOG_DEBUG, "Unknown digest nid %d!", nid);
return false;
}
set_maclength(digest, maclength);
return true;
return digest_open(evp_md, maclength);
}
bool digest_open_sha1(digest_t *digest, int maclength) {
digest->digest = EVP_sha1();
digest->key = NULL;
set_maclength(digest, maclength);
return true;
digest_t *digest_open_sha1(int maclength) {
return digest_open(EVP_sha1(), maclength);
}
bool digest_set_key(digest_t *digest, const void *key, size_t len) {
@ -78,8 +76,11 @@ bool digest_set_key(digest_t *digest, const void *key, size_t len) {
}
void digest_close(digest_t *digest) {
if(!digest)
return;
free(digest->key);
digest->key = NULL;
free(digest);
}
bool digest_create(digest_t *digest, const void *indata, size_t inlen, void *outdata) {
@ -87,7 +88,10 @@ bool digest_create(digest_t *digest, const void *indata, size_t inlen, void *out
unsigned char tmpdata[len];
if(digest->key) {
HMAC(digest->digest, digest->key, digest->keylength, indata, inlen, tmpdata, NULL);
if(!HMAC(digest->digest, digest->key, digest->keylength, indata, inlen, tmpdata, NULL)) {
logger(DEBUG_ALWAYS, LOG_DEBUG, "Error creating digest: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
} else {
EVP_MD_CTX ctx;
@ -111,17 +115,26 @@ bool digest_verify(digest_t *digest, const void *indata, size_t inlen, const voi
}
int digest_get_nid(const digest_t *digest) {
return digest->digest ? digest->digest->type : 0;
if(!digest || !digest->digest)
return 0;
return digest->digest->type;
}
size_t digest_keylength(const digest_t *digest) {
if(!digest || !digest->digest)
return 0;
return digest->digest->md_size;
}
size_t digest_length(const digest_t *digest) {
if(!digest)
return 0;
return digest->maclength;
}
bool digest_active(const digest_t *digest) {
return digest->digest && digest->digest->type != 0;
return digest && digest->digest && digest->digest->type != 0;
}

View file

@ -1,6 +1,6 @@
/*
digest.h -- header file digest.c
Copyright (C) 2007-2011 Guus Sliepen <guus@tinc-vpn.org>
Copyright (C) 2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -17,30 +17,16 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __TINC_DIGEST_H__
#define __TINC_DIGEST_H__
#ifndef __TINC_OPENSSL_DIGEST_H__
#define __TINC_OPENSSL_DIGEST_H__
#include <openssl/evp.h>
#define DIGEST_MAX_SIZE EVP_MAX_MD_SIZE
typedef struct digest {
struct digest {
const EVP_MD *digest;
int maclength;
int keylength;
char *key;
} digest_t;
extern bool digest_open_by_name(struct digest *, const char *name, int maclength);
extern bool digest_open_by_nid(struct digest *, int nid, int maclength);
extern bool digest_open_sha1(struct digest *, int maclength);
extern void digest_close(struct digest *);
extern bool digest_create(struct digest *, const void *indata, size_t inlen, void *outdata);
extern bool digest_verify(struct digest *, const void *indata, size_t inlen, const void *digestdata);
extern bool digest_set_key(struct digest *, const void *key, size_t len);
extern int digest_get_nid(const struct digest *);
extern size_t digest_keylength(const struct digest *);
extern size_t digest_length(const struct digest *);
extern bool digest_active(const struct digest *);
};
#endif

BIN
src/openssl/digest.o Normal file

Binary file not shown.

View file

@ -1,6 +1,6 @@
/*
ecdh.c -- Diffie-Hellman key exchange handling
Copyright (C) 2011-2012 Guus Sliepen <guus@tinc-vpn.org>
Copyright (C) 2011-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -17,68 +17,70 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "system.h"
#include "utils.h"
#include "xalloc.h"
#include "../system.h"
#include <openssl/err.h>
#include <openssl/ec.h>
#include <openssl/ecdh.h>
#include <openssl/obj_mac.h>
#include "ecdh.h"
#include "logger.h"
#define __TINC_ECDH_INTERNAL__
typedef EC_KEY ecdh_t;
bool ecdh_generate_public(ecdh_t *ecdh, void *pubkey) {
*ecdh = EC_KEY_new_by_curve_name(NID_secp521r1);
if(!*ecdh) {
#include "../ecdh.h"
#include "../logger.h"
#include "../utils.h"
#include "../xalloc.h"
ecdh_t *ecdh_generate_public(void *pubkey) {
ecdh_t *ecdh = EC_KEY_new_by_curve_name(NID_secp521r1);
if(!ecdh) {
logger(DEBUG_ALWAYS, LOG_ERR, "Generating EC key_by_curve_name failed: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
if(!EC_KEY_generate_key(*ecdh)) {
EC_KEY_free(*ecdh);
*ecdh = NULL;
if(!EC_KEY_generate_key(ecdh)) {
EC_KEY_free(ecdh);
logger(DEBUG_ALWAYS, LOG_ERR, "Generating EC key failed: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
return NULL;
}
const EC_POINT *point = EC_KEY_get0_public_key(*ecdh);
const EC_POINT *point = EC_KEY_get0_public_key(ecdh);
if(!point) {
EC_KEY_free(*ecdh);
*ecdh = NULL;
EC_KEY_free(ecdh);
logger(DEBUG_ALWAYS, LOG_ERR, "Getting public key failed: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
return NULL;
}
size_t result = EC_POINT_point2oct(EC_KEY_get0_group(*ecdh), point, POINT_CONVERSION_COMPRESSED, pubkey, ECDH_SIZE, NULL);
size_t result = EC_POINT_point2oct(EC_KEY_get0_group(ecdh), point, POINT_CONVERSION_COMPRESSED, pubkey, ECDH_SIZE, NULL);
if(!result) {
EC_KEY_free(*ecdh);
*ecdh = NULL;
EC_KEY_free(ecdh);
logger(DEBUG_ALWAYS, LOG_ERR, "Converting EC_POINT to binary failed: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
return NULL;
}
return true;
return ecdh;
}
bool ecdh_compute_shared(ecdh_t *ecdh, const void *pubkey, void *shared) {
EC_POINT *point = EC_POINT_new(EC_KEY_get0_group(*ecdh));
EC_POINT *point = EC_POINT_new(EC_KEY_get0_group(ecdh));
if(!point) {
logger(DEBUG_ALWAYS, LOG_ERR, "EC_POINT_new() failed: %s", ERR_error_string(ERR_get_error(), NULL));
EC_KEY_free(ecdh);
return false;
}
int result = EC_POINT_oct2point(EC_KEY_get0_group(*ecdh), point, pubkey, ECDH_SIZE, NULL);
int result = EC_POINT_oct2point(EC_KEY_get0_group(ecdh), point, pubkey, ECDH_SIZE, NULL);
if(!result) {
EC_POINT_free(point);
EC_KEY_free(ecdh);
logger(DEBUG_ALWAYS, LOG_ERR, "Converting binary to EC_POINT failed: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
result = ECDH_compute_key(shared, ECDH_SIZE, point, *ecdh, NULL);
result = ECDH_compute_key(shared, ECDH_SIZE, point, ecdh, NULL);
EC_POINT_free(point);
EC_KEY_free(*ecdh);
*ecdh = NULL;
EC_KEY_free(ecdh);
if(!result) {
logger(DEBUG_ALWAYS, LOG_ERR, "Computing Elliptic Curve Diffie-Hellman shared key failed: %s", ERR_error_string(ERR_get_error(), NULL));
@ -89,8 +91,6 @@ bool ecdh_compute_shared(ecdh_t *ecdh, const void *pubkey, void *shared) {
}
void ecdh_free(ecdh_t *ecdh) {
if(*ecdh) {
EC_KEY_free(*ecdh);
*ecdh = NULL;
}
if(ecdh)
EC_KEY_free(ecdh);
}

BIN
src/openssl/ecdh.o Normal file

Binary file not shown.

View file

@ -1,6 +1,6 @@
/*
ecdsa.c -- ECDSA key handling
Copyright (C) 2011-2012 Guus Sliepen <guus@tinc-vpn.org>
Copyright (C) 2011-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -17,22 +17,26 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "system.h"
#include "../system.h"
#include <openssl/pem.h>
#include <openssl/err.h>
#include "logger.h"
#include "ecdsa.h"
#include "utils.h"
#define __TINC_ECDSA_INTERNAL__
typedef EC_KEY ecdsa_t;
#include "../logger.h"
#include "../ecdsa.h"
#include "../utils.h"
#include "../xalloc.h"
// Get and set ECDSA keys
//
bool ecdsa_set_base64_public_key(ecdsa_t *ecdsa, const char *p) {
*ecdsa = EC_KEY_new_by_curve_name(NID_secp521r1);
if(!*ecdsa) {
ecdsa_t *ecdsa_set_base64_public_key(const char *p) {
ecdsa_t *ecdsa = EC_KEY_new_by_curve_name(NID_secp521r1);
if(!ecdsa) {
logger(DEBUG_ALWAYS, LOG_DEBUG, "EC_KEY_new_by_curve_name failed: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
return NULL;
}
int len = strlen(p);
@ -40,19 +44,20 @@ bool ecdsa_set_base64_public_key(ecdsa_t *ecdsa, const char *p) {
const unsigned char *ppubkey = pubkey;
len = b64decode(p, (char *)pubkey, len);
if(!o2i_ECPublicKey(ecdsa, &ppubkey, len)) {
if(!o2i_ECPublicKey(&ecdsa, &ppubkey, len)) {
logger(DEBUG_ALWAYS, LOG_DEBUG, "o2i_ECPublicKey failed: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
EC_KEY_free(ecdsa);
return NULL;
}
return true;
return ecdsa;
}
char *ecdsa_get_base64_public_key(ecdsa_t *ecdsa) {
unsigned char *pubkey = NULL;
int len = i2o_ECPublicKey(*ecdsa, &pubkey);
int len = i2o_ECPublicKey(ecdsa, &pubkey);
char *base64 = malloc(len * 4 / 3 + 5);
char *base64 = xmalloc(len * 4 / 3 + 5);
b64encode((char *)pubkey, base64, len);
free(pubkey);
@ -62,41 +67,39 @@ char *ecdsa_get_base64_public_key(ecdsa_t *ecdsa) {
// Read PEM ECDSA keys
bool ecdsa_read_pem_public_key(ecdsa_t *ecdsa, FILE *fp) {
*ecdsa = PEM_read_EC_PUBKEY(fp, ecdsa, NULL, NULL);
ecdsa_t *ecdsa_read_pem_public_key(FILE *fp) {
ecdsa_t *ecdsa = PEM_read_EC_PUBKEY(fp, NULL, NULL, NULL);
if(*ecdsa)
return true;
if(!ecdsa)
logger(DEBUG_ALWAYS, LOG_ERR, "Unable to read ECDSA public key: %s", ERR_error_string(ERR_get_error(), NULL));
logger(DEBUG_ALWAYS, LOG_ERR, "Unable to read ECDSA public key: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
return ecdsa;
}
bool ecdsa_read_pem_private_key(ecdsa_t *ecdsa, FILE *fp) {
*ecdsa = PEM_read_ECPrivateKey(fp, NULL, NULL, NULL);
ecdsa_t *ecdsa_read_pem_private_key(FILE *fp) {
ecdsa_t *ecdsa = PEM_read_ECPrivateKey(fp, NULL, NULL, NULL);
if(*ecdsa)
return true;
if(!ecdsa)
logger(DEBUG_ALWAYS, LOG_ERR, "Unable to read ECDSA private key: %s", ERR_error_string(ERR_get_error(), NULL));
logger(DEBUG_ALWAYS, LOG_ERR, "Unable to read ECDSA private key: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
return ecdsa;
}
size_t ecdsa_size(ecdsa_t *ecdsa) {
return ECDSA_size(*ecdsa);
return ECDSA_size(ecdsa);
}
// TODO: standardise output format?
bool ecdsa_sign(ecdsa_t *ecdsa, const void *in, size_t len, void *sig) {
unsigned int siglen = ECDSA_size(*ecdsa);
unsigned int siglen = ECDSA_size(ecdsa);
unsigned char hash[SHA512_DIGEST_LENGTH];
SHA512(in, len, hash);
memset(sig, 0, siglen);
if(!ECDSA_sign(0, hash, sizeof hash, sig, &siglen, *ecdsa)) {
if(!ECDSA_sign(0, hash, sizeof hash, sig, &siglen, ecdsa)) {
logger(DEBUG_ALWAYS, LOG_DEBUG, "ECDSA_sign() failed: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
@ -105,12 +108,12 @@ bool ecdsa_sign(ecdsa_t *ecdsa, const void *in, size_t len, void *sig) {
}
bool ecdsa_verify(ecdsa_t *ecdsa, const void *in, size_t len, const void *sig) {
unsigned int siglen = ECDSA_size(*ecdsa);
unsigned int siglen = ECDSA_size(ecdsa);
unsigned char hash[SHA512_DIGEST_LENGTH];
SHA512(in, len, hash);
if(!ECDSA_verify(0, hash, sizeof hash, sig, siglen, *ecdsa)) {
if(!ECDSA_verify(0, hash, sizeof hash, sig, siglen, ecdsa)) {
logger(DEBUG_ALWAYS, LOG_DEBUG, "ECDSA_verify() failed: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
@ -119,12 +122,10 @@ bool ecdsa_verify(ecdsa_t *ecdsa, const void *in, size_t len, const void *sig) {
}
bool ecdsa_active(ecdsa_t *ecdsa) {
return *ecdsa;
return ecdsa;
}
void ecdsa_free(ecdsa_t *ecdsa) {
if(*ecdsa) {
EC_KEY_free(*ecdsa);
*ecdsa = NULL;
}
if(ecdsa)
EC_KEY_free(ecdsa);
}

BIN
src/openssl/ecdsa.o Normal file

Binary file not shown.

View file

@ -1,6 +1,6 @@
/*
ecdsagen.c -- ECDSA key generation and export
Copyright (C) 2011 Guus Sliepen <guus@tinc-vpn.org>
Copyright (C) 2011-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -17,59 +17,54 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "system.h"
#include "../system.h"
#include <openssl/pem.h>
#include <openssl/err.h>
#include <openssl/obj_mac.h>
#include "ecdsagen.h"
#include "utils.h"
#define __TINC_ECDSA_INTERNAL__
typedef EC_KEY ecdsa_t;
#include "../ecdsagen.h"
#include "../utils.h"
#include "../xalloc.h"
// Generate ECDSA key
bool ecdsa_generate(ecdsa_t *ecdsa) {
*ecdsa = EC_KEY_new_by_curve_name(NID_secp521r1);
ecdsa_t *ecdsa_generate(void) {
ecdsa_t *ecdsa = EC_KEY_new_by_curve_name(NID_secp521r1);
if(!EC_KEY_generate_key(*ecdsa)) {
if(!ecdsa || !EC_KEY_generate_key(ecdsa)) {
fprintf(stderr, "Generating EC key failed: %s", ERR_error_string(ERR_get_error(), NULL));
ecdsa_free(ecdsa);
return false;
}
EC_KEY_set_asn1_flag(*ecdsa, OPENSSL_EC_NAMED_CURVE);
EC_KEY_set_conv_form(*ecdsa, POINT_CONVERSION_COMPRESSED);
EC_KEY_set_asn1_flag(ecdsa, OPENSSL_EC_NAMED_CURVE);
EC_KEY_set_conv_form(ecdsa, POINT_CONVERSION_COMPRESSED);
return true;
return ecdsa;
}
// Write PEM ECDSA keys
bool ecdsa_write_pem_public_key(ecdsa_t *ecdsa, FILE *fp) {
BIO *out = BIO_new(BIO_s_file());
BIO_set_fp(out,fp,BIO_NOCLOSE);
PEM_write_bio_EC_PUBKEY(out, *ecdsa);
if(!out)
return false;
BIO_set_fp(out, fp, BIO_NOCLOSE);
bool result = PEM_write_bio_EC_PUBKEY(out, ecdsa);
BIO_free(out);
return true;
return result;
}
bool ecdsa_write_pem_private_key(ecdsa_t *ecdsa, FILE *fp) {
BIO *out = BIO_new(BIO_s_file());
BIO_set_fp(out,fp,BIO_NOCLOSE);
PEM_write_bio_ECPrivateKey(out, *ecdsa, NULL, NULL, 0, NULL, NULL);
if(!out)
return false;
BIO_set_fp(out, fp, BIO_NOCLOSE);
bool result = PEM_write_bio_ECPrivateKey(out, ecdsa, NULL, NULL, 0, NULL, NULL);
BIO_free(out);
return true;
}
// Convert ECDSA public key to base64 format
char *ecdsa_get_base64_public_key(ecdsa_t *ecdsa) {
unsigned char *pubkey = NULL;
int len = i2o_ECPublicKey(*ecdsa, &pubkey);
char *base64 = malloc(len * 4 / 3 + 5);
b64encode((char *)pubkey, base64, len);
free(pubkey);
return base64;
return result;
}

BIN
src/openssl/ecdsagen.o Normal file

Binary file not shown.

View file

@ -1,6 +1,6 @@
/*
prf.c -- Pseudo-Random Function for key material generation
Copyright (C) 2011-2012 Guus Sliepen <guus@tinc-vpn.org>
Copyright (C) 2011-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -17,27 +17,30 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "system.h"
#include "../system.h"
#include <openssl/obj_mac.h>
#include "digest.h"
#include "prf.h"
#include "../digest.h"
#include "../prf.h"
/* Generate key material from a master secret and a seed, based on RFC 4346 section 5.
We use SHA512 instead of MD5 and SHA1.
*/
static bool prf_xor(int nid, const char *secret, size_t secretlen, char *seed, size_t seedlen, char *out, ssize_t outlen) {
digest_t digest;
digest_t *digest = digest_open_by_nid(nid, -1);
if(!digest_open_by_nid(&digest, nid, -1))
if(!digest)
return false;
if(!digest_set_key(&digest, secret, secretlen))
if(!digest_set_key(digest, secret, secretlen)) {
digest_close(digest);
return false;
}
size_t len = digest_length(&digest);
size_t len = digest_length(digest);
/* Data is what the "inner" HMAC function processes.
It consists of the previous HMAC result plus the seed.
@ -51,10 +54,16 @@ static bool prf_xor(int nid, const char *secret, size_t secretlen, char *seed, s
while(outlen > 0) {
/* Inner HMAC */
digest_create(&digest, data, len + seedlen, data);
if(!digest_create(digest, data, len + seedlen, data)) {
digest_close(digest);
return false;
}
/* Outer HMAC */
digest_create(&digest, data, len + seedlen, hash);
if(!digest_create(digest, data, len + seedlen, hash)) {
digest_close(digest);
return false;
}
/* XOR the results of the outer HMAC into the out buffer */
for(int i = 0; i < len && i < outlen; i++)
@ -63,7 +72,7 @@ static bool prf_xor(int nid, const char *secret, size_t secretlen, char *seed, s
outlen -= len;
}
digest_close(&digest);
digest_close(digest);
return true;
}

BIN
src/openssl/prf.o Normal file

Binary file not shown.

View file

@ -1,6 +1,6 @@
/*
rsa.c -- RSA key handling
Copyright (C) 2007-2012 Guus Sliepen <guus@tinc-vpn.org>
Copyright (C) 2007-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -17,69 +17,74 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "system.h"
#include "../system.h"
#include <openssl/pem.h>
#include <openssl/err.h>
#include "logger.h"
#include "rsa.h"
#define __TINC_RSA_INTERNAL__
typedef RSA rsa_t;
#include "../logger.h"
#include "../rsa.h"
// Set RSA keys
bool rsa_set_hex_public_key(rsa_t *rsa, char *n, char *e) {
*rsa = RSA_new();
if(BN_hex2bn(&(*rsa)->n, n) != strlen(n))
rsa_t *rsa_set_hex_public_key(char *n, char *e) {
rsa_t *rsa = RSA_new();
if(!rsa)
return NULL;
if(BN_hex2bn(&rsa->n, n) != strlen(n) || BN_hex2bn(&rsa->e, e) != strlen(e)) {
RSA_free(rsa);
return false;
if(BN_hex2bn(&(*rsa)->e, e) != strlen(e))
return false;
return true;
}
return rsa;
}
bool rsa_set_hex_private_key(rsa_t *rsa, char *n, char *e, char *d) {
*rsa = RSA_new();
if(BN_hex2bn(&(*rsa)->n, n) != strlen(n))
rsa_t *rsa_set_hex_private_key(char *n, char *e, char *d) {
rsa_t *rsa = RSA_new();
if(!rsa)
return NULL;
if(BN_hex2bn(&rsa->n, n) != strlen(n) || BN_hex2bn(&rsa->e, e) != strlen(e) || BN_hex2bn(&rsa->d, d) != strlen(d)) {
RSA_free(rsa);
return false;
if(BN_hex2bn(&(*rsa)->e, e) != strlen(e))
return false;
if(BN_hex2bn(&(*rsa)->d, d) != strlen(d))
return false;
return true;
}
return rsa;
}
// Read PEM RSA keys
bool rsa_read_pem_public_key(rsa_t *rsa, FILE *fp) {
*rsa = PEM_read_RSAPublicKey(fp, rsa, NULL, NULL);
rsa_t *rsa_read_pem_public_key(FILE *fp) {
rsa_t *rsa = PEM_read_RSAPublicKey(fp, NULL, NULL, NULL);
if(*rsa)
return true;
if(!rsa)
rsa = PEM_read_RSA_PUBKEY(fp, NULL, NULL, NULL);
*rsa = PEM_read_RSA_PUBKEY(fp, rsa, NULL, NULL);
if(!rsa)
logger(DEBUG_ALWAYS, LOG_ERR, "Unable to read RSA public key: %s", ERR_error_string(ERR_get_error(), NULL));
if(*rsa)
return true;
logger(DEBUG_ALWAYS, LOG_ERR, "Unable to read RSA public key: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
return rsa;
}
bool rsa_read_pem_private_key(rsa_t *rsa, FILE *fp) {
*rsa = PEM_read_RSAPrivateKey(fp, NULL, NULL, NULL);
rsa_t *rsa_read_pem_private_key(FILE *fp) {
rsa_t *rsa = PEM_read_RSAPrivateKey(fp, NULL, NULL, NULL);
if(*rsa)
return true;
if(!rsa)
logger(DEBUG_ALWAYS, LOG_ERR, "Unable to read RSA private key: %s", ERR_error_string(ERR_get_error(), NULL));
logger(DEBUG_ALWAYS, LOG_ERR, "Unable to read RSA private key: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
return rsa;
}
size_t rsa_size(rsa_t *rsa) {
return RSA_size(*rsa);
return RSA_size(rsa);
}
bool rsa_public_encrypt(rsa_t *rsa, void *in, size_t len, void *out) {
if(RSA_public_encrypt(len, in, out, *rsa, RSA_NO_PADDING) == len)
if(RSA_public_encrypt(len, in, out, rsa, RSA_NO_PADDING) == len)
return true;
logger(DEBUG_ALWAYS, LOG_ERR, "Unable to perform RSA encryption: %s", ERR_error_string(ERR_get_error(), NULL));
@ -87,7 +92,7 @@ bool rsa_public_encrypt(rsa_t *rsa, void *in, size_t len, void *out) {
}
bool rsa_private_decrypt(rsa_t *rsa, void *in, size_t len, void *out) {
if(RSA_private_decrypt(len, in, out, *rsa, RSA_NO_PADDING) == len)
if(RSA_private_decrypt(len, in, out, rsa, RSA_NO_PADDING) == len)
return true;
logger(DEBUG_ALWAYS, LOG_ERR, "Unable to perform RSA decryption: %s", ERR_error_string(ERR_get_error(), NULL));
@ -95,12 +100,10 @@ bool rsa_private_decrypt(rsa_t *rsa, void *in, size_t len, void *out) {
}
bool rsa_active(rsa_t *rsa) {
return *rsa;
return rsa;
}
void rsa_free(rsa_t *rsa) {
if(*rsa) {
RSA_free(*rsa);
*rsa = NULL;
}
if(rsa)
RSA_free(rsa);
}

BIN
src/openssl/rsa.o Normal file

Binary file not shown.

View file

@ -1,6 +1,6 @@
/*
rsagen.c -- RSA key generation and export
Copyright (C) 2008 Guus Sliepen <guus@tinc-vpn.org>
Copyright (C) 2008-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -17,13 +17,16 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "system.h"
#include "../system.h"
#include <openssl/pem.h>
#include <openssl/err.h>
#include "logger.h"
#include "rsagen.h"
#define __TINC_RSA_INTERNAL__
typedef RSA rsa_t;
#include "../logger.h"
#include "../rsagen.h"
/* This function prettyprints the key generation process */
@ -63,21 +66,16 @@ static void indicator(int a, int b, void *p) {
// Generate RSA key
bool rsa_generate(rsa_t *rsa, size_t bits, unsigned long exponent) {
*rsa = RSA_generate_key(bits, exponent, indicator, NULL);
return *rsa;
rsa_t *rsa_generate(size_t bits, unsigned long exponent) {
return RSA_generate_key(bits, exponent, indicator, NULL);
}
// Write PEM RSA keys
bool rsa_write_pem_public_key(rsa_t *rsa, FILE *fp) {
PEM_write_RSAPublicKey(fp, *rsa);
return true;
return PEM_write_RSAPublicKey(fp, rsa);
}
bool rsa_write_pem_private_key(rsa_t *rsa, FILE *fp) {
PEM_write_RSAPrivateKey(fp, *rsa, NULL, NULL, 0, NULL, NULL);
return true;
return PEM_write_RSAPrivateKey(fp, rsa, NULL, NULL, 0, NULL, NULL);
}

BIN
src/openssl/rsagen.o Normal file

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more