diff options
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | apps/nc/CMakeLists.txt | 4 | ||||
-rw-r--r-- | apps/ocspcheck/CMakeLists.txt | 5 | ||||
-rw-r--r-- | apps/openssl/CMakeLists.txt | 4 | ||||
-rw-r--r-- | crypto/CMakeLists.txt | 4 | ||||
-rw-r--r-- | include/CMakeLists.txt | 4 | ||||
-rw-r--r-- | man/CMakeLists.txt | 4 | ||||
-rw-r--r-- | patches/netcat.c.patch | 38 | ||||
-rw-r--r-- | ssl/CMakeLists.txt | 4 | ||||
-rw-r--r-- | tests/tlstest.bat | 2 | ||||
-rw-r--r-- | tls/CMakeLists.txt | 4 |
11 files changed, 38 insertions, 36 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index bfd1363..959edb7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -6,6 +6,7 @@ include(CheckTypeSize) | |||
6 | 6 | ||
7 | set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" ${CMAKE_MODULE_PATH}) | 7 | set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" ${CMAKE_MODULE_PATH}) |
8 | include(cmake_export_symbol) | 8 | include(cmake_export_symbol) |
9 | include(GNUInstallDirs) | ||
9 | 10 | ||
10 | project (LibreSSL C) | 11 | project (LibreSSL C) |
11 | 12 | ||
diff --git a/apps/nc/CMakeLists.txt b/apps/nc/CMakeLists.txt index 424c676..64d14fa 100644 --- a/apps/nc/CMakeLists.txt +++ b/apps/nc/CMakeLists.txt | |||
@@ -54,8 +54,8 @@ target_link_libraries(nc tls ${OPENSSL_LIBS}) | |||
54 | 54 | ||
55 | if(ENABLE_NC) | 55 | if(ENABLE_NC) |
56 | if(ENABLE_LIBRESSL_INSTALL) | 56 | if(ENABLE_LIBRESSL_INSTALL) |
57 | install(TARGETS nc DESTINATION bin) | 57 | install(TARGETS nc DESTINATION ${CMAKE_INSTALL_BINDIR}) |
58 | install(FILES nc.1 DESTINATION share/man/man1) | 58 | install(FILES nc.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) |
59 | endif(ENABLE_LIBRESSL_INSTALL) | 59 | endif(ENABLE_LIBRESSL_INSTALL) |
60 | endif() | 60 | endif() |
61 | 61 | ||
diff --git a/apps/ocspcheck/CMakeLists.txt b/apps/ocspcheck/CMakeLists.txt index 064c367..af245f4 100644 --- a/apps/ocspcheck/CMakeLists.txt +++ b/apps/ocspcheck/CMakeLists.txt | |||
@@ -37,8 +37,9 @@ add_executable(ocspcheck ${OCSPCHECK_SRC}) | |||
37 | target_link_libraries(ocspcheck tls ${OPENSSL_LIBS}) | 37 | target_link_libraries(ocspcheck tls ${OPENSSL_LIBS}) |
38 | 38 | ||
39 | if(ENABLE_LIBRESSL_INSTALL) | 39 | if(ENABLE_LIBRESSL_INSTALL) |
40 | install(TARGETS ocspcheck DESTINATION bin) | 40 | install(TARGETS ocspcheck DESTINATION ${CMAKE_INSTALL_BINDIR}) |
41 | install(FILES ocspcheck.8 DESTINATION share/man/man8) | 41 | install(FILES ocspcheck.8 DESTINATION ${CMAKE_INSTALL_MANDIR}/man8) |
42 | |||
42 | endif(ENABLE_LIBRESSL_INSTALL) | 43 | endif(ENABLE_LIBRESSL_INSTALL) |
43 | 44 | ||
44 | endif() | 45 | endif() |
diff --git a/apps/openssl/CMakeLists.txt b/apps/openssl/CMakeLists.txt index cf5c852..71fbd63 100644 --- a/apps/openssl/CMakeLists.txt +++ b/apps/openssl/CMakeLists.txt | |||
@@ -77,8 +77,8 @@ add_executable(openssl ${OPENSSL_SRC}) | |||
77 | target_link_libraries(openssl ${OPENSSL_LIBS}) | 77 | target_link_libraries(openssl ${OPENSSL_LIBS}) |
78 | 78 | ||
79 | if(ENABLE_LIBRESSL_INSTALL) | 79 | if(ENABLE_LIBRESSL_INSTALL) |
80 | install(TARGETS openssl DESTINATION bin) | 80 | install(TARGETS openssl DESTINATION ${CMAKE_INSTALL_BINDIR}) |
81 | install(FILES openssl.1 DESTINATION share/man/man1) | 81 | install(FILES openssl.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) |
82 | endif(ENABLE_LIBRESSL_INSTALL) | 82 | endif(ENABLE_LIBRESSL_INSTALL) |
83 | 83 | ||
84 | if(NOT "${OPENSSLDIR}" STREQUAL "") | 84 | if(NOT "${OPENSSLDIR}" STREQUAL "") |
diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt index a2b4817..aa289aa 100644 --- a/crypto/CMakeLists.txt +++ b/crypto/CMakeLists.txt | |||
@@ -830,12 +830,12 @@ if (BUILD_SHARED) | |||
830 | set_target_properties(crypto-shared PROPERTIES VERSION | 830 | set_target_properties(crypto-shared PROPERTIES VERSION |
831 | ${CRYPTO_VERSION} SOVERSION ${CRYPTO_MAJOR_VERSION}) | 831 | ${CRYPTO_VERSION} SOVERSION ${CRYPTO_MAJOR_VERSION}) |
832 | if(ENABLE_LIBRESSL_INSTALL) | 832 | if(ENABLE_LIBRESSL_INSTALL) |
833 | install(TARGETS crypto crypto-shared DESTINATION lib) | 833 | install(TARGETS crypto crypto-shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
834 | endif(ENABLE_LIBRESSL_INSTALL) | 834 | endif(ENABLE_LIBRESSL_INSTALL) |
835 | else() | 835 | else() |
836 | add_library(crypto STATIC ${CRYPTO_SRC}) | 836 | add_library(crypto STATIC ${CRYPTO_SRC}) |
837 | if(ENABLE_LIBRESSL_INSTALL) | 837 | if(ENABLE_LIBRESSL_INSTALL) |
838 | install(TARGETS crypto DESTINATION lib) | 838 | install(TARGETS crypto DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
839 | endif(ENABLE_LIBRESSL_INSTALL) | 839 | endif(ENABLE_LIBRESSL_INSTALL) |
840 | endif() | 840 | endif() |
841 | 841 | ||
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 870c740..b730954 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | if(ENABLE_LIBRESSL_INSTALL) | 1 | if(ENABLE_LIBRESSL_INSTALL) |
2 | install(DIRECTORY . | 2 | install(DIRECTORY . |
3 | DESTINATION include | 3 | DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} |
4 | PATTERN "CMakeLists.txt" EXCLUDE | 4 | PATTERN "CMakeLists.txt" EXCLUDE |
5 | PATTERN "compat" EXCLUDE | 5 | PATTERN "compat" EXCLUDE |
6 | PATTERN "Makefile*" EXCLUDE) | 6 | PATTERN "Makefile*" EXCLUDE) |
7 | endif(ENABLE_LIBRESSL_INSTALL) | 7 | endif(ENABLE_LIBRESSL_INSTALL) |
diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt index f08091c..639b9ed 100644 --- a/man/CMakeLists.txt +++ b/man/CMakeLists.txt | |||
@@ -1,11 +1,11 @@ | |||
1 | if(ENABLE_LIBRESSL_INSTALL) | 1 | if(ENABLE_LIBRESSL_INSTALL) |
2 | install(DIRECTORY . | 2 | install(DIRECTORY . |
3 | DESTINATION share/man/man3 | 3 | DESTINATION ${CMAKE_INSTALL_MANDIR}/man3 |
4 | FILES_MATCHING PATTERN "*.3" | 4 | FILES_MATCHING PATTERN "*.3" |
5 | ) | 5 | ) |
6 | 6 | ||
7 | install(DIRECTORY . | 7 | install(DIRECTORY . |
8 | DESTINATION share/man/man1 | 8 | DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 |
9 | FILES_MATCHING PATTERN "*.1" | 9 | FILES_MATCHING PATTERN "*.1" |
10 | ) | 10 | ) |
11 | endif(ENABLE_LIBRESSL_INSTALL) | 11 | endif(ENABLE_LIBRESSL_INSTALL) |
diff --git a/patches/netcat.c.patch b/patches/netcat.c.patch index 1088249..7160d4c 100644 --- a/patches/netcat.c.patch +++ b/patches/netcat.c.patch | |||
@@ -1,16 +1,16 @@ | |||
1 | --- apps/nc/netcat.c.orig Sat Jun 3 19:34:23 2017 | 1 | --- apps/nc/netcat.c.orig 2017-07-07 00:10:09.009409624 +0900 |
2 | +++ apps/nc/netcat.c Sat Jun 3 19:51:37 2017 | 2 | +++ apps/nc/netcat.c 2017-07-07 00:30:32.380088772 +0900 |
3 | @@ -65,7 +65,9 @@ | 3 | @@ -66,7 +66,9 @@ |
4 | #define POLL_NETIN 2 | 4 | #define POLL_NETIN 2 |
5 | #define POLL_STDOUT 3 | 5 | #define POLL_STDOUT 3 |
6 | #define BUFSIZE 16384 | 6 | #define BUFSIZE 16384 |
7 | +#ifndef DEFAULT_CA_FILE | 7 | +#ifndef DEFAULT_CA_FILE |
8 | #define DEFAULT_CA_FILE "/etc/ssl/cert.pem" | 8 | #define DEFAULT_CA_FILE "/etc/ssl/cert.pem" |
9 | +#endif | 9 | +#endif |
10 | 10 | ||
11 | #define TLS_ALL (1 << 1) | 11 | #define TLS_ALL (1 << 1) |
12 | #define TLS_NOVERIFY (1 << 2) | 12 | #define TLS_NOVERIFY (1 << 2) |
13 | @@ -93,9 +95,13 @@ | 13 | @@ -94,9 +96,13 @@ int zflag; /* Port Scan Flag */ |
14 | int Dflag; /* sodebug */ | 14 | int Dflag; /* sodebug */ |
15 | int Iflag; /* TCP receive buffer size */ | 15 | int Iflag; /* TCP receive buffer size */ |
16 | int Oflag; /* TCP send buffer size */ | 16 | int Oflag; /* TCP send buffer size */ |
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | int usetls; /* use TLS */ | 25 | int usetls; /* use TLS */ |
26 | char *Cflag; /* Public cert file */ | 26 | char *Cflag; /* Public cert file */ |
27 | @@ -264,12 +270,14 @@ | 27 | @@ -265,12 +271,14 @@ main(int argc, char *argv[]) |
28 | case 'u': | 28 | case 'u': |
29 | uflag = 1; | 29 | uflag = 1; |
30 | break; | 30 | break; |
@@ -39,7 +39,7 @@ | |||
39 | case 'v': | 39 | case 'v': |
40 | vflag = 1; | 40 | vflag = 1; |
41 | break; | 41 | break; |
42 | @@ -316,9 +324,11 @@ | 42 | @@ -317,9 +325,11 @@ main(int argc, char *argv[]) |
43 | case 'o': | 43 | case 'o': |
44 | oflag = optarg; | 44 | oflag = optarg; |
45 | break; | 45 | break; |
@@ -51,7 +51,7 @@ | |||
51 | case 'T': | 51 | case 'T': |
52 | errstr = NULL; | 52 | errstr = NULL; |
53 | errno = 0; | 53 | errno = 0; |
54 | @@ -342,9 +352,11 @@ | 54 | @@ -343,9 +353,11 @@ main(int argc, char *argv[]) |
55 | argc -= optind; | 55 | argc -= optind; |
56 | argv += optind; | 56 | argv += optind; |
57 | 57 | ||
@@ -63,7 +63,7 @@ | |||
63 | 63 | ||
64 | if (family == AF_UNIX) { | 64 | if (family == AF_UNIX) { |
65 | if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1) | 65 | if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1) |
66 | @@ -889,7 +901,10 @@ | 66 | @@ -888,7 +900,10 @@ int |
67 | remote_connect(const char *host, const char *port, struct addrinfo hints) | 67 | remote_connect(const char *host, const char *port, struct addrinfo hints) |
68 | { | 68 | { |
69 | struct addrinfo *res, *res0; | 69 | struct addrinfo *res, *res0; |
@@ -75,7 +75,7 @@ | |||
75 | 75 | ||
76 | if ((error = getaddrinfo(host, port, &hints, &res0))) | 76 | if ((error = getaddrinfo(host, port, &hints, &res0))) |
77 | errx(1, "getaddrinfo for host \"%s\" port %s: %s", host, | 77 | errx(1, "getaddrinfo for host \"%s\" port %s: %s", host, |
78 | @@ -904,8 +919,10 @@ | 78 | @@ -903,8 +918,10 @@ remote_connect(const char *host, const c |
79 | if (sflag || pflag) { | 79 | if (sflag || pflag) { |
80 | struct addrinfo ahints, *ares; | 80 | struct addrinfo ahints, *ares; |
81 | 81 | ||
@@ -86,7 +86,7 @@ | |||
86 | memset(&ahints, 0, sizeof(struct addrinfo)); | 86 | memset(&ahints, 0, sizeof(struct addrinfo)); |
87 | ahints.ai_family = res->ai_family; | 87 | ahints.ai_family = res->ai_family; |
88 | ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM; | 88 | ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM; |
89 | @@ -976,7 +993,10 @@ | 89 | @@ -975,7 +992,10 @@ int |
90 | local_listen(char *host, char *port, struct addrinfo hints) | 90 | local_listen(char *host, char *port, struct addrinfo hints) |
91 | { | 91 | { |
92 | struct addrinfo *res, *res0; | 92 | struct addrinfo *res, *res0; |
@@ -98,7 +98,7 @@ | |||
98 | int error; | 98 | int error; |
99 | 99 | ||
100 | /* Allow nodename to be null. */ | 100 | /* Allow nodename to be null. */ |
101 | @@ -997,9 +1017,11 @@ | 101 | @@ -996,9 +1016,11 @@ local_listen(char *host, char *port, str |
102 | res->ai_protocol)) < 0) | 102 | res->ai_protocol)) < 0) |
103 | continue; | 103 | continue; |
104 | 104 | ||
@@ -110,7 +110,7 @@ | |||
110 | 110 | ||
111 | set_common_sockopts(s, res->ai_family); | 111 | set_common_sockopts(s, res->ai_family); |
112 | 112 | ||
113 | @@ -1455,11 +1477,13 @@ | 113 | @@ -1454,11 +1476,13 @@ set_common_sockopts(int s, int af) |
114 | { | 114 | { |
115 | int x = 1; | 115 | int x = 1; |
116 | 116 | ||
@@ -124,7 +124,7 @@ | |||
124 | if (Dflag) { | 124 | if (Dflag) { |
125 | if (setsockopt(s, SOL_SOCKET, SO_DEBUG, | 125 | if (setsockopt(s, SOL_SOCKET, SO_DEBUG, |
126 | &x, sizeof(x)) == -1) | 126 | &x, sizeof(x)) == -1) |
127 | @@ -1470,9 +1494,16 @@ | 127 | @@ -1469,9 +1493,16 @@ set_common_sockopts(int s, int af) |
128 | IP_TOS, &Tflag, sizeof(Tflag)) == -1) | 128 | IP_TOS, &Tflag, sizeof(Tflag)) == -1) |
129 | err(1, "set IP ToS"); | 129 | err(1, "set IP ToS"); |
130 | 130 | ||
@@ -141,7 +141,7 @@ | |||
141 | } | 141 | } |
142 | if (Iflag) { | 142 | if (Iflag) { |
143 | if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, | 143 | if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, |
144 | @@ -1496,13 +1527,17 @@ | 144 | @@ -1495,13 +1526,17 @@ set_common_sockopts(int s, int af) |
145 | } | 145 | } |
146 | 146 | ||
147 | if (minttl != -1) { | 147 | if (minttl != -1) { |
@@ -160,7 +160,7 @@ | |||
160 | } | 160 | } |
161 | } | 161 | } |
162 | 162 | ||
163 | @@ -1710,14 +1745,22 @@ | 163 | @@ -1709,14 +1744,22 @@ help(void) |
164 | \t-P proxyuser\tUsername for proxy authentication\n\ | 164 | \t-P proxyuser\tUsername for proxy authentication\n\ |
165 | \t-p port\t Specify local port for remote connects\n\ | 165 | \t-p port\t Specify local port for remote connects\n\ |
166 | \t-R CAfile CA bundle\n\ | 166 | \t-R CAfile CA bundle\n\ |
diff --git a/ssl/CMakeLists.txt b/ssl/CMakeLists.txt index 0e1c326..bad7276 100644 --- a/ssl/CMakeLists.txt +++ b/ssl/CMakeLists.txt | |||
@@ -61,11 +61,11 @@ if (BUILD_SHARED) | |||
61 | set_target_properties(ssl-shared PROPERTIES VERSION ${SSL_VERSION} | 61 | set_target_properties(ssl-shared PROPERTIES VERSION ${SSL_VERSION} |
62 | SOVERSION ${SSL_MAJOR_VERSION}) | 62 | SOVERSION ${SSL_MAJOR_VERSION}) |
63 | if(ENABLE_LIBRESSL_INSTALL) | 63 | if(ENABLE_LIBRESSL_INSTALL) |
64 | install(TARGETS ssl ssl-shared DESTINATION lib) | 64 | install(TARGETS ssl ssl-shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
65 | endif(ENABLE_LIBRESSL_INSTALL) | 65 | endif(ENABLE_LIBRESSL_INSTALL) |
66 | else() | 66 | else() |
67 | add_library(ssl STATIC ${SSL_SRC}) | 67 | add_library(ssl STATIC ${SSL_SRC}) |
68 | if(ENABLE_LIBRESSL_INSTALL) | 68 | if(ENABLE_LIBRESSL_INSTALL) |
69 | install(TARGETS ssl DESTINATION lib) | 69 | install(TARGETS ssl DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
70 | endif(ENABLE_LIBRESSL_INSTALL) | 70 | endif(ENABLE_LIBRESSL_INSTALL) |
71 | endif() | 71 | endif() |
diff --git a/tests/tlstest.bat b/tests/tlstest.bat index 4650d96..b7b1ecf 100644 --- a/tests/tlstest.bat +++ b/tests/tlstest.bat | |||
@@ -9,7 +9,7 @@ if "%srcdir%"=="" ( | |||
9 | set srcdir=. | 9 | set srcdir=. |
10 | ) | 10 | ) |
11 | 11 | ||
12 | %tlstest_bin% %srcdir%\server.pem %srcdir%\server.pem %srcdir%\ca.pem | 12 | %tlstest_bin% %srcdir%\ca.pem %srcdir%\server.pem %srcdir%\server.pem |
13 | if !errorlevel! neq 0 ( | 13 | if !errorlevel! neq 0 ( |
14 | exit /b 1 | 14 | exit /b 1 |
15 | ) | 15 | ) |
diff --git a/tls/CMakeLists.txt b/tls/CMakeLists.txt index ab73460..c8de04c 100644 --- a/tls/CMakeLists.txt +++ b/tls/CMakeLists.txt | |||
@@ -40,12 +40,12 @@ if (BUILD_SHARED) | |||
40 | set_target_properties(tls-shared PROPERTIES VERSION ${TLS_VERSION} | 40 | set_target_properties(tls-shared PROPERTIES VERSION ${TLS_VERSION} |
41 | SOVERSION ${TLS_MAJOR_VERSION}) | 41 | SOVERSION ${TLS_MAJOR_VERSION}) |
42 | if(ENABLE_LIBRESSL_INSTALL) | 42 | if(ENABLE_LIBRESSL_INSTALL) |
43 | install(TARGETS tls tls-shared DESTINATION lib) | 43 | install(TARGETS tls tls-shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
44 | endif(ENABLE_LIBRESSL_INSTALL) | 44 | endif(ENABLE_LIBRESSL_INSTALL) |
45 | else() | 45 | else() |
46 | add_library(tls STATIC ${TLS_SRC}) | 46 | add_library(tls STATIC ${TLS_SRC}) |
47 | if(ENABLE_LIBRESSL_INSTALL) | 47 | if(ENABLE_LIBRESSL_INSTALL) |
48 | install(TARGETS tls DESTINATION lib) | 48 | install(TARGETS tls DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
49 | endif(ENABLE_LIBRESSL_INSTALL) | 49 | endif(ENABLE_LIBRESSL_INSTALL) |
50 | endif() | 50 | endif() |
51 | 51 | ||